@widget-js/core 24.1.1-beta.75 → 24.1.1-beta.76

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.cjs CHANGED
@@ -2275,6 +2275,7 @@ var Channel = /* @__PURE__ */ ((Channel2) => {
2275
2275
  Channel2["STORE"] = "channel::cn.widgetjs.core.store";
2276
2276
  Channel2["STORAGE"] = "channel::cn.widgetjs.core.storage";
2277
2277
  Channel2["PROCESS"] = "channel::cn.widgetjs.core.process";
2278
+ Channel2["USER"] = "channel::cn.widgetjs.core.user";
2278
2279
  return Channel2;
2279
2280
  })(Channel || {});
2280
2281
 
@@ -2983,6 +2984,9 @@ var ProcessApi = new ProcessApiImpl();
2983
2984
 
2984
2985
  // src/api/AppApi.ts
2985
2986
  var AppApiImpl = class extends BaseApi {
2987
+ showAppWindow(route, options) {
2988
+ return this.invokeMethod("showAppWindow", route, options);
2989
+ }
2986
2990
  openWidgetPackageManagerWindow() {
2987
2991
  return this.invokeMethod("openWidgetPackageManagerWindow");
2988
2992
  }
@@ -3314,6 +3318,12 @@ var WidgetPackageApiImpl = class extends BaseApi {
3314
3318
  }
3315
3319
  return this.invokeMethod("install", JSON.stringify(widgetPackage));
3316
3320
  }
3321
+ async uninstall(widgetPackage) {
3322
+ if (typeof widgetPackage == "string") {
3323
+ return this.invokeMethod("uninstall", widgetPackage);
3324
+ }
3325
+ return this.invokeMethod("uninstall", widgetPackage.name);
3326
+ }
3317
3327
  upgrade(packageName, remoteUrlInfo) {
3318
3328
  return this.invokeMethod("upgrade", packageName, remoteUrlInfo);
3319
3329
  }
@@ -3411,6 +3421,23 @@ var HttpApiImpl = class extends BaseApi {
3411
3421
  };
3412
3422
  var HttpApi = new HttpApiImpl();
3413
3423
 
3424
+ // src/api/UserApi.ts
3425
+ var UserApiImpl = class extends BaseApi {
3426
+ async login(user) {
3427
+ await this.invokeMethod("login", user);
3428
+ }
3429
+ async logout() {
3430
+ await this.invokeMethod("logout");
3431
+ }
3432
+ async getUserInfo() {
3433
+ return await this.invokeMethod("getUserInfo");
3434
+ }
3435
+ getChannel() {
3436
+ return "channel::cn.widgetjs.core.user" /* USER */;
3437
+ }
3438
+ };
3439
+ var UserApi = new UserApiImpl();
3440
+
3414
3441
  exports.ApiConstants = ApiConstants;
3415
3442
  exports.AppApi = AppApi;
3416
3443
  exports.AppApiConstants = AppApiConstants;
@@ -3464,6 +3491,7 @@ exports.SystemApi = SystemApi;
3464
3491
  exports.SystemApiEvent = SystemApiEvent;
3465
3492
  exports.ThemeMode = ThemeMode;
3466
3493
  exports.TrayApiEvent = TrayApiEvent;
3494
+ exports.UserApi = UserApi;
3467
3495
  exports.WebSocketEvent = WebSocketEvent;
3468
3496
  exports.WebSocketEventType = WebSocketEventType;
3469
3497
  exports.Widget = Widget;