@etsoo/appscript 1.4.7 → 1.4.8

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.
@@ -59,6 +59,10 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
59
59
  * Storage
60
60
  */
61
61
  readonly storage: IStorage;
62
+ /**
63
+ * Access token
64
+ */
65
+ accessToken?: string;
62
66
  private _culture;
63
67
  /**
64
68
  * Culture, like zh-CN
@@ -473,6 +473,7 @@ class CoreApp {
473
473
  authorize(token, refreshToken) {
474
474
  var _a;
475
475
  // State, when token is null, means logout
476
+ this.accessToken = token;
476
477
  this.authorized = token != null;
477
478
  // Token
478
479
  this.api.authorize(this.settings.authScheme, token);
@@ -6,6 +6,10 @@ export interface IExternalSettings {
6
6
  * Core system API endpoint
7
7
  */
8
8
  readonly endpoint: string;
9
+ /**
10
+ * Message hub endpoint
11
+ */
12
+ readonly messageHub?: string;
9
13
  /**
10
14
  * Core system app root url
11
15
  */
@@ -113,6 +113,10 @@ export interface IApp {
113
113
  * Application name
114
114
  */
115
115
  readonly name: string;
116
+ /**
117
+ * Access token
118
+ */
119
+ accessToken?: string;
116
120
  /**
117
121
  * IP data
118
122
  */
@@ -59,6 +59,10 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
59
59
  * Storage
60
60
  */
61
61
  readonly storage: IStorage;
62
+ /**
63
+ * Access token
64
+ */
65
+ accessToken?: string;
62
66
  private _culture;
63
67
  /**
64
68
  * Culture, like zh-CN
@@ -447,6 +447,7 @@ export class CoreApp {
447
447
  authorize(token, refreshToken) {
448
448
  var _a;
449
449
  // State, when token is null, means logout
450
+ this.accessToken = token;
450
451
  this.authorized = token != null;
451
452
  // Token
452
453
  this.api.authorize(this.settings.authScheme, token);
@@ -6,6 +6,10 @@ export interface IExternalSettings {
6
6
  * Core system API endpoint
7
7
  */
8
8
  readonly endpoint: string;
9
+ /**
10
+ * Message hub endpoint
11
+ */
12
+ readonly messageHub?: string;
9
13
  /**
10
14
  * Core system app root url
11
15
  */
@@ -113,6 +113,10 @@ export interface IApp {
113
113
  * Application name
114
114
  */
115
115
  readonly name: string;
116
+ /**
117
+ * Access token
118
+ */
119
+ accessToken?: string;
116
120
  /**
117
121
  * IP data
118
122
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -113,6 +113,11 @@ export abstract class CoreApp<
113
113
  */
114
114
  readonly storage: IStorage;
115
115
 
116
+ /**
117
+ * Access token
118
+ */
119
+ accessToken?: string;
120
+
116
121
  private _culture!: string;
117
122
  /**
118
123
  * Culture, like zh-CN
@@ -678,6 +683,7 @@ export abstract class CoreApp<
678
683
  */
679
684
  authorize(token?: string, refreshToken?: string) {
680
685
  // State, when token is null, means logout
686
+ this.accessToken = token;
681
687
  this.authorized = token != null;
682
688
 
683
689
  // Token
@@ -7,6 +7,11 @@ export interface IExternalSettings {
7
7
  */
8
8
  readonly endpoint: string;
9
9
 
10
+ /**
11
+ * Message hub endpoint
12
+ */
13
+ readonly messageHub?: string;
14
+
10
15
  /**
11
16
  * Core system app root url
12
17
  */
package/src/app/IApp.ts CHANGED
@@ -156,6 +156,11 @@ export interface IApp {
156
156
  */
157
157
  readonly name: string;
158
158
 
159
+ /**
160
+ * Access token
161
+ */
162
+ accessToken?: string;
163
+
159
164
  /**
160
165
  * IP data
161
166
  */