@fctc/interface-logic 1.5.5 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{configs.mjs → configs.cjs} +152 -105
- package/dist/{configs.d.mts → configs.d.cts} +1 -1
- package/dist/configs.js +115 -140
- package/dist/{constants.mjs → constants.cjs} +40 -2
- package/dist/constants.js +2 -41
- package/dist/{environment.mjs → environment.cjs} +208 -154
- package/dist/environment.js +167 -189
- package/dist/{hooks.mjs → hooks.cjs} +1893 -1627
- package/dist/{hooks.d.mts → hooks.d.cts} +1 -1
- package/dist/hooks.js +1788 -1726
- package/dist/{provider.mjs → provider.cjs} +648 -557
- package/dist/{provider.d.mts → provider.d.cts} +4 -3
- package/dist/provider.d.ts +4 -3
- package/dist/provider.js +608 -591
- package/dist/{services.mjs → services.cjs} +1607 -1398
- package/dist/{services.d.mts → services.d.cts} +1 -1
- package/dist/services.js +1560 -1437
- package/dist/{store.mjs → store.cjs} +148 -30
- package/dist/{store.d.mts → store.d.cts} +127 -127
- package/dist/store.d.ts +127 -127
- package/dist/store.js +43 -131
- package/dist/types.cjs +17 -0
- package/dist/{types.d.mts → types.d.cts} +1 -1
- package/dist/types.js +0 -18
- package/dist/{utils.mjs → utils.cjs} +202 -115
- package/dist/{utils.d.mts → utils.d.cts} +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +135 -176
- package/package.json +23 -11
- package/dist/types.mjs +0 -0
- /package/dist/{constants.d.mts → constants.d.cts} +0 -0
- /package/dist/{environment.d.mts → environment.d.cts} +0 -0
- /package/dist/{view-type-BGJfDe73.d.mts → view-type-BGJfDe73.d.cts} +0 -0
package/dist/services.js
CHANGED
|
@@ -1,46 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
1
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __pow = Math.pow;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
11
19
|
};
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __async = (__this, __arguments, generator) => {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
var fulfilled = (value) => {
|
|
24
|
+
try {
|
|
25
|
+
step(generator.next(value));
|
|
26
|
+
} catch (e) {
|
|
27
|
+
reject(e);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var rejected = (value) => {
|
|
31
|
+
try {
|
|
32
|
+
step(generator.throw(value));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
38
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
39
|
+
});
|
|
19
40
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/services.ts
|
|
31
|
-
var services_exports = {};
|
|
32
|
-
__export(services_exports, {
|
|
33
|
-
ActionService: () => action_service_default,
|
|
34
|
-
AuthService: () => auth_service_default,
|
|
35
|
-
CompanyService: () => company_service_default,
|
|
36
|
-
ExcelService: () => excel_service_default,
|
|
37
|
-
FormService: () => form_service_default,
|
|
38
|
-
KanbanService: () => kanban_service_default,
|
|
39
|
-
ModelService: () => model_service_default,
|
|
40
|
-
UserService: () => user_service_default,
|
|
41
|
-
ViewService: () => view_service_default
|
|
42
|
-
});
|
|
43
|
-
module.exports = __toCommonJS(services_exports);
|
|
44
41
|
|
|
45
42
|
// src/constants/api/uri-constant.ts
|
|
46
43
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -73,10 +70,10 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
73
70
|
})(UriConstants || {});
|
|
74
71
|
|
|
75
72
|
// src/configs/axios-client.ts
|
|
76
|
-
|
|
73
|
+
import axios from "axios";
|
|
77
74
|
|
|
78
75
|
// src/utils/format.ts
|
|
79
|
-
|
|
76
|
+
import moment from "moment";
|
|
80
77
|
|
|
81
78
|
// src/utils/domain/py_tokenizer.ts
|
|
82
79
|
var TokenizerError = class extends Error {
|
|
@@ -1156,22 +1153,6 @@ var PyRelativeDelta = class _PyRelativeDelta {
|
|
|
1156
1153
|
this.microsecond = params.microsecond;
|
|
1157
1154
|
this.weekday = params.weekday;
|
|
1158
1155
|
}
|
|
1159
|
-
years;
|
|
1160
|
-
months;
|
|
1161
|
-
days;
|
|
1162
|
-
hours;
|
|
1163
|
-
minutes;
|
|
1164
|
-
seconds;
|
|
1165
|
-
microseconds;
|
|
1166
|
-
leapDays;
|
|
1167
|
-
year;
|
|
1168
|
-
month;
|
|
1169
|
-
day;
|
|
1170
|
-
hour;
|
|
1171
|
-
minute;
|
|
1172
|
-
second;
|
|
1173
|
-
microsecond;
|
|
1174
|
-
weekday;
|
|
1175
1156
|
negate() {
|
|
1176
1157
|
return new _PyRelativeDelta(this, -1);
|
|
1177
1158
|
}
|
|
@@ -1286,7 +1267,7 @@ function execOnIterable(iterable, func) {
|
|
|
1286
1267
|
if (typeof iterable === "object" && !Array.isArray(iterable) && !(iterable instanceof Set)) {
|
|
1287
1268
|
iterable = Object.keys(iterable);
|
|
1288
1269
|
}
|
|
1289
|
-
if (typeof iterable
|
|
1270
|
+
if (typeof (iterable == null ? void 0 : iterable[Symbol.iterator]) !== "function") {
|
|
1290
1271
|
throw new EvaluationError("value not iterable");
|
|
1291
1272
|
}
|
|
1292
1273
|
return func(iterable);
|
|
@@ -1609,7 +1590,7 @@ function applyBinaryOp(ast, context) {
|
|
|
1609
1590
|
}
|
|
1610
1591
|
return Math.floor(left / right);
|
|
1611
1592
|
case "**":
|
|
1612
|
-
return left
|
|
1593
|
+
return __pow(left, right);
|
|
1613
1594
|
case "==":
|
|
1614
1595
|
return isEqual(left, right);
|
|
1615
1596
|
case "<>":
|
|
@@ -1731,7 +1712,7 @@ function evaluate(ast, context = {}) {
|
|
|
1731
1712
|
const dicts = /* @__PURE__ */ new Set();
|
|
1732
1713
|
let pyContext;
|
|
1733
1714
|
const evalContext = Object.create(context);
|
|
1734
|
-
if (!evalContext
|
|
1715
|
+
if (!(evalContext == null ? void 0 : evalContext.context)) {
|
|
1735
1716
|
Object.defineProperty(evalContext, "context", {
|
|
1736
1717
|
get() {
|
|
1737
1718
|
if (!pyContext) {
|
|
@@ -1742,17 +1723,18 @@ function evaluate(ast, context = {}) {
|
|
|
1742
1723
|
});
|
|
1743
1724
|
}
|
|
1744
1725
|
function _innerEvaluate(ast2) {
|
|
1745
|
-
|
|
1726
|
+
var _a, _b, _c;
|
|
1727
|
+
switch (ast2 == null ? void 0 : ast2.type) {
|
|
1746
1728
|
case 0:
|
|
1747
1729
|
// Number
|
|
1748
1730
|
case 1:
|
|
1749
1731
|
return ast2.value;
|
|
1750
1732
|
case 5:
|
|
1751
1733
|
if (ast2.value in evalContext) {
|
|
1752
|
-
if (typeof evalContext[ast2.value] === "object" && evalContext[ast2.value]
|
|
1753
|
-
return evalContext[ast2.value]
|
|
1734
|
+
if (typeof evalContext[ast2.value] === "object" && ((_a = evalContext[ast2.value]) == null ? void 0 : _a.id)) {
|
|
1735
|
+
return (_b = evalContext[ast2.value]) == null ? void 0 : _b.id;
|
|
1754
1736
|
}
|
|
1755
|
-
return evalContext[ast2.value]
|
|
1737
|
+
return (_c = evalContext[ast2.value]) != null ? _c : false;
|
|
1756
1738
|
} else if (ast2.value in BUILTINS) {
|
|
1757
1739
|
return BUILTINS[ast2.value];
|
|
1758
1740
|
} else {
|
|
@@ -1789,7 +1771,7 @@ function evaluate(ast, context = {}) {
|
|
|
1789
1771
|
const args = ast2.args.map(_evaluate);
|
|
1790
1772
|
const kwargs = {};
|
|
1791
1773
|
for (const kwarg in ast2.kwargs) {
|
|
1792
|
-
kwargs[kwarg] = _evaluate(ast2
|
|
1774
|
+
kwargs[kwarg] = _evaluate(ast2 == null ? void 0 : ast2.kwargs[kwarg]);
|
|
1793
1775
|
}
|
|
1794
1776
|
if (fnValue === PyDate || fnValue === PyDateTime || fnValue === PyTime || fnValue === PyRelativeDelta || fnValue === PyTimeDelta) {
|
|
1795
1777
|
return fnValue.create(...args, kwargs);
|
|
@@ -1868,9 +1850,25 @@ function escapeRegExp(str) {
|
|
|
1868
1850
|
var InvalidDomainError = class extends Error {
|
|
1869
1851
|
};
|
|
1870
1852
|
var Domain = class _Domain {
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1853
|
+
constructor(descr = []) {
|
|
1854
|
+
this.ast = { type: -1, value: null };
|
|
1855
|
+
if (descr instanceof _Domain) {
|
|
1856
|
+
return new _Domain(descr.toString());
|
|
1857
|
+
} else {
|
|
1858
|
+
let rawAST;
|
|
1859
|
+
try {
|
|
1860
|
+
rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
|
|
1861
|
+
} catch (error) {
|
|
1862
|
+
throw new InvalidDomainError(
|
|
1863
|
+
`Invalid domain representation: ${descr}`,
|
|
1864
|
+
{
|
|
1865
|
+
cause: error
|
|
1866
|
+
}
|
|
1867
|
+
);
|
|
1868
|
+
}
|
|
1869
|
+
this.ast = normalizeDomainAST(rawAST);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1874
1872
|
static combine(domains, operator) {
|
|
1875
1873
|
if (domains.length === 0) {
|
|
1876
1874
|
return new _Domain([]);
|
|
@@ -1949,24 +1947,6 @@ var Domain = class _Domain {
|
|
|
1949
1947
|
processLeaf(d.ast.value, 0, "&", newDomain);
|
|
1950
1948
|
return newDomain;
|
|
1951
1949
|
}
|
|
1952
|
-
constructor(descr = []) {
|
|
1953
|
-
if (descr instanceof _Domain) {
|
|
1954
|
-
return new _Domain(descr.toString());
|
|
1955
|
-
} else {
|
|
1956
|
-
let rawAST;
|
|
1957
|
-
try {
|
|
1958
|
-
rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
|
|
1959
|
-
} catch (error) {
|
|
1960
|
-
throw new InvalidDomainError(
|
|
1961
|
-
`Invalid domain representation: ${descr}`,
|
|
1962
|
-
{
|
|
1963
|
-
cause: error
|
|
1964
|
-
}
|
|
1965
|
-
);
|
|
1966
|
-
}
|
|
1967
|
-
this.ast = normalizeDomainAST(rawAST);
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
1950
|
contains(record) {
|
|
1971
1951
|
const expr = evaluate(this.ast, record);
|
|
1972
1952
|
return matchDomain(record, expr);
|
|
@@ -1985,7 +1965,7 @@ var Domain = class _Domain {
|
|
|
1985
1965
|
return evaluatedAsList;
|
|
1986
1966
|
}
|
|
1987
1967
|
return this.toString();
|
|
1988
|
-
} catch {
|
|
1968
|
+
} catch (e) {
|
|
1989
1969
|
return this.toString();
|
|
1990
1970
|
}
|
|
1991
1971
|
}
|
|
@@ -2185,7 +2165,7 @@ function matchDomain(record, domain) {
|
|
|
2185
2165
|
}
|
|
2186
2166
|
|
|
2187
2167
|
// src/utils/function.ts
|
|
2188
|
-
|
|
2168
|
+
import { useEffect, useState } from "react";
|
|
2189
2169
|
var toQueryString = (params) => {
|
|
2190
2170
|
return Object.keys(params).map(
|
|
2191
2171
|
(key) => encodeURIComponent(key) + "=" + encodeURIComponent(params[key].toString())
|
|
@@ -2213,22 +2193,22 @@ var updateTokenParamInOriginalRequest = (originalRequest, newAccessToken) => {
|
|
|
2213
2193
|
|
|
2214
2194
|
// src/utils/storage/local-storage.ts
|
|
2215
2195
|
var localStorageUtils = () => {
|
|
2216
|
-
const setToken =
|
|
2196
|
+
const setToken = (access_token) => __async(null, null, function* () {
|
|
2217
2197
|
localStorage.setItem("accessToken", access_token);
|
|
2218
|
-
};
|
|
2219
|
-
const setRefreshToken =
|
|
2198
|
+
});
|
|
2199
|
+
const setRefreshToken = (refresh_token) => __async(null, null, function* () {
|
|
2220
2200
|
localStorage.setItem("refreshToken", refresh_token);
|
|
2221
|
-
};
|
|
2222
|
-
const getAccessToken =
|
|
2201
|
+
});
|
|
2202
|
+
const getAccessToken = () => __async(null, null, function* () {
|
|
2223
2203
|
return localStorage.getItem("accessToken");
|
|
2224
|
-
};
|
|
2225
|
-
const getRefreshToken =
|
|
2204
|
+
});
|
|
2205
|
+
const getRefreshToken = () => __async(null, null, function* () {
|
|
2226
2206
|
return localStorage.getItem("refreshToken");
|
|
2227
|
-
};
|
|
2228
|
-
const clearToken =
|
|
2207
|
+
});
|
|
2208
|
+
const clearToken = () => __async(null, null, function* () {
|
|
2229
2209
|
localStorage.removeItem("accessToken");
|
|
2230
2210
|
localStorage.removeItem("refreshToken");
|
|
2231
|
-
};
|
|
2211
|
+
});
|
|
2232
2212
|
return {
|
|
2233
2213
|
setToken,
|
|
2234
2214
|
setRefreshToken,
|
|
@@ -2240,9 +2220,9 @@ var localStorageUtils = () => {
|
|
|
2240
2220
|
|
|
2241
2221
|
// src/utils/storage/session-storage.ts
|
|
2242
2222
|
var sessionStorageUtils = () => {
|
|
2243
|
-
const getBrowserSession =
|
|
2223
|
+
const getBrowserSession = () => __async(null, null, function* () {
|
|
2244
2224
|
return sessionStorage.getItem("browserSession");
|
|
2245
|
-
};
|
|
2225
|
+
});
|
|
2246
2226
|
return {
|
|
2247
2227
|
getBrowserSession
|
|
2248
2228
|
};
|
|
@@ -2251,13 +2231,14 @@ var sessionStorageUtils = () => {
|
|
|
2251
2231
|
// src/configs/axios-client.ts
|
|
2252
2232
|
var axiosClient = {
|
|
2253
2233
|
init(config) {
|
|
2254
|
-
|
|
2255
|
-
const
|
|
2234
|
+
var _a, _b;
|
|
2235
|
+
const localStorage2 = (_a = config.localStorageUtils) != null ? _a : localStorageUtils();
|
|
2236
|
+
const sessionStorage2 = (_b = config.sessionStorageUtils) != null ? _b : sessionStorageUtils();
|
|
2256
2237
|
const db = config.db;
|
|
2257
2238
|
let isRefreshing = false;
|
|
2258
2239
|
let failedQueue = [];
|
|
2259
2240
|
const processQueue = (error, token = null) => {
|
|
2260
|
-
failedQueue
|
|
2241
|
+
failedQueue == null ? void 0 : failedQueue.forEach((prom) => {
|
|
2261
2242
|
if (error) {
|
|
2262
2243
|
prom.reject(error);
|
|
2263
2244
|
} else {
|
|
@@ -2266,21 +2247,21 @@ var axiosClient = {
|
|
|
2266
2247
|
});
|
|
2267
2248
|
failedQueue = [];
|
|
2268
2249
|
};
|
|
2269
|
-
const instance =
|
|
2270
|
-
adapter:
|
|
2250
|
+
const instance = axios.create({
|
|
2251
|
+
adapter: axios.defaults.adapter,
|
|
2271
2252
|
baseURL: config.baseUrl,
|
|
2272
2253
|
timeout: 5e4,
|
|
2273
2254
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2274
2255
|
});
|
|
2275
2256
|
instance.interceptors.request.use(
|
|
2276
|
-
|
|
2257
|
+
(config2) => __async(null, null, function* () {
|
|
2277
2258
|
const useRefreshToken = config2.useRefreshToken;
|
|
2278
|
-
const token = useRefreshToken ?
|
|
2259
|
+
const token = useRefreshToken ? yield localStorage2.getRefreshToken() : yield localStorage2.getAccessToken();
|
|
2279
2260
|
if (token) {
|
|
2280
2261
|
config2.headers["Authorization"] = "Bearer " + token;
|
|
2281
2262
|
}
|
|
2282
2263
|
return config2;
|
|
2283
|
-
},
|
|
2264
|
+
}),
|
|
2284
2265
|
(error) => {
|
|
2285
2266
|
Promise.reject(error);
|
|
2286
2267
|
}
|
|
@@ -2289,19 +2270,21 @@ var axiosClient = {
|
|
|
2289
2270
|
(response) => {
|
|
2290
2271
|
return handleResponse(response);
|
|
2291
2272
|
},
|
|
2292
|
-
|
|
2293
|
-
|
|
2273
|
+
(error) => __async(null, null, function* () {
|
|
2274
|
+
var _a2, _b2, _c;
|
|
2275
|
+
const handleError3 = (error2) => __async(null, null, function* () {
|
|
2276
|
+
var _a3;
|
|
2294
2277
|
if (!error2.response) {
|
|
2295
2278
|
return error2;
|
|
2296
2279
|
}
|
|
2297
2280
|
const { data } = error2.response;
|
|
2298
|
-
if (data && data.code === 400 && ["invalid_grant"].includes(data.data
|
|
2299
|
-
|
|
2281
|
+
if (data && data.code === 400 && ["invalid_grant"].includes((_a3 = data.data) == null ? void 0 : _a3.error)) {
|
|
2282
|
+
yield clearAuthToken();
|
|
2300
2283
|
}
|
|
2301
2284
|
return data;
|
|
2302
|
-
};
|
|
2285
|
+
});
|
|
2303
2286
|
const originalRequest = error.config;
|
|
2304
|
-
if ((error.response
|
|
2287
|
+
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(
|
|
2305
2288
|
error.response.data.code
|
|
2306
2289
|
)) {
|
|
2307
2290
|
if (isRefreshing) {
|
|
@@ -2314,18 +2297,19 @@ var axiosClient = {
|
|
|
2314
2297
|
token
|
|
2315
2298
|
);
|
|
2316
2299
|
return instance.request(originalRequest);
|
|
2317
|
-
}).catch(
|
|
2318
|
-
|
|
2319
|
-
|
|
2300
|
+
}).catch((err) => __async(null, null, function* () {
|
|
2301
|
+
var _a3, _b3;
|
|
2302
|
+
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)) {
|
|
2303
|
+
yield clearAuthToken();
|
|
2320
2304
|
}
|
|
2321
|
-
});
|
|
2305
|
+
}));
|
|
2322
2306
|
}
|
|
2323
|
-
const browserSession =
|
|
2324
|
-
const refreshToken =
|
|
2325
|
-
const accessTokenExp =
|
|
2307
|
+
const browserSession = yield sessionStorage2.getBrowserSession();
|
|
2308
|
+
const refreshToken = yield localStorage2.getRefreshToken();
|
|
2309
|
+
const accessTokenExp = yield localStorage2.getAccessToken();
|
|
2326
2310
|
isRefreshing = true;
|
|
2327
2311
|
if (!refreshToken && (!browserSession || browserSession == "unActive")) {
|
|
2328
|
-
|
|
2312
|
+
yield clearAuthToken();
|
|
2329
2313
|
} else {
|
|
2330
2314
|
const payload = Object.fromEntries(
|
|
2331
2315
|
Object.entries({
|
|
@@ -2336,8 +2320,9 @@ var axiosClient = {
|
|
|
2336
2320
|
}).filter(([_, value]) => !!value)
|
|
2337
2321
|
);
|
|
2338
2322
|
return new Promise(function(resolve) {
|
|
2339
|
-
|
|
2340
|
-
|
|
2323
|
+
var _a3;
|
|
2324
|
+
axios.post(
|
|
2325
|
+
`${config.baseUrl}${(_a3 = config.refreshTokenEndpoint) != null ? _a3 : "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
|
|
2341
2326
|
payload,
|
|
2342
2327
|
{
|
|
2343
2328
|
headers: {
|
|
@@ -2345,11 +2330,11 @@ var axiosClient = {
|
|
|
2345
2330
|
Authorization: `Bearer ${accessTokenExp}`
|
|
2346
2331
|
}
|
|
2347
2332
|
}
|
|
2348
|
-
).then(
|
|
2333
|
+
).then((res) => __async(null, null, function* () {
|
|
2349
2334
|
const data = res.data;
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2335
|
+
yield localStorage2.setToken(data.access_token);
|
|
2336
|
+
yield localStorage2.setRefreshToken(data.refresh_token);
|
|
2337
|
+
axios.defaults.headers.common["Authorization"] = "Bearer " + data.access_token;
|
|
2353
2338
|
originalRequest.headers["Authorization"] = "Bearer " + data.access_token;
|
|
2354
2339
|
originalRequest.data = updateTokenParamInOriginalRequest(
|
|
2355
2340
|
originalRequest,
|
|
@@ -2357,25 +2342,26 @@ var axiosClient = {
|
|
|
2357
2342
|
);
|
|
2358
2343
|
processQueue(null, data.access_token);
|
|
2359
2344
|
resolve(instance.request(originalRequest));
|
|
2360
|
-
}).catch(
|
|
2361
|
-
|
|
2362
|
-
|
|
2345
|
+
})).catch((err) => __async(null, null, function* () {
|
|
2346
|
+
var _a4;
|
|
2347
|
+
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") {
|
|
2348
|
+
yield clearAuthToken();
|
|
2363
2349
|
}
|
|
2364
2350
|
if (err && err.response) {
|
|
2365
|
-
const { error_code } = err.response
|
|
2351
|
+
const { error_code } = ((_a4 = err.response) == null ? void 0 : _a4.data) || {};
|
|
2366
2352
|
if (error_code === "AUTHEN_FAIL") {
|
|
2367
|
-
|
|
2353
|
+
yield clearAuthToken();
|
|
2368
2354
|
}
|
|
2369
2355
|
}
|
|
2370
2356
|
processQueue(err, null);
|
|
2371
|
-
}).finally(() => {
|
|
2357
|
+
})).finally(() => {
|
|
2372
2358
|
isRefreshing = false;
|
|
2373
2359
|
});
|
|
2374
2360
|
});
|
|
2375
2361
|
}
|
|
2376
2362
|
}
|
|
2377
|
-
return Promise.reject(
|
|
2378
|
-
}
|
|
2363
|
+
return Promise.reject(yield handleError3(error));
|
|
2364
|
+
})
|
|
2379
2365
|
);
|
|
2380
2366
|
const handleResponse = (res) => {
|
|
2381
2367
|
if (res && res.data) {
|
|
@@ -2384,6 +2370,7 @@ var axiosClient = {
|
|
|
2384
2370
|
return res;
|
|
2385
2371
|
};
|
|
2386
2372
|
const handleError2 = (error) => {
|
|
2373
|
+
var _a2, _b2, _c;
|
|
2387
2374
|
if (error.isAxiosError && error.code === "ECONNABORTED") {
|
|
2388
2375
|
console.error("Request Timeout Error:", error);
|
|
2389
2376
|
return "Request Timeout Error";
|
|
@@ -2391,17 +2378,17 @@ var axiosClient = {
|
|
|
2391
2378
|
console.error("Network Error:", error);
|
|
2392
2379
|
return "Network Error";
|
|
2393
2380
|
} else {
|
|
2394
|
-
console.error("Other Error:", error
|
|
2395
|
-
const errorMessage = error
|
|
2396
|
-
return { message: errorMessage, status: error
|
|
2381
|
+
console.error("Other Error:", error == null ? void 0 : error.response);
|
|
2382
|
+
const errorMessage = ((_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "An error occurred";
|
|
2383
|
+
return { message: errorMessage, status: (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.status };
|
|
2397
2384
|
}
|
|
2398
2385
|
};
|
|
2399
|
-
const clearAuthToken =
|
|
2400
|
-
|
|
2386
|
+
const clearAuthToken = () => __async(null, null, function* () {
|
|
2387
|
+
yield localStorage2.clearToken();
|
|
2401
2388
|
if (typeof window !== "undefined") {
|
|
2402
2389
|
window.location.href = `/login`;
|
|
2403
2390
|
}
|
|
2404
|
-
};
|
|
2391
|
+
});
|
|
2405
2392
|
function formatUrl(url, db2) {
|
|
2406
2393
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2407
2394
|
}
|
|
@@ -2425,14 +2412,14 @@ var axiosClient = {
|
|
|
2425
2412
|
};
|
|
2426
2413
|
|
|
2427
2414
|
// src/store/index.ts
|
|
2428
|
-
|
|
2415
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
2429
2416
|
|
|
2430
2417
|
// src/store/reducers/breadcrums-slice/index.ts
|
|
2431
|
-
|
|
2418
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2432
2419
|
var initialState = {
|
|
2433
2420
|
breadCrumbs: []
|
|
2434
2421
|
};
|
|
2435
|
-
var breadcrumbsSlice =
|
|
2422
|
+
var breadcrumbsSlice = createSlice({
|
|
2436
2423
|
name: "breadcrumbs",
|
|
2437
2424
|
initialState,
|
|
2438
2425
|
reducers: {
|
|
@@ -2445,7 +2432,7 @@ var { setBreadCrumbs } = breadcrumbsSlice.actions;
|
|
|
2445
2432
|
var breadcrums_slice_default = breadcrumbsSlice.reducer;
|
|
2446
2433
|
|
|
2447
2434
|
// src/store/reducers/env-slice/index.ts
|
|
2448
|
-
|
|
2435
|
+
import { createSlice as createSlice2 } from "@reduxjs/toolkit";
|
|
2449
2436
|
var initialState2 = {
|
|
2450
2437
|
baseUrl: "",
|
|
2451
2438
|
requests: null,
|
|
@@ -2466,7 +2453,7 @@ var initialState2 = {
|
|
|
2466
2453
|
tz: "Asia/Saigon"
|
|
2467
2454
|
}
|
|
2468
2455
|
};
|
|
2469
|
-
var envSlice = (
|
|
2456
|
+
var envSlice = createSlice2({
|
|
2470
2457
|
name: "env",
|
|
2471
2458
|
initialState: initialState2,
|
|
2472
2459
|
reducers: {
|
|
@@ -2513,7 +2500,7 @@ var {
|
|
|
2513
2500
|
var env_slice_default = envSlice.reducer;
|
|
2514
2501
|
|
|
2515
2502
|
// src/store/reducers/excel-slice/index.ts
|
|
2516
|
-
|
|
2503
|
+
import { createSlice as createSlice3 } from "@reduxjs/toolkit";
|
|
2517
2504
|
var initialState3 = {
|
|
2518
2505
|
dataParse: null,
|
|
2519
2506
|
idFile: null,
|
|
@@ -2522,7 +2509,7 @@ var initialState3 = {
|
|
|
2522
2509
|
selectedFile: null,
|
|
2523
2510
|
errorData: null
|
|
2524
2511
|
};
|
|
2525
|
-
var excelSlice = (
|
|
2512
|
+
var excelSlice = createSlice3({
|
|
2526
2513
|
name: "excel",
|
|
2527
2514
|
initialState: initialState3,
|
|
2528
2515
|
reducers: {
|
|
@@ -2557,7 +2544,7 @@ var {
|
|
|
2557
2544
|
var excel_slice_default = excelSlice.reducer;
|
|
2558
2545
|
|
|
2559
2546
|
// src/store/reducers/form-slice/index.ts
|
|
2560
|
-
|
|
2547
|
+
import { createSlice as createSlice4 } from "@reduxjs/toolkit";
|
|
2561
2548
|
var initialState4 = {
|
|
2562
2549
|
viewDataStore: {},
|
|
2563
2550
|
isShowingModalDetail: false,
|
|
@@ -2567,7 +2554,7 @@ var initialState4 = {
|
|
|
2567
2554
|
listSubject: {},
|
|
2568
2555
|
dataUser: {}
|
|
2569
2556
|
};
|
|
2570
|
-
var formSlice = (
|
|
2557
|
+
var formSlice = createSlice4({
|
|
2571
2558
|
name: "form",
|
|
2572
2559
|
initialState: initialState4,
|
|
2573
2560
|
reducers: {
|
|
@@ -2606,15 +2593,15 @@ var {
|
|
|
2606
2593
|
var form_slice_default = formSlice.reducer;
|
|
2607
2594
|
|
|
2608
2595
|
// src/store/reducers/header-slice/index.ts
|
|
2609
|
-
|
|
2610
|
-
var headerSlice = (
|
|
2596
|
+
import { createSlice as createSlice5 } from "@reduxjs/toolkit";
|
|
2597
|
+
var headerSlice = createSlice5({
|
|
2611
2598
|
name: "header",
|
|
2612
2599
|
initialState: {
|
|
2613
2600
|
value: { allowedCompanyIds: [] }
|
|
2614
2601
|
},
|
|
2615
2602
|
reducers: {
|
|
2616
2603
|
setHeader: (state, action) => {
|
|
2617
|
-
state.value = {
|
|
2604
|
+
state.value = __spreadValues(__spreadValues({}, state.value), action.payload);
|
|
2618
2605
|
},
|
|
2619
2606
|
setAllowedCompanyIds: (state, action) => {
|
|
2620
2607
|
state.value.allowedCompanyIds = action.payload;
|
|
@@ -2625,7 +2612,7 @@ var { setAllowedCompanyIds, setHeader } = headerSlice.actions;
|
|
|
2625
2612
|
var header_slice_default = headerSlice.reducer;
|
|
2626
2613
|
|
|
2627
2614
|
// src/store/reducers/list-slice/index.ts
|
|
2628
|
-
|
|
2615
|
+
import { createSlice as createSlice6 } from "@reduxjs/toolkit";
|
|
2629
2616
|
var initialState5 = {
|
|
2630
2617
|
pageLimit: 10,
|
|
2631
2618
|
fields: {},
|
|
@@ -2639,7 +2626,7 @@ var initialState5 = {
|
|
|
2639
2626
|
page: 0,
|
|
2640
2627
|
domainTable: []
|
|
2641
2628
|
};
|
|
2642
|
-
var listSlice = (
|
|
2629
|
+
var listSlice = createSlice6({
|
|
2643
2630
|
name: "list",
|
|
2644
2631
|
initialState: initialState5,
|
|
2645
2632
|
reducers: {
|
|
@@ -2690,13 +2677,13 @@ var {
|
|
|
2690
2677
|
var list_slice_default = listSlice.reducer;
|
|
2691
2678
|
|
|
2692
2679
|
// src/store/reducers/login-slice/index.ts
|
|
2693
|
-
|
|
2680
|
+
import { createSlice as createSlice7 } from "@reduxjs/toolkit";
|
|
2694
2681
|
var initialState6 = {
|
|
2695
2682
|
db: "",
|
|
2696
2683
|
redirectTo: "/",
|
|
2697
2684
|
forgotPasswordUrl: "/"
|
|
2698
2685
|
};
|
|
2699
|
-
var loginSlice = (
|
|
2686
|
+
var loginSlice = createSlice7({
|
|
2700
2687
|
name: "login",
|
|
2701
2688
|
initialState: initialState6,
|
|
2702
2689
|
reducers: {
|
|
@@ -2715,14 +2702,14 @@ var { setDb, setRedirectTo, setForgotPasswordUrl } = loginSlice.actions;
|
|
|
2715
2702
|
var login_slice_default = loginSlice.reducer;
|
|
2716
2703
|
|
|
2717
2704
|
// src/store/reducers/navbar-slice/index.ts
|
|
2718
|
-
|
|
2705
|
+
import { createSlice as createSlice8 } from "@reduxjs/toolkit";
|
|
2719
2706
|
var initialState7 = {
|
|
2720
2707
|
menuFocus: {},
|
|
2721
2708
|
menuAction: {},
|
|
2722
2709
|
navbarWidth: 250,
|
|
2723
2710
|
menuList: []
|
|
2724
2711
|
};
|
|
2725
|
-
var navbarSlice = (
|
|
2712
|
+
var navbarSlice = createSlice8({
|
|
2726
2713
|
name: "navbar",
|
|
2727
2714
|
initialState: initialState7,
|
|
2728
2715
|
reducers: {
|
|
@@ -2744,11 +2731,11 @@ var { setMenuFocus, setMenuFocusAction, setNavbarWidth, setMenuList } = navbarSl
|
|
|
2744
2731
|
var navbar_slice_default = navbarSlice.reducer;
|
|
2745
2732
|
|
|
2746
2733
|
// src/store/reducers/profile-slice/index.ts
|
|
2747
|
-
|
|
2734
|
+
import { createSlice as createSlice9 } from "@reduxjs/toolkit";
|
|
2748
2735
|
var initialState8 = {
|
|
2749
2736
|
profile: {}
|
|
2750
2737
|
};
|
|
2751
|
-
var profileSlice = (
|
|
2738
|
+
var profileSlice = createSlice9({
|
|
2752
2739
|
name: "profile",
|
|
2753
2740
|
initialState: initialState8,
|
|
2754
2741
|
reducers: {
|
|
@@ -2761,7 +2748,7 @@ var { setProfile } = profileSlice.actions;
|
|
|
2761
2748
|
var profile_slice_default = profileSlice.reducer;
|
|
2762
2749
|
|
|
2763
2750
|
// src/store/reducers/search-slice/index.ts
|
|
2764
|
-
|
|
2751
|
+
import { createSlice as createSlice10 } from "@reduxjs/toolkit";
|
|
2765
2752
|
var initialState9 = {
|
|
2766
2753
|
groupByDomain: null,
|
|
2767
2754
|
searchBy: [],
|
|
@@ -2773,7 +2760,7 @@ var initialState9 = {
|
|
|
2773
2760
|
filterBy: [],
|
|
2774
2761
|
groupBy: []
|
|
2775
2762
|
};
|
|
2776
|
-
var searchSlice = (
|
|
2763
|
+
var searchSlice = createSlice10({
|
|
2777
2764
|
name: "search",
|
|
2778
2765
|
initialState: initialState9,
|
|
2779
2766
|
reducers: {
|
|
@@ -2847,7 +2834,7 @@ var {
|
|
|
2847
2834
|
var search_slice_default = searchSlice.reducer;
|
|
2848
2835
|
|
|
2849
2836
|
// src/store/store.ts
|
|
2850
|
-
|
|
2837
|
+
import { configureStore } from "@reduxjs/toolkit";
|
|
2851
2838
|
|
|
2852
2839
|
// node_modules/redux/dist/redux.mjs
|
|
2853
2840
|
function formatProdErrorMessage(code) {
|
|
@@ -3031,7 +3018,7 @@ var rootReducer = combineReducers({
|
|
|
3031
3018
|
excel: excel_slice_default,
|
|
3032
3019
|
profile: profile_slice_default
|
|
3033
3020
|
});
|
|
3034
|
-
var envStore =
|
|
3021
|
+
var envStore = configureStore({
|
|
3035
3022
|
reducer: rootReducer,
|
|
3036
3023
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
3037
3024
|
serializableCheck: false
|
|
@@ -3040,18 +3027,6 @@ var envStore = (0, import_toolkit11.configureStore)({
|
|
|
3040
3027
|
|
|
3041
3028
|
// src/environment/EnvStore.ts
|
|
3042
3029
|
var EnvStore = class {
|
|
3043
|
-
envStore;
|
|
3044
|
-
baseUrl;
|
|
3045
|
-
requests;
|
|
3046
|
-
context;
|
|
3047
|
-
defaultCompany;
|
|
3048
|
-
config;
|
|
3049
|
-
companies;
|
|
3050
|
-
user;
|
|
3051
|
-
db;
|
|
3052
|
-
localStorageUtils;
|
|
3053
|
-
sessionStorageUtils;
|
|
3054
|
-
refreshTokenEndpoint;
|
|
3055
3030
|
constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
|
|
3056
3031
|
this.envStore = envStore2;
|
|
3057
3032
|
this.localStorageUtils = localStorageUtils2;
|
|
@@ -3060,25 +3035,24 @@ var EnvStore = class {
|
|
|
3060
3035
|
}
|
|
3061
3036
|
setup() {
|
|
3062
3037
|
const env2 = this.envStore.getState().env;
|
|
3063
|
-
this.baseUrl = env2
|
|
3064
|
-
this.requests = env2
|
|
3065
|
-
this.context = env2
|
|
3066
|
-
this.defaultCompany = env2
|
|
3067
|
-
this.config = env2
|
|
3068
|
-
this.companies = env2
|
|
3069
|
-
this.user = env2
|
|
3070
|
-
this.db = env2
|
|
3071
|
-
this.refreshTokenEndpoint = env2
|
|
3038
|
+
this.baseUrl = env2 == null ? void 0 : env2.baseUrl;
|
|
3039
|
+
this.requests = env2 == null ? void 0 : env2.requests;
|
|
3040
|
+
this.context = env2 == null ? void 0 : env2.context;
|
|
3041
|
+
this.defaultCompany = env2 == null ? void 0 : env2.defaultCompany;
|
|
3042
|
+
this.config = env2 == null ? void 0 : env2.config;
|
|
3043
|
+
this.companies = (env2 == null ? void 0 : env2.companies) || [];
|
|
3044
|
+
this.user = env2 == null ? void 0 : env2.user;
|
|
3045
|
+
this.db = env2 == null ? void 0 : env2.db;
|
|
3046
|
+
this.refreshTokenEndpoint = env2 == null ? void 0 : env2.refreshTokenEndpoint;
|
|
3072
3047
|
}
|
|
3073
3048
|
setupEnv(envConfig) {
|
|
3074
3049
|
const dispatch = this.envStore.dispatch;
|
|
3075
|
-
const env2 = {
|
|
3076
|
-
...envConfig,
|
|
3050
|
+
const env2 = __spreadProps(__spreadValues({}, envConfig), {
|
|
3077
3051
|
localStorageUtils: this.localStorageUtils,
|
|
3078
3052
|
sessionStorageUtils: this.sessionStorageUtils
|
|
3079
|
-
};
|
|
3053
|
+
});
|
|
3080
3054
|
const requests = axiosClient.init(env2);
|
|
3081
|
-
dispatch(setEnv({
|
|
3055
|
+
dispatch(setEnv(__spreadProps(__spreadValues({}, env2), { requests })));
|
|
3082
3056
|
this.setup();
|
|
3083
3057
|
}
|
|
3084
3058
|
setUid(uid) {
|
|
@@ -3122,35 +3096,61 @@ function getEnv() {
|
|
|
3122
3096
|
// src/services/action-service/index.ts
|
|
3123
3097
|
var ActionService = {
|
|
3124
3098
|
// Load Action
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
}
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
}
|
|
3099
|
+
loadAction(_0) {
|
|
3100
|
+
return __async(this, arguments, function* ({
|
|
3101
|
+
idAction,
|
|
3102
|
+
context
|
|
3103
|
+
}) {
|
|
3104
|
+
const env2 = getEnv();
|
|
3105
|
+
const jsonData = {
|
|
3106
|
+
action_id: idAction,
|
|
3107
|
+
with_context: __spreadValues({}, context)
|
|
3108
|
+
};
|
|
3109
|
+
return env2.requests.post(`${"/load_action" /* LOAD_ACTION */}`, jsonData, {
|
|
3110
|
+
headers: {
|
|
3111
|
+
"Content-Type": "application/json"
|
|
3112
|
+
}
|
|
3113
|
+
});
|
|
3140
3114
|
});
|
|
3141
3115
|
},
|
|
3142
3116
|
// Call Button
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3117
|
+
callButton(_0) {
|
|
3118
|
+
return __async(this, arguments, function* ({
|
|
3119
|
+
model,
|
|
3120
|
+
ids = [],
|
|
3121
|
+
context,
|
|
3122
|
+
method
|
|
3123
|
+
}) {
|
|
3124
|
+
try {
|
|
3125
|
+
const env2 = getEnv();
|
|
3126
|
+
const jsonData = {
|
|
3127
|
+
model,
|
|
3128
|
+
method,
|
|
3129
|
+
ids,
|
|
3130
|
+
with_context: context
|
|
3131
|
+
};
|
|
3132
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3133
|
+
headers: {
|
|
3134
|
+
"Content-Type": "application/json"
|
|
3135
|
+
}
|
|
3136
|
+
});
|
|
3137
|
+
} catch (error) {
|
|
3138
|
+
console.error("Error when calling button action:", error);
|
|
3139
|
+
throw error;
|
|
3140
|
+
}
|
|
3141
|
+
});
|
|
3142
|
+
},
|
|
3143
|
+
// remove Row
|
|
3144
|
+
removeRows(_0) {
|
|
3145
|
+
return __async(this, arguments, function* ({
|
|
3146
|
+
model,
|
|
3147
|
+
ids,
|
|
3148
|
+
context
|
|
3149
|
+
}) {
|
|
3150
3150
|
const env2 = getEnv();
|
|
3151
3151
|
const jsonData = {
|
|
3152
3152
|
model,
|
|
3153
|
-
method,
|
|
3153
|
+
method: "unlink",
|
|
3154
3154
|
ids,
|
|
3155
3155
|
with_context: context
|
|
3156
3156
|
};
|
|
@@ -3159,112 +3159,96 @@ var ActionService = {
|
|
|
3159
3159
|
"Content-Type": "application/json"
|
|
3160
3160
|
}
|
|
3161
3161
|
});
|
|
3162
|
-
} catch (error) {
|
|
3163
|
-
console.error("Error when calling button action:", error);
|
|
3164
|
-
throw error;
|
|
3165
|
-
}
|
|
3166
|
-
},
|
|
3167
|
-
// remove Row
|
|
3168
|
-
async removeRows({
|
|
3169
|
-
model,
|
|
3170
|
-
ids,
|
|
3171
|
-
context
|
|
3172
|
-
}) {
|
|
3173
|
-
const env2 = getEnv();
|
|
3174
|
-
const jsonData = {
|
|
3175
|
-
model,
|
|
3176
|
-
method: "unlink",
|
|
3177
|
-
ids,
|
|
3178
|
-
with_context: context
|
|
3179
|
-
};
|
|
3180
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3181
|
-
headers: {
|
|
3182
|
-
"Content-Type": "application/json"
|
|
3183
|
-
}
|
|
3184
3162
|
});
|
|
3185
3163
|
},
|
|
3186
3164
|
// Duplicate Model
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
id,
|
|
3190
|
-
context
|
|
3191
|
-
}) {
|
|
3192
|
-
const env2 = getEnv();
|
|
3193
|
-
const jsonData = {
|
|
3165
|
+
duplicateRecord(_0) {
|
|
3166
|
+
return __async(this, arguments, function* ({
|
|
3194
3167
|
model,
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3168
|
+
id,
|
|
3169
|
+
context
|
|
3170
|
+
}) {
|
|
3171
|
+
const env2 = getEnv();
|
|
3172
|
+
const jsonData = {
|
|
3173
|
+
model,
|
|
3174
|
+
method: "copy",
|
|
3175
|
+
ids: id,
|
|
3176
|
+
with_context: context
|
|
3177
|
+
};
|
|
3178
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3179
|
+
headers: {
|
|
3180
|
+
"Content-Type": "application/json"
|
|
3181
|
+
}
|
|
3182
|
+
});
|
|
3203
3183
|
});
|
|
3204
3184
|
},
|
|
3205
3185
|
// Get Print Report
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3186
|
+
getPrintReportName(_0) {
|
|
3187
|
+
return __async(this, arguments, function* ({ id }) {
|
|
3188
|
+
const env2 = getEnv();
|
|
3189
|
+
const jsonData = {
|
|
3190
|
+
model: "ir.actions.report",
|
|
3191
|
+
method: "web_read",
|
|
3192
|
+
id,
|
|
3193
|
+
kwargs: {
|
|
3194
|
+
specification: {
|
|
3195
|
+
report_name: {}
|
|
3196
|
+
}
|
|
3215
3197
|
}
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
}
|
|
3198
|
+
};
|
|
3199
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3200
|
+
headers: {
|
|
3201
|
+
"Content-Type": "application/json"
|
|
3202
|
+
}
|
|
3203
|
+
});
|
|
3222
3204
|
});
|
|
3223
3205
|
},
|
|
3224
3206
|
//Save Print Invoice
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3207
|
+
print(_0) {
|
|
3208
|
+
return __async(this, arguments, function* ({ id, report, db }) {
|
|
3209
|
+
const env2 = getEnv();
|
|
3210
|
+
const jsonData = {
|
|
3211
|
+
report,
|
|
3212
|
+
id,
|
|
3213
|
+
type: "pdf",
|
|
3214
|
+
file_response: true,
|
|
3215
|
+
db
|
|
3216
|
+
};
|
|
3217
|
+
const queryString = toQueryString(jsonData);
|
|
3218
|
+
const urlWithParams = `${"/report" /* REPORT_PATH */}?${queryString}`;
|
|
3219
|
+
return env2.requests.get(urlWithParams, {
|
|
3220
|
+
headers: {
|
|
3221
|
+
"Content-Type": "application/json"
|
|
3222
|
+
},
|
|
3223
|
+
responseType: "arraybuffer"
|
|
3224
|
+
});
|
|
3241
3225
|
});
|
|
3242
3226
|
},
|
|
3243
3227
|
//Run Action
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
}
|
|
3228
|
+
runAction(_0) {
|
|
3229
|
+
return __async(this, arguments, function* ({
|
|
3230
|
+
idAction,
|
|
3231
|
+
context
|
|
3232
|
+
}) {
|
|
3233
|
+
const env2 = getEnv();
|
|
3234
|
+
const jsonData = {
|
|
3235
|
+
action_id: idAction,
|
|
3236
|
+
with_context: __spreadValues({}, context)
|
|
3237
|
+
// context: {
|
|
3238
|
+
// lang: 'en_US',
|
|
3239
|
+
// tz: 'Asia/Saigon',
|
|
3240
|
+
// uid: 2,
|
|
3241
|
+
// allowed_company_ids: [1],
|
|
3242
|
+
// active_id: Array.isArray(idDetail) ? idDetail[0] : idDetail,
|
|
3243
|
+
// active_ids: Array.isArray(idDetail) ? [...idDetail] : idDetail,
|
|
3244
|
+
// active_model: model,
|
|
3245
|
+
// },
|
|
3246
|
+
};
|
|
3247
|
+
return env2.requests.post(`${"/run_action" /* RUN_ACTION_PATH */}`, jsonData, {
|
|
3248
|
+
headers: {
|
|
3249
|
+
"Content-Type": "application/json"
|
|
3250
|
+
}
|
|
3251
|
+
});
|
|
3268
3252
|
});
|
|
3269
3253
|
}
|
|
3270
3254
|
};
|
|
@@ -3272,200 +3256,238 @@ var action_service_default = ActionService;
|
|
|
3272
3256
|
|
|
3273
3257
|
// src/services/auth-service/index.ts
|
|
3274
3258
|
var AuthService = {
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3259
|
+
login(body) {
|
|
3260
|
+
return __async(this, null, function* () {
|
|
3261
|
+
var _a, _b, _c, _d;
|
|
3262
|
+
const env2 = getEnv();
|
|
3263
|
+
const payload = Object.fromEntries(
|
|
3264
|
+
Object.entries({
|
|
3265
|
+
username: body.email,
|
|
3266
|
+
password: body.password,
|
|
3267
|
+
grant_type: ((_a = env2 == null ? void 0 : env2.config) == null ? void 0 : _a.grantType) || "",
|
|
3268
|
+
client_id: ((_b = env2 == null ? void 0 : env2.config) == null ? void 0 : _b.clientId) || "",
|
|
3269
|
+
client_secret: ((_c = env2 == null ? void 0 : env2.config) == null ? void 0 : _c.clientSecret) || ""
|
|
3270
|
+
}).filter(([_, value]) => !!value)
|
|
3271
|
+
);
|
|
3272
|
+
const encodedData = new URLSearchParams(payload).toString();
|
|
3273
|
+
return (_d = env2 == null ? void 0 : env2.requests) == null ? void 0 : _d.post(body.path, encodedData, {
|
|
3274
|
+
headers: {
|
|
3275
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3276
|
+
}
|
|
3277
|
+
});
|
|
3291
3278
|
});
|
|
3292
3279
|
},
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3280
|
+
forgotPassword(email) {
|
|
3281
|
+
return __async(this, null, function* () {
|
|
3282
|
+
var _a;
|
|
3283
|
+
const env2 = getEnv();
|
|
3284
|
+
const bodyData = {
|
|
3285
|
+
login: email,
|
|
3286
|
+
url: `${window.location.origin}/reset-password`
|
|
3287
|
+
};
|
|
3288
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/reset_password" /* RESET_PASSWORD_PATH */, bodyData, {
|
|
3289
|
+
headers: {
|
|
3290
|
+
"Content-Type": "application/json"
|
|
3291
|
+
}
|
|
3292
|
+
});
|
|
3303
3293
|
});
|
|
3304
3294
|
},
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3295
|
+
forgotPasswordSSO(_0) {
|
|
3296
|
+
return __async(this, arguments, function* ({
|
|
3297
|
+
email,
|
|
3298
|
+
with_context,
|
|
3299
|
+
method
|
|
3300
|
+
}) {
|
|
3301
|
+
var _a;
|
|
3302
|
+
const env2 = getEnv();
|
|
3303
|
+
const body = {
|
|
3304
|
+
method,
|
|
3305
|
+
kwargs: {
|
|
3306
|
+
vals: {
|
|
3307
|
+
email
|
|
3308
|
+
}
|
|
3309
|
+
},
|
|
3310
|
+
with_context
|
|
3311
|
+
};
|
|
3312
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, body, {
|
|
3313
|
+
headers: {
|
|
3314
|
+
"Content-Type": "application/json"
|
|
3316
3315
|
}
|
|
3317
|
-
}
|
|
3318
|
-
with_context
|
|
3319
|
-
};
|
|
3320
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, body, {
|
|
3321
|
-
headers: {
|
|
3322
|
-
"Content-Type": "application/json"
|
|
3323
|
-
}
|
|
3316
|
+
});
|
|
3324
3317
|
});
|
|
3325
3318
|
},
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3319
|
+
resetPassword(data, token) {
|
|
3320
|
+
return __async(this, null, function* () {
|
|
3321
|
+
var _a;
|
|
3322
|
+
const env2 = getEnv();
|
|
3323
|
+
const bodyData = {
|
|
3324
|
+
token,
|
|
3325
|
+
password: data.password,
|
|
3326
|
+
new_password: data.confirmPassword
|
|
3327
|
+
};
|
|
3328
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/change_password" /* CHANGE_PASSWORD_PATH */, bodyData, {
|
|
3329
|
+
headers: {
|
|
3330
|
+
"Content-Type": "application/json"
|
|
3331
|
+
}
|
|
3332
|
+
});
|
|
3337
3333
|
});
|
|
3338
3334
|
},
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
password,
|
|
3342
|
-
with_context
|
|
3343
|
-
}) {
|
|
3344
|
-
const env2 = getEnv();
|
|
3345
|
-
const bodyData = {
|
|
3335
|
+
resetPasswordSSO(_0) {
|
|
3336
|
+
return __async(this, arguments, function* ({
|
|
3346
3337
|
method,
|
|
3347
|
-
|
|
3348
|
-
vals: {
|
|
3349
|
-
password
|
|
3350
|
-
}
|
|
3351
|
-
},
|
|
3338
|
+
password,
|
|
3352
3339
|
with_context
|
|
3353
|
-
}
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3340
|
+
}) {
|
|
3341
|
+
var _a;
|
|
3342
|
+
const env2 = getEnv();
|
|
3343
|
+
const bodyData = {
|
|
3344
|
+
method,
|
|
3345
|
+
kwargs: {
|
|
3346
|
+
vals: {
|
|
3347
|
+
password
|
|
3348
|
+
}
|
|
3349
|
+
},
|
|
3350
|
+
with_context
|
|
3351
|
+
};
|
|
3352
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, bodyData, {
|
|
3353
|
+
headers: {
|
|
3354
|
+
"Content-Type": "application/json"
|
|
3355
|
+
}
|
|
3356
|
+
});
|
|
3358
3357
|
});
|
|
3359
3358
|
},
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3359
|
+
updatePassword(data, token) {
|
|
3360
|
+
return __async(this, null, function* () {
|
|
3361
|
+
var _a;
|
|
3362
|
+
const env2 = getEnv();
|
|
3363
|
+
const bodyData = {
|
|
3364
|
+
token,
|
|
3365
|
+
old_password: data.oldPassword,
|
|
3366
|
+
new_password: data.newPassword
|
|
3367
|
+
};
|
|
3368
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/change_password_parent" /* UPDATE_PASSWORD_PATH */, bodyData, {
|
|
3369
|
+
headers: {
|
|
3370
|
+
"Content-Type": "application/json"
|
|
3371
|
+
}
|
|
3372
|
+
});
|
|
3371
3373
|
});
|
|
3372
3374
|
},
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
}
|
|
3382
|
-
});
|
|
3383
|
-
},
|
|
3384
|
-
async loginSocial({
|
|
3385
|
-
db,
|
|
3386
|
-
state,
|
|
3387
|
-
access_token
|
|
3388
|
-
}) {
|
|
3389
|
-
const env2 = getEnv();
|
|
3390
|
-
return env2?.requests?.post(
|
|
3391
|
-
"/token/generate" /* GENTOKEN_SOCIAL */,
|
|
3392
|
-
{ state, access_token },
|
|
3393
|
-
{
|
|
3375
|
+
isValidToken(token) {
|
|
3376
|
+
return __async(this, null, function* () {
|
|
3377
|
+
var _a;
|
|
3378
|
+
const env2 = getEnv();
|
|
3379
|
+
const bodyData = {
|
|
3380
|
+
token
|
|
3381
|
+
};
|
|
3382
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/check_token" /* TOKEN */, bodyData, {
|
|
3394
3383
|
headers: {
|
|
3395
3384
|
"Content-Type": "application/json"
|
|
3396
3385
|
}
|
|
3397
|
-
}
|
|
3398
|
-
);
|
|
3386
|
+
});
|
|
3387
|
+
});
|
|
3399
3388
|
},
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3389
|
+
loginSocial(_0) {
|
|
3390
|
+
return __async(this, arguments, function* ({
|
|
3391
|
+
db,
|
|
3392
|
+
state,
|
|
3393
|
+
access_token
|
|
3394
|
+
}) {
|
|
3395
|
+
var _a;
|
|
3396
|
+
const env2 = getEnv();
|
|
3397
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(
|
|
3398
|
+
"/token/generate" /* GENTOKEN_SOCIAL */,
|
|
3399
|
+
{ state, access_token },
|
|
3400
|
+
{
|
|
3401
|
+
headers: {
|
|
3402
|
+
"Content-Type": "application/json"
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
);
|
|
3406
|
+
});
|
|
3403
3407
|
},
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3408
|
+
getProviders(db) {
|
|
3409
|
+
return __async(this, null, function* () {
|
|
3410
|
+
var _a;
|
|
3411
|
+
const env2 = getEnv();
|
|
3412
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.get("/oauth/providers", { params: { db } });
|
|
3413
|
+
});
|
|
3414
|
+
},
|
|
3415
|
+
getAccessByCode(code) {
|
|
3416
|
+
return __async(this, null, function* () {
|
|
3417
|
+
var _a, _b, _c, _d;
|
|
3418
|
+
const env2 = getEnv();
|
|
3419
|
+
const data = new URLSearchParams();
|
|
3420
|
+
data.append("code", code);
|
|
3421
|
+
data.append("grant_type", "authorization_code");
|
|
3422
|
+
data.append("client_id", ((_a = env2 == null ? void 0 : env2.config) == null ? void 0 : _a.clientId) || "");
|
|
3423
|
+
data.append("redirect_uri", ((_b = env2 == null ? void 0 : env2.config) == null ? void 0 : _b.redirectUri) || "");
|
|
3424
|
+
return (_d = env2 == null ? void 0 : env2.requests) == null ? void 0 : _d.post(
|
|
3425
|
+
`${(_c = env2 == null ? void 0 : env2.baseUrl) == null ? void 0 : _c.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
|
|
3426
|
+
data,
|
|
3427
|
+
{
|
|
3428
|
+
headers: {
|
|
3429
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3430
|
+
}
|
|
3417
3431
|
}
|
|
3418
|
-
|
|
3419
|
-
);
|
|
3432
|
+
);
|
|
3433
|
+
});
|
|
3420
3434
|
},
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
+
logout(data) {
|
|
3436
|
+
return __async(this, null, function* () {
|
|
3437
|
+
var _a;
|
|
3438
|
+
const env2 = getEnv();
|
|
3439
|
+
console.log(data);
|
|
3440
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(
|
|
3441
|
+
"/logout" /* LOGOUT */,
|
|
3442
|
+
{},
|
|
3443
|
+
{
|
|
3444
|
+
headers: {
|
|
3445
|
+
"Content-Type": "application/json"
|
|
3446
|
+
},
|
|
3447
|
+
withCredentials: true,
|
|
3448
|
+
useRefreshToken: true
|
|
3449
|
+
}
|
|
3450
|
+
);
|
|
3451
|
+
});
|
|
3435
3452
|
}
|
|
3436
3453
|
};
|
|
3437
3454
|
var auth_service_default = AuthService;
|
|
3438
3455
|
|
|
3439
3456
|
// src/services/company-service/index.ts
|
|
3440
3457
|
var CompanyService = {
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3458
|
+
getCurrentCompany() {
|
|
3459
|
+
return __async(this, null, function* () {
|
|
3460
|
+
const env2 = getEnv();
|
|
3461
|
+
return yield env2.requests.get("/company" /* COMPANY_PATH */, {
|
|
3462
|
+
headers: {
|
|
3463
|
+
"Content-Type": "application/json"
|
|
3464
|
+
}
|
|
3465
|
+
});
|
|
3447
3466
|
});
|
|
3448
3467
|
},
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3468
|
+
getInfoCompany(id) {
|
|
3469
|
+
return __async(this, null, function* () {
|
|
3470
|
+
var _a;
|
|
3471
|
+
const env2 = getEnv();
|
|
3472
|
+
const jsonData = {
|
|
3473
|
+
ids: [id],
|
|
3474
|
+
model: "res.company" /* COMPANY */,
|
|
3475
|
+
method: "web_read" /* WEB_READ */,
|
|
3476
|
+
kwargs: {
|
|
3477
|
+
specification: {
|
|
3478
|
+
primary_color: {},
|
|
3479
|
+
secondary_color: {},
|
|
3480
|
+
logo: {},
|
|
3481
|
+
display_name: {},
|
|
3482
|
+
secondary_logo: {}
|
|
3483
|
+
}
|
|
3462
3484
|
}
|
|
3463
|
-
}
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
}
|
|
3485
|
+
};
|
|
3486
|
+
return yield (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
3487
|
+
headers: {
|
|
3488
|
+
"Content-Type": "application/json"
|
|
3489
|
+
}
|
|
3490
|
+
});
|
|
3469
3491
|
});
|
|
3470
3492
|
}
|
|
3471
3493
|
};
|
|
@@ -3473,613 +3495,671 @@ var company_service_default = CompanyService;
|
|
|
3473
3495
|
|
|
3474
3496
|
// src/services/excel-service/index.ts
|
|
3475
3497
|
var ExcelService = {
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3498
|
+
uploadFile(_0) {
|
|
3499
|
+
return __async(this, arguments, function* ({ formData }) {
|
|
3500
|
+
const env2 = getEnv();
|
|
3501
|
+
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3502
|
+
headers: {
|
|
3503
|
+
"Content-Type": "multipart/form-data"
|
|
3504
|
+
}
|
|
3505
|
+
});
|
|
3482
3506
|
});
|
|
3483
3507
|
},
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3508
|
+
uploadIdFile(_0) {
|
|
3509
|
+
return __async(this, arguments, function* ({ formData }) {
|
|
3510
|
+
const env2 = getEnv();
|
|
3511
|
+
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3512
|
+
headers: {
|
|
3513
|
+
"Content-Type": "multipart/form-data"
|
|
3514
|
+
}
|
|
3515
|
+
});
|
|
3490
3516
|
});
|
|
3491
3517
|
},
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3518
|
+
parsePreview(_0) {
|
|
3519
|
+
return __async(this, arguments, function* ({
|
|
3520
|
+
id,
|
|
3521
|
+
selectedSheet,
|
|
3522
|
+
isHeader,
|
|
3523
|
+
context
|
|
3524
|
+
}) {
|
|
3525
|
+
const env2 = getEnv();
|
|
3526
|
+
const jsonData = {
|
|
3527
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
3528
|
+
method: "parse_preview",
|
|
3529
|
+
ids: [id],
|
|
3530
|
+
kwargs: {
|
|
3531
|
+
options: {
|
|
3532
|
+
import_skip_records: [],
|
|
3533
|
+
import_set_empty_fields: [],
|
|
3534
|
+
fallback_values: {},
|
|
3535
|
+
name_create_enabled_fields: {},
|
|
3536
|
+
encoding: "",
|
|
3537
|
+
separator: "",
|
|
3538
|
+
quoting: '"',
|
|
3539
|
+
date_format: "",
|
|
3540
|
+
datetime_format: "",
|
|
3541
|
+
float_thousand_separator: ",",
|
|
3542
|
+
float_decimal_separator: ".",
|
|
3543
|
+
advanced: true,
|
|
3544
|
+
has_headers: isHeader,
|
|
3545
|
+
keep_matches: false,
|
|
3546
|
+
limit: 2e3,
|
|
3547
|
+
sheets: [],
|
|
3548
|
+
sheet: selectedSheet,
|
|
3549
|
+
skip: 0,
|
|
3550
|
+
tracking_disable: true
|
|
3551
|
+
}
|
|
3552
|
+
},
|
|
3553
|
+
with_context: context
|
|
3554
|
+
};
|
|
3555
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3556
|
+
headers: {
|
|
3557
|
+
"Content-Type": "multipart/form-data"
|
|
3524
3558
|
}
|
|
3525
|
-
}
|
|
3526
|
-
with_context: context
|
|
3527
|
-
};
|
|
3528
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3529
|
-
headers: {
|
|
3530
|
-
"Content-Type": "multipart/form-data"
|
|
3531
|
-
}
|
|
3559
|
+
});
|
|
3532
3560
|
});
|
|
3533
3561
|
},
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3562
|
+
executeImport(_0) {
|
|
3563
|
+
return __async(this, arguments, function* ({
|
|
3564
|
+
columns,
|
|
3565
|
+
fields,
|
|
3566
|
+
idFile,
|
|
3567
|
+
options,
|
|
3568
|
+
dryrun,
|
|
3569
|
+
context
|
|
3570
|
+
}) {
|
|
3571
|
+
const env2 = getEnv();
|
|
3572
|
+
const jsonData = {
|
|
3573
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
3574
|
+
method: "execute_import",
|
|
3575
|
+
ids: [idFile],
|
|
3576
|
+
kwargs: {
|
|
3577
|
+
fields,
|
|
3578
|
+
columns,
|
|
3579
|
+
options,
|
|
3580
|
+
dryrun
|
|
3581
|
+
},
|
|
3582
|
+
with_context: context
|
|
3583
|
+
};
|
|
3584
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3585
|
+
headers: {
|
|
3586
|
+
"Content-Type": "multipart/form-data"
|
|
3587
|
+
}
|
|
3588
|
+
});
|
|
3559
3589
|
});
|
|
3560
3590
|
},
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3591
|
+
getFileExcel(_0) {
|
|
3592
|
+
return __async(this, arguments, function* ({ model }) {
|
|
3593
|
+
const env2 = getEnv();
|
|
3594
|
+
const jsonData = {
|
|
3595
|
+
model,
|
|
3596
|
+
method: "get_import_templates" /* GET_IMPORT */,
|
|
3597
|
+
args: []
|
|
3598
|
+
};
|
|
3599
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData);
|
|
3600
|
+
});
|
|
3569
3601
|
},
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
isShow,
|
|
3574
|
-
parentField,
|
|
3575
|
-
fieldType,
|
|
3576
|
-
parentName,
|
|
3577
|
-
prefix,
|
|
3578
|
-
name,
|
|
3579
|
-
context,
|
|
3580
|
-
importCompat
|
|
3581
|
-
}) {
|
|
3582
|
-
const env2 = getEnv();
|
|
3583
|
-
const jsonData = {
|
|
3602
|
+
getFieldExport(_0) {
|
|
3603
|
+
return __async(this, arguments, function* ({
|
|
3604
|
+
ids,
|
|
3584
3605
|
model,
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
jsonData
|
|
3596
|
-
|
|
3597
|
-
|
|
3606
|
+
isShow,
|
|
3607
|
+
parentField,
|
|
3608
|
+
fieldType,
|
|
3609
|
+
parentName,
|
|
3610
|
+
prefix,
|
|
3611
|
+
name,
|
|
3612
|
+
context,
|
|
3613
|
+
importCompat
|
|
3614
|
+
}) {
|
|
3615
|
+
const env2 = getEnv();
|
|
3616
|
+
const jsonData = {
|
|
3617
|
+
model,
|
|
3618
|
+
import_compat: importCompat,
|
|
3619
|
+
domain: [["id", "in", ids]],
|
|
3620
|
+
with_context: context
|
|
3621
|
+
};
|
|
3622
|
+
if (isShow) {
|
|
3623
|
+
jsonData.parent_field = parentField;
|
|
3624
|
+
jsonData.parent_field_type = fieldType;
|
|
3625
|
+
jsonData.parent_name = parentName;
|
|
3626
|
+
jsonData.name = name;
|
|
3627
|
+
jsonData.prefix = prefix;
|
|
3628
|
+
jsonData.exclude = [null];
|
|
3629
|
+
}
|
|
3630
|
+
return env2.requests.post("/export/get_fields", jsonData);
|
|
3631
|
+
});
|
|
3598
3632
|
},
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
domain,
|
|
3602
|
-
ids,
|
|
3603
|
-
fields,
|
|
3604
|
-
type,
|
|
3605
|
-
importCompat,
|
|
3606
|
-
context,
|
|
3607
|
-
groupby
|
|
3608
|
-
}) {
|
|
3609
|
-
const env2 = getEnv();
|
|
3610
|
-
const jsonData = {
|
|
3633
|
+
exportExcel(_0) {
|
|
3634
|
+
return __async(this, arguments, function* ({
|
|
3611
3635
|
model,
|
|
3612
3636
|
domain,
|
|
3613
3637
|
ids,
|
|
3614
|
-
import_compat: importCompat,
|
|
3615
3638
|
fields,
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3639
|
+
type,
|
|
3640
|
+
importCompat,
|
|
3641
|
+
context,
|
|
3642
|
+
groupby
|
|
3643
|
+
}) {
|
|
3644
|
+
const env2 = getEnv();
|
|
3645
|
+
const jsonData = {
|
|
3646
|
+
model,
|
|
3647
|
+
domain,
|
|
3648
|
+
ids,
|
|
3649
|
+
import_compat: importCompat,
|
|
3650
|
+
fields,
|
|
3651
|
+
with_context: context,
|
|
3652
|
+
groupby: groupby != null ? groupby : []
|
|
3653
|
+
};
|
|
3654
|
+
return env2.requests.post_excel(`/export/${type}`, jsonData);
|
|
3655
|
+
});
|
|
3620
3656
|
}
|
|
3621
3657
|
};
|
|
3622
3658
|
var excel_service_default = ExcelService;
|
|
3623
3659
|
|
|
3624
3660
|
// src/services/form-service/index.ts
|
|
3625
3661
|
var FormService = {
|
|
3626
|
-
|
|
3627
|
-
|
|
3662
|
+
getComment(_0) {
|
|
3663
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3664
|
+
try {
|
|
3665
|
+
const env2 = getEnv();
|
|
3666
|
+
const jsonData = {
|
|
3667
|
+
thread_id: data.thread_id,
|
|
3668
|
+
thread_model: data.thread_model,
|
|
3669
|
+
limit: 100,
|
|
3670
|
+
with_context: {
|
|
3671
|
+
lang: data.lang
|
|
3672
|
+
}
|
|
3673
|
+
};
|
|
3674
|
+
return env2.requests.post("/chatter/thread/messages" /* GET_MESSAGE */, jsonData, {
|
|
3675
|
+
headers: {
|
|
3676
|
+
"Content-Type": "application/json"
|
|
3677
|
+
}
|
|
3678
|
+
});
|
|
3679
|
+
} catch (error) {
|
|
3680
|
+
console.error("Error when sending message:", error);
|
|
3681
|
+
throw error;
|
|
3682
|
+
}
|
|
3683
|
+
});
|
|
3684
|
+
},
|
|
3685
|
+
sentComment(_0) {
|
|
3686
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3687
|
+
try {
|
|
3688
|
+
const env2 = getEnv();
|
|
3689
|
+
const jsonData = {
|
|
3690
|
+
context: {
|
|
3691
|
+
tz: "Asia/Saigon",
|
|
3692
|
+
uid: 2,
|
|
3693
|
+
allowed_company_ids: [1],
|
|
3694
|
+
mail_post_autofollow: false,
|
|
3695
|
+
temporary_id: 142183.01
|
|
3696
|
+
},
|
|
3697
|
+
post_data: {
|
|
3698
|
+
body: data.message,
|
|
3699
|
+
message_type: "comment",
|
|
3700
|
+
attachment_ids: data.attachment_ids,
|
|
3701
|
+
attachment_tokens: [],
|
|
3702
|
+
subtype_xmlid: data.subtype
|
|
3703
|
+
},
|
|
3704
|
+
thread_id: Number(data.thread_id),
|
|
3705
|
+
thread_model: data.thread_model
|
|
3706
|
+
};
|
|
3707
|
+
return env2.requests.post("/chatter/message/post" /* SENT_MESSAGE */, jsonData, {
|
|
3708
|
+
headers: {
|
|
3709
|
+
"Content-Type": "application/json"
|
|
3710
|
+
}
|
|
3711
|
+
});
|
|
3712
|
+
} catch (error) {
|
|
3713
|
+
console.error("Error when sent message:", error);
|
|
3714
|
+
throw error;
|
|
3715
|
+
}
|
|
3716
|
+
});
|
|
3717
|
+
},
|
|
3718
|
+
deleteComment(_0) {
|
|
3719
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3720
|
+
try {
|
|
3721
|
+
const env2 = getEnv();
|
|
3722
|
+
const jsonData = {
|
|
3723
|
+
attachment_ids: [],
|
|
3724
|
+
attachment_tokens: [],
|
|
3725
|
+
body: "",
|
|
3726
|
+
message_id: data.message_id
|
|
3727
|
+
};
|
|
3728
|
+
return env2.requests.post("/chatter/message/update_content" /* DELETE_MESSAGE */, jsonData, {
|
|
3729
|
+
headers: {
|
|
3730
|
+
"Content-Type": "application/json"
|
|
3731
|
+
}
|
|
3732
|
+
});
|
|
3733
|
+
} catch (error) {
|
|
3734
|
+
console.error("Error when sent message:", error);
|
|
3735
|
+
throw error;
|
|
3736
|
+
}
|
|
3737
|
+
});
|
|
3738
|
+
},
|
|
3739
|
+
getImage(_0) {
|
|
3740
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3741
|
+
try {
|
|
3742
|
+
const env2 = getEnv();
|
|
3743
|
+
return env2.requests.get(
|
|
3744
|
+
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
3745
|
+
{
|
|
3746
|
+
headers: {
|
|
3747
|
+
"Content-Type": "application/json"
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
);
|
|
3751
|
+
} catch (error) {
|
|
3752
|
+
console.error("Error when sent message:", error);
|
|
3753
|
+
throw error;
|
|
3754
|
+
}
|
|
3755
|
+
});
|
|
3756
|
+
},
|
|
3757
|
+
uploadImage(_0) {
|
|
3758
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3759
|
+
try {
|
|
3760
|
+
const env2 = getEnv();
|
|
3761
|
+
return env2.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
|
|
3762
|
+
headers: {
|
|
3763
|
+
"Content-Type": "multipart/form-data"
|
|
3764
|
+
}
|
|
3765
|
+
});
|
|
3766
|
+
} catch (error) {
|
|
3767
|
+
console.error("Error when sent message:", error);
|
|
3768
|
+
throw error;
|
|
3769
|
+
}
|
|
3770
|
+
});
|
|
3771
|
+
},
|
|
3772
|
+
getFormView(_0) {
|
|
3773
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3774
|
+
try {
|
|
3775
|
+
const env2 = getEnv();
|
|
3776
|
+
const jsonData = {
|
|
3777
|
+
model: data.model,
|
|
3778
|
+
method: "get_formview_action",
|
|
3779
|
+
ids: data.id ? [data.id] : [],
|
|
3780
|
+
with_context: data.context
|
|
3781
|
+
};
|
|
3782
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3783
|
+
headers: {
|
|
3784
|
+
"Content-Type": "application/json"
|
|
3785
|
+
}
|
|
3786
|
+
});
|
|
3787
|
+
} catch (error) {
|
|
3788
|
+
console.error("Error when fetching form view:", error);
|
|
3789
|
+
throw error;
|
|
3790
|
+
}
|
|
3791
|
+
});
|
|
3792
|
+
},
|
|
3793
|
+
changeStatus(_0) {
|
|
3794
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3628
3795
|
const env2 = getEnv();
|
|
3796
|
+
const vals = {
|
|
3797
|
+
[data.name]: data.stage_id
|
|
3798
|
+
};
|
|
3629
3799
|
const jsonData = {
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
limit: 100,
|
|
3800
|
+
model: data.model,
|
|
3801
|
+
method: "web_save",
|
|
3633
3802
|
with_context: {
|
|
3634
|
-
lang: data.lang
|
|
3803
|
+
lang: data.lang,
|
|
3804
|
+
allowed_company_ids: [1],
|
|
3805
|
+
uid: 2,
|
|
3806
|
+
search_default_my_ticket: true,
|
|
3807
|
+
search_default_is_open: true
|
|
3808
|
+
},
|
|
3809
|
+
ids: [data.id],
|
|
3810
|
+
kwargs: {
|
|
3811
|
+
vals,
|
|
3812
|
+
specification: {}
|
|
3635
3813
|
}
|
|
3636
3814
|
};
|
|
3637
|
-
return env2.requests.post("/
|
|
3815
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3638
3816
|
headers: {
|
|
3639
3817
|
"Content-Type": "application/json"
|
|
3640
3818
|
}
|
|
3641
3819
|
});
|
|
3642
|
-
}
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3820
|
+
});
|
|
3821
|
+
}
|
|
3822
|
+
};
|
|
3823
|
+
var form_service_default = FormService;
|
|
3824
|
+
|
|
3825
|
+
// src/services/kanban-service/index.ts
|
|
3826
|
+
var KanbanServices = {
|
|
3827
|
+
getGroups(_0) {
|
|
3828
|
+
return __async(this, arguments, function* ({
|
|
3829
|
+
model,
|
|
3830
|
+
width_context
|
|
3831
|
+
}) {
|
|
3649
3832
|
const env2 = getEnv();
|
|
3650
|
-
const
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
},
|
|
3658
|
-
post_data: {
|
|
3659
|
-
body: data.message,
|
|
3660
|
-
message_type: "comment",
|
|
3661
|
-
attachment_ids: data.attachment_ids,
|
|
3662
|
-
attachment_tokens: [],
|
|
3663
|
-
subtype_xmlid: data.subtype
|
|
3833
|
+
const jsonDataView = {
|
|
3834
|
+
model,
|
|
3835
|
+
method: "web_read_group",
|
|
3836
|
+
kwargs: {
|
|
3837
|
+
domain: [["stage_id.fold", "=", false]],
|
|
3838
|
+
fields: ["color:sum"],
|
|
3839
|
+
groupby: ["stage_id"]
|
|
3664
3840
|
},
|
|
3665
|
-
|
|
3666
|
-
thread_model: data.thread_model
|
|
3841
|
+
width_context
|
|
3667
3842
|
};
|
|
3668
|
-
return env2.requests.post("/
|
|
3843
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3669
3844
|
headers: {
|
|
3670
3845
|
"Content-Type": "application/json"
|
|
3671
3846
|
}
|
|
3672
3847
|
});
|
|
3673
|
-
}
|
|
3674
|
-
console.error("Error when sent message:", error);
|
|
3675
|
-
throw error;
|
|
3676
|
-
}
|
|
3848
|
+
});
|
|
3677
3849
|
},
|
|
3678
|
-
|
|
3679
|
-
|
|
3850
|
+
getProgressBar(_0) {
|
|
3851
|
+
return __async(this, arguments, function* ({
|
|
3852
|
+
field,
|
|
3853
|
+
color,
|
|
3854
|
+
model,
|
|
3855
|
+
width_context
|
|
3856
|
+
}) {
|
|
3680
3857
|
const env2 = getEnv();
|
|
3681
|
-
const
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3858
|
+
const jsonDataView = {
|
|
3859
|
+
model,
|
|
3860
|
+
method: "read_progress_bar",
|
|
3861
|
+
kwargs: {
|
|
3862
|
+
domain: [],
|
|
3863
|
+
group_by: "stage_id",
|
|
3864
|
+
progress_bar: {
|
|
3865
|
+
colors: color,
|
|
3866
|
+
field
|
|
3867
|
+
}
|
|
3868
|
+
},
|
|
3869
|
+
width_context
|
|
3686
3870
|
};
|
|
3687
|
-
return env2.requests.post("/
|
|
3871
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3688
3872
|
headers: {
|
|
3689
3873
|
"Content-Type": "application/json"
|
|
3690
3874
|
}
|
|
3691
3875
|
});
|
|
3692
|
-
}
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
}
|
|
3707
|
-
);
|
|
3708
|
-
} catch (error) {
|
|
3709
|
-
console.error("Error when sent message:", error);
|
|
3710
|
-
throw error;
|
|
3711
|
-
}
|
|
3712
|
-
},
|
|
3713
|
-
async uploadImage({ data }) {
|
|
3714
|
-
try {
|
|
3876
|
+
});
|
|
3877
|
+
}
|
|
3878
|
+
};
|
|
3879
|
+
var kanban_service_default = KanbanServices;
|
|
3880
|
+
|
|
3881
|
+
// src/services/model-service/index.ts
|
|
3882
|
+
var OBJECT_POSITION = 2;
|
|
3883
|
+
var ModelService = {
|
|
3884
|
+
getListMyBankAccount(_0) {
|
|
3885
|
+
return __async(this, arguments, function* ({
|
|
3886
|
+
domain,
|
|
3887
|
+
spectification,
|
|
3888
|
+
model
|
|
3889
|
+
}) {
|
|
3715
3890
|
const env2 = getEnv();
|
|
3716
|
-
|
|
3891
|
+
const jsonData = {
|
|
3892
|
+
model,
|
|
3893
|
+
method: "web_search_read",
|
|
3894
|
+
kwargs: {
|
|
3895
|
+
specification: spectification,
|
|
3896
|
+
domain,
|
|
3897
|
+
limit: 100,
|
|
3898
|
+
offset: 0
|
|
3899
|
+
}
|
|
3900
|
+
};
|
|
3901
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3717
3902
|
headers: {
|
|
3718
|
-
"Content-Type": "
|
|
3903
|
+
"Content-Type": "application/json"
|
|
3719
3904
|
}
|
|
3720
3905
|
});
|
|
3721
|
-
}
|
|
3722
|
-
console.error("Error when sent message:", error);
|
|
3723
|
-
throw error;
|
|
3724
|
-
}
|
|
3906
|
+
});
|
|
3725
3907
|
},
|
|
3726
|
-
|
|
3727
|
-
|
|
3908
|
+
getCurrency() {
|
|
3909
|
+
return __async(this, null, function* () {
|
|
3728
3910
|
const env2 = getEnv();
|
|
3729
3911
|
const jsonData = {
|
|
3730
|
-
model:
|
|
3731
|
-
method: "
|
|
3732
|
-
|
|
3733
|
-
|
|
3912
|
+
model: "res.currency",
|
|
3913
|
+
method: "web_search_read",
|
|
3914
|
+
kwargs: {
|
|
3915
|
+
specification: {
|
|
3916
|
+
icon_url: {},
|
|
3917
|
+
name: {}
|
|
3918
|
+
},
|
|
3919
|
+
domain: [["active", "=", true]],
|
|
3920
|
+
limit: 100,
|
|
3921
|
+
offset: 0
|
|
3922
|
+
}
|
|
3734
3923
|
};
|
|
3735
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3924
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3736
3925
|
headers: {
|
|
3737
3926
|
"Content-Type": "application/json"
|
|
3738
3927
|
}
|
|
3739
3928
|
});
|
|
3740
|
-
} catch (error) {
|
|
3741
|
-
console.error("Error when fetching form view:", error);
|
|
3742
|
-
throw error;
|
|
3743
|
-
}
|
|
3744
|
-
},
|
|
3745
|
-
async changeStatus({ data }) {
|
|
3746
|
-
const env2 = getEnv();
|
|
3747
|
-
const vals = {
|
|
3748
|
-
[data.name]: data.stage_id
|
|
3749
|
-
};
|
|
3750
|
-
const jsonData = {
|
|
3751
|
-
model: data.model,
|
|
3752
|
-
method: "web_save",
|
|
3753
|
-
with_context: {
|
|
3754
|
-
lang: data.lang,
|
|
3755
|
-
allowed_company_ids: [1],
|
|
3756
|
-
uid: 2,
|
|
3757
|
-
search_default_my_ticket: true,
|
|
3758
|
-
search_default_is_open: true
|
|
3759
|
-
},
|
|
3760
|
-
ids: [data.id],
|
|
3761
|
-
kwargs: {
|
|
3762
|
-
vals,
|
|
3763
|
-
specification: {}
|
|
3764
|
-
}
|
|
3765
|
-
};
|
|
3766
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3767
|
-
headers: {
|
|
3768
|
-
"Content-Type": "application/json"
|
|
3769
|
-
}
|
|
3770
|
-
});
|
|
3771
|
-
}
|
|
3772
|
-
};
|
|
3773
|
-
var form_service_default = FormService;
|
|
3774
|
-
|
|
3775
|
-
// src/services/kanban-service/index.ts
|
|
3776
|
-
var KanbanServices = {
|
|
3777
|
-
async getGroups({
|
|
3778
|
-
model,
|
|
3779
|
-
width_context
|
|
3780
|
-
}) {
|
|
3781
|
-
const env2 = getEnv();
|
|
3782
|
-
const jsonDataView = {
|
|
3783
|
-
model,
|
|
3784
|
-
method: "web_read_group",
|
|
3785
|
-
kwargs: {
|
|
3786
|
-
domain: [["stage_id.fold", "=", false]],
|
|
3787
|
-
fields: ["color:sum"],
|
|
3788
|
-
groupby: ["stage_id"]
|
|
3789
|
-
},
|
|
3790
|
-
width_context
|
|
3791
|
-
};
|
|
3792
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3793
|
-
headers: {
|
|
3794
|
-
"Content-Type": "application/json"
|
|
3795
|
-
}
|
|
3796
|
-
});
|
|
3797
|
-
},
|
|
3798
|
-
async getProgressBar({
|
|
3799
|
-
field,
|
|
3800
|
-
color,
|
|
3801
|
-
model,
|
|
3802
|
-
width_context
|
|
3803
|
-
}) {
|
|
3804
|
-
const env2 = getEnv();
|
|
3805
|
-
const jsonDataView = {
|
|
3806
|
-
model,
|
|
3807
|
-
method: "read_progress_bar",
|
|
3808
|
-
kwargs: {
|
|
3809
|
-
domain: [],
|
|
3810
|
-
group_by: "stage_id",
|
|
3811
|
-
progress_bar: {
|
|
3812
|
-
colors: color,
|
|
3813
|
-
field
|
|
3814
|
-
}
|
|
3815
|
-
},
|
|
3816
|
-
width_context
|
|
3817
|
-
};
|
|
3818
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3819
|
-
headers: {
|
|
3820
|
-
"Content-Type": "application/json"
|
|
3821
|
-
}
|
|
3822
|
-
});
|
|
3823
|
-
}
|
|
3824
|
-
};
|
|
3825
|
-
var kanban_service_default = KanbanServices;
|
|
3826
|
-
|
|
3827
|
-
// src/services/model-service/index.ts
|
|
3828
|
-
var OBJECT_POSITION = 2;
|
|
3829
|
-
var ModelService = {
|
|
3830
|
-
async getListMyBankAccount({
|
|
3831
|
-
domain,
|
|
3832
|
-
spectification,
|
|
3833
|
-
model
|
|
3834
|
-
}) {
|
|
3835
|
-
const env2 = getEnv();
|
|
3836
|
-
const jsonData = {
|
|
3837
|
-
model,
|
|
3838
|
-
method: "web_search_read",
|
|
3839
|
-
kwargs: {
|
|
3840
|
-
specification: spectification,
|
|
3841
|
-
domain,
|
|
3842
|
-
limit: 100,
|
|
3843
|
-
offset: 0
|
|
3844
|
-
}
|
|
3845
|
-
};
|
|
3846
|
-
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3847
|
-
headers: {
|
|
3848
|
-
"Content-Type": "application/json"
|
|
3849
|
-
}
|
|
3850
|
-
});
|
|
3851
|
-
},
|
|
3852
|
-
async getCurrency() {
|
|
3853
|
-
const env2 = getEnv();
|
|
3854
|
-
const jsonData = {
|
|
3855
|
-
model: "res.currency",
|
|
3856
|
-
method: "web_search_read",
|
|
3857
|
-
kwargs: {
|
|
3858
|
-
specification: {
|
|
3859
|
-
icon_url: {},
|
|
3860
|
-
name: {}
|
|
3861
|
-
},
|
|
3862
|
-
domain: [["active", "=", true]],
|
|
3863
|
-
limit: 100,
|
|
3864
|
-
offset: 0
|
|
3865
|
-
}
|
|
3866
|
-
};
|
|
3867
|
-
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3868
|
-
headers: {
|
|
3869
|
-
"Content-Type": "application/json"
|
|
3870
|
-
}
|
|
3871
3929
|
});
|
|
3872
3930
|
},
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3931
|
+
getConversionRate() {
|
|
3932
|
+
return __async(this, null, function* () {
|
|
3933
|
+
const env2 = getEnv();
|
|
3934
|
+
const jsonData = {
|
|
3935
|
+
model: "res.currency",
|
|
3936
|
+
method: "web_search_read",
|
|
3937
|
+
kwargs: {
|
|
3938
|
+
specification: {
|
|
3939
|
+
name: {},
|
|
3940
|
+
icon_url: {},
|
|
3941
|
+
rate_ids: {
|
|
3942
|
+
fields: {
|
|
3943
|
+
company_rate: {},
|
|
3944
|
+
sell: {}
|
|
3945
|
+
}
|
|
3886
3946
|
}
|
|
3887
|
-
}
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
}
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
}
|
|
3947
|
+
},
|
|
3948
|
+
domain: [["active", "=", true]],
|
|
3949
|
+
limit: 100,
|
|
3950
|
+
offset: 0
|
|
3951
|
+
}
|
|
3952
|
+
};
|
|
3953
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3954
|
+
headers: {
|
|
3955
|
+
"Content-Type": "application/json"
|
|
3956
|
+
}
|
|
3957
|
+
});
|
|
3898
3958
|
});
|
|
3899
3959
|
},
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
fields: data.fields
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3960
|
+
getAll(_0) {
|
|
3961
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3962
|
+
const env2 = getEnv();
|
|
3963
|
+
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] ? {
|
|
3964
|
+
fields: data.fields,
|
|
3965
|
+
groupby: data.groupby
|
|
3966
|
+
} : {
|
|
3967
|
+
count_limit: 10001,
|
|
3968
|
+
order: data.sort,
|
|
3969
|
+
specification: data.specification
|
|
3970
|
+
};
|
|
3971
|
+
const jsonData = {
|
|
3972
|
+
model: String(data.model),
|
|
3973
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
3974
|
+
ids: data.ids,
|
|
3975
|
+
with_context: data.context,
|
|
3976
|
+
kwargs: __spreadValues({
|
|
3977
|
+
domain: data.domain,
|
|
3978
|
+
limit: data.limit,
|
|
3979
|
+
offset: data.offset
|
|
3980
|
+
}, jsonReadGroup)
|
|
3981
|
+
};
|
|
3982
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3983
|
+
headers: {
|
|
3984
|
+
"Content-Type": "application/json"
|
|
3985
|
+
}
|
|
3986
|
+
});
|
|
3926
3987
|
});
|
|
3927
3988
|
},
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
fields: data.fields
|
|
3932
|
-
groupby: data.groupby
|
|
3933
|
-
} : {
|
|
3934
|
-
count_limit: 10001,
|
|
3935
|
-
order: data.sort,
|
|
3936
|
-
specification: data.specification
|
|
3937
|
-
};
|
|
3938
|
-
const jsonData = {
|
|
3939
|
-
model: String(data.model),
|
|
3940
|
-
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
3941
|
-
ids: data.ids,
|
|
3942
|
-
with_context: data.context,
|
|
3943
|
-
kwargs: {
|
|
3944
|
-
domain: data.domain,
|
|
3945
|
-
limit: data.limit,
|
|
3946
|
-
offset: data.offset,
|
|
3989
|
+
getListCalendar(_0) {
|
|
3990
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3991
|
+
const env2 = getEnv();
|
|
3992
|
+
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] ? {
|
|
3947
3993
|
fields: data.fields,
|
|
3948
|
-
|
|
3949
|
-
}
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3994
|
+
groupby: data.groupby
|
|
3995
|
+
} : {
|
|
3996
|
+
count_limit: 10001,
|
|
3997
|
+
order: data.sort,
|
|
3998
|
+
specification: data.specification
|
|
3999
|
+
};
|
|
4000
|
+
const jsonData = {
|
|
4001
|
+
model: String(data.model),
|
|
4002
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
4003
|
+
ids: data.ids,
|
|
4004
|
+
with_context: data.context,
|
|
4005
|
+
kwargs: __spreadValues({
|
|
4006
|
+
domain: data.domain,
|
|
4007
|
+
limit: data.limit,
|
|
4008
|
+
offset: data.offset,
|
|
4009
|
+
fields: data.fields
|
|
4010
|
+
}, jsonReadGroup)
|
|
4011
|
+
};
|
|
4012
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4013
|
+
headers: {
|
|
4014
|
+
"Content-Type": "application/json"
|
|
4015
|
+
}
|
|
4016
|
+
});
|
|
3955
4017
|
});
|
|
3956
4018
|
},
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
ids = [],
|
|
3960
|
-
specification = {},
|
|
3961
|
-
domain = [],
|
|
3962
|
-
offset,
|
|
3963
|
-
order,
|
|
3964
|
-
context = {},
|
|
3965
|
-
limit = 10
|
|
3966
|
-
}) {
|
|
3967
|
-
const env2 = getEnv();
|
|
3968
|
-
const jsonData = {
|
|
4019
|
+
getList(_0) {
|
|
4020
|
+
return __async(this, arguments, function* ({
|
|
3969
4021
|
model,
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
4022
|
+
ids = [],
|
|
4023
|
+
specification = {},
|
|
4024
|
+
domain = [],
|
|
4025
|
+
offset,
|
|
4026
|
+
order,
|
|
4027
|
+
context = {},
|
|
4028
|
+
limit = 10
|
|
4029
|
+
}) {
|
|
4030
|
+
var _a;
|
|
4031
|
+
const env2 = getEnv();
|
|
4032
|
+
const jsonData = {
|
|
4033
|
+
model,
|
|
4034
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4035
|
+
ids,
|
|
4036
|
+
with_context: context,
|
|
4037
|
+
kwargs: {
|
|
4038
|
+
specification,
|
|
4039
|
+
domain,
|
|
4040
|
+
limit,
|
|
4041
|
+
offset,
|
|
4042
|
+
order
|
|
4043
|
+
}
|
|
4044
|
+
};
|
|
4045
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4046
|
+
headers: {
|
|
4047
|
+
"Content-Type": "application/json"
|
|
4048
|
+
}
|
|
4049
|
+
});
|
|
3985
4050
|
});
|
|
3986
4051
|
},
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
specification,
|
|
3991
|
-
context
|
|
3992
|
-
}) {
|
|
3993
|
-
const env2 = getEnv();
|
|
3994
|
-
const jsonData = {
|
|
4052
|
+
getDetail(_0) {
|
|
4053
|
+
return __async(this, arguments, function* ({
|
|
4054
|
+
ids = [],
|
|
3995
4055
|
model,
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4056
|
+
specification,
|
|
4057
|
+
context
|
|
4058
|
+
}) {
|
|
4059
|
+
var _a;
|
|
4060
|
+
const env2 = getEnv();
|
|
4061
|
+
const jsonData = {
|
|
4062
|
+
model,
|
|
4063
|
+
method: "web_read" /* WEB_READ */,
|
|
4064
|
+
ids,
|
|
4065
|
+
with_context: context,
|
|
4066
|
+
kwargs: {
|
|
4067
|
+
specification
|
|
4068
|
+
}
|
|
4069
|
+
};
|
|
4070
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4071
|
+
headers: {
|
|
4072
|
+
"Content-Type": "application/json"
|
|
4073
|
+
}
|
|
4074
|
+
});
|
|
4007
4075
|
});
|
|
4008
4076
|
},
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
ids = [],
|
|
4012
|
-
data = {},
|
|
4013
|
-
specification = {},
|
|
4014
|
-
context = {},
|
|
4015
|
-
path
|
|
4016
|
-
}) {
|
|
4017
|
-
const env2 = getEnv();
|
|
4018
|
-
const jsonData = {
|
|
4077
|
+
save(_0) {
|
|
4078
|
+
return __async(this, arguments, function* ({
|
|
4019
4079
|
model,
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4080
|
+
ids = [],
|
|
4081
|
+
data = {},
|
|
4082
|
+
specification = {},
|
|
4083
|
+
context = {},
|
|
4084
|
+
path
|
|
4085
|
+
}) {
|
|
4086
|
+
var _a;
|
|
4087
|
+
const env2 = getEnv();
|
|
4088
|
+
const jsonData = {
|
|
4089
|
+
model,
|
|
4090
|
+
method: "web_save" /* WEB_SAVE */,
|
|
4091
|
+
with_context: context,
|
|
4092
|
+
ids,
|
|
4093
|
+
kwargs: {
|
|
4094
|
+
vals: data,
|
|
4095
|
+
specification
|
|
4096
|
+
}
|
|
4097
|
+
};
|
|
4098
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(path != null ? path : "/call" /* CALL_PATH */, jsonData, {
|
|
4099
|
+
headers: {
|
|
4100
|
+
"Content-Type": "application/json"
|
|
4101
|
+
}
|
|
4102
|
+
});
|
|
4032
4103
|
});
|
|
4033
4104
|
},
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4105
|
+
delete(_0) {
|
|
4106
|
+
return __async(this, arguments, function* ({ ids = [], model }) {
|
|
4107
|
+
var _a;
|
|
4108
|
+
const env2 = getEnv();
|
|
4109
|
+
const jsonData = {
|
|
4110
|
+
model,
|
|
4111
|
+
method: "unlink" /* UNLINK */,
|
|
4112
|
+
ids
|
|
4113
|
+
};
|
|
4114
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4115
|
+
headers: {
|
|
4116
|
+
"Content-Type": "application/json"
|
|
4117
|
+
}
|
|
4118
|
+
});
|
|
4045
4119
|
});
|
|
4046
4120
|
},
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
object,
|
|
4051
|
-
specification,
|
|
4052
|
-
context,
|
|
4053
|
-
fieldChange
|
|
4054
|
-
}) {
|
|
4055
|
-
const env2 = getEnv();
|
|
4056
|
-
const jsonData = {
|
|
4121
|
+
onChange(_0) {
|
|
4122
|
+
return __async(this, arguments, function* ({
|
|
4123
|
+
ids = [],
|
|
4057
4124
|
model,
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4125
|
+
object,
|
|
4126
|
+
specification,
|
|
4127
|
+
context,
|
|
4128
|
+
fieldChange
|
|
4129
|
+
}) {
|
|
4130
|
+
var _a;
|
|
4131
|
+
const env2 = getEnv();
|
|
4132
|
+
const jsonData = {
|
|
4133
|
+
model,
|
|
4134
|
+
method: "onchange" /* ONCHANGE */,
|
|
4135
|
+
ids,
|
|
4136
|
+
with_context: context,
|
|
4137
|
+
args: [
|
|
4138
|
+
object ? object : {},
|
|
4139
|
+
fieldChange ? fieldChange : [],
|
|
4140
|
+
specification
|
|
4141
|
+
]
|
|
4142
|
+
};
|
|
4143
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4144
|
+
headers: {
|
|
4145
|
+
"Content-Type": "application/json"
|
|
4146
|
+
}
|
|
4147
|
+
});
|
|
4071
4148
|
});
|
|
4072
4149
|
},
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4150
|
+
getListFieldsOnchange(_0) {
|
|
4151
|
+
return __async(this, arguments, function* ({ model }) {
|
|
4152
|
+
var _a;
|
|
4153
|
+
const env2 = getEnv();
|
|
4154
|
+
const jsonData = {
|
|
4155
|
+
model,
|
|
4156
|
+
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4157
|
+
};
|
|
4158
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4159
|
+
headers: {
|
|
4160
|
+
"Content-Type": "application/json"
|
|
4161
|
+
}
|
|
4162
|
+
});
|
|
4083
4163
|
});
|
|
4084
4164
|
},
|
|
4085
4165
|
parseORMOdoo(data) {
|
|
@@ -4093,13 +4173,14 @@ var ModelService = {
|
|
|
4093
4173
|
data[key] = "/";
|
|
4094
4174
|
}
|
|
4095
4175
|
}
|
|
4096
|
-
return {
|
|
4176
|
+
return __spreadValues({}, data);
|
|
4097
4177
|
},
|
|
4098
4178
|
toDataJS(data, viewData, model) {
|
|
4179
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
4099
4180
|
for (const key in data) {
|
|
4100
4181
|
if (data[key] === false) {
|
|
4101
4182
|
if (viewData && model) {
|
|
4102
|
-
if (viewData
|
|
4183
|
+
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 */) {
|
|
4103
4184
|
data[key] = null;
|
|
4104
4185
|
}
|
|
4105
4186
|
} else {
|
|
@@ -4109,12 +4190,13 @@ var ModelService = {
|
|
|
4109
4190
|
data[key] = "Draft";
|
|
4110
4191
|
} else if (data[key] !== false) {
|
|
4111
4192
|
if (model !== void 0) {
|
|
4112
|
-
if (viewData
|
|
4113
|
-
data[key] = (data[key]
|
|
4114
|
-
|
|
4193
|
+
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 */) {
|
|
4194
|
+
data[key] = (_k = (_j = data[key]) != null ? _j : data[key] = []) == null ? void 0 : _k.map((item) => {
|
|
4195
|
+
var _a2, _b2, _c2, _d2;
|
|
4196
|
+
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;
|
|
4115
4197
|
if (relation !== void 0) {
|
|
4116
|
-
if (viewData
|
|
4117
|
-
if (item
|
|
4198
|
+
if ((_d2 = viewData == null ? void 0 : viewData.models) == null ? void 0 : _d2[relation]) {
|
|
4199
|
+
if ((item == null ? void 0 : item.length) >= 3) {
|
|
4118
4200
|
return ModelService.toDataJS(
|
|
4119
4201
|
item[OBJECT_POSITION],
|
|
4120
4202
|
viewData,
|
|
@@ -4124,7 +4206,7 @@ var ModelService = {
|
|
|
4124
4206
|
return ModelService.toDataJS(item, viewData, relation);
|
|
4125
4207
|
}
|
|
4126
4208
|
} else {
|
|
4127
|
-
if (item
|
|
4209
|
+
if ((item == null ? void 0 : item.length) >= 3) {
|
|
4128
4210
|
return item[OBJECT_POSITION];
|
|
4129
4211
|
} else {
|
|
4130
4212
|
return item;
|
|
@@ -4136,527 +4218,568 @@ var ModelService = {
|
|
|
4136
4218
|
}
|
|
4137
4219
|
}
|
|
4138
4220
|
}
|
|
4139
|
-
return {
|
|
4221
|
+
return __spreadValues({}, data);
|
|
4140
4222
|
}
|
|
4141
4223
|
};
|
|
4142
4224
|
var model_service_default = ModelService;
|
|
4143
4225
|
|
|
4144
4226
|
// src/services/user-service/index.ts
|
|
4145
4227
|
var UserService = {
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4228
|
+
getProfile(path) {
|
|
4229
|
+
return __async(this, null, function* () {
|
|
4230
|
+
const env2 = getEnv();
|
|
4231
|
+
return env2.requests.get(path != null ? path : "/userinfo" /* PROFILE_PATH */, {
|
|
4232
|
+
headers: {
|
|
4233
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
4234
|
+
}
|
|
4235
|
+
});
|
|
4152
4236
|
});
|
|
4153
4237
|
},
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4238
|
+
getUser(_0) {
|
|
4239
|
+
return __async(this, arguments, function* ({ context, id }) {
|
|
4240
|
+
const env2 = getEnv();
|
|
4241
|
+
const jsonData = {
|
|
4242
|
+
model: "res.users",
|
|
4243
|
+
method: "web_read",
|
|
4244
|
+
ids: [id],
|
|
4245
|
+
with_context: context,
|
|
4246
|
+
kwargs: {
|
|
4247
|
+
specification: {
|
|
4248
|
+
display_name: {},
|
|
4249
|
+
image_1920: {},
|
|
4250
|
+
name: {},
|
|
4251
|
+
login: {},
|
|
4252
|
+
email: {},
|
|
4253
|
+
password: {},
|
|
4254
|
+
visible_group_id: {
|
|
4255
|
+
fields: {
|
|
4256
|
+
id: {},
|
|
4257
|
+
display_name: {}
|
|
4258
|
+
}
|
|
4259
|
+
},
|
|
4260
|
+
company_id: {
|
|
4261
|
+
fields: {
|
|
4262
|
+
id: {},
|
|
4263
|
+
display_name: {}
|
|
4264
|
+
}
|
|
4179
4265
|
}
|
|
4180
4266
|
}
|
|
4181
4267
|
}
|
|
4182
|
-
}
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
}
|
|
4268
|
+
};
|
|
4269
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4270
|
+
headers: {
|
|
4271
|
+
"Content-Type": "application/json"
|
|
4272
|
+
}
|
|
4273
|
+
});
|
|
4188
4274
|
});
|
|
4189
4275
|
},
|
|
4190
|
-
switchUserLocale:
|
|
4276
|
+
switchUserLocale: (_0) => __async(null, [_0], function* ({ id, values }) {
|
|
4277
|
+
var _a;
|
|
4191
4278
|
const env2 = getEnv();
|
|
4192
4279
|
const jsonData = {
|
|
4193
4280
|
model: "res.users",
|
|
4194
4281
|
domain: [["id", "=", id]],
|
|
4195
4282
|
values
|
|
4196
4283
|
};
|
|
4197
|
-
return env2
|
|
4284
|
+
return env2 == null ? void 0 : env2.requests.post((_a = UriConstants) == null ? void 0 : _a.CREATE_UPDATE_PATH, jsonData, {
|
|
4198
4285
|
headers: {
|
|
4199
4286
|
"Content-Type": "application/json"
|
|
4200
4287
|
}
|
|
4201
4288
|
});
|
|
4202
|
-
}
|
|
4289
|
+
})
|
|
4203
4290
|
};
|
|
4204
4291
|
var user_service_default = UserService;
|
|
4205
4292
|
|
|
4206
4293
|
// src/services/view-service/index.ts
|
|
4207
4294
|
var ViewService = {
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
views,
|
|
4211
|
-
context = {},
|
|
4212
|
-
options = {},
|
|
4213
|
-
aid
|
|
4214
|
-
}) {
|
|
4215
|
-
const env2 = getEnv();
|
|
4216
|
-
const defaultOptions = {
|
|
4217
|
-
load_filters: true,
|
|
4218
|
-
toolbar: true,
|
|
4219
|
-
action_id: aid
|
|
4220
|
-
};
|
|
4221
|
-
const jsonDataView = {
|
|
4295
|
+
getView(_0) {
|
|
4296
|
+
return __async(this, arguments, function* ({
|
|
4222
4297
|
model,
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4298
|
+
views,
|
|
4299
|
+
context = {},
|
|
4300
|
+
options = {},
|
|
4301
|
+
aid
|
|
4302
|
+
}) {
|
|
4303
|
+
var _a;
|
|
4304
|
+
const env2 = getEnv();
|
|
4305
|
+
const defaultOptions = {
|
|
4306
|
+
load_filters: true,
|
|
4307
|
+
toolbar: true,
|
|
4308
|
+
action_id: aid
|
|
4309
|
+
};
|
|
4310
|
+
const jsonDataView = {
|
|
4311
|
+
model,
|
|
4312
|
+
method: "get_fields_view_v2" /* GET_FIELD_VIEW */,
|
|
4313
|
+
kwargs: {
|
|
4314
|
+
views,
|
|
4315
|
+
options: __spreadValues(__spreadValues({}, options), defaultOptions)
|
|
4316
|
+
},
|
|
4317
|
+
with_context: context
|
|
4318
|
+
};
|
|
4319
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4320
|
+
headers: {
|
|
4321
|
+
"Content-Type": "application/json"
|
|
4322
|
+
}
|
|
4323
|
+
});
|
|
4234
4324
|
});
|
|
4235
4325
|
},
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
web_icon: {},
|
|
4260
|
-
web_icon_data: {},
|
|
4261
|
-
groups_id: {
|
|
4262
|
-
fields: {
|
|
4263
|
-
full_name: {}
|
|
4326
|
+
getMenu(context) {
|
|
4327
|
+
return __async(this, null, function* () {
|
|
4328
|
+
var _a;
|
|
4329
|
+
const env2 = getEnv();
|
|
4330
|
+
const jsonData = {
|
|
4331
|
+
model: "ir.ui.menu" /* MENU */,
|
|
4332
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4333
|
+
ids: [],
|
|
4334
|
+
with_context: context,
|
|
4335
|
+
kwargs: {
|
|
4336
|
+
specification: {
|
|
4337
|
+
active: {},
|
|
4338
|
+
name: {},
|
|
4339
|
+
is_display: {},
|
|
4340
|
+
sequence: {},
|
|
4341
|
+
complete_name: {},
|
|
4342
|
+
action: {
|
|
4343
|
+
fields: {
|
|
4344
|
+
display_name: {},
|
|
4345
|
+
type: {},
|
|
4346
|
+
binding_view_types: {}
|
|
4347
|
+
// res_model: {},
|
|
4348
|
+
}
|
|
4264
4349
|
},
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
active: {},
|
|
4272
|
-
name: {},
|
|
4273
|
-
is_display: {},
|
|
4274
|
-
sequence: {},
|
|
4275
|
-
complete_name: {},
|
|
4276
|
-
action: {
|
|
4277
|
-
fields: {
|
|
4278
|
-
display_name: {},
|
|
4279
|
-
type: {},
|
|
4280
|
-
binding_view_types: {}
|
|
4281
|
-
// res_model: {},
|
|
4282
|
-
}
|
|
4350
|
+
url_icon: {},
|
|
4351
|
+
web_icon: {},
|
|
4352
|
+
web_icon_data: {},
|
|
4353
|
+
groups_id: {
|
|
4354
|
+
fields: {
|
|
4355
|
+
full_name: {}
|
|
4283
4356
|
},
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4357
|
+
limit: 40,
|
|
4358
|
+
order: ""
|
|
4359
|
+
},
|
|
4360
|
+
display_name: {},
|
|
4361
|
+
child_id: {
|
|
4362
|
+
fields: {
|
|
4363
|
+
active: {},
|
|
4364
|
+
name: {},
|
|
4365
|
+
is_display: {},
|
|
4366
|
+
sequence: {},
|
|
4367
|
+
complete_name: {},
|
|
4368
|
+
action: {
|
|
4369
|
+
fields: {
|
|
4370
|
+
display_name: {},
|
|
4371
|
+
type: {},
|
|
4372
|
+
binding_view_types: {}
|
|
4373
|
+
// res_model: {},
|
|
4374
|
+
}
|
|
4290
4375
|
},
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
active: {},
|
|
4298
|
-
name: {},
|
|
4299
|
-
is_display: {},
|
|
4300
|
-
sequence: {},
|
|
4301
|
-
complete_name: {},
|
|
4302
|
-
action: {
|
|
4303
|
-
fields: {
|
|
4304
|
-
display_name: {},
|
|
4305
|
-
type: {},
|
|
4306
|
-
binding_view_types: {}
|
|
4307
|
-
// res_model: {},
|
|
4308
|
-
}
|
|
4376
|
+
url_icon: {},
|
|
4377
|
+
web_icon: {},
|
|
4378
|
+
web_icon_data: {},
|
|
4379
|
+
groups_id: {
|
|
4380
|
+
fields: {
|
|
4381
|
+
full_name: {}
|
|
4309
4382
|
},
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4383
|
+
limit: 40,
|
|
4384
|
+
order: ""
|
|
4385
|
+
},
|
|
4386
|
+
display_name: {},
|
|
4387
|
+
child_id: {
|
|
4388
|
+
fields: {
|
|
4389
|
+
active: {},
|
|
4390
|
+
name: {},
|
|
4391
|
+
is_display: {},
|
|
4392
|
+
sequence: {},
|
|
4393
|
+
complete_name: {},
|
|
4394
|
+
action: {
|
|
4395
|
+
fields: {
|
|
4396
|
+
display_name: {},
|
|
4397
|
+
type: {},
|
|
4398
|
+
binding_view_types: {}
|
|
4399
|
+
// res_model: {},
|
|
4400
|
+
}
|
|
4316
4401
|
},
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
active: {},
|
|
4324
|
-
name: {},
|
|
4325
|
-
is_display: {},
|
|
4326
|
-
sequence: {},
|
|
4327
|
-
complete_name: {},
|
|
4328
|
-
action: {
|
|
4329
|
-
fields: {
|
|
4330
|
-
display_name: {},
|
|
4331
|
-
type: {},
|
|
4332
|
-
binding_view_types: {}
|
|
4333
|
-
// res_model: {},
|
|
4334
|
-
}
|
|
4402
|
+
url_icon: {},
|
|
4403
|
+
web_icon: {},
|
|
4404
|
+
web_icon_data: {},
|
|
4405
|
+
groups_id: {
|
|
4406
|
+
fields: {
|
|
4407
|
+
full_name: {}
|
|
4335
4408
|
},
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4409
|
+
limit: 40,
|
|
4410
|
+
order: ""
|
|
4411
|
+
},
|
|
4412
|
+
display_name: {},
|
|
4413
|
+
child_id: {
|
|
4414
|
+
fields: {
|
|
4415
|
+
active: {},
|
|
4416
|
+
name: {},
|
|
4417
|
+
is_display: {},
|
|
4418
|
+
sequence: {},
|
|
4419
|
+
complete_name: {},
|
|
4420
|
+
action: {
|
|
4421
|
+
fields: {
|
|
4422
|
+
display_name: {},
|
|
4423
|
+
type: {},
|
|
4424
|
+
binding_view_types: {}
|
|
4425
|
+
// res_model: {},
|
|
4426
|
+
}
|
|
4427
|
+
},
|
|
4428
|
+
url_icon: {},
|
|
4429
|
+
web_icon: {},
|
|
4430
|
+
web_icon_data: {},
|
|
4431
|
+
groups_id: {
|
|
4432
|
+
fields: {
|
|
4433
|
+
full_name: {}
|
|
4434
|
+
},
|
|
4435
|
+
limit: 40,
|
|
4436
|
+
order: ""
|
|
4342
4437
|
},
|
|
4343
|
-
|
|
4344
|
-
|
|
4438
|
+
display_name: {},
|
|
4439
|
+
child_id: {
|
|
4440
|
+
fields: {},
|
|
4441
|
+
limit: 40,
|
|
4442
|
+
order: ""
|
|
4443
|
+
}
|
|
4345
4444
|
},
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
}
|
|
4373
|
-
};
|
|
4374
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4375
|
-
headers: {
|
|
4376
|
-
"Content-Type": "application/json"
|
|
4377
|
-
}
|
|
4445
|
+
limit: 40,
|
|
4446
|
+
order: ""
|
|
4447
|
+
}
|
|
4448
|
+
},
|
|
4449
|
+
limit: 40,
|
|
4450
|
+
order: ""
|
|
4451
|
+
}
|
|
4452
|
+
},
|
|
4453
|
+
limit: 40,
|
|
4454
|
+
order: ""
|
|
4455
|
+
}
|
|
4456
|
+
},
|
|
4457
|
+
domain: [
|
|
4458
|
+
"&",
|
|
4459
|
+
["is_display", "=", true],
|
|
4460
|
+
"&",
|
|
4461
|
+
["active", "=", true],
|
|
4462
|
+
["parent_id", "=", false]
|
|
4463
|
+
]
|
|
4464
|
+
}
|
|
4465
|
+
};
|
|
4466
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4467
|
+
headers: {
|
|
4468
|
+
"Content-Type": "application/json"
|
|
4469
|
+
}
|
|
4470
|
+
});
|
|
4378
4471
|
});
|
|
4379
4472
|
},
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4473
|
+
getActionDetail(aid, context) {
|
|
4474
|
+
return __async(this, null, function* () {
|
|
4475
|
+
var _a;
|
|
4476
|
+
const env2 = getEnv();
|
|
4477
|
+
const jsonData = {
|
|
4478
|
+
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
4479
|
+
method: "web_read" /* WEB_READ */,
|
|
4480
|
+
ids: [aid],
|
|
4481
|
+
with_context: context,
|
|
4482
|
+
kwargs: {
|
|
4483
|
+
specification: {
|
|
4484
|
+
id: {},
|
|
4485
|
+
name: {},
|
|
4486
|
+
res_model: {},
|
|
4487
|
+
views: {},
|
|
4488
|
+
view_mode: {},
|
|
4489
|
+
mobile_view_mode: {},
|
|
4490
|
+
domain: {},
|
|
4491
|
+
context: {},
|
|
4492
|
+
groups_id: {},
|
|
4493
|
+
search_view_id: {}
|
|
4494
|
+
}
|
|
4399
4495
|
}
|
|
4400
|
-
}
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
}
|
|
4496
|
+
};
|
|
4497
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4498
|
+
headers: {
|
|
4499
|
+
"Content-Type": "application/json"
|
|
4500
|
+
}
|
|
4501
|
+
});
|
|
4406
4502
|
});
|
|
4407
4503
|
},
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
ids,
|
|
4411
|
-
context,
|
|
4412
|
-
offset
|
|
4413
|
-
}) {
|
|
4414
|
-
const env2 = getEnv();
|
|
4415
|
-
const jsonData = {
|
|
4504
|
+
getResequence(_0) {
|
|
4505
|
+
return __async(this, arguments, function* ({
|
|
4416
4506
|
model,
|
|
4417
|
-
with_context: context,
|
|
4418
4507
|
ids,
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
}
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4508
|
+
context,
|
|
4509
|
+
offset
|
|
4510
|
+
}) {
|
|
4511
|
+
const env2 = getEnv();
|
|
4512
|
+
const jsonData = __spreadValues({
|
|
4513
|
+
model,
|
|
4514
|
+
with_context: context,
|
|
4515
|
+
ids,
|
|
4516
|
+
field: "sequence"
|
|
4517
|
+
}, offset > 0 ? { offset } : {});
|
|
4518
|
+
return env2 == null ? void 0 : env2.requests.post("/web/dataset/resequence", jsonData, {
|
|
4519
|
+
headers: {
|
|
4520
|
+
"Content-Type": "application/json"
|
|
4521
|
+
}
|
|
4522
|
+
});
|
|
4426
4523
|
});
|
|
4427
4524
|
},
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4525
|
+
getSelectionItem(_0) {
|
|
4526
|
+
return __async(this, arguments, function* ({ data }) {
|
|
4527
|
+
var _a;
|
|
4528
|
+
const env2 = getEnv();
|
|
4529
|
+
const jsonData = {
|
|
4530
|
+
model: data.model,
|
|
4531
|
+
ids: [],
|
|
4532
|
+
method: "get_data_select",
|
|
4533
|
+
with_context: data.context,
|
|
4534
|
+
kwargs: {
|
|
4535
|
+
count_limit: 10001,
|
|
4536
|
+
domain: data.domain ? data.domain : [],
|
|
4537
|
+
offset: 0,
|
|
4538
|
+
order: "",
|
|
4539
|
+
specification: (_a = data == null ? void 0 : data.specification) != null ? _a : {
|
|
4540
|
+
id: {},
|
|
4541
|
+
name: {},
|
|
4542
|
+
display_name: {}
|
|
4543
|
+
}
|
|
4444
4544
|
}
|
|
4445
|
-
}
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
}
|
|
4545
|
+
};
|
|
4546
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4547
|
+
headers: {
|
|
4548
|
+
"Content-Type": "application/json"
|
|
4549
|
+
}
|
|
4550
|
+
});
|
|
4451
4551
|
});
|
|
4452
4552
|
},
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4553
|
+
loadMessages() {
|
|
4554
|
+
return __async(this, null, function* () {
|
|
4555
|
+
const env2 = getEnv();
|
|
4556
|
+
return env2.requests.post(
|
|
4557
|
+
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
4558
|
+
{},
|
|
4559
|
+
{
|
|
4560
|
+
headers: {
|
|
4561
|
+
"Content-Type": "application/json"
|
|
4562
|
+
}
|
|
4563
|
+
}
|
|
4564
|
+
);
|
|
4565
|
+
});
|
|
4566
|
+
},
|
|
4567
|
+
getVersion() {
|
|
4568
|
+
return __async(this, null, function* () {
|
|
4569
|
+
var _a;
|
|
4570
|
+
const env2 = getEnv();
|
|
4571
|
+
console.log("env?.requests", env2, env2 == null ? void 0 : env2.requests);
|
|
4572
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.get("", {
|
|
4459
4573
|
headers: {
|
|
4460
4574
|
"Content-Type": "application/json"
|
|
4461
4575
|
}
|
|
4462
|
-
}
|
|
4463
|
-
);
|
|
4464
|
-
},
|
|
4465
|
-
async getVersion() {
|
|
4466
|
-
const env2 = getEnv();
|
|
4467
|
-
return env2?.requests.get("", {
|
|
4468
|
-
headers: {
|
|
4469
|
-
"Content-Type": "application/json"
|
|
4470
|
-
}
|
|
4576
|
+
});
|
|
4471
4577
|
});
|
|
4472
4578
|
},
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
with_context
|
|
4476
|
-
}) {
|
|
4477
|
-
const env2 = getEnv();
|
|
4478
|
-
const jsonData = {
|
|
4579
|
+
get2FAMethods(_0) {
|
|
4580
|
+
return __async(this, arguments, function* ({
|
|
4479
4581
|
method,
|
|
4480
4582
|
with_context
|
|
4481
|
-
}
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4583
|
+
}) {
|
|
4584
|
+
const env2 = getEnv();
|
|
4585
|
+
const jsonData = {
|
|
4586
|
+
method,
|
|
4587
|
+
with_context
|
|
4588
|
+
};
|
|
4589
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4590
|
+
headers: {
|
|
4591
|
+
"Content-Type": "application/json"
|
|
4592
|
+
}
|
|
4593
|
+
});
|
|
4486
4594
|
});
|
|
4487
4595
|
},
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
with_context,
|
|
4491
|
-
code,
|
|
4492
|
-
device,
|
|
4493
|
-
location
|
|
4494
|
-
}) {
|
|
4495
|
-
const env2 = getEnv();
|
|
4496
|
-
const jsonData = {
|
|
4596
|
+
verify2FA(_0) {
|
|
4597
|
+
return __async(this, arguments, function* ({
|
|
4497
4598
|
method,
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4599
|
+
with_context,
|
|
4600
|
+
code,
|
|
4601
|
+
device,
|
|
4602
|
+
location
|
|
4603
|
+
}) {
|
|
4604
|
+
const env2 = getEnv();
|
|
4605
|
+
const jsonData = {
|
|
4606
|
+
method,
|
|
4607
|
+
kwargs: {
|
|
4608
|
+
vals: {
|
|
4609
|
+
code,
|
|
4610
|
+
device,
|
|
4611
|
+
location
|
|
4612
|
+
}
|
|
4613
|
+
},
|
|
4614
|
+
with_context
|
|
4615
|
+
};
|
|
4616
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4617
|
+
headers: {
|
|
4618
|
+
"Content-Type": "application/json"
|
|
4619
|
+
},
|
|
4620
|
+
withCredentials: true
|
|
4621
|
+
});
|
|
4512
4622
|
});
|
|
4513
4623
|
},
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
state,
|
|
4517
|
-
client_id,
|
|
4518
|
-
response_type,
|
|
4519
|
-
path
|
|
4520
|
-
}) {
|
|
4521
|
-
const env2 = getEnv();
|
|
4522
|
-
const params = new URLSearchParams({
|
|
4523
|
-
response_type,
|
|
4524
|
-
client_id,
|
|
4624
|
+
signInSSO(_0) {
|
|
4625
|
+
return __async(this, arguments, function* ({
|
|
4525
4626
|
redirect_uri,
|
|
4526
|
-
state
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4627
|
+
state,
|
|
4628
|
+
client_id,
|
|
4629
|
+
response_type,
|
|
4630
|
+
path
|
|
4631
|
+
}) {
|
|
4632
|
+
const env2 = getEnv();
|
|
4633
|
+
const params = new URLSearchParams({
|
|
4634
|
+
response_type,
|
|
4635
|
+
client_id,
|
|
4636
|
+
redirect_uri,
|
|
4637
|
+
state
|
|
4638
|
+
});
|
|
4639
|
+
const url = `${path}?${params.toString()}`;
|
|
4640
|
+
return env2 == null ? void 0 : env2.requests.get(url, {
|
|
4641
|
+
headers: {
|
|
4642
|
+
"Content-Type": "application/json"
|
|
4643
|
+
},
|
|
4644
|
+
withCredentials: true
|
|
4645
|
+
});
|
|
4534
4646
|
});
|
|
4535
4647
|
},
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
state,
|
|
4539
|
-
client_id,
|
|
4540
|
-
scopes
|
|
4541
|
-
}) {
|
|
4542
|
-
const env2 = getEnv();
|
|
4543
|
-
const jsonData = {
|
|
4648
|
+
grantAccess(_0) {
|
|
4649
|
+
return __async(this, arguments, function* ({
|
|
4544
4650
|
redirect_uri,
|
|
4545
4651
|
state,
|
|
4546
4652
|
client_id,
|
|
4547
4653
|
scopes
|
|
4548
|
-
}
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4654
|
+
}) {
|
|
4655
|
+
const env2 = getEnv();
|
|
4656
|
+
const jsonData = {
|
|
4657
|
+
redirect_uri,
|
|
4658
|
+
state,
|
|
4659
|
+
client_id,
|
|
4660
|
+
scopes
|
|
4661
|
+
};
|
|
4662
|
+
return env2 == null ? void 0 : env2.requests.post("/grant-access" /* GRANT_ACCESS */, jsonData, {
|
|
4663
|
+
headers: {
|
|
4664
|
+
"Content-Type": "application/json"
|
|
4665
|
+
},
|
|
4666
|
+
withCredentials: true
|
|
4667
|
+
});
|
|
4554
4668
|
});
|
|
4555
4669
|
},
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
token,
|
|
4559
|
-
views
|
|
4560
|
-
}) {
|
|
4561
|
-
const env2 = getEnv();
|
|
4562
|
-
const jsonData = {
|
|
4670
|
+
getFieldsViewSecurity(_0) {
|
|
4671
|
+
return __async(this, arguments, function* ({
|
|
4563
4672
|
method,
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4673
|
+
token,
|
|
4674
|
+
views
|
|
4675
|
+
}) {
|
|
4676
|
+
const env2 = getEnv();
|
|
4677
|
+
const jsonData = {
|
|
4678
|
+
method,
|
|
4679
|
+
kwargs: {
|
|
4680
|
+
views
|
|
4681
|
+
},
|
|
4682
|
+
with_context: {
|
|
4683
|
+
token
|
|
4684
|
+
}
|
|
4685
|
+
};
|
|
4686
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4687
|
+
headers: {
|
|
4688
|
+
"Content-Type": "application/json"
|
|
4689
|
+
}
|
|
4690
|
+
});
|
|
4575
4691
|
});
|
|
4576
4692
|
},
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
model,
|
|
4580
|
-
kwargs,
|
|
4581
|
-
token
|
|
4582
|
-
}) {
|
|
4583
|
-
const env2 = getEnv();
|
|
4584
|
-
const jsonData = {
|
|
4693
|
+
settingsWebRead2fa(_0) {
|
|
4694
|
+
return __async(this, arguments, function* ({
|
|
4585
4695
|
method,
|
|
4586
4696
|
model,
|
|
4587
4697
|
kwargs,
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4698
|
+
token
|
|
4699
|
+
}) {
|
|
4700
|
+
const env2 = getEnv();
|
|
4701
|
+
const jsonData = {
|
|
4702
|
+
method,
|
|
4703
|
+
model,
|
|
4704
|
+
kwargs,
|
|
4705
|
+
with_context: {
|
|
4706
|
+
token
|
|
4707
|
+
}
|
|
4708
|
+
};
|
|
4709
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4710
|
+
headers: {
|
|
4711
|
+
"Content-Type": "application/json"
|
|
4712
|
+
}
|
|
4713
|
+
});
|
|
4596
4714
|
});
|
|
4597
4715
|
},
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4716
|
+
requestSetupTotp(_0) {
|
|
4717
|
+
return __async(this, arguments, function* ({ method, token }) {
|
|
4718
|
+
const env2 = getEnv();
|
|
4719
|
+
const jsonData = {
|
|
4720
|
+
method,
|
|
4721
|
+
with_context: {
|
|
4722
|
+
token
|
|
4723
|
+
}
|
|
4724
|
+
};
|
|
4725
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4726
|
+
headers: {
|
|
4727
|
+
"Content-Type": "application/json"
|
|
4728
|
+
}
|
|
4729
|
+
});
|
|
4610
4730
|
});
|
|
4611
4731
|
},
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
action_token,
|
|
4615
|
-
code
|
|
4616
|
-
}) {
|
|
4617
|
-
const env2 = getEnv();
|
|
4618
|
-
const jsonData = {
|
|
4732
|
+
verifyTotp(_0) {
|
|
4733
|
+
return __async(this, arguments, function* ({
|
|
4619
4734
|
method,
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4735
|
+
action_token,
|
|
4736
|
+
code
|
|
4737
|
+
}) {
|
|
4738
|
+
const env2 = getEnv();
|
|
4739
|
+
const jsonData = {
|
|
4740
|
+
method,
|
|
4741
|
+
kwargs: {
|
|
4742
|
+
vals: {
|
|
4743
|
+
code
|
|
4744
|
+
}
|
|
4745
|
+
},
|
|
4746
|
+
with_context: {
|
|
4747
|
+
action_token
|
|
4623
4748
|
}
|
|
4624
|
-
}
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
headers: {
|
|
4631
|
-
"Content-Type": "application/json"
|
|
4632
|
-
}
|
|
4749
|
+
};
|
|
4750
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4751
|
+
headers: {
|
|
4752
|
+
"Content-Type": "application/json"
|
|
4753
|
+
}
|
|
4754
|
+
});
|
|
4633
4755
|
});
|
|
4634
4756
|
},
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4757
|
+
removeTotpSetUp(_0) {
|
|
4758
|
+
return __async(this, arguments, function* ({ method, token }) {
|
|
4759
|
+
const env2 = getEnv();
|
|
4760
|
+
const jsonData = {
|
|
4761
|
+
method,
|
|
4762
|
+
with_context: {
|
|
4763
|
+
token
|
|
4764
|
+
}
|
|
4765
|
+
};
|
|
4766
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4767
|
+
headers: {
|
|
4768
|
+
"Content-Type": "application/json"
|
|
4769
|
+
}
|
|
4770
|
+
});
|
|
4647
4771
|
});
|
|
4648
4772
|
}
|
|
4649
4773
|
};
|
|
4650
4774
|
var view_service_default = ViewService;
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
});
|
|
4775
|
+
export {
|
|
4776
|
+
action_service_default as ActionService,
|
|
4777
|
+
auth_service_default as AuthService,
|
|
4778
|
+
company_service_default as CompanyService,
|
|
4779
|
+
excel_service_default as ExcelService,
|
|
4780
|
+
form_service_default as FormService,
|
|
4781
|
+
kanban_service_default as KanbanService,
|
|
4782
|
+
model_service_default as ModelService,
|
|
4783
|
+
user_service_default as UserService,
|
|
4784
|
+
view_service_default as ViewService
|
|
4785
|
+
};
|