@fctc/interface-logic 1.5.2 → 1.5.3
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/configs.js +107 -96
- package/dist/configs.mjs +108 -96
- package/dist/environment.js +137 -122
- package/dist/environment.mjs +140 -122
- package/dist/hooks.js +1556 -1393
- package/dist/hooks.mjs +1559 -1393
- package/dist/provider.d.mts +4 -3
- package/dist/provider.d.ts +4 -3
- package/dist/provider.js +562 -509
- package/dist/provider.mjs +565 -509
- package/dist/services.js +1529 -1364
- package/dist/services.mjs +1524 -1356
- package/dist/store.js +19 -5
- package/dist/store.mjs +22 -5
- package/dist/utils.js +116 -94
- package/dist/utils.mjs +119 -94
- package/package.json +1 -1
package/dist/hooks.js
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
9
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __pow = Math.pow;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
+
var __spreadValues = (a, b) => {
|
|
15
|
+
for (var prop in b || (b = {}))
|
|
16
|
+
if (__hasOwnProp.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
if (__getOwnPropSymbols)
|
|
19
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
+
if (__propIsEnum.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
8
26
|
var __export = (target, all) => {
|
|
9
27
|
for (var name in all)
|
|
10
28
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -26,6 +44,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
44
|
mod
|
|
27
45
|
));
|
|
28
46
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
47
|
+
var __async = (__this, __arguments, generator) => {
|
|
48
|
+
return new Promise((resolve, reject) => {
|
|
49
|
+
var fulfilled = (value) => {
|
|
50
|
+
try {
|
|
51
|
+
step(generator.next(value));
|
|
52
|
+
} catch (e) {
|
|
53
|
+
reject(e);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var rejected = (value) => {
|
|
57
|
+
try {
|
|
58
|
+
step(generator.throw(value));
|
|
59
|
+
} catch (e) {
|
|
60
|
+
reject(e);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
64
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
65
|
+
});
|
|
66
|
+
};
|
|
29
67
|
|
|
30
68
|
// src/hooks.ts
|
|
31
69
|
var hooks_exports = {};
|
|
@@ -1225,22 +1263,6 @@ var PyRelativeDelta = class _PyRelativeDelta {
|
|
|
1225
1263
|
this.microsecond = params.microsecond;
|
|
1226
1264
|
this.weekday = params.weekday;
|
|
1227
1265
|
}
|
|
1228
|
-
years;
|
|
1229
|
-
months;
|
|
1230
|
-
days;
|
|
1231
|
-
hours;
|
|
1232
|
-
minutes;
|
|
1233
|
-
seconds;
|
|
1234
|
-
microseconds;
|
|
1235
|
-
leapDays;
|
|
1236
|
-
year;
|
|
1237
|
-
month;
|
|
1238
|
-
day;
|
|
1239
|
-
hour;
|
|
1240
|
-
minute;
|
|
1241
|
-
second;
|
|
1242
|
-
microsecond;
|
|
1243
|
-
weekday;
|
|
1244
1266
|
negate() {
|
|
1245
1267
|
return new _PyRelativeDelta(this, -1);
|
|
1246
1268
|
}
|
|
@@ -1355,7 +1377,7 @@ function execOnIterable(iterable, func) {
|
|
|
1355
1377
|
if (typeof iterable === "object" && !Array.isArray(iterable) && !(iterable instanceof Set)) {
|
|
1356
1378
|
iterable = Object.keys(iterable);
|
|
1357
1379
|
}
|
|
1358
|
-
if (typeof iterable
|
|
1380
|
+
if (typeof (iterable == null ? void 0 : iterable[Symbol.iterator]) !== "function") {
|
|
1359
1381
|
throw new EvaluationError("value not iterable");
|
|
1360
1382
|
}
|
|
1361
1383
|
return func(iterable);
|
|
@@ -1678,7 +1700,7 @@ function applyBinaryOp(ast, context) {
|
|
|
1678
1700
|
}
|
|
1679
1701
|
return Math.floor(left / right);
|
|
1680
1702
|
case "**":
|
|
1681
|
-
return left
|
|
1703
|
+
return __pow(left, right);
|
|
1682
1704
|
case "==":
|
|
1683
1705
|
return isEqual(left, right);
|
|
1684
1706
|
case "<>":
|
|
@@ -1800,7 +1822,7 @@ function evaluate(ast, context = {}) {
|
|
|
1800
1822
|
const dicts = /* @__PURE__ */ new Set();
|
|
1801
1823
|
let pyContext;
|
|
1802
1824
|
const evalContext = Object.create(context);
|
|
1803
|
-
if (!evalContext
|
|
1825
|
+
if (!(evalContext == null ? void 0 : evalContext.context)) {
|
|
1804
1826
|
Object.defineProperty(evalContext, "context", {
|
|
1805
1827
|
get() {
|
|
1806
1828
|
if (!pyContext) {
|
|
@@ -1811,17 +1833,18 @@ function evaluate(ast, context = {}) {
|
|
|
1811
1833
|
});
|
|
1812
1834
|
}
|
|
1813
1835
|
function _innerEvaluate(ast2) {
|
|
1814
|
-
|
|
1836
|
+
var _a, _b, _c;
|
|
1837
|
+
switch (ast2 == null ? void 0 : ast2.type) {
|
|
1815
1838
|
case 0:
|
|
1816
1839
|
// Number
|
|
1817
1840
|
case 1:
|
|
1818
1841
|
return ast2.value;
|
|
1819
1842
|
case 5:
|
|
1820
1843
|
if (ast2.value in evalContext) {
|
|
1821
|
-
if (typeof evalContext[ast2.value] === "object" && evalContext[ast2.value]
|
|
1822
|
-
return evalContext[ast2.value]
|
|
1844
|
+
if (typeof evalContext[ast2.value] === "object" && ((_a = evalContext[ast2.value]) == null ? void 0 : _a.id)) {
|
|
1845
|
+
return (_b = evalContext[ast2.value]) == null ? void 0 : _b.id;
|
|
1823
1846
|
}
|
|
1824
|
-
return evalContext[ast2.value]
|
|
1847
|
+
return (_c = evalContext[ast2.value]) != null ? _c : false;
|
|
1825
1848
|
} else if (ast2.value in BUILTINS) {
|
|
1826
1849
|
return BUILTINS[ast2.value];
|
|
1827
1850
|
} else {
|
|
@@ -1858,7 +1881,7 @@ function evaluate(ast, context = {}) {
|
|
|
1858
1881
|
const args = ast2.args.map(_evaluate);
|
|
1859
1882
|
const kwargs = {};
|
|
1860
1883
|
for (const kwarg in ast2.kwargs) {
|
|
1861
|
-
kwargs[kwarg] = _evaluate(ast2
|
|
1884
|
+
kwargs[kwarg] = _evaluate(ast2 == null ? void 0 : ast2.kwargs[kwarg]);
|
|
1862
1885
|
}
|
|
1863
1886
|
if (fnValue === PyDate || fnValue === PyDateTime || fnValue === PyTime || fnValue === PyRelativeDelta || fnValue === PyTimeDelta) {
|
|
1864
1887
|
return fnValue.create(...args, kwargs);
|
|
@@ -1937,9 +1960,25 @@ function escapeRegExp(str) {
|
|
|
1937
1960
|
var InvalidDomainError = class extends Error {
|
|
1938
1961
|
};
|
|
1939
1962
|
var Domain = class _Domain {
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1963
|
+
constructor(descr = []) {
|
|
1964
|
+
this.ast = { type: -1, value: null };
|
|
1965
|
+
if (descr instanceof _Domain) {
|
|
1966
|
+
return new _Domain(descr.toString());
|
|
1967
|
+
} else {
|
|
1968
|
+
let rawAST;
|
|
1969
|
+
try {
|
|
1970
|
+
rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
|
|
1971
|
+
} catch (error) {
|
|
1972
|
+
throw new InvalidDomainError(
|
|
1973
|
+
`Invalid domain representation: ${descr}`,
|
|
1974
|
+
{
|
|
1975
|
+
cause: error
|
|
1976
|
+
}
|
|
1977
|
+
);
|
|
1978
|
+
}
|
|
1979
|
+
this.ast = normalizeDomainAST(rawAST);
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1943
1982
|
static combine(domains, operator) {
|
|
1944
1983
|
if (domains.length === 0) {
|
|
1945
1984
|
return new _Domain([]);
|
|
@@ -2018,24 +2057,6 @@ var Domain = class _Domain {
|
|
|
2018
2057
|
processLeaf(d.ast.value, 0, "&", newDomain);
|
|
2019
2058
|
return newDomain;
|
|
2020
2059
|
}
|
|
2021
|
-
constructor(descr = []) {
|
|
2022
|
-
if (descr instanceof _Domain) {
|
|
2023
|
-
return new _Domain(descr.toString());
|
|
2024
|
-
} else {
|
|
2025
|
-
let rawAST;
|
|
2026
|
-
try {
|
|
2027
|
-
rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
|
|
2028
|
-
} catch (error) {
|
|
2029
|
-
throw new InvalidDomainError(
|
|
2030
|
-
`Invalid domain representation: ${descr}`,
|
|
2031
|
-
{
|
|
2032
|
-
cause: error
|
|
2033
|
-
}
|
|
2034
|
-
);
|
|
2035
|
-
}
|
|
2036
|
-
this.ast = normalizeDomainAST(rawAST);
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
2060
|
contains(record) {
|
|
2040
2061
|
const expr = evaluate(this.ast, record);
|
|
2041
2062
|
return matchDomain(record, expr);
|
|
@@ -2054,7 +2075,7 @@ var Domain = class _Domain {
|
|
|
2054
2075
|
return evaluatedAsList;
|
|
2055
2076
|
}
|
|
2056
2077
|
return this.toString();
|
|
2057
|
-
} catch {
|
|
2078
|
+
} catch (e) {
|
|
2058
2079
|
return this.toString();
|
|
2059
2080
|
}
|
|
2060
2081
|
}
|
|
@@ -2297,22 +2318,22 @@ var updateTokenParamInOriginalRequest = (originalRequest, newAccessToken) => {
|
|
|
2297
2318
|
|
|
2298
2319
|
// src/utils/storage/local-storage.ts
|
|
2299
2320
|
var localStorageUtils = () => {
|
|
2300
|
-
const setToken =
|
|
2321
|
+
const setToken = (access_token) => __async(null, null, function* () {
|
|
2301
2322
|
localStorage.setItem("accessToken", access_token);
|
|
2302
|
-
};
|
|
2303
|
-
const setRefreshToken =
|
|
2323
|
+
});
|
|
2324
|
+
const setRefreshToken = (refresh_token) => __async(null, null, function* () {
|
|
2304
2325
|
localStorage.setItem("refreshToken", refresh_token);
|
|
2305
|
-
};
|
|
2306
|
-
const getAccessToken =
|
|
2326
|
+
});
|
|
2327
|
+
const getAccessToken = () => __async(null, null, function* () {
|
|
2307
2328
|
return localStorage.getItem("accessToken");
|
|
2308
|
-
};
|
|
2309
|
-
const getRefreshToken =
|
|
2329
|
+
});
|
|
2330
|
+
const getRefreshToken = () => __async(null, null, function* () {
|
|
2310
2331
|
return localStorage.getItem("refreshToken");
|
|
2311
|
-
};
|
|
2312
|
-
const clearToken =
|
|
2332
|
+
});
|
|
2333
|
+
const clearToken = () => __async(null, null, function* () {
|
|
2313
2334
|
localStorage.removeItem("accessToken");
|
|
2314
2335
|
localStorage.removeItem("refreshToken");
|
|
2315
|
-
};
|
|
2336
|
+
});
|
|
2316
2337
|
return {
|
|
2317
2338
|
setToken,
|
|
2318
2339
|
setRefreshToken,
|
|
@@ -2324,9 +2345,9 @@ var localStorageUtils = () => {
|
|
|
2324
2345
|
|
|
2325
2346
|
// src/utils/storage/session-storage.ts
|
|
2326
2347
|
var sessionStorageUtils = () => {
|
|
2327
|
-
const getBrowserSession =
|
|
2348
|
+
const getBrowserSession = () => __async(null, null, function* () {
|
|
2328
2349
|
return sessionStorage.getItem("browserSession");
|
|
2329
|
-
};
|
|
2350
|
+
});
|
|
2330
2351
|
return {
|
|
2331
2352
|
getBrowserSession
|
|
2332
2353
|
};
|
|
@@ -2335,13 +2356,14 @@ var sessionStorageUtils = () => {
|
|
|
2335
2356
|
// src/configs/axios-client.ts
|
|
2336
2357
|
var axiosClient = {
|
|
2337
2358
|
init(config) {
|
|
2338
|
-
|
|
2339
|
-
const
|
|
2359
|
+
var _a, _b;
|
|
2360
|
+
const localStorage2 = (_a = config.localStorageUtils) != null ? _a : localStorageUtils();
|
|
2361
|
+
const sessionStorage2 = (_b = config.sessionStorageUtils) != null ? _b : sessionStorageUtils();
|
|
2340
2362
|
const db = config.db;
|
|
2341
2363
|
let isRefreshing = false;
|
|
2342
2364
|
let failedQueue = [];
|
|
2343
2365
|
const processQueue = (error, token = null) => {
|
|
2344
|
-
failedQueue
|
|
2366
|
+
failedQueue == null ? void 0 : failedQueue.forEach((prom) => {
|
|
2345
2367
|
if (error) {
|
|
2346
2368
|
prom.reject(error);
|
|
2347
2369
|
} else {
|
|
@@ -2357,14 +2379,14 @@ var axiosClient = {
|
|
|
2357
2379
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2358
2380
|
});
|
|
2359
2381
|
instance.interceptors.request.use(
|
|
2360
|
-
|
|
2382
|
+
(config2) => __async(null, null, function* () {
|
|
2361
2383
|
const useRefreshToken = config2.useRefreshToken;
|
|
2362
|
-
const token = useRefreshToken ?
|
|
2384
|
+
const token = useRefreshToken ? yield localStorage2.getRefreshToken() : yield localStorage2.getAccessToken();
|
|
2363
2385
|
if (token) {
|
|
2364
2386
|
config2.headers["Authorization"] = "Bearer " + token;
|
|
2365
2387
|
}
|
|
2366
2388
|
return config2;
|
|
2367
|
-
},
|
|
2389
|
+
}),
|
|
2368
2390
|
(error) => {
|
|
2369
2391
|
Promise.reject(error);
|
|
2370
2392
|
}
|
|
@@ -2373,19 +2395,21 @@ var axiosClient = {
|
|
|
2373
2395
|
(response) => {
|
|
2374
2396
|
return handleResponse(response);
|
|
2375
2397
|
},
|
|
2376
|
-
|
|
2377
|
-
|
|
2398
|
+
(error) => __async(null, null, function* () {
|
|
2399
|
+
var _a2, _b2, _c;
|
|
2400
|
+
const handleError3 = (error2) => __async(null, null, function* () {
|
|
2401
|
+
var _a3;
|
|
2378
2402
|
if (!error2.response) {
|
|
2379
2403
|
return error2;
|
|
2380
2404
|
}
|
|
2381
2405
|
const { data } = error2.response;
|
|
2382
|
-
if (data && data.code === 400 && ["invalid_grant"].includes(data.data
|
|
2383
|
-
|
|
2406
|
+
if (data && data.code === 400 && ["invalid_grant"].includes((_a3 = data.data) == null ? void 0 : _a3.error)) {
|
|
2407
|
+
yield clearAuthToken();
|
|
2384
2408
|
}
|
|
2385
2409
|
return data;
|
|
2386
|
-
};
|
|
2410
|
+
});
|
|
2387
2411
|
const originalRequest = error.config;
|
|
2388
|
-
if ((error.response
|
|
2412
|
+
if ((((_a2 = error.response) == null ? void 0 : _a2.status) === 403 || ((_b2 = error.response) == null ? void 0 : _b2.status) === 401 || ((_c = error.response) == null ? void 0 : _c.status) === 404) && ["TOKEN_EXPIRED", "AUTHEN_FAIL", 401, "ERR_2FA_006"].includes(
|
|
2389
2413
|
error.response.data.code
|
|
2390
2414
|
)) {
|
|
2391
2415
|
if (isRefreshing) {
|
|
@@ -2398,18 +2422,19 @@ var axiosClient = {
|
|
|
2398
2422
|
token
|
|
2399
2423
|
);
|
|
2400
2424
|
return instance.request(originalRequest);
|
|
2401
|
-
}).catch(
|
|
2402
|
-
|
|
2403
|
-
|
|
2425
|
+
}).catch((err) => __async(null, null, function* () {
|
|
2426
|
+
var _a3, _b3;
|
|
2427
|
+
if ((((_a3 = err.response) == null ? void 0 : _a3.status) === 400 || ((_b3 = err.response) == null ? void 0 : _b3.status) === 401) && ["invalid_grant"].includes(err.response.data.error)) {
|
|
2428
|
+
yield clearAuthToken();
|
|
2404
2429
|
}
|
|
2405
|
-
});
|
|
2430
|
+
}));
|
|
2406
2431
|
}
|
|
2407
|
-
const browserSession =
|
|
2408
|
-
const refreshToken =
|
|
2409
|
-
const accessTokenExp =
|
|
2432
|
+
const browserSession = yield sessionStorage2.getBrowserSession();
|
|
2433
|
+
const refreshToken = yield localStorage2.getRefreshToken();
|
|
2434
|
+
const accessTokenExp = yield localStorage2.getAccessToken();
|
|
2410
2435
|
isRefreshing = true;
|
|
2411
2436
|
if (!refreshToken && (!browserSession || browserSession == "unActive")) {
|
|
2412
|
-
|
|
2437
|
+
yield clearAuthToken();
|
|
2413
2438
|
} else {
|
|
2414
2439
|
const payload = Object.fromEntries(
|
|
2415
2440
|
Object.entries({
|
|
@@ -2420,8 +2445,9 @@ var axiosClient = {
|
|
|
2420
2445
|
}).filter(([_, value]) => !!value)
|
|
2421
2446
|
);
|
|
2422
2447
|
return new Promise(function(resolve) {
|
|
2448
|
+
var _a3;
|
|
2423
2449
|
import_axios.default.post(
|
|
2424
|
-
`${config.baseUrl}${config.refreshTokenEndpoint
|
|
2450
|
+
`${config.baseUrl}${(_a3 = config.refreshTokenEndpoint) != null ? _a3 : "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
|
|
2425
2451
|
payload,
|
|
2426
2452
|
{
|
|
2427
2453
|
headers: {
|
|
@@ -2429,10 +2455,10 @@ var axiosClient = {
|
|
|
2429
2455
|
Authorization: `Bearer ${accessTokenExp}`
|
|
2430
2456
|
}
|
|
2431
2457
|
}
|
|
2432
|
-
).then(
|
|
2458
|
+
).then((res) => __async(null, null, function* () {
|
|
2433
2459
|
const data = res.data;
|
|
2434
|
-
|
|
2435
|
-
|
|
2460
|
+
yield localStorage2.setToken(data.access_token);
|
|
2461
|
+
yield localStorage2.setRefreshToken(data.refresh_token);
|
|
2436
2462
|
import_axios.default.defaults.headers.common["Authorization"] = "Bearer " + data.access_token;
|
|
2437
2463
|
originalRequest.headers["Authorization"] = "Bearer " + data.access_token;
|
|
2438
2464
|
originalRequest.data = updateTokenParamInOriginalRequest(
|
|
@@ -2441,25 +2467,26 @@ var axiosClient = {
|
|
|
2441
2467
|
);
|
|
2442
2468
|
processQueue(null, data.access_token);
|
|
2443
2469
|
resolve(instance.request(originalRequest));
|
|
2444
|
-
}).catch(
|
|
2445
|
-
|
|
2446
|
-
|
|
2470
|
+
})).catch((err) => __async(null, null, function* () {
|
|
2471
|
+
var _a4;
|
|
2472
|
+
if (err && ((err == null ? void 0 : err.error_code) === "AUTHEN_FAIL" || (err == null ? void 0 : err.error_code) === "TOKEN_EXPIRED" || (err == null ? void 0 : err.error_code) === "TOKEN_INCORRECT" || (err == null ? void 0 : err.code) === "ERR_BAD_REQUEST") || (err == null ? void 0 : err.error_code) === "ERR_2FA_006") {
|
|
2473
|
+
yield clearAuthToken();
|
|
2447
2474
|
}
|
|
2448
2475
|
if (err && err.response) {
|
|
2449
|
-
const { error_code } = err.response
|
|
2476
|
+
const { error_code } = ((_a4 = err.response) == null ? void 0 : _a4.data) || {};
|
|
2450
2477
|
if (error_code === "AUTHEN_FAIL") {
|
|
2451
|
-
|
|
2478
|
+
yield clearAuthToken();
|
|
2452
2479
|
}
|
|
2453
2480
|
}
|
|
2454
2481
|
processQueue(err, null);
|
|
2455
|
-
}).finally(() => {
|
|
2482
|
+
})).finally(() => {
|
|
2456
2483
|
isRefreshing = false;
|
|
2457
2484
|
});
|
|
2458
2485
|
});
|
|
2459
2486
|
}
|
|
2460
2487
|
}
|
|
2461
|
-
return Promise.reject(
|
|
2462
|
-
}
|
|
2488
|
+
return Promise.reject(yield handleError3(error));
|
|
2489
|
+
})
|
|
2463
2490
|
);
|
|
2464
2491
|
const handleResponse = (res) => {
|
|
2465
2492
|
if (res && res.data) {
|
|
@@ -2468,6 +2495,7 @@ var axiosClient = {
|
|
|
2468
2495
|
return res;
|
|
2469
2496
|
};
|
|
2470
2497
|
const handleError2 = (error) => {
|
|
2498
|
+
var _a2, _b2, _c;
|
|
2471
2499
|
if (error.isAxiosError && error.code === "ECONNABORTED") {
|
|
2472
2500
|
console.error("Request Timeout Error:", error);
|
|
2473
2501
|
return "Request Timeout Error";
|
|
@@ -2475,17 +2503,17 @@ var axiosClient = {
|
|
|
2475
2503
|
console.error("Network Error:", error);
|
|
2476
2504
|
return "Network Error";
|
|
2477
2505
|
} else {
|
|
2478
|
-
console.error("Other Error:", error
|
|
2479
|
-
const errorMessage = error
|
|
2480
|
-
return { message: errorMessage, status: error
|
|
2506
|
+
console.error("Other Error:", error == null ? void 0 : error.response);
|
|
2507
|
+
const errorMessage = ((_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "An error occurred";
|
|
2508
|
+
return { message: errorMessage, status: (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.status };
|
|
2481
2509
|
}
|
|
2482
2510
|
};
|
|
2483
|
-
const clearAuthToken =
|
|
2484
|
-
|
|
2511
|
+
const clearAuthToken = () => __async(null, null, function* () {
|
|
2512
|
+
yield localStorage2.clearToken();
|
|
2485
2513
|
if (typeof window !== "undefined") {
|
|
2486
2514
|
window.location.href = `/login`;
|
|
2487
2515
|
}
|
|
2488
|
-
};
|
|
2516
|
+
});
|
|
2489
2517
|
function formatUrl(url, db2) {
|
|
2490
2518
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2491
2519
|
}
|
|
@@ -2698,7 +2726,7 @@ var headerSlice = (0, import_toolkit5.createSlice)({
|
|
|
2698
2726
|
},
|
|
2699
2727
|
reducers: {
|
|
2700
2728
|
setHeader: (state, action) => {
|
|
2701
|
-
state.value = {
|
|
2729
|
+
state.value = __spreadValues(__spreadValues({}, state.value), action.payload);
|
|
2702
2730
|
},
|
|
2703
2731
|
setAllowedCompanyIds: (state, action) => {
|
|
2704
2732
|
state.value.allowedCompanyIds = action.payload;
|
|
@@ -3124,18 +3152,6 @@ var envStore = (0, import_toolkit11.configureStore)({
|
|
|
3124
3152
|
|
|
3125
3153
|
// src/environment/EnvStore.ts
|
|
3126
3154
|
var EnvStore = class {
|
|
3127
|
-
envStore;
|
|
3128
|
-
baseUrl;
|
|
3129
|
-
requests;
|
|
3130
|
-
context;
|
|
3131
|
-
defaultCompany;
|
|
3132
|
-
config;
|
|
3133
|
-
companies;
|
|
3134
|
-
user;
|
|
3135
|
-
db;
|
|
3136
|
-
localStorageUtils;
|
|
3137
|
-
sessionStorageUtils;
|
|
3138
|
-
refreshTokenEndpoint;
|
|
3139
3155
|
constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
|
|
3140
3156
|
this.envStore = envStore2;
|
|
3141
3157
|
this.localStorageUtils = localStorageUtils2;
|
|
@@ -3144,25 +3160,24 @@ var EnvStore = class {
|
|
|
3144
3160
|
}
|
|
3145
3161
|
setup() {
|
|
3146
3162
|
const env2 = this.envStore.getState().env;
|
|
3147
|
-
this.baseUrl = env2
|
|
3148
|
-
this.requests = env2
|
|
3149
|
-
this.context = env2
|
|
3150
|
-
this.defaultCompany = env2
|
|
3151
|
-
this.config = env2
|
|
3152
|
-
this.companies = env2
|
|
3153
|
-
this.user = env2
|
|
3154
|
-
this.db = env2
|
|
3155
|
-
this.refreshTokenEndpoint = env2
|
|
3163
|
+
this.baseUrl = env2 == null ? void 0 : env2.baseUrl;
|
|
3164
|
+
this.requests = env2 == null ? void 0 : env2.requests;
|
|
3165
|
+
this.context = env2 == null ? void 0 : env2.context;
|
|
3166
|
+
this.defaultCompany = env2 == null ? void 0 : env2.defaultCompany;
|
|
3167
|
+
this.config = env2 == null ? void 0 : env2.config;
|
|
3168
|
+
this.companies = (env2 == null ? void 0 : env2.companies) || [];
|
|
3169
|
+
this.user = env2 == null ? void 0 : env2.user;
|
|
3170
|
+
this.db = env2 == null ? void 0 : env2.db;
|
|
3171
|
+
this.refreshTokenEndpoint = env2 == null ? void 0 : env2.refreshTokenEndpoint;
|
|
3156
3172
|
}
|
|
3157
3173
|
setupEnv(envConfig) {
|
|
3158
3174
|
const dispatch = this.envStore.dispatch;
|
|
3159
|
-
const env2 = {
|
|
3160
|
-
...envConfig,
|
|
3175
|
+
const env2 = __spreadProps(__spreadValues({}, envConfig), {
|
|
3161
3176
|
localStorageUtils: this.localStorageUtils,
|
|
3162
3177
|
sessionStorageUtils: this.sessionStorageUtils
|
|
3163
|
-
};
|
|
3178
|
+
});
|
|
3164
3179
|
const requests = axiosClient.init(env2);
|
|
3165
|
-
dispatch(setEnv({
|
|
3180
|
+
dispatch(setEnv(__spreadProps(__spreadValues({}, env2), { requests })));
|
|
3166
3181
|
this.setup();
|
|
3167
3182
|
}
|
|
3168
3183
|
setUid(uid) {
|
|
@@ -3206,35 +3221,61 @@ function getEnv() {
|
|
|
3206
3221
|
// src/services/action-service/index.ts
|
|
3207
3222
|
var ActionService = {
|
|
3208
3223
|
// Load Action
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
}
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
}
|
|
3224
|
+
loadAction(_0) {
|
|
3225
|
+
return __async(this, arguments, function* ({
|
|
3226
|
+
idAction,
|
|
3227
|
+
context
|
|
3228
|
+
}) {
|
|
3229
|
+
const env2 = getEnv();
|
|
3230
|
+
const jsonData = {
|
|
3231
|
+
action_id: idAction,
|
|
3232
|
+
with_context: __spreadValues({}, context)
|
|
3233
|
+
};
|
|
3234
|
+
return env2.requests.post(`${"/load_action" /* LOAD_ACTION */}`, jsonData, {
|
|
3235
|
+
headers: {
|
|
3236
|
+
"Content-Type": "application/json"
|
|
3237
|
+
}
|
|
3238
|
+
});
|
|
3224
3239
|
});
|
|
3225
3240
|
},
|
|
3226
3241
|
// Call Button
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3242
|
+
callButton(_0) {
|
|
3243
|
+
return __async(this, arguments, function* ({
|
|
3244
|
+
model,
|
|
3245
|
+
ids = [],
|
|
3246
|
+
context,
|
|
3247
|
+
method
|
|
3248
|
+
}) {
|
|
3249
|
+
try {
|
|
3250
|
+
const env2 = getEnv();
|
|
3251
|
+
const jsonData = {
|
|
3252
|
+
model,
|
|
3253
|
+
method,
|
|
3254
|
+
ids,
|
|
3255
|
+
with_context: context
|
|
3256
|
+
};
|
|
3257
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3258
|
+
headers: {
|
|
3259
|
+
"Content-Type": "application/json"
|
|
3260
|
+
}
|
|
3261
|
+
});
|
|
3262
|
+
} catch (error) {
|
|
3263
|
+
console.error("Error when calling button action:", error);
|
|
3264
|
+
throw error;
|
|
3265
|
+
}
|
|
3266
|
+
});
|
|
3267
|
+
},
|
|
3268
|
+
// remove Row
|
|
3269
|
+
removeRows(_0) {
|
|
3270
|
+
return __async(this, arguments, function* ({
|
|
3271
|
+
model,
|
|
3272
|
+
ids,
|
|
3273
|
+
context
|
|
3274
|
+
}) {
|
|
3234
3275
|
const env2 = getEnv();
|
|
3235
3276
|
const jsonData = {
|
|
3236
3277
|
model,
|
|
3237
|
-
method,
|
|
3278
|
+
method: "unlink",
|
|
3238
3279
|
ids,
|
|
3239
3280
|
with_context: context
|
|
3240
3281
|
};
|
|
@@ -3243,112 +3284,96 @@ var ActionService = {
|
|
|
3243
3284
|
"Content-Type": "application/json"
|
|
3244
3285
|
}
|
|
3245
3286
|
});
|
|
3246
|
-
} catch (error) {
|
|
3247
|
-
console.error("Error when calling button action:", error);
|
|
3248
|
-
throw error;
|
|
3249
|
-
}
|
|
3250
|
-
},
|
|
3251
|
-
// remove Row
|
|
3252
|
-
async removeRows({
|
|
3253
|
-
model,
|
|
3254
|
-
ids,
|
|
3255
|
-
context
|
|
3256
|
-
}) {
|
|
3257
|
-
const env2 = getEnv();
|
|
3258
|
-
const jsonData = {
|
|
3259
|
-
model,
|
|
3260
|
-
method: "unlink",
|
|
3261
|
-
ids,
|
|
3262
|
-
with_context: context
|
|
3263
|
-
};
|
|
3264
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3265
|
-
headers: {
|
|
3266
|
-
"Content-Type": "application/json"
|
|
3267
|
-
}
|
|
3268
3287
|
});
|
|
3269
3288
|
},
|
|
3270
3289
|
// Duplicate Model
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
id,
|
|
3274
|
-
context
|
|
3275
|
-
}) {
|
|
3276
|
-
const env2 = getEnv();
|
|
3277
|
-
const jsonData = {
|
|
3290
|
+
duplicateRecord(_0) {
|
|
3291
|
+
return __async(this, arguments, function* ({
|
|
3278
3292
|
model,
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3293
|
+
id,
|
|
3294
|
+
context
|
|
3295
|
+
}) {
|
|
3296
|
+
const env2 = getEnv();
|
|
3297
|
+
const jsonData = {
|
|
3298
|
+
model,
|
|
3299
|
+
method: "copy",
|
|
3300
|
+
ids: id,
|
|
3301
|
+
with_context: context
|
|
3302
|
+
};
|
|
3303
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3304
|
+
headers: {
|
|
3305
|
+
"Content-Type": "application/json"
|
|
3306
|
+
}
|
|
3307
|
+
});
|
|
3287
3308
|
});
|
|
3288
3309
|
},
|
|
3289
3310
|
// Get Print Report
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3311
|
+
getPrintReportName(_0) {
|
|
3312
|
+
return __async(this, arguments, function* ({ id }) {
|
|
3313
|
+
const env2 = getEnv();
|
|
3314
|
+
const jsonData = {
|
|
3315
|
+
model: "ir.actions.report",
|
|
3316
|
+
method: "web_read",
|
|
3317
|
+
id,
|
|
3318
|
+
kwargs: {
|
|
3319
|
+
specification: {
|
|
3320
|
+
report_name: {}
|
|
3321
|
+
}
|
|
3299
3322
|
}
|
|
3300
|
-
}
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
}
|
|
3323
|
+
};
|
|
3324
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3325
|
+
headers: {
|
|
3326
|
+
"Content-Type": "application/json"
|
|
3327
|
+
}
|
|
3328
|
+
});
|
|
3306
3329
|
});
|
|
3307
3330
|
},
|
|
3308
3331
|
//Save Print Invoice
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3332
|
+
print(_0) {
|
|
3333
|
+
return __async(this, arguments, function* ({ id, report, db }) {
|
|
3334
|
+
const env2 = getEnv();
|
|
3335
|
+
const jsonData = {
|
|
3336
|
+
report,
|
|
3337
|
+
id,
|
|
3338
|
+
type: "pdf",
|
|
3339
|
+
file_response: true,
|
|
3340
|
+
db
|
|
3341
|
+
};
|
|
3342
|
+
const queryString = toQueryString(jsonData);
|
|
3343
|
+
const urlWithParams = `${"/report" /* REPORT_PATH */}?${queryString}`;
|
|
3344
|
+
return env2.requests.get(urlWithParams, {
|
|
3345
|
+
headers: {
|
|
3346
|
+
"Content-Type": "application/json"
|
|
3347
|
+
},
|
|
3348
|
+
responseType: "arraybuffer"
|
|
3349
|
+
});
|
|
3325
3350
|
});
|
|
3326
3351
|
},
|
|
3327
3352
|
//Run Action
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
}
|
|
3353
|
+
runAction(_0) {
|
|
3354
|
+
return __async(this, arguments, function* ({
|
|
3355
|
+
idAction,
|
|
3356
|
+
context
|
|
3357
|
+
}) {
|
|
3358
|
+
const env2 = getEnv();
|
|
3359
|
+
const jsonData = {
|
|
3360
|
+
action_id: idAction,
|
|
3361
|
+
with_context: __spreadValues({}, context)
|
|
3362
|
+
// context: {
|
|
3363
|
+
// lang: 'en_US',
|
|
3364
|
+
// tz: 'Asia/Saigon',
|
|
3365
|
+
// uid: 2,
|
|
3366
|
+
// allowed_company_ids: [1],
|
|
3367
|
+
// active_id: Array.isArray(idDetail) ? idDetail[0] : idDetail,
|
|
3368
|
+
// active_ids: Array.isArray(idDetail) ? [...idDetail] : idDetail,
|
|
3369
|
+
// active_model: model,
|
|
3370
|
+
// },
|
|
3371
|
+
};
|
|
3372
|
+
return env2.requests.post(`${"/run_action" /* RUN_ACTION_PATH */}`, jsonData, {
|
|
3373
|
+
headers: {
|
|
3374
|
+
"Content-Type": "application/json"
|
|
3375
|
+
}
|
|
3376
|
+
});
|
|
3352
3377
|
});
|
|
3353
3378
|
}
|
|
3354
3379
|
};
|
|
@@ -3356,200 +3381,238 @@ var action_service_default = ActionService;
|
|
|
3356
3381
|
|
|
3357
3382
|
// src/services/auth-service/index.ts
|
|
3358
3383
|
var AuthService = {
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3384
|
+
login(body) {
|
|
3385
|
+
return __async(this, null, function* () {
|
|
3386
|
+
var _a, _b, _c, _d;
|
|
3387
|
+
const env2 = getEnv();
|
|
3388
|
+
const payload = Object.fromEntries(
|
|
3389
|
+
Object.entries({
|
|
3390
|
+
username: body.email,
|
|
3391
|
+
password: body.password,
|
|
3392
|
+
grant_type: ((_a = env2 == null ? void 0 : env2.config) == null ? void 0 : _a.grantType) || "",
|
|
3393
|
+
client_id: ((_b = env2 == null ? void 0 : env2.config) == null ? void 0 : _b.clientId) || "",
|
|
3394
|
+
client_secret: ((_c = env2 == null ? void 0 : env2.config) == null ? void 0 : _c.clientSecret) || ""
|
|
3395
|
+
}).filter(([_, value]) => !!value)
|
|
3396
|
+
);
|
|
3397
|
+
const encodedData = new URLSearchParams(payload).toString();
|
|
3398
|
+
return (_d = env2 == null ? void 0 : env2.requests) == null ? void 0 : _d.post(body.path, encodedData, {
|
|
3399
|
+
headers: {
|
|
3400
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3401
|
+
}
|
|
3402
|
+
});
|
|
3375
3403
|
});
|
|
3376
3404
|
},
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3405
|
+
forgotPassword(email) {
|
|
3406
|
+
return __async(this, null, function* () {
|
|
3407
|
+
var _a;
|
|
3408
|
+
const env2 = getEnv();
|
|
3409
|
+
const bodyData = {
|
|
3410
|
+
login: email,
|
|
3411
|
+
url: `${window.location.origin}/reset-password`
|
|
3412
|
+
};
|
|
3413
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/reset_password" /* RESET_PASSWORD_PATH */, bodyData, {
|
|
3414
|
+
headers: {
|
|
3415
|
+
"Content-Type": "application/json"
|
|
3416
|
+
}
|
|
3417
|
+
});
|
|
3387
3418
|
});
|
|
3388
3419
|
},
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3420
|
+
forgotPasswordSSO(_0) {
|
|
3421
|
+
return __async(this, arguments, function* ({
|
|
3422
|
+
email,
|
|
3423
|
+
with_context,
|
|
3424
|
+
method
|
|
3425
|
+
}) {
|
|
3426
|
+
var _a;
|
|
3427
|
+
const env2 = getEnv();
|
|
3428
|
+
const body = {
|
|
3429
|
+
method,
|
|
3430
|
+
kwargs: {
|
|
3431
|
+
vals: {
|
|
3432
|
+
email
|
|
3433
|
+
}
|
|
3434
|
+
},
|
|
3435
|
+
with_context
|
|
3436
|
+
};
|
|
3437
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, body, {
|
|
3438
|
+
headers: {
|
|
3439
|
+
"Content-Type": "application/json"
|
|
3400
3440
|
}
|
|
3401
|
-
}
|
|
3402
|
-
with_context
|
|
3403
|
-
};
|
|
3404
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, body, {
|
|
3405
|
-
headers: {
|
|
3406
|
-
"Content-Type": "application/json"
|
|
3407
|
-
}
|
|
3441
|
+
});
|
|
3408
3442
|
});
|
|
3409
3443
|
},
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3444
|
+
resetPassword(data, token) {
|
|
3445
|
+
return __async(this, null, function* () {
|
|
3446
|
+
var _a;
|
|
3447
|
+
const env2 = getEnv();
|
|
3448
|
+
const bodyData = {
|
|
3449
|
+
token,
|
|
3450
|
+
password: data.password,
|
|
3451
|
+
new_password: data.confirmPassword
|
|
3452
|
+
};
|
|
3453
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/change_password" /* CHANGE_PASSWORD_PATH */, bodyData, {
|
|
3454
|
+
headers: {
|
|
3455
|
+
"Content-Type": "application/json"
|
|
3456
|
+
}
|
|
3457
|
+
});
|
|
3421
3458
|
});
|
|
3422
3459
|
},
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
password,
|
|
3426
|
-
with_context
|
|
3427
|
-
}) {
|
|
3428
|
-
const env2 = getEnv();
|
|
3429
|
-
const bodyData = {
|
|
3460
|
+
resetPasswordSSO(_0) {
|
|
3461
|
+
return __async(this, arguments, function* ({
|
|
3430
3462
|
method,
|
|
3431
|
-
|
|
3432
|
-
vals: {
|
|
3433
|
-
password
|
|
3434
|
-
}
|
|
3435
|
-
},
|
|
3463
|
+
password,
|
|
3436
3464
|
with_context
|
|
3437
|
-
}
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
}
|
|
3465
|
+
}) {
|
|
3466
|
+
var _a;
|
|
3467
|
+
const env2 = getEnv();
|
|
3468
|
+
const bodyData = {
|
|
3469
|
+
method,
|
|
3470
|
+
kwargs: {
|
|
3471
|
+
vals: {
|
|
3472
|
+
password
|
|
3473
|
+
}
|
|
3474
|
+
},
|
|
3475
|
+
with_context
|
|
3476
|
+
};
|
|
3477
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, bodyData, {
|
|
3478
|
+
headers: {
|
|
3479
|
+
"Content-Type": "application/json"
|
|
3480
|
+
}
|
|
3481
|
+
});
|
|
3455
3482
|
});
|
|
3456
3483
|
},
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
}
|
|
3484
|
+
updatePassword(data, token) {
|
|
3485
|
+
return __async(this, null, function* () {
|
|
3486
|
+
var _a;
|
|
3487
|
+
const env2 = getEnv();
|
|
3488
|
+
const bodyData = {
|
|
3489
|
+
token,
|
|
3490
|
+
old_password: data.oldPassword,
|
|
3491
|
+
new_password: data.newPassword
|
|
3492
|
+
};
|
|
3493
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/change_password_parent" /* UPDATE_PASSWORD_PATH */, bodyData, {
|
|
3494
|
+
headers: {
|
|
3495
|
+
"Content-Type": "application/json"
|
|
3496
|
+
}
|
|
3497
|
+
});
|
|
3466
3498
|
});
|
|
3467
3499
|
},
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
"/
|
|
3476
|
-
{ state, access_token },
|
|
3477
|
-
{
|
|
3500
|
+
isValidToken(token) {
|
|
3501
|
+
return __async(this, null, function* () {
|
|
3502
|
+
var _a;
|
|
3503
|
+
const env2 = getEnv();
|
|
3504
|
+
const bodyData = {
|
|
3505
|
+
token
|
|
3506
|
+
};
|
|
3507
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/check_token" /* TOKEN */, bodyData, {
|
|
3478
3508
|
headers: {
|
|
3479
3509
|
"Content-Type": "application/json"
|
|
3480
3510
|
}
|
|
3481
|
-
}
|
|
3482
|
-
);
|
|
3511
|
+
});
|
|
3512
|
+
});
|
|
3483
3513
|
},
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3514
|
+
loginSocial(_0) {
|
|
3515
|
+
return __async(this, arguments, function* ({
|
|
3516
|
+
db,
|
|
3517
|
+
state,
|
|
3518
|
+
access_token
|
|
3519
|
+
}) {
|
|
3520
|
+
var _a;
|
|
3521
|
+
const env2 = getEnv();
|
|
3522
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(
|
|
3523
|
+
"/token/generate" /* GENTOKEN_SOCIAL */,
|
|
3524
|
+
{ state, access_token },
|
|
3525
|
+
{
|
|
3526
|
+
headers: {
|
|
3527
|
+
"Content-Type": "application/json"
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
);
|
|
3531
|
+
});
|
|
3487
3532
|
},
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3533
|
+
getProviders(db) {
|
|
3534
|
+
return __async(this, null, function* () {
|
|
3535
|
+
var _a;
|
|
3536
|
+
const env2 = getEnv();
|
|
3537
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.get("/oauth/providers", { params: { db } });
|
|
3538
|
+
});
|
|
3539
|
+
},
|
|
3540
|
+
getAccessByCode(code) {
|
|
3541
|
+
return __async(this, null, function* () {
|
|
3542
|
+
var _a, _b, _c, _d;
|
|
3543
|
+
const env2 = getEnv();
|
|
3544
|
+
const data = new URLSearchParams();
|
|
3545
|
+
data.append("code", code);
|
|
3546
|
+
data.append("grant_type", "authorization_code");
|
|
3547
|
+
data.append("client_id", ((_a = env2 == null ? void 0 : env2.config) == null ? void 0 : _a.clientId) || "");
|
|
3548
|
+
data.append("redirect_uri", ((_b = env2 == null ? void 0 : env2.config) == null ? void 0 : _b.redirectUri) || "");
|
|
3549
|
+
return (_d = env2 == null ? void 0 : env2.requests) == null ? void 0 : _d.post(
|
|
3550
|
+
`${(_c = env2 == null ? void 0 : env2.baseUrl) == null ? void 0 : _c.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
|
|
3551
|
+
data,
|
|
3552
|
+
{
|
|
3553
|
+
headers: {
|
|
3554
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3555
|
+
}
|
|
3501
3556
|
}
|
|
3502
|
-
|
|
3503
|
-
);
|
|
3557
|
+
);
|
|
3558
|
+
});
|
|
3504
3559
|
},
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3560
|
+
logout(data) {
|
|
3561
|
+
return __async(this, null, function* () {
|
|
3562
|
+
var _a;
|
|
3563
|
+
const env2 = getEnv();
|
|
3564
|
+
console.log(data);
|
|
3565
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(
|
|
3566
|
+
"/logout" /* LOGOUT */,
|
|
3567
|
+
{},
|
|
3568
|
+
{
|
|
3569
|
+
headers: {
|
|
3570
|
+
"Content-Type": "application/json"
|
|
3571
|
+
},
|
|
3572
|
+
withCredentials: true,
|
|
3573
|
+
useRefreshToken: true
|
|
3574
|
+
}
|
|
3575
|
+
);
|
|
3576
|
+
});
|
|
3519
3577
|
}
|
|
3520
3578
|
};
|
|
3521
3579
|
var auth_service_default = AuthService;
|
|
3522
3580
|
|
|
3523
3581
|
// src/services/company-service/index.ts
|
|
3524
3582
|
var CompanyService = {
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3583
|
+
getCurrentCompany() {
|
|
3584
|
+
return __async(this, null, function* () {
|
|
3585
|
+
const env2 = getEnv();
|
|
3586
|
+
return yield env2.requests.get("/company" /* COMPANY_PATH */, {
|
|
3587
|
+
headers: {
|
|
3588
|
+
"Content-Type": "application/json"
|
|
3589
|
+
}
|
|
3590
|
+
});
|
|
3531
3591
|
});
|
|
3532
3592
|
},
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3593
|
+
getInfoCompany(id) {
|
|
3594
|
+
return __async(this, null, function* () {
|
|
3595
|
+
var _a;
|
|
3596
|
+
const env2 = getEnv();
|
|
3597
|
+
const jsonData = {
|
|
3598
|
+
ids: [id],
|
|
3599
|
+
model: "res.company" /* COMPANY */,
|
|
3600
|
+
method: "web_read" /* WEB_READ */,
|
|
3601
|
+
kwargs: {
|
|
3602
|
+
specification: {
|
|
3603
|
+
primary_color: {},
|
|
3604
|
+
secondary_color: {},
|
|
3605
|
+
logo: {},
|
|
3606
|
+
display_name: {},
|
|
3607
|
+
secondary_logo: {}
|
|
3608
|
+
}
|
|
3546
3609
|
}
|
|
3547
|
-
}
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
}
|
|
3610
|
+
};
|
|
3611
|
+
return yield (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
3612
|
+
headers: {
|
|
3613
|
+
"Content-Type": "application/json"
|
|
3614
|
+
}
|
|
3615
|
+
});
|
|
3553
3616
|
});
|
|
3554
3617
|
}
|
|
3555
3618
|
};
|
|
@@ -3557,300 +3620,328 @@ var company_service_default = CompanyService;
|
|
|
3557
3620
|
|
|
3558
3621
|
// src/services/excel-service/index.ts
|
|
3559
3622
|
var ExcelService = {
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
});
|
|
3567
|
-
},
|
|
3568
|
-
async uploadIdFile({ formData }) {
|
|
3569
|
-
const env2 = getEnv();
|
|
3570
|
-
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3571
|
-
headers: {
|
|
3572
|
-
"Content-Type": "multipart/form-data"
|
|
3573
|
-
}
|
|
3574
|
-
});
|
|
3575
|
-
},
|
|
3576
|
-
async parsePreview({
|
|
3577
|
-
id,
|
|
3578
|
-
selectedSheet,
|
|
3579
|
-
isHeader,
|
|
3580
|
-
context
|
|
3581
|
-
}) {
|
|
3582
|
-
const env2 = getEnv();
|
|
3583
|
-
const jsonData = {
|
|
3584
|
-
model: "base_import.import" /* BASE_IMPORT */,
|
|
3585
|
-
method: "parse_preview",
|
|
3586
|
-
ids: [id],
|
|
3587
|
-
kwargs: {
|
|
3588
|
-
options: {
|
|
3589
|
-
import_skip_records: [],
|
|
3590
|
-
import_set_empty_fields: [],
|
|
3591
|
-
fallback_values: {},
|
|
3592
|
-
name_create_enabled_fields: {},
|
|
3593
|
-
encoding: "",
|
|
3594
|
-
separator: "",
|
|
3595
|
-
quoting: '"',
|
|
3596
|
-
date_format: "",
|
|
3597
|
-
datetime_format: "",
|
|
3598
|
-
float_thousand_separator: ",",
|
|
3599
|
-
float_decimal_separator: ".",
|
|
3600
|
-
advanced: true,
|
|
3601
|
-
has_headers: isHeader,
|
|
3602
|
-
keep_matches: false,
|
|
3603
|
-
limit: 2e3,
|
|
3604
|
-
sheets: [],
|
|
3605
|
-
sheet: selectedSheet,
|
|
3606
|
-
skip: 0,
|
|
3607
|
-
tracking_disable: true
|
|
3623
|
+
uploadFile(_0) {
|
|
3624
|
+
return __async(this, arguments, function* ({ formData }) {
|
|
3625
|
+
const env2 = getEnv();
|
|
3626
|
+
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3627
|
+
headers: {
|
|
3628
|
+
"Content-Type": "multipart/form-data"
|
|
3608
3629
|
}
|
|
3609
|
-
}
|
|
3610
|
-
with_context: context
|
|
3611
|
-
};
|
|
3612
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3613
|
-
headers: {
|
|
3614
|
-
"Content-Type": "multipart/form-data"
|
|
3615
|
-
}
|
|
3630
|
+
});
|
|
3616
3631
|
});
|
|
3617
3632
|
},
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
const env2 = getEnv();
|
|
3627
|
-
const jsonData = {
|
|
3628
|
-
model: "base_import.import" /* BASE_IMPORT */,
|
|
3629
|
-
method: "execute_import",
|
|
3630
|
-
ids: [idFile],
|
|
3631
|
-
kwargs: {
|
|
3632
|
-
fields,
|
|
3633
|
-
columns,
|
|
3634
|
-
options,
|
|
3635
|
-
dryrun
|
|
3636
|
-
},
|
|
3637
|
-
with_context: context
|
|
3638
|
-
};
|
|
3639
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3640
|
-
headers: {
|
|
3641
|
-
"Content-Type": "multipart/form-data"
|
|
3642
|
-
}
|
|
3633
|
+
uploadIdFile(_0) {
|
|
3634
|
+
return __async(this, arguments, function* ({ formData }) {
|
|
3635
|
+
const env2 = getEnv();
|
|
3636
|
+
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3637
|
+
headers: {
|
|
3638
|
+
"Content-Type": "multipart/form-data"
|
|
3639
|
+
}
|
|
3640
|
+
});
|
|
3643
3641
|
});
|
|
3644
3642
|
},
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
}
|
|
3652
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData);
|
|
3653
|
-
},
|
|
3654
|
-
async getFieldExport({
|
|
3655
|
-
ids,
|
|
3656
|
-
model,
|
|
3657
|
-
isShow,
|
|
3658
|
-
parentField,
|
|
3659
|
-
fieldType,
|
|
3660
|
-
parentName,
|
|
3661
|
-
prefix,
|
|
3662
|
-
name,
|
|
3663
|
-
context,
|
|
3664
|
-
importCompat
|
|
3665
|
-
}) {
|
|
3666
|
-
const env2 = getEnv();
|
|
3667
|
-
const jsonData = {
|
|
3668
|
-
model,
|
|
3669
|
-
import_compat: importCompat,
|
|
3670
|
-
domain: [["id", "in", ids]],
|
|
3671
|
-
with_context: context
|
|
3672
|
-
};
|
|
3673
|
-
if (isShow) {
|
|
3674
|
-
jsonData.parent_field = parentField;
|
|
3675
|
-
jsonData.parent_field_type = fieldType;
|
|
3676
|
-
jsonData.parent_name = parentName;
|
|
3677
|
-
jsonData.name = name;
|
|
3678
|
-
jsonData.prefix = prefix;
|
|
3679
|
-
jsonData.exclude = [null];
|
|
3680
|
-
}
|
|
3681
|
-
return env2.requests.post("/export/get_fields", jsonData);
|
|
3682
|
-
},
|
|
3683
|
-
async exportExcel({
|
|
3684
|
-
model,
|
|
3685
|
-
domain,
|
|
3686
|
-
ids,
|
|
3687
|
-
fields,
|
|
3688
|
-
type,
|
|
3689
|
-
importCompat,
|
|
3690
|
-
context,
|
|
3691
|
-
groupby
|
|
3692
|
-
}) {
|
|
3693
|
-
const env2 = getEnv();
|
|
3694
|
-
const jsonData = {
|
|
3695
|
-
model,
|
|
3696
|
-
domain,
|
|
3697
|
-
ids,
|
|
3698
|
-
import_compat: importCompat,
|
|
3699
|
-
fields,
|
|
3700
|
-
with_context: context,
|
|
3701
|
-
groupby: groupby ?? []
|
|
3702
|
-
};
|
|
3703
|
-
return env2.requests.post_excel(`/export/${type}`, jsonData);
|
|
3704
|
-
}
|
|
3705
|
-
};
|
|
3706
|
-
var excel_service_default = ExcelService;
|
|
3707
|
-
|
|
3708
|
-
// src/services/form-service/index.ts
|
|
3709
|
-
var FormService = {
|
|
3710
|
-
async getComment({ data }) {
|
|
3711
|
-
try {
|
|
3643
|
+
parsePreview(_0) {
|
|
3644
|
+
return __async(this, arguments, function* ({
|
|
3645
|
+
id,
|
|
3646
|
+
selectedSheet,
|
|
3647
|
+
isHeader,
|
|
3648
|
+
context
|
|
3649
|
+
}) {
|
|
3712
3650
|
const env2 = getEnv();
|
|
3713
3651
|
const jsonData = {
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3652
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
3653
|
+
method: "parse_preview",
|
|
3654
|
+
ids: [id],
|
|
3655
|
+
kwargs: {
|
|
3656
|
+
options: {
|
|
3657
|
+
import_skip_records: [],
|
|
3658
|
+
import_set_empty_fields: [],
|
|
3659
|
+
fallback_values: {},
|
|
3660
|
+
name_create_enabled_fields: {},
|
|
3661
|
+
encoding: "",
|
|
3662
|
+
separator: "",
|
|
3663
|
+
quoting: '"',
|
|
3664
|
+
date_format: "",
|
|
3665
|
+
datetime_format: "",
|
|
3666
|
+
float_thousand_separator: ",",
|
|
3667
|
+
float_decimal_separator: ".",
|
|
3668
|
+
advanced: true,
|
|
3669
|
+
has_headers: isHeader,
|
|
3670
|
+
keep_matches: false,
|
|
3671
|
+
limit: 2e3,
|
|
3672
|
+
sheets: [],
|
|
3673
|
+
sheet: selectedSheet,
|
|
3674
|
+
skip: 0,
|
|
3675
|
+
tracking_disable: true
|
|
3676
|
+
}
|
|
3677
|
+
},
|
|
3678
|
+
with_context: context
|
|
3720
3679
|
};
|
|
3721
|
-
return env2.requests.post("/
|
|
3680
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3722
3681
|
headers: {
|
|
3723
|
-
"Content-Type": "
|
|
3682
|
+
"Content-Type": "multipart/form-data"
|
|
3724
3683
|
}
|
|
3725
3684
|
});
|
|
3726
|
-
}
|
|
3727
|
-
console.error("Error when sending message:", error);
|
|
3728
|
-
throw error;
|
|
3729
|
-
}
|
|
3685
|
+
});
|
|
3730
3686
|
},
|
|
3731
|
-
|
|
3732
|
-
|
|
3687
|
+
executeImport(_0) {
|
|
3688
|
+
return __async(this, arguments, function* ({
|
|
3689
|
+
columns,
|
|
3690
|
+
fields,
|
|
3691
|
+
idFile,
|
|
3692
|
+
options,
|
|
3693
|
+
dryrun,
|
|
3694
|
+
context
|
|
3695
|
+
}) {
|
|
3733
3696
|
const env2 = getEnv();
|
|
3734
3697
|
const jsonData = {
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3698
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
3699
|
+
method: "execute_import",
|
|
3700
|
+
ids: [idFile],
|
|
3701
|
+
kwargs: {
|
|
3702
|
+
fields,
|
|
3703
|
+
columns,
|
|
3704
|
+
options,
|
|
3705
|
+
dryrun
|
|
3741
3706
|
},
|
|
3742
|
-
|
|
3743
|
-
body: data.message,
|
|
3744
|
-
message_type: "comment",
|
|
3745
|
-
attachment_ids: data.attachment_ids,
|
|
3746
|
-
attachment_tokens: [],
|
|
3747
|
-
subtype_xmlid: data.subtype
|
|
3748
|
-
},
|
|
3749
|
-
thread_id: Number(data.thread_id),
|
|
3750
|
-
thread_model: data.thread_model
|
|
3707
|
+
with_context: context
|
|
3751
3708
|
};
|
|
3752
|
-
return env2.requests.post("/
|
|
3709
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3753
3710
|
headers: {
|
|
3754
|
-
"Content-Type": "
|
|
3711
|
+
"Content-Type": "multipart/form-data"
|
|
3755
3712
|
}
|
|
3756
3713
|
});
|
|
3757
|
-
}
|
|
3758
|
-
console.error("Error when sent message:", error);
|
|
3759
|
-
throw error;
|
|
3760
|
-
}
|
|
3714
|
+
});
|
|
3761
3715
|
},
|
|
3762
|
-
|
|
3763
|
-
|
|
3716
|
+
getFileExcel(_0) {
|
|
3717
|
+
return __async(this, arguments, function* ({ model }) {
|
|
3764
3718
|
const env2 = getEnv();
|
|
3765
3719
|
const jsonData = {
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
message_id: data.message_id
|
|
3720
|
+
model,
|
|
3721
|
+
method: "get_import_templates" /* GET_IMPORT */,
|
|
3722
|
+
args: []
|
|
3770
3723
|
};
|
|
3771
|
-
return env2.requests.post("/
|
|
3772
|
-
|
|
3773
|
-
"Content-Type": "application/json"
|
|
3774
|
-
}
|
|
3775
|
-
});
|
|
3776
|
-
} catch (error) {
|
|
3777
|
-
console.error("Error when sent message:", error);
|
|
3778
|
-
throw error;
|
|
3779
|
-
}
|
|
3724
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData);
|
|
3725
|
+
});
|
|
3780
3726
|
},
|
|
3781
|
-
|
|
3782
|
-
|
|
3727
|
+
getFieldExport(_0) {
|
|
3728
|
+
return __async(this, arguments, function* ({
|
|
3729
|
+
ids,
|
|
3730
|
+
model,
|
|
3731
|
+
isShow,
|
|
3732
|
+
parentField,
|
|
3733
|
+
fieldType,
|
|
3734
|
+
parentName,
|
|
3735
|
+
prefix,
|
|
3736
|
+
name,
|
|
3737
|
+
context,
|
|
3738
|
+
importCompat
|
|
3739
|
+
}) {
|
|
3783
3740
|
const env2 = getEnv();
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3741
|
+
const jsonData = {
|
|
3742
|
+
model,
|
|
3743
|
+
import_compat: importCompat,
|
|
3744
|
+
domain: [["id", "in", ids]],
|
|
3745
|
+
with_context: context
|
|
3746
|
+
};
|
|
3747
|
+
if (isShow) {
|
|
3748
|
+
jsonData.parent_field = parentField;
|
|
3749
|
+
jsonData.parent_field_type = fieldType;
|
|
3750
|
+
jsonData.parent_name = parentName;
|
|
3751
|
+
jsonData.name = name;
|
|
3752
|
+
jsonData.prefix = prefix;
|
|
3753
|
+
jsonData.exclude = [null];
|
|
3754
|
+
}
|
|
3755
|
+
return env2.requests.post("/export/get_fields", jsonData);
|
|
3756
|
+
});
|
|
3757
|
+
},
|
|
3758
|
+
exportExcel(_0) {
|
|
3759
|
+
return __async(this, arguments, function* ({
|
|
3760
|
+
model,
|
|
3761
|
+
domain,
|
|
3762
|
+
ids,
|
|
3763
|
+
fields,
|
|
3764
|
+
type,
|
|
3765
|
+
importCompat,
|
|
3766
|
+
context,
|
|
3767
|
+
groupby
|
|
3768
|
+
}) {
|
|
3769
|
+
const env2 = getEnv();
|
|
3770
|
+
const jsonData = {
|
|
3771
|
+
model,
|
|
3772
|
+
domain,
|
|
3773
|
+
ids,
|
|
3774
|
+
import_compat: importCompat,
|
|
3775
|
+
fields,
|
|
3776
|
+
with_context: context,
|
|
3777
|
+
groupby: groupby != null ? groupby : []
|
|
3778
|
+
};
|
|
3779
|
+
return env2.requests.post_excel(`/export/${type}`, jsonData);
|
|
3780
|
+
});
|
|
3781
|
+
}
|
|
3782
|
+
};
|
|
3783
|
+
var excel_service_default = ExcelService;
|
|
3784
|
+
|
|
3785
|
+
// src/services/form-service/index.ts
|
|
3786
|
+
var FormService = {
|
|
3787
|
+
getComment(_0) {
|
|
3788
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3789
|
+
try {
|
|
3790
|
+
const env2 = getEnv();
|
|
3791
|
+
const jsonData = {
|
|
3792
|
+
thread_id: data.thread_id,
|
|
3793
|
+
thread_model: data.thread_model,
|
|
3794
|
+
limit: 100,
|
|
3795
|
+
with_context: {
|
|
3796
|
+
lang: data.lang
|
|
3797
|
+
}
|
|
3798
|
+
};
|
|
3799
|
+
return env2.requests.post("/chatter/thread/messages" /* GET_MESSAGE */, jsonData, {
|
|
3787
3800
|
headers: {
|
|
3788
3801
|
"Content-Type": "application/json"
|
|
3789
3802
|
}
|
|
3790
|
-
}
|
|
3791
|
-
)
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
}
|
|
3803
|
+
});
|
|
3804
|
+
} catch (error) {
|
|
3805
|
+
console.error("Error when sending message:", error);
|
|
3806
|
+
throw error;
|
|
3807
|
+
}
|
|
3808
|
+
});
|
|
3796
3809
|
},
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3810
|
+
sentComment(_0) {
|
|
3811
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3812
|
+
try {
|
|
3813
|
+
const env2 = getEnv();
|
|
3814
|
+
const jsonData = {
|
|
3815
|
+
context: {
|
|
3816
|
+
tz: "Asia/Saigon",
|
|
3817
|
+
uid: 2,
|
|
3818
|
+
allowed_company_ids: [1],
|
|
3819
|
+
mail_post_autofollow: false,
|
|
3820
|
+
temporary_id: 142183.01
|
|
3821
|
+
},
|
|
3822
|
+
post_data: {
|
|
3823
|
+
body: data.message,
|
|
3824
|
+
message_type: "comment",
|
|
3825
|
+
attachment_ids: data.attachment_ids,
|
|
3826
|
+
attachment_tokens: [],
|
|
3827
|
+
subtype_xmlid: data.subtype
|
|
3828
|
+
},
|
|
3829
|
+
thread_id: Number(data.thread_id),
|
|
3830
|
+
thread_model: data.thread_model
|
|
3831
|
+
};
|
|
3832
|
+
return env2.requests.post("/chatter/message/post" /* SENT_MESSAGE */, jsonData, {
|
|
3833
|
+
headers: {
|
|
3834
|
+
"Content-Type": "application/json"
|
|
3835
|
+
}
|
|
3836
|
+
});
|
|
3837
|
+
} catch (error) {
|
|
3838
|
+
console.error("Error when sent message:", error);
|
|
3839
|
+
throw error;
|
|
3840
|
+
}
|
|
3841
|
+
});
|
|
3809
3842
|
},
|
|
3810
|
-
|
|
3811
|
-
|
|
3843
|
+
deleteComment(_0) {
|
|
3844
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3845
|
+
try {
|
|
3846
|
+
const env2 = getEnv();
|
|
3847
|
+
const jsonData = {
|
|
3848
|
+
attachment_ids: [],
|
|
3849
|
+
attachment_tokens: [],
|
|
3850
|
+
body: "",
|
|
3851
|
+
message_id: data.message_id
|
|
3852
|
+
};
|
|
3853
|
+
return env2.requests.post("/chatter/message/update_content" /* DELETE_MESSAGE */, jsonData, {
|
|
3854
|
+
headers: {
|
|
3855
|
+
"Content-Type": "application/json"
|
|
3856
|
+
}
|
|
3857
|
+
});
|
|
3858
|
+
} catch (error) {
|
|
3859
|
+
console.error("Error when sent message:", error);
|
|
3860
|
+
throw error;
|
|
3861
|
+
}
|
|
3862
|
+
});
|
|
3863
|
+
},
|
|
3864
|
+
getImage(_0) {
|
|
3865
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3866
|
+
try {
|
|
3867
|
+
const env2 = getEnv();
|
|
3868
|
+
return env2.requests.get(
|
|
3869
|
+
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
3870
|
+
{
|
|
3871
|
+
headers: {
|
|
3872
|
+
"Content-Type": "application/json"
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
);
|
|
3876
|
+
} catch (error) {
|
|
3877
|
+
console.error("Error when sent message:", error);
|
|
3878
|
+
throw error;
|
|
3879
|
+
}
|
|
3880
|
+
});
|
|
3881
|
+
},
|
|
3882
|
+
uploadImage(_0) {
|
|
3883
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3884
|
+
try {
|
|
3885
|
+
const env2 = getEnv();
|
|
3886
|
+
return env2.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
|
|
3887
|
+
headers: {
|
|
3888
|
+
"Content-Type": "multipart/form-data"
|
|
3889
|
+
}
|
|
3890
|
+
});
|
|
3891
|
+
} catch (error) {
|
|
3892
|
+
console.error("Error when sent message:", error);
|
|
3893
|
+
throw error;
|
|
3894
|
+
}
|
|
3895
|
+
});
|
|
3896
|
+
},
|
|
3897
|
+
getFormView(_0) {
|
|
3898
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3899
|
+
try {
|
|
3900
|
+
const env2 = getEnv();
|
|
3901
|
+
const jsonData = {
|
|
3902
|
+
model: data.model,
|
|
3903
|
+
method: "get_formview_action",
|
|
3904
|
+
ids: data.id ? [data.id] : [],
|
|
3905
|
+
with_context: data.context
|
|
3906
|
+
};
|
|
3907
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3908
|
+
headers: {
|
|
3909
|
+
"Content-Type": "application/json"
|
|
3910
|
+
}
|
|
3911
|
+
});
|
|
3912
|
+
} catch (error) {
|
|
3913
|
+
console.error("Error when fetching form view:", error);
|
|
3914
|
+
throw error;
|
|
3915
|
+
}
|
|
3916
|
+
});
|
|
3917
|
+
},
|
|
3918
|
+
changeStatus(_0) {
|
|
3919
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3812
3920
|
const env2 = getEnv();
|
|
3921
|
+
const vals = {
|
|
3922
|
+
[data.name]: data.stage_id
|
|
3923
|
+
};
|
|
3813
3924
|
const jsonData = {
|
|
3814
3925
|
model: data.model,
|
|
3815
|
-
method: "
|
|
3816
|
-
|
|
3817
|
-
|
|
3926
|
+
method: "web_save",
|
|
3927
|
+
with_context: {
|
|
3928
|
+
lang: data.lang,
|
|
3929
|
+
allowed_company_ids: [1],
|
|
3930
|
+
uid: 2,
|
|
3931
|
+
search_default_my_ticket: true,
|
|
3932
|
+
search_default_is_open: true
|
|
3933
|
+
},
|
|
3934
|
+
ids: [data.id],
|
|
3935
|
+
kwargs: {
|
|
3936
|
+
vals,
|
|
3937
|
+
specification: {}
|
|
3938
|
+
}
|
|
3818
3939
|
};
|
|
3819
3940
|
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3820
3941
|
headers: {
|
|
3821
3942
|
"Content-Type": "application/json"
|
|
3822
3943
|
}
|
|
3823
3944
|
});
|
|
3824
|
-
} catch (error) {
|
|
3825
|
-
console.error("Error when fetching form view:", error);
|
|
3826
|
-
throw error;
|
|
3827
|
-
}
|
|
3828
|
-
},
|
|
3829
|
-
async changeStatus({ data }) {
|
|
3830
|
-
const env2 = getEnv();
|
|
3831
|
-
const vals = {
|
|
3832
|
-
[data.name]: data.stage_id
|
|
3833
|
-
};
|
|
3834
|
-
const jsonData = {
|
|
3835
|
-
model: data.model,
|
|
3836
|
-
method: "web_save",
|
|
3837
|
-
with_context: {
|
|
3838
|
-
lang: data.lang,
|
|
3839
|
-
allowed_company_ids: [1],
|
|
3840
|
-
uid: 2,
|
|
3841
|
-
search_default_my_ticket: true,
|
|
3842
|
-
search_default_is_open: true
|
|
3843
|
-
},
|
|
3844
|
-
ids: [data.id],
|
|
3845
|
-
kwargs: {
|
|
3846
|
-
vals,
|
|
3847
|
-
specification: {}
|
|
3848
|
-
}
|
|
3849
|
-
};
|
|
3850
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3851
|
-
headers: {
|
|
3852
|
-
"Content-Type": "application/json"
|
|
3853
|
-
}
|
|
3854
3945
|
});
|
|
3855
3946
|
}
|
|
3856
3947
|
};
|
|
@@ -3858,51 +3949,55 @@ var form_service_default = FormService;
|
|
|
3858
3949
|
|
|
3859
3950
|
// src/services/kanban-service/index.ts
|
|
3860
3951
|
var KanbanServices = {
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
width_context
|
|
3864
|
-
}) {
|
|
3865
|
-
const env2 = getEnv();
|
|
3866
|
-
const jsonDataView = {
|
|
3952
|
+
getGroups(_0) {
|
|
3953
|
+
return __async(this, arguments, function* ({
|
|
3867
3954
|
model,
|
|
3868
|
-
method: "web_read_group",
|
|
3869
|
-
kwargs: {
|
|
3870
|
-
domain: [["stage_id.fold", "=", false]],
|
|
3871
|
-
fields: ["color:sum"],
|
|
3872
|
-
groupby: ["stage_id"]
|
|
3873
|
-
},
|
|
3874
3955
|
width_context
|
|
3875
|
-
}
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3956
|
+
}) {
|
|
3957
|
+
const env2 = getEnv();
|
|
3958
|
+
const jsonDataView = {
|
|
3959
|
+
model,
|
|
3960
|
+
method: "web_read_group",
|
|
3961
|
+
kwargs: {
|
|
3962
|
+
domain: [["stage_id.fold", "=", false]],
|
|
3963
|
+
fields: ["color:sum"],
|
|
3964
|
+
groupby: ["stage_id"]
|
|
3965
|
+
},
|
|
3966
|
+
width_context
|
|
3967
|
+
};
|
|
3968
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3969
|
+
headers: {
|
|
3970
|
+
"Content-Type": "application/json"
|
|
3971
|
+
}
|
|
3972
|
+
});
|
|
3880
3973
|
});
|
|
3881
3974
|
},
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
width_context
|
|
3887
|
-
}) {
|
|
3888
|
-
const env2 = getEnv();
|
|
3889
|
-
const jsonDataView = {
|
|
3975
|
+
getProgressBar(_0) {
|
|
3976
|
+
return __async(this, arguments, function* ({
|
|
3977
|
+
field,
|
|
3978
|
+
color,
|
|
3890
3979
|
model,
|
|
3891
|
-
method: "read_progress_bar",
|
|
3892
|
-
kwargs: {
|
|
3893
|
-
domain: [],
|
|
3894
|
-
group_by: "stage_id",
|
|
3895
|
-
progress_bar: {
|
|
3896
|
-
colors: color,
|
|
3897
|
-
field
|
|
3898
|
-
}
|
|
3899
|
-
},
|
|
3900
3980
|
width_context
|
|
3901
|
-
}
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3981
|
+
}) {
|
|
3982
|
+
const env2 = getEnv();
|
|
3983
|
+
const jsonDataView = {
|
|
3984
|
+
model,
|
|
3985
|
+
method: "read_progress_bar",
|
|
3986
|
+
kwargs: {
|
|
3987
|
+
domain: [],
|
|
3988
|
+
group_by: "stage_id",
|
|
3989
|
+
progress_bar: {
|
|
3990
|
+
colors: color,
|
|
3991
|
+
field
|
|
3992
|
+
}
|
|
3993
|
+
},
|
|
3994
|
+
width_context
|
|
3995
|
+
};
|
|
3996
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3997
|
+
headers: {
|
|
3998
|
+
"Content-Type": "application/json"
|
|
3999
|
+
}
|
|
4000
|
+
});
|
|
3906
4001
|
});
|
|
3907
4002
|
}
|
|
3908
4003
|
};
|
|
@@ -3911,259 +4006,285 @@ var kanban_service_default = KanbanServices;
|
|
|
3911
4006
|
// src/services/model-service/index.ts
|
|
3912
4007
|
var OBJECT_POSITION = 2;
|
|
3913
4008
|
var ModelService = {
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
4009
|
+
getListMyBankAccount(_0) {
|
|
4010
|
+
return __async(this, arguments, function* ({
|
|
4011
|
+
domain,
|
|
4012
|
+
spectification,
|
|
4013
|
+
model
|
|
4014
|
+
}) {
|
|
4015
|
+
const env2 = getEnv();
|
|
4016
|
+
const jsonData = {
|
|
4017
|
+
model,
|
|
4018
|
+
method: "web_search_read",
|
|
4019
|
+
kwargs: {
|
|
4020
|
+
specification: spectification,
|
|
4021
|
+
domain,
|
|
4022
|
+
limit: 100,
|
|
4023
|
+
offset: 0
|
|
4024
|
+
}
|
|
4025
|
+
};
|
|
4026
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4027
|
+
headers: {
|
|
4028
|
+
"Content-Type": "application/json"
|
|
4029
|
+
}
|
|
4030
|
+
});
|
|
3934
4031
|
});
|
|
3935
4032
|
},
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
4033
|
+
getCurrency() {
|
|
4034
|
+
return __async(this, null, function* () {
|
|
4035
|
+
const env2 = getEnv();
|
|
4036
|
+
const jsonData = {
|
|
4037
|
+
model: "res.currency",
|
|
4038
|
+
method: "web_search_read",
|
|
4039
|
+
kwargs: {
|
|
4040
|
+
specification: {
|
|
4041
|
+
icon_url: {},
|
|
4042
|
+
name: {}
|
|
4043
|
+
},
|
|
4044
|
+
domain: [["active", "=", true]],
|
|
4045
|
+
limit: 100,
|
|
4046
|
+
offset: 0
|
|
4047
|
+
}
|
|
4048
|
+
};
|
|
4049
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4050
|
+
headers: {
|
|
4051
|
+
"Content-Type": "application/json"
|
|
4052
|
+
}
|
|
4053
|
+
});
|
|
3955
4054
|
});
|
|
3956
4055
|
},
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
4056
|
+
getConversionRate() {
|
|
4057
|
+
return __async(this, null, function* () {
|
|
4058
|
+
const env2 = getEnv();
|
|
4059
|
+
const jsonData = {
|
|
4060
|
+
model: "res.currency",
|
|
4061
|
+
method: "web_search_read",
|
|
4062
|
+
kwargs: {
|
|
4063
|
+
specification: {
|
|
4064
|
+
name: {},
|
|
4065
|
+
icon_url: {},
|
|
4066
|
+
rate_ids: {
|
|
4067
|
+
fields: {
|
|
4068
|
+
company_rate: {},
|
|
4069
|
+
sell: {}
|
|
4070
|
+
}
|
|
3970
4071
|
}
|
|
3971
|
-
}
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
}
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
}
|
|
4072
|
+
},
|
|
4073
|
+
domain: [["active", "=", true]],
|
|
4074
|
+
limit: 100,
|
|
4075
|
+
offset: 0
|
|
4076
|
+
}
|
|
4077
|
+
};
|
|
4078
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4079
|
+
headers: {
|
|
4080
|
+
"Content-Type": "application/json"
|
|
4081
|
+
}
|
|
4082
|
+
});
|
|
3982
4083
|
});
|
|
3983
4084
|
},
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
fields: data.fields
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4085
|
+
getAll(_0) {
|
|
4086
|
+
return __async(this, arguments, function* ({ data }) {
|
|
4087
|
+
const env2 = getEnv();
|
|
4088
|
+
const jsonReadGroup = data.type == "calendar" ? { fields: data == null ? void 0 : data.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
4089
|
+
fields: data.fields,
|
|
4090
|
+
groupby: data.groupby
|
|
4091
|
+
} : {
|
|
4092
|
+
count_limit: 10001,
|
|
4093
|
+
order: data.sort,
|
|
4094
|
+
specification: data.specification
|
|
4095
|
+
};
|
|
4096
|
+
const jsonData = {
|
|
4097
|
+
model: String(data.model),
|
|
4098
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
4099
|
+
ids: data.ids,
|
|
4100
|
+
with_context: data.context,
|
|
4101
|
+
kwargs: __spreadValues({
|
|
4102
|
+
domain: data.domain,
|
|
4103
|
+
limit: data.limit,
|
|
4104
|
+
offset: data.offset
|
|
4105
|
+
}, jsonReadGroup)
|
|
4106
|
+
};
|
|
4107
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4108
|
+
headers: {
|
|
4109
|
+
"Content-Type": "application/json"
|
|
4110
|
+
}
|
|
4111
|
+
});
|
|
4010
4112
|
});
|
|
4011
4113
|
},
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
fields: data.fields
|
|
4016
|
-
groupby: data.groupby
|
|
4017
|
-
} : {
|
|
4018
|
-
count_limit: 10001,
|
|
4019
|
-
order: data.sort,
|
|
4020
|
-
specification: data.specification
|
|
4021
|
-
};
|
|
4022
|
-
const jsonData = {
|
|
4023
|
-
model: String(data.model),
|
|
4024
|
-
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
4025
|
-
ids: data.ids,
|
|
4026
|
-
with_context: data.context,
|
|
4027
|
-
kwargs: {
|
|
4028
|
-
domain: data.domain,
|
|
4029
|
-
limit: data.limit,
|
|
4030
|
-
offset: data.offset,
|
|
4114
|
+
getListCalendar(_0) {
|
|
4115
|
+
return __async(this, arguments, function* ({ data }) {
|
|
4116
|
+
const env2 = getEnv();
|
|
4117
|
+
const jsonReadGroup = data.type == "calendar" ? data == null ? void 0 : data.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
4031
4118
|
fields: data.fields,
|
|
4032
|
-
|
|
4033
|
-
}
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4119
|
+
groupby: data.groupby
|
|
4120
|
+
} : {
|
|
4121
|
+
count_limit: 10001,
|
|
4122
|
+
order: data.sort,
|
|
4123
|
+
specification: data.specification
|
|
4124
|
+
};
|
|
4125
|
+
const jsonData = {
|
|
4126
|
+
model: String(data.model),
|
|
4127
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
4128
|
+
ids: data.ids,
|
|
4129
|
+
with_context: data.context,
|
|
4130
|
+
kwargs: __spreadValues({
|
|
4131
|
+
domain: data.domain,
|
|
4132
|
+
limit: data.limit,
|
|
4133
|
+
offset: data.offset,
|
|
4134
|
+
fields: data.fields
|
|
4135
|
+
}, jsonReadGroup)
|
|
4136
|
+
};
|
|
4137
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4138
|
+
headers: {
|
|
4139
|
+
"Content-Type": "application/json"
|
|
4140
|
+
}
|
|
4141
|
+
});
|
|
4039
4142
|
});
|
|
4040
4143
|
},
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
ids = [],
|
|
4044
|
-
specification = {},
|
|
4045
|
-
domain = [],
|
|
4046
|
-
offset,
|
|
4047
|
-
order,
|
|
4048
|
-
context = {},
|
|
4049
|
-
limit = 10
|
|
4050
|
-
}) {
|
|
4051
|
-
const env2 = getEnv();
|
|
4052
|
-
const jsonData = {
|
|
4144
|
+
getList(_0) {
|
|
4145
|
+
return __async(this, arguments, function* ({
|
|
4053
4146
|
model,
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4147
|
+
ids = [],
|
|
4148
|
+
specification = {},
|
|
4149
|
+
domain = [],
|
|
4150
|
+
offset,
|
|
4151
|
+
order,
|
|
4152
|
+
context = {},
|
|
4153
|
+
limit = 10
|
|
4154
|
+
}) {
|
|
4155
|
+
var _a;
|
|
4156
|
+
const env2 = getEnv();
|
|
4157
|
+
const jsonData = {
|
|
4158
|
+
model,
|
|
4159
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4160
|
+
ids,
|
|
4161
|
+
with_context: context,
|
|
4162
|
+
kwargs: {
|
|
4163
|
+
specification,
|
|
4164
|
+
domain,
|
|
4165
|
+
limit,
|
|
4166
|
+
offset,
|
|
4167
|
+
order
|
|
4168
|
+
}
|
|
4169
|
+
};
|
|
4170
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4171
|
+
headers: {
|
|
4172
|
+
"Content-Type": "application/json"
|
|
4173
|
+
}
|
|
4174
|
+
});
|
|
4069
4175
|
});
|
|
4070
4176
|
},
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
specification,
|
|
4075
|
-
context
|
|
4076
|
-
}) {
|
|
4077
|
-
const env2 = getEnv();
|
|
4078
|
-
const jsonData = {
|
|
4177
|
+
getDetail(_0) {
|
|
4178
|
+
return __async(this, arguments, function* ({
|
|
4179
|
+
ids = [],
|
|
4079
4180
|
model,
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4181
|
+
specification,
|
|
4182
|
+
context
|
|
4183
|
+
}) {
|
|
4184
|
+
var _a;
|
|
4185
|
+
const env2 = getEnv();
|
|
4186
|
+
const jsonData = {
|
|
4187
|
+
model,
|
|
4188
|
+
method: "web_read" /* WEB_READ */,
|
|
4189
|
+
ids,
|
|
4190
|
+
with_context: context,
|
|
4191
|
+
kwargs: {
|
|
4192
|
+
specification
|
|
4193
|
+
}
|
|
4194
|
+
};
|
|
4195
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4196
|
+
headers: {
|
|
4197
|
+
"Content-Type": "application/json"
|
|
4198
|
+
}
|
|
4199
|
+
});
|
|
4091
4200
|
});
|
|
4092
4201
|
},
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
ids = [],
|
|
4096
|
-
data = {},
|
|
4097
|
-
specification = {},
|
|
4098
|
-
context = {},
|
|
4099
|
-
path
|
|
4100
|
-
}) {
|
|
4101
|
-
const env2 = getEnv();
|
|
4102
|
-
const jsonData = {
|
|
4202
|
+
save(_0) {
|
|
4203
|
+
return __async(this, arguments, function* ({
|
|
4103
4204
|
model,
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4205
|
+
ids = [],
|
|
4206
|
+
data = {},
|
|
4207
|
+
specification = {},
|
|
4208
|
+
context = {},
|
|
4209
|
+
path
|
|
4210
|
+
}) {
|
|
4211
|
+
var _a;
|
|
4212
|
+
const env2 = getEnv();
|
|
4213
|
+
const jsonData = {
|
|
4214
|
+
model,
|
|
4215
|
+
method: "web_save" /* WEB_SAVE */,
|
|
4216
|
+
with_context: context,
|
|
4217
|
+
ids,
|
|
4218
|
+
kwargs: {
|
|
4219
|
+
vals: data,
|
|
4220
|
+
specification
|
|
4221
|
+
}
|
|
4222
|
+
};
|
|
4223
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(path != null ? path : "/call" /* CALL_PATH */, jsonData, {
|
|
4224
|
+
headers: {
|
|
4225
|
+
"Content-Type": "application/json"
|
|
4226
|
+
}
|
|
4227
|
+
});
|
|
4116
4228
|
});
|
|
4117
4229
|
},
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4230
|
+
delete(_0) {
|
|
4231
|
+
return __async(this, arguments, function* ({ ids = [], model }) {
|
|
4232
|
+
var _a;
|
|
4233
|
+
const env2 = getEnv();
|
|
4234
|
+
const jsonData = {
|
|
4235
|
+
model,
|
|
4236
|
+
method: "unlink" /* UNLINK */,
|
|
4237
|
+
ids
|
|
4238
|
+
};
|
|
4239
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4240
|
+
headers: {
|
|
4241
|
+
"Content-Type": "application/json"
|
|
4242
|
+
}
|
|
4243
|
+
});
|
|
4129
4244
|
});
|
|
4130
4245
|
},
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
object,
|
|
4135
|
-
specification,
|
|
4136
|
-
context,
|
|
4137
|
-
fieldChange
|
|
4138
|
-
}) {
|
|
4139
|
-
const env2 = getEnv();
|
|
4140
|
-
const jsonData = {
|
|
4246
|
+
onChange(_0) {
|
|
4247
|
+
return __async(this, arguments, function* ({
|
|
4248
|
+
ids = [],
|
|
4141
4249
|
model,
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4250
|
+
object,
|
|
4251
|
+
specification,
|
|
4252
|
+
context,
|
|
4253
|
+
fieldChange
|
|
4254
|
+
}) {
|
|
4255
|
+
var _a;
|
|
4256
|
+
const env2 = getEnv();
|
|
4257
|
+
const jsonData = {
|
|
4258
|
+
model,
|
|
4259
|
+
method: "onchange" /* ONCHANGE */,
|
|
4260
|
+
ids,
|
|
4261
|
+
with_context: context,
|
|
4262
|
+
args: [
|
|
4263
|
+
object ? object : {},
|
|
4264
|
+
fieldChange ? fieldChange : [],
|
|
4265
|
+
specification
|
|
4266
|
+
]
|
|
4267
|
+
};
|
|
4268
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4269
|
+
headers: {
|
|
4270
|
+
"Content-Type": "application/json"
|
|
4271
|
+
}
|
|
4272
|
+
});
|
|
4155
4273
|
});
|
|
4156
4274
|
},
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4275
|
+
getListFieldsOnchange(_0) {
|
|
4276
|
+
return __async(this, arguments, function* ({ model }) {
|
|
4277
|
+
var _a;
|
|
4278
|
+
const env2 = getEnv();
|
|
4279
|
+
const jsonData = {
|
|
4280
|
+
model,
|
|
4281
|
+
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4282
|
+
};
|
|
4283
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4284
|
+
headers: {
|
|
4285
|
+
"Content-Type": "application/json"
|
|
4286
|
+
}
|
|
4287
|
+
});
|
|
4167
4288
|
});
|
|
4168
4289
|
},
|
|
4169
4290
|
parseORMOdoo(data) {
|
|
@@ -4177,13 +4298,14 @@ var ModelService = {
|
|
|
4177
4298
|
data[key] = "/";
|
|
4178
4299
|
}
|
|
4179
4300
|
}
|
|
4180
|
-
return {
|
|
4301
|
+
return __spreadValues({}, data);
|
|
4181
4302
|
},
|
|
4182
4303
|
toDataJS(data, viewData, model) {
|
|
4304
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
4183
4305
|
for (const key in data) {
|
|
4184
4306
|
if (data[key] === false) {
|
|
4185
4307
|
if (viewData && model) {
|
|
4186
|
-
if (viewData
|
|
4308
|
+
if (((_c = (_b = (_a = viewData == null ? void 0 : viewData.models) == null ? void 0 : _a[model]) == null ? void 0 : _b[key]) == null ? void 0 : _c.type) !== "boolean" /* BOOLEAN */) {
|
|
4187
4309
|
data[key] = null;
|
|
4188
4310
|
}
|
|
4189
4311
|
} else {
|
|
@@ -4193,12 +4315,13 @@ var ModelService = {
|
|
|
4193
4315
|
data[key] = "Draft";
|
|
4194
4316
|
} else if (data[key] !== false) {
|
|
4195
4317
|
if (model !== void 0) {
|
|
4196
|
-
if (viewData
|
|
4197
|
-
data[key] = (data[key]
|
|
4198
|
-
|
|
4318
|
+
if (((_f = (_e = (_d = viewData == null ? void 0 : viewData.models) == null ? void 0 : _d[model]) == null ? void 0 : _e[key]) == null ? void 0 : _f.type) === "one2many" /* ONE2MANY */ || ((_i = (_h = (_g = viewData == null ? void 0 : viewData.models) == null ? void 0 : _g[model]) == null ? void 0 : _h[key]) == null ? void 0 : _i.type) === "many2many" /* MANY2MANY */) {
|
|
4319
|
+
data[key] = (_k = (_j = data[key]) != null ? _j : data[key] = []) == null ? void 0 : _k.map((item) => {
|
|
4320
|
+
var _a2, _b2, _c2, _d2;
|
|
4321
|
+
const relation = (_c2 = (_b2 = (_a2 = viewData == null ? void 0 : viewData.models) == null ? void 0 : _a2[model]) == null ? void 0 : _b2[key]) == null ? void 0 : _c2.relation;
|
|
4199
4322
|
if (relation !== void 0) {
|
|
4200
|
-
if (viewData
|
|
4201
|
-
if (item
|
|
4323
|
+
if ((_d2 = viewData == null ? void 0 : viewData.models) == null ? void 0 : _d2[relation]) {
|
|
4324
|
+
if ((item == null ? void 0 : item.length) >= 3) {
|
|
4202
4325
|
return ModelService.toDataJS(
|
|
4203
4326
|
item[OBJECT_POSITION],
|
|
4204
4327
|
viewData,
|
|
@@ -4208,7 +4331,7 @@ var ModelService = {
|
|
|
4208
4331
|
return ModelService.toDataJS(item, viewData, relation);
|
|
4209
4332
|
}
|
|
4210
4333
|
} else {
|
|
4211
|
-
if (item
|
|
4334
|
+
if ((item == null ? void 0 : item.length) >= 3) {
|
|
4212
4335
|
return item[OBJECT_POSITION];
|
|
4213
4336
|
} else {
|
|
4214
4337
|
return item;
|
|
@@ -4220,514 +4343,556 @@ var ModelService = {
|
|
|
4220
4343
|
}
|
|
4221
4344
|
}
|
|
4222
4345
|
}
|
|
4223
|
-
return {
|
|
4346
|
+
return __spreadValues({}, data);
|
|
4224
4347
|
}
|
|
4225
4348
|
};
|
|
4226
4349
|
var model_service_default = ModelService;
|
|
4227
4350
|
|
|
4228
4351
|
// src/services/user-service/index.ts
|
|
4229
4352
|
var UserService = {
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4353
|
+
getProfile(path) {
|
|
4354
|
+
return __async(this, null, function* () {
|
|
4355
|
+
const env2 = getEnv();
|
|
4356
|
+
return env2.requests.get(path != null ? path : "/userinfo" /* PROFILE_PATH */, {
|
|
4357
|
+
headers: {
|
|
4358
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
4359
|
+
}
|
|
4360
|
+
});
|
|
4236
4361
|
});
|
|
4237
4362
|
},
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4363
|
+
getUser(_0) {
|
|
4364
|
+
return __async(this, arguments, function* ({ context, id }) {
|
|
4365
|
+
const env2 = getEnv();
|
|
4366
|
+
const jsonData = {
|
|
4367
|
+
model: "res.users",
|
|
4368
|
+
method: "web_read",
|
|
4369
|
+
ids: [id],
|
|
4370
|
+
with_context: context,
|
|
4371
|
+
kwargs: {
|
|
4372
|
+
specification: {
|
|
4373
|
+
display_name: {},
|
|
4374
|
+
image_1920: {},
|
|
4375
|
+
name: {},
|
|
4376
|
+
login: {},
|
|
4377
|
+
email: {},
|
|
4378
|
+
password: {},
|
|
4379
|
+
visible_group_id: {
|
|
4380
|
+
fields: {
|
|
4381
|
+
id: {},
|
|
4382
|
+
display_name: {}
|
|
4383
|
+
}
|
|
4384
|
+
},
|
|
4385
|
+
company_id: {
|
|
4386
|
+
fields: {
|
|
4387
|
+
id: {},
|
|
4388
|
+
display_name: {}
|
|
4389
|
+
}
|
|
4263
4390
|
}
|
|
4264
4391
|
}
|
|
4265
4392
|
}
|
|
4266
|
-
}
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
}
|
|
4393
|
+
};
|
|
4394
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4395
|
+
headers: {
|
|
4396
|
+
"Content-Type": "application/json"
|
|
4397
|
+
}
|
|
4398
|
+
});
|
|
4272
4399
|
});
|
|
4273
4400
|
},
|
|
4274
|
-
switchUserLocale:
|
|
4401
|
+
switchUserLocale: (_0) => __async(null, [_0], function* ({ id, values }) {
|
|
4402
|
+
var _a;
|
|
4275
4403
|
const env2 = getEnv();
|
|
4276
4404
|
const jsonData = {
|
|
4277
4405
|
model: "res.users",
|
|
4278
4406
|
domain: [["id", "=", id]],
|
|
4279
4407
|
values
|
|
4280
4408
|
};
|
|
4281
|
-
return env2
|
|
4409
|
+
return env2 == null ? void 0 : env2.requests.post((_a = UriConstants) == null ? void 0 : _a.CREATE_UPDATE_PATH, jsonData, {
|
|
4282
4410
|
headers: {
|
|
4283
4411
|
"Content-Type": "application/json"
|
|
4284
4412
|
}
|
|
4285
4413
|
});
|
|
4286
|
-
}
|
|
4414
|
+
})
|
|
4287
4415
|
};
|
|
4288
4416
|
var user_service_default = UserService;
|
|
4289
4417
|
|
|
4290
4418
|
// src/services/view-service/index.ts
|
|
4291
4419
|
var ViewService = {
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
views,
|
|
4295
|
-
context = {},
|
|
4296
|
-
options = {},
|
|
4297
|
-
aid
|
|
4298
|
-
}) {
|
|
4299
|
-
const env2 = getEnv();
|
|
4300
|
-
const defaultOptions = {
|
|
4301
|
-
load_filters: true,
|
|
4302
|
-
toolbar: true,
|
|
4303
|
-
action_id: aid
|
|
4304
|
-
};
|
|
4305
|
-
const jsonDataView = {
|
|
4420
|
+
getView(_0) {
|
|
4421
|
+
return __async(this, arguments, function* ({
|
|
4306
4422
|
model,
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4423
|
+
views,
|
|
4424
|
+
context = {},
|
|
4425
|
+
options = {},
|
|
4426
|
+
aid
|
|
4427
|
+
}) {
|
|
4428
|
+
var _a;
|
|
4429
|
+
const env2 = getEnv();
|
|
4430
|
+
const defaultOptions = {
|
|
4431
|
+
load_filters: true,
|
|
4432
|
+
toolbar: true,
|
|
4433
|
+
action_id: aid
|
|
4434
|
+
};
|
|
4435
|
+
const jsonDataView = {
|
|
4436
|
+
model,
|
|
4437
|
+
method: "get_fields_view_v2" /* GET_FIELD_VIEW */,
|
|
4438
|
+
kwargs: {
|
|
4439
|
+
views,
|
|
4440
|
+
options: __spreadValues(__spreadValues({}, options), defaultOptions)
|
|
4441
|
+
},
|
|
4442
|
+
with_context: context
|
|
4443
|
+
};
|
|
4444
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4445
|
+
headers: {
|
|
4446
|
+
"Content-Type": "application/json"
|
|
4447
|
+
}
|
|
4448
|
+
});
|
|
4318
4449
|
});
|
|
4319
4450
|
},
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
web_icon: {},
|
|
4344
|
-
web_icon_data: {},
|
|
4345
|
-
groups_id: {
|
|
4346
|
-
fields: {
|
|
4347
|
-
full_name: {}
|
|
4451
|
+
getMenu(context) {
|
|
4452
|
+
return __async(this, null, function* () {
|
|
4453
|
+
var _a;
|
|
4454
|
+
const env2 = getEnv();
|
|
4455
|
+
const jsonData = {
|
|
4456
|
+
model: "ir.ui.menu" /* MENU */,
|
|
4457
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4458
|
+
ids: [],
|
|
4459
|
+
with_context: context,
|
|
4460
|
+
kwargs: {
|
|
4461
|
+
specification: {
|
|
4462
|
+
active: {},
|
|
4463
|
+
name: {},
|
|
4464
|
+
is_display: {},
|
|
4465
|
+
sequence: {},
|
|
4466
|
+
complete_name: {},
|
|
4467
|
+
action: {
|
|
4468
|
+
fields: {
|
|
4469
|
+
display_name: {},
|
|
4470
|
+
type: {},
|
|
4471
|
+
binding_view_types: {}
|
|
4472
|
+
// res_model: {},
|
|
4473
|
+
}
|
|
4348
4474
|
},
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
active: {},
|
|
4356
|
-
name: {},
|
|
4357
|
-
is_display: {},
|
|
4358
|
-
sequence: {},
|
|
4359
|
-
complete_name: {},
|
|
4360
|
-
action: {
|
|
4361
|
-
fields: {
|
|
4362
|
-
display_name: {},
|
|
4363
|
-
type: {},
|
|
4364
|
-
binding_view_types: {}
|
|
4365
|
-
// res_model: {},
|
|
4366
|
-
}
|
|
4475
|
+
url_icon: {},
|
|
4476
|
+
web_icon: {},
|
|
4477
|
+
web_icon_data: {},
|
|
4478
|
+
groups_id: {
|
|
4479
|
+
fields: {
|
|
4480
|
+
full_name: {}
|
|
4367
4481
|
},
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4482
|
+
limit: 40,
|
|
4483
|
+
order: ""
|
|
4484
|
+
},
|
|
4485
|
+
display_name: {},
|
|
4486
|
+
child_id: {
|
|
4487
|
+
fields: {
|
|
4488
|
+
active: {},
|
|
4489
|
+
name: {},
|
|
4490
|
+
is_display: {},
|
|
4491
|
+
sequence: {},
|
|
4492
|
+
complete_name: {},
|
|
4493
|
+
action: {
|
|
4494
|
+
fields: {
|
|
4495
|
+
display_name: {},
|
|
4496
|
+
type: {},
|
|
4497
|
+
binding_view_types: {}
|
|
4498
|
+
// res_model: {},
|
|
4499
|
+
}
|
|
4374
4500
|
},
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
active: {},
|
|
4382
|
-
name: {},
|
|
4383
|
-
is_display: {},
|
|
4384
|
-
sequence: {},
|
|
4385
|
-
complete_name: {},
|
|
4386
|
-
action: {
|
|
4387
|
-
fields: {
|
|
4388
|
-
display_name: {},
|
|
4389
|
-
type: {},
|
|
4390
|
-
binding_view_types: {}
|
|
4391
|
-
// res_model: {},
|
|
4392
|
-
}
|
|
4501
|
+
url_icon: {},
|
|
4502
|
+
web_icon: {},
|
|
4503
|
+
web_icon_data: {},
|
|
4504
|
+
groups_id: {
|
|
4505
|
+
fields: {
|
|
4506
|
+
full_name: {}
|
|
4393
4507
|
},
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4508
|
+
limit: 40,
|
|
4509
|
+
order: ""
|
|
4510
|
+
},
|
|
4511
|
+
display_name: {},
|
|
4512
|
+
child_id: {
|
|
4513
|
+
fields: {
|
|
4514
|
+
active: {},
|
|
4515
|
+
name: {},
|
|
4516
|
+
is_display: {},
|
|
4517
|
+
sequence: {},
|
|
4518
|
+
complete_name: {},
|
|
4519
|
+
action: {
|
|
4520
|
+
fields: {
|
|
4521
|
+
display_name: {},
|
|
4522
|
+
type: {},
|
|
4523
|
+
binding_view_types: {}
|
|
4524
|
+
// res_model: {},
|
|
4525
|
+
}
|
|
4400
4526
|
},
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
active: {},
|
|
4408
|
-
name: {},
|
|
4409
|
-
is_display: {},
|
|
4410
|
-
sequence: {},
|
|
4411
|
-
complete_name: {},
|
|
4412
|
-
action: {
|
|
4413
|
-
fields: {
|
|
4414
|
-
display_name: {},
|
|
4415
|
-
type: {},
|
|
4416
|
-
binding_view_types: {}
|
|
4417
|
-
// res_model: {},
|
|
4418
|
-
}
|
|
4527
|
+
url_icon: {},
|
|
4528
|
+
web_icon: {},
|
|
4529
|
+
web_icon_data: {},
|
|
4530
|
+
groups_id: {
|
|
4531
|
+
fields: {
|
|
4532
|
+
full_name: {}
|
|
4419
4533
|
},
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4534
|
+
limit: 40,
|
|
4535
|
+
order: ""
|
|
4536
|
+
},
|
|
4537
|
+
display_name: {},
|
|
4538
|
+
child_id: {
|
|
4539
|
+
fields: {
|
|
4540
|
+
active: {},
|
|
4541
|
+
name: {},
|
|
4542
|
+
is_display: {},
|
|
4543
|
+
sequence: {},
|
|
4544
|
+
complete_name: {},
|
|
4545
|
+
action: {
|
|
4546
|
+
fields: {
|
|
4547
|
+
display_name: {},
|
|
4548
|
+
type: {},
|
|
4549
|
+
binding_view_types: {}
|
|
4550
|
+
// res_model: {},
|
|
4551
|
+
}
|
|
4426
4552
|
},
|
|
4427
|
-
|
|
4428
|
-
|
|
4553
|
+
url_icon: {},
|
|
4554
|
+
web_icon: {},
|
|
4555
|
+
web_icon_data: {},
|
|
4556
|
+
groups_id: {
|
|
4557
|
+
fields: {
|
|
4558
|
+
full_name: {}
|
|
4559
|
+
},
|
|
4560
|
+
limit: 40,
|
|
4561
|
+
order: ""
|
|
4562
|
+
},
|
|
4563
|
+
display_name: {},
|
|
4564
|
+
child_id: {
|
|
4565
|
+
fields: {},
|
|
4566
|
+
limit: 40,
|
|
4567
|
+
order: ""
|
|
4568
|
+
}
|
|
4429
4569
|
},
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
}
|
|
4457
|
-
};
|
|
4458
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4459
|
-
headers: {
|
|
4460
|
-
"Content-Type": "application/json"
|
|
4461
|
-
}
|
|
4570
|
+
limit: 40,
|
|
4571
|
+
order: ""
|
|
4572
|
+
}
|
|
4573
|
+
},
|
|
4574
|
+
limit: 40,
|
|
4575
|
+
order: ""
|
|
4576
|
+
}
|
|
4577
|
+
},
|
|
4578
|
+
limit: 40,
|
|
4579
|
+
order: ""
|
|
4580
|
+
}
|
|
4581
|
+
},
|
|
4582
|
+
domain: [
|
|
4583
|
+
"&",
|
|
4584
|
+
["is_display", "=", true],
|
|
4585
|
+
"&",
|
|
4586
|
+
["active", "=", true],
|
|
4587
|
+
["parent_id", "=", false]
|
|
4588
|
+
]
|
|
4589
|
+
}
|
|
4590
|
+
};
|
|
4591
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4592
|
+
headers: {
|
|
4593
|
+
"Content-Type": "application/json"
|
|
4594
|
+
}
|
|
4595
|
+
});
|
|
4462
4596
|
});
|
|
4463
4597
|
},
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4598
|
+
getActionDetail(aid, context) {
|
|
4599
|
+
return __async(this, null, function* () {
|
|
4600
|
+
var _a;
|
|
4601
|
+
const env2 = getEnv();
|
|
4602
|
+
const jsonData = {
|
|
4603
|
+
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
4604
|
+
method: "web_read" /* WEB_READ */,
|
|
4605
|
+
ids: [aid],
|
|
4606
|
+
with_context: context,
|
|
4607
|
+
kwargs: {
|
|
4608
|
+
specification: {
|
|
4609
|
+
id: {},
|
|
4610
|
+
name: {},
|
|
4611
|
+
res_model: {},
|
|
4612
|
+
views: {},
|
|
4613
|
+
view_mode: {},
|
|
4614
|
+
mobile_view_mode: {},
|
|
4615
|
+
domain: {},
|
|
4616
|
+
context: {},
|
|
4617
|
+
groups_id: {},
|
|
4618
|
+
search_view_id: {}
|
|
4619
|
+
}
|
|
4483
4620
|
}
|
|
4484
|
-
}
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
}
|
|
4621
|
+
};
|
|
4622
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4623
|
+
headers: {
|
|
4624
|
+
"Content-Type": "application/json"
|
|
4625
|
+
}
|
|
4626
|
+
});
|
|
4490
4627
|
});
|
|
4491
4628
|
},
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
ids,
|
|
4495
|
-
context,
|
|
4496
|
-
offset
|
|
4497
|
-
}) {
|
|
4498
|
-
const env2 = getEnv();
|
|
4499
|
-
const jsonData = {
|
|
4629
|
+
getResequence(_0) {
|
|
4630
|
+
return __async(this, arguments, function* ({
|
|
4500
4631
|
model,
|
|
4501
|
-
with_context: context,
|
|
4502
4632
|
ids,
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
}
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4633
|
+
context,
|
|
4634
|
+
offset
|
|
4635
|
+
}) {
|
|
4636
|
+
const env2 = getEnv();
|
|
4637
|
+
const jsonData = __spreadValues({
|
|
4638
|
+
model,
|
|
4639
|
+
with_context: context,
|
|
4640
|
+
ids,
|
|
4641
|
+
field: "sequence"
|
|
4642
|
+
}, offset > 0 ? { offset } : {});
|
|
4643
|
+
return env2 == null ? void 0 : env2.requests.post("/web/dataset/resequence", jsonData, {
|
|
4644
|
+
headers: {
|
|
4645
|
+
"Content-Type": "application/json"
|
|
4646
|
+
}
|
|
4647
|
+
});
|
|
4510
4648
|
});
|
|
4511
4649
|
},
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4650
|
+
getSelectionItem(_0) {
|
|
4651
|
+
return __async(this, arguments, function* ({ data }) {
|
|
4652
|
+
var _a;
|
|
4653
|
+
const env2 = getEnv();
|
|
4654
|
+
const jsonData = {
|
|
4655
|
+
model: data.model,
|
|
4656
|
+
ids: [],
|
|
4657
|
+
method: "get_data_select",
|
|
4658
|
+
with_context: data.context,
|
|
4659
|
+
kwargs: {
|
|
4660
|
+
count_limit: 10001,
|
|
4661
|
+
domain: data.domain ? data.domain : [],
|
|
4662
|
+
offset: 0,
|
|
4663
|
+
order: "",
|
|
4664
|
+
specification: (_a = data == null ? void 0 : data.specification) != null ? _a : {
|
|
4665
|
+
id: {},
|
|
4666
|
+
name: {},
|
|
4667
|
+
display_name: {}
|
|
4668
|
+
}
|
|
4528
4669
|
}
|
|
4529
|
-
}
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
}
|
|
4670
|
+
};
|
|
4671
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4672
|
+
headers: {
|
|
4673
|
+
"Content-Type": "application/json"
|
|
4674
|
+
}
|
|
4675
|
+
});
|
|
4535
4676
|
});
|
|
4536
4677
|
},
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4678
|
+
loadMessages() {
|
|
4679
|
+
return __async(this, null, function* () {
|
|
4680
|
+
const env2 = getEnv();
|
|
4681
|
+
return env2.requests.post(
|
|
4682
|
+
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
4683
|
+
{},
|
|
4684
|
+
{
|
|
4685
|
+
headers: {
|
|
4686
|
+
"Content-Type": "application/json"
|
|
4687
|
+
}
|
|
4688
|
+
}
|
|
4689
|
+
);
|
|
4690
|
+
});
|
|
4691
|
+
},
|
|
4692
|
+
getVersion() {
|
|
4693
|
+
return __async(this, null, function* () {
|
|
4694
|
+
var _a;
|
|
4695
|
+
const env2 = getEnv();
|
|
4696
|
+
console.log("env?.requests", env2, env2 == null ? void 0 : env2.requests);
|
|
4697
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.get("", {
|
|
4543
4698
|
headers: {
|
|
4544
4699
|
"Content-Type": "application/json"
|
|
4545
4700
|
}
|
|
4546
|
-
}
|
|
4547
|
-
);
|
|
4548
|
-
},
|
|
4549
|
-
async getVersion() {
|
|
4550
|
-
const env2 = getEnv();
|
|
4551
|
-
return env2?.requests.get("", {
|
|
4552
|
-
headers: {
|
|
4553
|
-
"Content-Type": "application/json"
|
|
4554
|
-
}
|
|
4701
|
+
});
|
|
4555
4702
|
});
|
|
4556
4703
|
},
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
with_context
|
|
4560
|
-
}) {
|
|
4561
|
-
const env2 = getEnv();
|
|
4562
|
-
const jsonData = {
|
|
4704
|
+
get2FAMethods(_0) {
|
|
4705
|
+
return __async(this, arguments, function* ({
|
|
4563
4706
|
method,
|
|
4564
4707
|
with_context
|
|
4565
|
-
}
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4708
|
+
}) {
|
|
4709
|
+
const env2 = getEnv();
|
|
4710
|
+
const jsonData = {
|
|
4711
|
+
method,
|
|
4712
|
+
with_context
|
|
4713
|
+
};
|
|
4714
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4715
|
+
headers: {
|
|
4716
|
+
"Content-Type": "application/json"
|
|
4717
|
+
}
|
|
4718
|
+
});
|
|
4570
4719
|
});
|
|
4571
4720
|
},
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
with_context,
|
|
4575
|
-
code,
|
|
4576
|
-
device,
|
|
4577
|
-
location
|
|
4578
|
-
}) {
|
|
4579
|
-
const env2 = getEnv();
|
|
4580
|
-
const jsonData = {
|
|
4721
|
+
verify2FA(_0) {
|
|
4722
|
+
return __async(this, arguments, function* ({
|
|
4581
4723
|
method,
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4724
|
+
with_context,
|
|
4725
|
+
code,
|
|
4726
|
+
device,
|
|
4727
|
+
location
|
|
4728
|
+
}) {
|
|
4729
|
+
const env2 = getEnv();
|
|
4730
|
+
const jsonData = {
|
|
4731
|
+
method,
|
|
4732
|
+
kwargs: {
|
|
4733
|
+
vals: {
|
|
4734
|
+
code,
|
|
4735
|
+
device,
|
|
4736
|
+
location
|
|
4737
|
+
}
|
|
4738
|
+
},
|
|
4739
|
+
with_context
|
|
4740
|
+
};
|
|
4741
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4742
|
+
headers: {
|
|
4743
|
+
"Content-Type": "application/json"
|
|
4744
|
+
},
|
|
4745
|
+
withCredentials: true
|
|
4746
|
+
});
|
|
4596
4747
|
});
|
|
4597
4748
|
},
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
state,
|
|
4601
|
-
client_id,
|
|
4602
|
-
response_type,
|
|
4603
|
-
path
|
|
4604
|
-
}) {
|
|
4605
|
-
const env2 = getEnv();
|
|
4606
|
-
const params = new URLSearchParams({
|
|
4607
|
-
response_type,
|
|
4608
|
-
client_id,
|
|
4749
|
+
signInSSO(_0) {
|
|
4750
|
+
return __async(this, arguments, function* ({
|
|
4609
4751
|
redirect_uri,
|
|
4610
|
-
state
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4752
|
+
state,
|
|
4753
|
+
client_id,
|
|
4754
|
+
response_type,
|
|
4755
|
+
path
|
|
4756
|
+
}) {
|
|
4757
|
+
const env2 = getEnv();
|
|
4758
|
+
const params = new URLSearchParams({
|
|
4759
|
+
response_type,
|
|
4760
|
+
client_id,
|
|
4761
|
+
redirect_uri,
|
|
4762
|
+
state
|
|
4763
|
+
});
|
|
4764
|
+
const url = `${path}?${params.toString()}`;
|
|
4765
|
+
return env2 == null ? void 0 : env2.requests.get(url, {
|
|
4766
|
+
headers: {
|
|
4767
|
+
"Content-Type": "application/json"
|
|
4768
|
+
},
|
|
4769
|
+
withCredentials: true
|
|
4770
|
+
});
|
|
4618
4771
|
});
|
|
4619
4772
|
},
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
state,
|
|
4623
|
-
client_id,
|
|
4624
|
-
scopes
|
|
4625
|
-
}) {
|
|
4626
|
-
const env2 = getEnv();
|
|
4627
|
-
const jsonData = {
|
|
4773
|
+
grantAccess(_0) {
|
|
4774
|
+
return __async(this, arguments, function* ({
|
|
4628
4775
|
redirect_uri,
|
|
4629
4776
|
state,
|
|
4630
4777
|
client_id,
|
|
4631
4778
|
scopes
|
|
4632
|
-
}
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4779
|
+
}) {
|
|
4780
|
+
const env2 = getEnv();
|
|
4781
|
+
const jsonData = {
|
|
4782
|
+
redirect_uri,
|
|
4783
|
+
state,
|
|
4784
|
+
client_id,
|
|
4785
|
+
scopes
|
|
4786
|
+
};
|
|
4787
|
+
return env2 == null ? void 0 : env2.requests.post("/grant-access" /* GRANT_ACCESS */, jsonData, {
|
|
4788
|
+
headers: {
|
|
4789
|
+
"Content-Type": "application/json"
|
|
4790
|
+
},
|
|
4791
|
+
withCredentials: true
|
|
4792
|
+
});
|
|
4638
4793
|
});
|
|
4639
4794
|
},
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
token,
|
|
4643
|
-
views
|
|
4644
|
-
}) {
|
|
4645
|
-
const env2 = getEnv();
|
|
4646
|
-
const jsonData = {
|
|
4795
|
+
getFieldsViewSecurity(_0) {
|
|
4796
|
+
return __async(this, arguments, function* ({
|
|
4647
4797
|
method,
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4798
|
+
token,
|
|
4799
|
+
views
|
|
4800
|
+
}) {
|
|
4801
|
+
const env2 = getEnv();
|
|
4802
|
+
const jsonData = {
|
|
4803
|
+
method,
|
|
4804
|
+
kwargs: {
|
|
4805
|
+
views
|
|
4806
|
+
},
|
|
4807
|
+
with_context: {
|
|
4808
|
+
token
|
|
4809
|
+
}
|
|
4810
|
+
};
|
|
4811
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4812
|
+
headers: {
|
|
4813
|
+
"Content-Type": "application/json"
|
|
4814
|
+
}
|
|
4815
|
+
});
|
|
4659
4816
|
});
|
|
4660
4817
|
},
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
model,
|
|
4664
|
-
kwargs,
|
|
4665
|
-
token
|
|
4666
|
-
}) {
|
|
4667
|
-
const env2 = getEnv();
|
|
4668
|
-
const jsonData = {
|
|
4818
|
+
settingsWebRead2fa(_0) {
|
|
4819
|
+
return __async(this, arguments, function* ({
|
|
4669
4820
|
method,
|
|
4670
4821
|
model,
|
|
4671
4822
|
kwargs,
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4823
|
+
token
|
|
4824
|
+
}) {
|
|
4825
|
+
const env2 = getEnv();
|
|
4826
|
+
const jsonData = {
|
|
4827
|
+
method,
|
|
4828
|
+
model,
|
|
4829
|
+
kwargs,
|
|
4830
|
+
with_context: {
|
|
4831
|
+
token
|
|
4832
|
+
}
|
|
4833
|
+
};
|
|
4834
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4835
|
+
headers: {
|
|
4836
|
+
"Content-Type": "application/json"
|
|
4837
|
+
}
|
|
4838
|
+
});
|
|
4680
4839
|
});
|
|
4681
4840
|
},
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4841
|
+
requestSetupTotp(_0) {
|
|
4842
|
+
return __async(this, arguments, function* ({ method, token }) {
|
|
4843
|
+
const env2 = getEnv();
|
|
4844
|
+
const jsonData = {
|
|
4845
|
+
method,
|
|
4846
|
+
with_context: {
|
|
4847
|
+
token
|
|
4848
|
+
}
|
|
4849
|
+
};
|
|
4850
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4851
|
+
headers: {
|
|
4852
|
+
"Content-Type": "application/json"
|
|
4853
|
+
}
|
|
4854
|
+
});
|
|
4694
4855
|
});
|
|
4695
4856
|
},
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
action_token,
|
|
4699
|
-
code
|
|
4700
|
-
}) {
|
|
4701
|
-
const env2 = getEnv();
|
|
4702
|
-
const jsonData = {
|
|
4857
|
+
verifyTotp(_0) {
|
|
4858
|
+
return __async(this, arguments, function* ({
|
|
4703
4859
|
method,
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4860
|
+
action_token,
|
|
4861
|
+
code
|
|
4862
|
+
}) {
|
|
4863
|
+
const env2 = getEnv();
|
|
4864
|
+
const jsonData = {
|
|
4865
|
+
method,
|
|
4866
|
+
kwargs: {
|
|
4867
|
+
vals: {
|
|
4868
|
+
code
|
|
4869
|
+
}
|
|
4870
|
+
},
|
|
4871
|
+
with_context: {
|
|
4872
|
+
action_token
|
|
4707
4873
|
}
|
|
4708
|
-
}
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
headers: {
|
|
4715
|
-
"Content-Type": "application/json"
|
|
4716
|
-
}
|
|
4874
|
+
};
|
|
4875
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4876
|
+
headers: {
|
|
4877
|
+
"Content-Type": "application/json"
|
|
4878
|
+
}
|
|
4879
|
+
});
|
|
4717
4880
|
});
|
|
4718
4881
|
},
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4882
|
+
removeTotpSetUp(_0) {
|
|
4883
|
+
return __async(this, arguments, function* ({ method, token }) {
|
|
4884
|
+
const env2 = getEnv();
|
|
4885
|
+
const jsonData = {
|
|
4886
|
+
method,
|
|
4887
|
+
with_context: {
|
|
4888
|
+
token
|
|
4889
|
+
}
|
|
4890
|
+
};
|
|
4891
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4892
|
+
headers: {
|
|
4893
|
+
"Content-Type": "application/json"
|
|
4894
|
+
}
|
|
4895
|
+
});
|
|
4731
4896
|
});
|
|
4732
4897
|
}
|
|
4733
4898
|
};
|
|
@@ -4763,7 +4928,7 @@ var import_react_query3 = require("@tanstack/react-query");
|
|
|
4763
4928
|
var useGetProvider = () => {
|
|
4764
4929
|
return (0, import_react_query3.useMutation)({
|
|
4765
4930
|
mutationFn: (data) => {
|
|
4766
|
-
return auth_service_default.getProviders(data
|
|
4931
|
+
return auth_service_default.getProviders(data == null ? void 0 : data.db);
|
|
4767
4932
|
}
|
|
4768
4933
|
});
|
|
4769
4934
|
};
|
|
@@ -5263,10 +5428,6 @@ var use_get_list_my_bank_account_default = useGetListMyBankAccount;
|
|
|
5263
5428
|
|
|
5264
5429
|
// src/models/base-model/index.ts
|
|
5265
5430
|
var BaseModel = class {
|
|
5266
|
-
name;
|
|
5267
|
-
view;
|
|
5268
|
-
actContext;
|
|
5269
|
-
fields;
|
|
5270
5431
|
constructor(init) {
|
|
5271
5432
|
this.name = init.name;
|
|
5272
5433
|
this.view = init.view;
|
|
@@ -5281,21 +5442,22 @@ var BaseModel = class {
|
|
|
5281
5442
|
modelRoot
|
|
5282
5443
|
}) {
|
|
5283
5444
|
if (Array.isArray(fields)) {
|
|
5284
|
-
let spec = {
|
|
5445
|
+
let spec = __spreadValues({}, specification);
|
|
5285
5446
|
fields.forEach((field) => {
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
const
|
|
5447
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
5448
|
+
if (!(field == null ? void 0 : field.type_co) || (field == null ? void 0 : field.name) && (field == null ? void 0 : field.type_co) === "field" /* FIELD */) {
|
|
5449
|
+
if ((_a = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _a[field == null ? void 0 : field.name]) {
|
|
5450
|
+
if (((_c = (_b = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _b[field == null ? void 0 : field.name]) == null ? void 0 : _c.type) === "one2many" /* ONE2MANY */ || ((_e = (_d = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _d[field == null ? void 0 : field.name]) == null ? void 0 : _e.type) === "many2many" /* MANY2MANY */) {
|
|
5451
|
+
const relation = (_g = (_f = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _f[field == null ? void 0 : field.name]) == null ? void 0 : _g.relation;
|
|
5452
|
+
const modelRelation = modelsData == null ? void 0 : modelsData[relation];
|
|
5291
5453
|
if (modelRelation) {
|
|
5292
|
-
spec[field
|
|
5454
|
+
spec[field == null ? void 0 : field.name] = {
|
|
5293
5455
|
fields: {}
|
|
5294
5456
|
};
|
|
5295
5457
|
if (modelRoot && modelRoot === relation) {
|
|
5296
|
-
spec[field
|
|
5458
|
+
spec[field == null ? void 0 : field.name].fields = { id: {} };
|
|
5297
5459
|
} else {
|
|
5298
|
-
spec[field
|
|
5460
|
+
spec[field == null ? void 0 : field.name].fields = this.getSpecificationByFields({
|
|
5299
5461
|
fields: Object.values(modelRelation),
|
|
5300
5462
|
specification: {},
|
|
5301
5463
|
modelsData,
|
|
@@ -5304,45 +5466,42 @@ var BaseModel = class {
|
|
|
5304
5466
|
});
|
|
5305
5467
|
}
|
|
5306
5468
|
} else {
|
|
5307
|
-
spec[field
|
|
5469
|
+
spec[field == null ? void 0 : field.name] = {
|
|
5308
5470
|
fields: {
|
|
5309
5471
|
id: {},
|
|
5310
5472
|
display_name: {}
|
|
5311
5473
|
}
|
|
5312
5474
|
};
|
|
5313
5475
|
}
|
|
5314
|
-
} else if (modelsData
|
|
5315
|
-
spec[field
|
|
5316
|
-
fields: {
|
|
5476
|
+
} else if (((_i = (_h = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _h[field == null ? void 0 : field.name]) == null ? void 0 : _i.type) === "many2one" /* MANY2ONE */) {
|
|
5477
|
+
spec[field == null ? void 0 : field.name] = {
|
|
5478
|
+
fields: __spreadValues(__spreadValues(__spreadValues({
|
|
5317
5479
|
id: {},
|
|
5318
|
-
display_name: {}
|
|
5319
|
-
|
|
5320
|
-
...field?.name === "currency_id" && fields?.find((item) => item?.widget === "monetary") ? { symbol: {} } : {},
|
|
5321
|
-
...field?.widget === "many2many_binary" ? { mimetype: {} } : {}
|
|
5322
|
-
}
|
|
5480
|
+
display_name: {}
|
|
5481
|
+
}, WIDGETAVATAR[field == null ? void 0 : field.widget] ? { image_256: {} } : {}), (field == null ? void 0 : field.name) === "currency_id" && (fields == null ? void 0 : fields.find((item) => (item == null ? void 0 : item.widget) === "monetary")) ? { symbol: {} } : {}), (field == null ? void 0 : field.widget) === "many2many_binary" ? { mimetype: {} } : {})
|
|
5323
5482
|
};
|
|
5324
5483
|
} else {
|
|
5325
|
-
spec[field
|
|
5484
|
+
spec[field == null ? void 0 : field.name] = {};
|
|
5326
5485
|
}
|
|
5327
5486
|
}
|
|
5328
|
-
} else if (field
|
|
5487
|
+
} else if ((field == null ? void 0 : field.type_co) === "group" /* GROUP */ || (field == null ? void 0 : field.type_co) === "div" /* DIV */ || (field == null ? void 0 : field.type_co) === "span" /* SPAN */) {
|
|
5329
5488
|
const specGroup = this.getSpecificationByFields({
|
|
5330
|
-
fields: field
|
|
5489
|
+
fields: field == null ? void 0 : field.fields,
|
|
5331
5490
|
specification: spec,
|
|
5332
5491
|
modelsData,
|
|
5333
5492
|
model
|
|
5334
5493
|
});
|
|
5335
|
-
spec = {
|
|
5336
|
-
} else if (field
|
|
5337
|
-
const relation = modelsData
|
|
5494
|
+
spec = __spreadValues(__spreadValues({}, spec), specGroup);
|
|
5495
|
+
} else if ((field == null ? void 0 : field.type_co) === "tree" /* TREE */ || (field == null ? void 0 : field.type_co) === "list" /* LIST */) {
|
|
5496
|
+
const relation = (_k = (_j = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _j[field == null ? void 0 : field.name]) == null ? void 0 : _k.relation;
|
|
5338
5497
|
const specTreee = this.getSpecificationByFields({
|
|
5339
|
-
fields: field
|
|
5498
|
+
fields: field == null ? void 0 : field.fields,
|
|
5340
5499
|
specification: {},
|
|
5341
5500
|
modelsData,
|
|
5342
5501
|
model: relation,
|
|
5343
5502
|
modelRoot: model
|
|
5344
5503
|
});
|
|
5345
|
-
spec = {
|
|
5504
|
+
spec = __spreadProps(__spreadValues({}, spec), { [field == null ? void 0 : field.name]: { fields: specTreee } });
|
|
5346
5505
|
}
|
|
5347
5506
|
});
|
|
5348
5507
|
return spec;
|
|
@@ -5351,16 +5510,19 @@ var BaseModel = class {
|
|
|
5351
5510
|
}
|
|
5352
5511
|
}
|
|
5353
5512
|
getTreeProps() {
|
|
5354
|
-
|
|
5513
|
+
var _a, _b;
|
|
5514
|
+
const props = ((_b = (_a = this.view) == null ? void 0 : _a.views) == null ? void 0 : _b.list) || {};
|
|
5355
5515
|
return props;
|
|
5356
5516
|
}
|
|
5357
5517
|
getTreeFields() {
|
|
5358
|
-
|
|
5518
|
+
var _a, _b, _c;
|
|
5519
|
+
const fields = ((_c = (_b = (_a = this.view) == null ? void 0 : _a.views) == null ? void 0 : _b.list) == null ? void 0 : _c.fields) || [];
|
|
5359
5520
|
return fields;
|
|
5360
5521
|
}
|
|
5361
5522
|
getSpecification() {
|
|
5523
|
+
var _a;
|
|
5362
5524
|
const specInit = {};
|
|
5363
|
-
const modelData = this.view
|
|
5525
|
+
const modelData = ((_a = this.view) == null ? void 0 : _a.models) || {};
|
|
5364
5526
|
const specification = this.getSpecificationByFields({
|
|
5365
5527
|
fields: this.fields,
|
|
5366
5528
|
specification: specInit,
|
|
@@ -5376,7 +5538,7 @@ var base_model_default = BaseModel;
|
|
|
5376
5538
|
// src/hooks/model/use-model.ts
|
|
5377
5539
|
var useModel = () => {
|
|
5378
5540
|
const initModel = (modelData) => {
|
|
5379
|
-
switch (modelData
|
|
5541
|
+
switch (modelData == null ? void 0 : modelData.name) {
|
|
5380
5542
|
default:
|
|
5381
5543
|
return new base_model_default(modelData);
|
|
5382
5544
|
}
|
|
@@ -5521,22 +5683,22 @@ var useGetActionDetail = ({
|
|
|
5521
5683
|
}) => {
|
|
5522
5684
|
const data = {
|
|
5523
5685
|
id,
|
|
5524
|
-
model: model
|
|
5686
|
+
model: model != null ? model : "",
|
|
5525
5687
|
context
|
|
5526
5688
|
};
|
|
5527
5689
|
return (0, import_react_query43.useQuery)({
|
|
5528
5690
|
queryKey,
|
|
5529
|
-
queryFn:
|
|
5691
|
+
queryFn: () => __async(null, null, function* () {
|
|
5530
5692
|
if (aid) {
|
|
5531
|
-
const res =
|
|
5693
|
+
const res = yield view_service_default.getActionDetail(aid, context);
|
|
5532
5694
|
if (res && res.length > 0) {
|
|
5533
5695
|
return res[0];
|
|
5534
5696
|
}
|
|
5535
5697
|
} else {
|
|
5536
|
-
const res =
|
|
5698
|
+
const res = yield form_service_default.getFormView({ data });
|
|
5537
5699
|
return res;
|
|
5538
5700
|
}
|
|
5539
|
-
},
|
|
5701
|
+
}),
|
|
5540
5702
|
enabled,
|
|
5541
5703
|
refetchOnWindowFocus: false,
|
|
5542
5704
|
staleTime: Infinity
|
|
@@ -5608,8 +5770,9 @@ var useGetMenu = (context, enabled) => {
|
|
|
5608
5770
|
return (0, import_react_query47.useQuery)({
|
|
5609
5771
|
queryKey: ["menus" /* MENU */, context],
|
|
5610
5772
|
queryFn: () => view_service_default.getMenu(context).then((res) => {
|
|
5611
|
-
|
|
5612
|
-
|
|
5773
|
+
var _a;
|
|
5774
|
+
if (res && (res == null ? void 0 : res.records) && ((_a = res == null ? void 0 : res.records) == null ? void 0 : _a.length) > 0) {
|
|
5775
|
+
return res == null ? void 0 : res.records;
|
|
5613
5776
|
}
|
|
5614
5777
|
return [];
|
|
5615
5778
|
}),
|