roboto-js 1.9.15 → 3.0.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/.last-build +1 -1
- package/dist/cjs/rbt_api.cjs +7 -7
- package/dist/cjs/rbt_user.cjs +1 -1
- package/dist/cjs/version.cjs +2 -2
- package/dist/esm/rbt_api.js +7 -7
- package/dist/esm/rbt_user.js +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/rbt_object.js +2 -1
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/src/rbt_api.js +8 -8
- package/src/rbt_user.js +1 -1
- package/src/version.js +2 -2
package/.last-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-
|
|
1
|
+
2026-04-05T01:06:26.330Z
|
package/dist/cjs/rbt_api.cjs
CHANGED
|
@@ -476,7 +476,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
476
476
|
case 0:
|
|
477
477
|
_context6.prev = 0;
|
|
478
478
|
_context6.next = 3;
|
|
479
|
-
return this.axios.post('/
|
|
479
|
+
return this.axios.post('/api/iac/loginUser', [{
|
|
480
480
|
email: params.email,
|
|
481
481
|
password: params.password ? _cryptoJs["default"].MD5(params.password).toString(_cryptoJs["default"].enc.Hex) : null,
|
|
482
482
|
// legacy hash password (md5)
|
|
@@ -595,7 +595,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
595
595
|
case 0:
|
|
596
596
|
_context8.prev = 0;
|
|
597
597
|
_context8.next = 3;
|
|
598
|
-
return this.axios.post('/
|
|
598
|
+
return this.axios.post('/api/iac/logoutUser');
|
|
599
599
|
case 3:
|
|
600
600
|
response = _context8.sent;
|
|
601
601
|
if (!(response.data.ok === false)) {
|
|
@@ -757,7 +757,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
757
757
|
};
|
|
758
758
|
_context11.prev = 1;
|
|
759
759
|
_context11.next = 4;
|
|
760
|
-
return this.axios.post('/
|
|
760
|
+
return this.axios.post('/api/iac/confirmUserEmail', [params]);
|
|
761
761
|
case 4:
|
|
762
762
|
response = _context11.sent;
|
|
763
763
|
if (!(response.data.ok === false)) {
|
|
@@ -1203,7 +1203,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1203
1203
|
while (1) switch (_context18.prev = _context18.next) {
|
|
1204
1204
|
case 0:
|
|
1205
1205
|
_context18.next = 2;
|
|
1206
|
-
return _this5.axios.post('/
|
|
1206
|
+
return _this5.axios.post('/api/iac/loadUser', [params]);
|
|
1207
1207
|
case 2:
|
|
1208
1208
|
response = _context18.sent;
|
|
1209
1209
|
userData = response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.user;
|
|
@@ -1264,7 +1264,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1264
1264
|
_context20.prev = 4;
|
|
1265
1265
|
//console.log('RBTTOK Req', authtoken);
|
|
1266
1266
|
// Create a new promise for the token refresh and store it in the cache
|
|
1267
|
-
promise = this.axios.post('/
|
|
1267
|
+
promise = this.axios.post('/api/iac/refreshAuthToken', [authtoken]);
|
|
1268
1268
|
this.requestCache[authtoken] = promise;
|
|
1269
1269
|
|
|
1270
1270
|
// Await the promise to get the response
|
|
@@ -1303,7 +1303,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1303
1303
|
//
|
|
1304
1304
|
// try {
|
|
1305
1305
|
//
|
|
1306
|
-
// const response = await this.axios.post('/
|
|
1306
|
+
// const response = await this.axios.post('/api/iac/refreshAuthToken', [authtoken]);
|
|
1307
1307
|
// return response.data;
|
|
1308
1308
|
//
|
|
1309
1309
|
// } catch (e) {
|
|
@@ -1332,7 +1332,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1332
1332
|
dataHash = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {};
|
|
1333
1333
|
_context21.prev = 1;
|
|
1334
1334
|
_context21.next = 4;
|
|
1335
|
-
return this.axios.post('/
|
|
1335
|
+
return this.axios.post('/api/iac/registerUser', [dataHash]);
|
|
1336
1336
|
case 4:
|
|
1337
1337
|
response = _context21.sent;
|
|
1338
1338
|
record = response.data;
|
package/dist/cjs/rbt_user.cjs
CHANGED
|
@@ -158,7 +158,7 @@ var RbtUser = exports["default"] = /*#__PURE__*/function () {
|
|
|
158
158
|
record = this.toRecord();
|
|
159
159
|
record.type = '<@iac.user>';
|
|
160
160
|
_context.next = 6;
|
|
161
|
-
return this._axios.post('/
|
|
161
|
+
return this._axios.post('/api/iac/saveUser', [record]);
|
|
162
162
|
case 6:
|
|
163
163
|
response = _context.sent;
|
|
164
164
|
if (!(response.data.ok === false)) {
|
package/dist/cjs/version.cjs
CHANGED
|
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = void 0;
|
|
7
7
|
// Auto-generated version file
|
|
8
8
|
// DO NOT EDIT - This file is automatically updated from package.cjson
|
|
9
|
-
// Version:
|
|
10
|
-
var version = exports.version = '
|
|
9
|
+
// Version: 3.0.0
|
|
10
|
+
var version = exports.version = '3.0.0';
|
package/dist/esm/rbt_api.js
CHANGED
|
@@ -469,7 +469,7 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
469
469
|
case 0:
|
|
470
470
|
_context6.prev = 0;
|
|
471
471
|
_context6.next = 3;
|
|
472
|
-
return this.axios.post('/
|
|
472
|
+
return this.axios.post('/api/iac/loginUser', [{
|
|
473
473
|
email: params.email,
|
|
474
474
|
password: params.password ? CryptoJS.MD5(params.password).toString(CryptoJS.enc.Hex) : null,
|
|
475
475
|
// legacy hash password (md5)
|
|
@@ -588,7 +588,7 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
588
588
|
case 0:
|
|
589
589
|
_context8.prev = 0;
|
|
590
590
|
_context8.next = 3;
|
|
591
|
-
return this.axios.post('/
|
|
591
|
+
return this.axios.post('/api/iac/logoutUser');
|
|
592
592
|
case 3:
|
|
593
593
|
response = _context8.sent;
|
|
594
594
|
if (!(response.data.ok === false)) {
|
|
@@ -750,7 +750,7 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
750
750
|
};
|
|
751
751
|
_context11.prev = 1;
|
|
752
752
|
_context11.next = 4;
|
|
753
|
-
return this.axios.post('/
|
|
753
|
+
return this.axios.post('/api/iac/confirmUserEmail', [params]);
|
|
754
754
|
case 4:
|
|
755
755
|
response = _context11.sent;
|
|
756
756
|
if (!(response.data.ok === false)) {
|
|
@@ -1196,7 +1196,7 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
1196
1196
|
while (1) switch (_context18.prev = _context18.next) {
|
|
1197
1197
|
case 0:
|
|
1198
1198
|
_context18.next = 2;
|
|
1199
|
-
return _this5.axios.post('/
|
|
1199
|
+
return _this5.axios.post('/api/iac/loadUser', [params]);
|
|
1200
1200
|
case 2:
|
|
1201
1201
|
response = _context18.sent;
|
|
1202
1202
|
userData = response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.user;
|
|
@@ -1257,7 +1257,7 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
1257
1257
|
_context20.prev = 4;
|
|
1258
1258
|
//console.log('RBTTOK Req', authtoken);
|
|
1259
1259
|
// Create a new promise for the token refresh and store it in the cache
|
|
1260
|
-
promise = this.axios.post('/
|
|
1260
|
+
promise = this.axios.post('/api/iac/refreshAuthToken', [authtoken]);
|
|
1261
1261
|
this.requestCache[authtoken] = promise;
|
|
1262
1262
|
|
|
1263
1263
|
// Await the promise to get the response
|
|
@@ -1296,7 +1296,7 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
1296
1296
|
//
|
|
1297
1297
|
// try {
|
|
1298
1298
|
//
|
|
1299
|
-
// const response = await this.axios.post('/
|
|
1299
|
+
// const response = await this.axios.post('/api/iac/refreshAuthToken', [authtoken]);
|
|
1300
1300
|
// return response.data;
|
|
1301
1301
|
//
|
|
1302
1302
|
// } catch (e) {
|
|
@@ -1325,7 +1325,7 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
1325
1325
|
dataHash = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {};
|
|
1326
1326
|
_context21.prev = 1;
|
|
1327
1327
|
_context21.next = 4;
|
|
1328
|
-
return this.axios.post('/
|
|
1328
|
+
return this.axios.post('/api/iac/registerUser', [dataHash]);
|
|
1329
1329
|
case 4:
|
|
1330
1330
|
response = _context21.sent;
|
|
1331
1331
|
record = response.data;
|
package/dist/esm/rbt_user.js
CHANGED
|
@@ -151,7 +151,7 @@ var RbtUser = /*#__PURE__*/function () {
|
|
|
151
151
|
record = this.toRecord();
|
|
152
152
|
record.type = '<@iac.user>';
|
|
153
153
|
_context.next = 6;
|
|
154
|
-
return this._axios.post('/
|
|
154
|
+
return this._axios.post('/api/iac/saveUser', [record]);
|
|
155
155
|
case 6:
|
|
156
156
|
response = _context.sent;
|
|
157
157
|
if (!(response.data.ok === false)) {
|
package/dist/esm/version.js
CHANGED
package/dist/rbt_object.js
CHANGED
|
@@ -1124,7 +1124,8 @@ var RbtObject = /*#__PURE__*/function () {
|
|
|
1124
1124
|
// Continue to next handler instead of breaking the loop
|
|
1125
1125
|
}
|
|
1126
1126
|
}
|
|
1127
|
-
|
|
1127
|
+
|
|
1128
|
+
// ✓ Completed calling ${handlers.length} handlers`);
|
|
1128
1129
|
}
|
|
1129
1130
|
}, {
|
|
1130
1131
|
key: "_broadcastChange",
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/src/rbt_api.js
CHANGED
|
@@ -299,7 +299,7 @@ export default class RbtApi {
|
|
|
299
299
|
|
|
300
300
|
try {
|
|
301
301
|
|
|
302
|
-
const response = await this.axios.post('/
|
|
302
|
+
const response = await this.axios.post('/api/iac/loginUser', [{
|
|
303
303
|
email: params.email,
|
|
304
304
|
password: (params.password)? CryptoJS.MD5(params.password).toString(CryptoJS.enc.Hex): null, // legacy hash password (md5)
|
|
305
305
|
passwd: params.password || null, // current password
|
|
@@ -378,9 +378,9 @@ export default class RbtApi {
|
|
|
378
378
|
|
|
379
379
|
async logout() {
|
|
380
380
|
try {
|
|
381
|
-
// Call logout endpoint if necessary. Here, I assume there's a '/
|
|
381
|
+
// Call logout endpoint if necessary. Here, I assume there's a '/api/iac/logoutUser' endpoint.
|
|
382
382
|
// This is optional and depends on how your backend is set up.
|
|
383
|
-
const response = await this.axios.post('/
|
|
383
|
+
const response = await this.axios.post('/api/iac/logoutUser');
|
|
384
384
|
|
|
385
385
|
if (response.data.ok === false) {
|
|
386
386
|
return this._handleError(response);
|
|
@@ -477,7 +477,7 @@ export default class RbtApi {
|
|
|
477
477
|
|
|
478
478
|
try {
|
|
479
479
|
|
|
480
|
-
const response = await this.axios.post('/
|
|
480
|
+
const response = await this.axios.post('/api/iac/confirmUserEmail', [params]);
|
|
481
481
|
|
|
482
482
|
if (response.data.ok === false) {
|
|
483
483
|
return this._handleError(response);
|
|
@@ -756,7 +756,7 @@ export default class RbtApi {
|
|
|
756
756
|
|
|
757
757
|
try {
|
|
758
758
|
const p = (async () => {
|
|
759
|
-
const response = await this.axios.post('/
|
|
759
|
+
const response = await this.axios.post('/api/iac/loadUser', [params]);
|
|
760
760
|
let userData = response?.data?.user;
|
|
761
761
|
let User = new RbtUser({ id: userData.id }, this.axios);
|
|
762
762
|
User.setData(userData);
|
|
@@ -788,7 +788,7 @@ export default class RbtApi {
|
|
|
788
788
|
try {
|
|
789
789
|
//console.log('RBTTOK Req', authtoken);
|
|
790
790
|
// Create a new promise for the token refresh and store it in the cache
|
|
791
|
-
const promise = this.axios.post('/
|
|
791
|
+
const promise = this.axios.post('/api/iac/refreshAuthToken', [authtoken]);
|
|
792
792
|
this.requestCache[authtoken] = promise;
|
|
793
793
|
|
|
794
794
|
// Await the promise to get the response
|
|
@@ -818,7 +818,7 @@ export default class RbtApi {
|
|
|
818
818
|
//
|
|
819
819
|
// try {
|
|
820
820
|
//
|
|
821
|
-
// const response = await this.axios.post('/
|
|
821
|
+
// const response = await this.axios.post('/api/iac/refreshAuthToken', [authtoken]);
|
|
822
822
|
// return response.data;
|
|
823
823
|
//
|
|
824
824
|
// } catch (e) {
|
|
@@ -837,7 +837,7 @@ export default class RbtApi {
|
|
|
837
837
|
*/
|
|
838
838
|
async registerUser(dataHash={}) {
|
|
839
839
|
try {
|
|
840
|
-
const response = await this.axios.post('/
|
|
840
|
+
const response = await this.axios.post('/api/iac/registerUser', [dataHash]);
|
|
841
841
|
|
|
842
842
|
const record = response.data;
|
|
843
843
|
return new RbtUser(record, this.axios);
|
package/src/rbt_user.js
CHANGED
|
@@ -123,7 +123,7 @@ export default class RbtUser {
|
|
|
123
123
|
debugger;
|
|
124
124
|
const record = this.toRecord();
|
|
125
125
|
record.type = '<@iac.user>';
|
|
126
|
-
const response = await this._axios.post('/
|
|
126
|
+
const response = await this._axios.post('/api/iac/saveUser', [record]);
|
|
127
127
|
|
|
128
128
|
if (response.data.ok === false) {
|
|
129
129
|
throw new Error(response.data.message);
|
package/src/version.js
CHANGED