@mcurros2/microm 1.1.165-0 → 1.1.167-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +24 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1458,8 +1458,7 @@ class $16abd72d1aa9b62d$export$6118e57c65bf19ee {
|
|
|
1458
1458
|
await this.#removeToken();
|
|
1459
1459
|
await this.#deleteEnabledMenus();
|
|
1460
1460
|
if (this.#RECORD_PATHS) this.#saveAllRecordedAccess();
|
|
1461
|
-
|
|
1462
|
-
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/logoff`, {
|
|
1461
|
+
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/auth/logoff`, {
|
|
1463
1462
|
method: 'POST',
|
|
1464
1463
|
headers: {
|
|
1465
1464
|
"Content-Type": "application/json; charset=utf-8",
|
|
@@ -1487,7 +1486,7 @@ class $16abd72d1aa9b62d$export$6118e57c65bf19ee {
|
|
|
1487
1486
|
try {
|
|
1488
1487
|
await this.#checkAndRefreshToken();
|
|
1489
1488
|
if (this.#TOKEN !== null && this.#TOKEN.access_token !== '') {
|
|
1490
|
-
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/isloggedin`, {
|
|
1489
|
+
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/auth/isloggedin`, {
|
|
1491
1490
|
method: 'GET',
|
|
1492
1491
|
headers: {
|
|
1493
1492
|
"Content-Type": "application/json; charset=utf-8",
|
|
@@ -1543,7 +1542,7 @@ class $16abd72d1aa9b62d$export$6118e57c65bf19ee {
|
|
|
1543
1542
|
try {
|
|
1544
1543
|
if (this.#RECORD_PATHS) this.#RECORDED_PATHS = {};
|
|
1545
1544
|
const localDeviceId = await this.#getLocalDeviceId();
|
|
1546
|
-
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/login`, {
|
|
1545
|
+
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/auth/login`, {
|
|
1547
1546
|
method: 'POST',
|
|
1548
1547
|
headers: {
|
|
1549
1548
|
"Content-Type": "application/json; charset=utf-8"
|
|
@@ -1602,7 +1601,7 @@ class $16abd72d1aa9b62d$export$6118e57c65bf19ee {
|
|
|
1602
1601
|
async recoveryemail(username) {
|
|
1603
1602
|
const loginTimeout = new (0, $dF8o7.TimeoutSignal)(this.#LOGIN_TIMEOUT * 4, 'Login request timed out');
|
|
1604
1603
|
try {
|
|
1605
|
-
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/recoveryemail`, {
|
|
1604
|
+
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/auth/recoveryemail`, {
|
|
1606
1605
|
method: 'POST',
|
|
1607
1606
|
headers: {
|
|
1608
1607
|
"Content-Type": "application/json; charset=utf-8"
|
|
@@ -1632,7 +1631,7 @@ class $16abd72d1aa9b62d$export$6118e57c65bf19ee {
|
|
|
1632
1631
|
async recoverpassword(username, password, recoverycode) {
|
|
1633
1632
|
const loginTimeout = new (0, $dF8o7.TimeoutSignal)(this.#LOGIN_TIMEOUT * 4, 'Login request timed out');
|
|
1634
1633
|
try {
|
|
1635
|
-
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/recoverpassword`, {
|
|
1634
|
+
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/auth/recoverpassword`, {
|
|
1636
1635
|
method: 'POST',
|
|
1637
1636
|
headers: {
|
|
1638
1637
|
"Content-Type": "application/json; charset=utf-8"
|
|
@@ -1782,7 +1781,7 @@ class $16abd72d1aa9b62d$export$6118e57c65bf19ee {
|
|
|
1782
1781
|
if (!this.#TOKEN) throw new Error('Token not found');
|
|
1783
1782
|
//console.log('Refreshing token');
|
|
1784
1783
|
const old_token = this.#TOKEN;
|
|
1785
|
-
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/refresh`, {
|
|
1784
|
+
const response = await fetch(`${this.#API_URL}/${this.#APP_ID}/auth/refresh`, {
|
|
1786
1785
|
method: 'POST',
|
|
1787
1786
|
headers: {
|
|
1788
1787
|
"Content-Type": "application/json; charset=utf-8"
|
|
@@ -1863,7 +1862,7 @@ class $16abd72d1aa9b62d$export$6118e57c65bf19ee {
|
|
|
1863
1862
|
}
|
|
1864
1863
|
async #submitToAPI(entity_name, parent_keys, values, recordsSelection, action, abort_signal = null, additional_route = null) {
|
|
1865
1864
|
const extra_route = additional_route !== null ? `/${additional_route}` : '';
|
|
1866
|
-
const route = `${this.#API_URL}/${this.#APP_ID}/${entity_name}/${action}${extra_route}`;
|
|
1865
|
+
const route = `${this.#API_URL}/${this.#APP_ID}/ent/${entity_name}/${action}${extra_route}`;
|
|
1867
1866
|
try {
|
|
1868
1867
|
await this.#checkAndRefreshToken();
|
|
1869
1868
|
if (!this.#TOKEN) throw {
|
|
@@ -4633,16 +4632,15 @@ function $b7f0b54e18925026$export$5e89f28b2f6c2d01(entity, actionName) {
|
|
|
4633
4632
|
done.current = false;
|
|
4634
4633
|
try {
|
|
4635
4634
|
const action = entity.def.serverActions[actionName];
|
|
4636
|
-
if (!action
|
|
4635
|
+
if (!action) throw new Error('Action or valuesMapper missing.');
|
|
4637
4636
|
setStatus({
|
|
4638
4637
|
loading: true,
|
|
4639
4638
|
operationType: 'action'
|
|
4640
4639
|
});
|
|
4641
4640
|
const data = await entity.API.executeServerAction(action, values, cancellation.current.signal);
|
|
4642
4641
|
done.current = true;
|
|
4643
|
-
const new_values = action.valuesMapper(data);
|
|
4644
4642
|
setStatus({
|
|
4645
|
-
data:
|
|
4643
|
+
data: data,
|
|
4646
4644
|
operationType: 'action'
|
|
4647
4645
|
});
|
|
4648
4646
|
// Update previous values
|