@etsoo/appscript 1.4.36 → 1.4.38
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/lib/cjs/app/ExternalSettings.d.ts +1 -1
- package/lib/cjs/app/ExternalSettings.js +2 -2
- package/lib/cjs/app/IApp.d.ts +0 -5
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +0 -1
- package/lib/mjs/app/ExternalSettings.d.ts +1 -1
- package/lib/mjs/app/ExternalSettings.js +2 -2
- package/lib/mjs/app/IApp.d.ts +0 -5
- package/lib/mjs/index.d.ts +0 -1
- package/lib/mjs/index.js +0 -1
- package/package.json +1 -1
- package/src/app/ExternalSettings.ts +4 -2
- package/src/app/IApp.ts +0 -6
- package/src/index.ts +0 -1
- package/lib/cjs/app/IAppApi.d.ts +0 -24
- package/lib/cjs/app/IAppApi.js +0 -2
- package/lib/mjs/app/IAppApi.d.ts +0 -24
- package/lib/mjs/app/IAppApi.js +0 -1
- package/src/app/IAppApi.ts +0 -28
|
@@ -34,6 +34,6 @@ export declare namespace ExternalSettings {
|
|
|
34
34
|
/**
|
|
35
35
|
* Create instance
|
|
36
36
|
*/
|
|
37
|
-
function
|
|
37
|
+
function create<T extends IExternalSettings = IExternalSettings>(): T | undefined;
|
|
38
38
|
function format(settings: any, hostname?: string): any;
|
|
39
39
|
}
|
|
@@ -9,7 +9,7 @@ var ExternalSettings;
|
|
|
9
9
|
/**
|
|
10
10
|
* Create instance
|
|
11
11
|
*/
|
|
12
|
-
function
|
|
12
|
+
function create() {
|
|
13
13
|
if ('settings' in globalThis) {
|
|
14
14
|
const settings = Reflect.get(globalThis, 'settings');
|
|
15
15
|
if (typeof settings === 'object') {
|
|
@@ -24,7 +24,7 @@ var ExternalSettings;
|
|
|
24
24
|
}
|
|
25
25
|
return undefined;
|
|
26
26
|
}
|
|
27
|
-
ExternalSettings.
|
|
27
|
+
ExternalSettings.create = create;
|
|
28
28
|
function format(settings, hostname) {
|
|
29
29
|
// Default hostname
|
|
30
30
|
if (!hostname)
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { IUser } from '../state/User';
|
|
|
7
7
|
import { IAppSettings } from './AppSettings';
|
|
8
8
|
import { UserRole } from './UserRole';
|
|
9
9
|
import { EntityStatus } from '../business/EntityStatus';
|
|
10
|
-
import { IAppApi } from './IAppApi';
|
|
11
10
|
/**
|
|
12
11
|
* Detect IP callback interface
|
|
13
12
|
*/
|
|
@@ -47,10 +46,6 @@ export interface RefreshTokenProps<D extends object> {
|
|
|
47
46
|
* Show loading bar or not
|
|
48
47
|
*/
|
|
49
48
|
showLoading?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Service application API
|
|
52
|
-
*/
|
|
53
|
-
appApi?: IAppApi;
|
|
54
49
|
}
|
|
55
50
|
/**
|
|
56
51
|
* App fields
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export * from './app/AppSettings';
|
|
|
12
12
|
export * from './app/CoreApp';
|
|
13
13
|
export * from './app/ExternalSettings';
|
|
14
14
|
export * from './app/IApp';
|
|
15
|
-
export * from './app/IAppApi';
|
|
16
15
|
export * from './app/UserRole';
|
|
17
16
|
export * from './bridges/BridgeUtils';
|
|
18
17
|
export * from './bridges/IBridgeHost';
|
package/lib/cjs/index.js
CHANGED
|
@@ -31,7 +31,6 @@ __exportStar(require("./app/AppSettings"), exports);
|
|
|
31
31
|
__exportStar(require("./app/CoreApp"), exports);
|
|
32
32
|
__exportStar(require("./app/ExternalSettings"), exports);
|
|
33
33
|
__exportStar(require("./app/IApp"), exports);
|
|
34
|
-
__exportStar(require("./app/IAppApi"), exports);
|
|
35
34
|
__exportStar(require("./app/UserRole"), exports);
|
|
36
35
|
// bridges
|
|
37
36
|
__exportStar(require("./bridges/BridgeUtils"), exports);
|
|
@@ -34,6 +34,6 @@ export declare namespace ExternalSettings {
|
|
|
34
34
|
/**
|
|
35
35
|
* Create instance
|
|
36
36
|
*/
|
|
37
|
-
function
|
|
37
|
+
function create<T extends IExternalSettings = IExternalSettings>(): T | undefined;
|
|
38
38
|
function format(settings: any, hostname?: string): any;
|
|
39
39
|
}
|
|
@@ -6,7 +6,7 @@ export var ExternalSettings;
|
|
|
6
6
|
/**
|
|
7
7
|
* Create instance
|
|
8
8
|
*/
|
|
9
|
-
function
|
|
9
|
+
function create() {
|
|
10
10
|
if ('settings' in globalThis) {
|
|
11
11
|
const settings = Reflect.get(globalThis, 'settings');
|
|
12
12
|
if (typeof settings === 'object') {
|
|
@@ -21,7 +21,7 @@ export var ExternalSettings;
|
|
|
21
21
|
}
|
|
22
22
|
return undefined;
|
|
23
23
|
}
|
|
24
|
-
ExternalSettings.
|
|
24
|
+
ExternalSettings.create = create;
|
|
25
25
|
function format(settings, hostname) {
|
|
26
26
|
// Default hostname
|
|
27
27
|
if (!hostname)
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { IUser } from '../state/User';
|
|
|
7
7
|
import { IAppSettings } from './AppSettings';
|
|
8
8
|
import { UserRole } from './UserRole';
|
|
9
9
|
import { EntityStatus } from '../business/EntityStatus';
|
|
10
|
-
import { IAppApi } from './IAppApi';
|
|
11
10
|
/**
|
|
12
11
|
* Detect IP callback interface
|
|
13
12
|
*/
|
|
@@ -47,10 +46,6 @@ export interface RefreshTokenProps<D extends object> {
|
|
|
47
46
|
* Show loading bar or not
|
|
48
47
|
*/
|
|
49
48
|
showLoading?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Service application API
|
|
52
|
-
*/
|
|
53
|
-
appApi?: IAppApi;
|
|
54
49
|
}
|
|
55
50
|
/**
|
|
56
51
|
* App fields
|
package/lib/mjs/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export * from './app/AppSettings';
|
|
|
12
12
|
export * from './app/CoreApp';
|
|
13
13
|
export * from './app/ExternalSettings';
|
|
14
14
|
export * from './app/IApp';
|
|
15
|
-
export * from './app/IAppApi';
|
|
16
15
|
export * from './app/UserRole';
|
|
17
16
|
export * from './bridges/BridgeUtils';
|
|
18
17
|
export * from './bridges/IBridgeHost';
|
package/lib/mjs/index.js
CHANGED
|
@@ -14,7 +14,6 @@ export * from './app/AppSettings';
|
|
|
14
14
|
export * from './app/CoreApp';
|
|
15
15
|
export * from './app/ExternalSettings';
|
|
16
16
|
export * from './app/IApp';
|
|
17
|
-
export * from './app/IAppApi';
|
|
18
17
|
export * from './app/UserRole';
|
|
19
18
|
// bridges
|
|
20
19
|
export * from './bridges/BridgeUtils';
|
package/package.json
CHANGED
|
@@ -40,7 +40,9 @@ export namespace ExternalSettings {
|
|
|
40
40
|
/**
|
|
41
41
|
* Create instance
|
|
42
42
|
*/
|
|
43
|
-
export function
|
|
43
|
+
export function create<T extends IExternalSettings = IExternalSettings>():
|
|
44
|
+
| T
|
|
45
|
+
| undefined {
|
|
44
46
|
if ('settings' in globalThis) {
|
|
45
47
|
const settings = Reflect.get(globalThis, 'settings');
|
|
46
48
|
if (typeof settings === 'object') {
|
|
@@ -52,7 +54,7 @@ export namespace ExternalSettings {
|
|
|
52
54
|
format(settings, hostname);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
return settings as
|
|
57
|
+
return settings as T;
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
return undefined;
|
package/src/app/IApp.ts
CHANGED
|
@@ -19,7 +19,6 @@ import { IUser } from '../state/User';
|
|
|
19
19
|
import { IAppSettings } from './AppSettings';
|
|
20
20
|
import { UserRole } from './UserRole';
|
|
21
21
|
import { EntityStatus } from '../business/EntityStatus';
|
|
22
|
-
import { IAppApi } from './IAppApi';
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
24
|
* Detect IP callback interface
|
|
@@ -70,11 +69,6 @@ export interface RefreshTokenProps<D extends object> {
|
|
|
70
69
|
* Show loading bar or not
|
|
71
70
|
*/
|
|
72
71
|
showLoading?: boolean;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Service application API
|
|
76
|
-
*/
|
|
77
|
-
appApi?: IAppApi;
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
/**
|
package/src/index.ts
CHANGED
package/lib/cjs/app/IAppApi.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { IApi } from '@etsoo/restclient';
|
|
2
|
-
/**
|
|
3
|
-
* Service application API, Implement interface calls between different services
|
|
4
|
-
* 服务程序接口,实现不同服务之间的接口调用
|
|
5
|
-
*/
|
|
6
|
-
export interface IAppApi {
|
|
7
|
-
/**
|
|
8
|
-
* API
|
|
9
|
-
*/
|
|
10
|
-
readonly api: IApi<any>;
|
|
11
|
-
/**
|
|
12
|
-
* Service id
|
|
13
|
-
*/
|
|
14
|
-
readonly serviceId: number;
|
|
15
|
-
/**
|
|
16
|
-
* Authorize the API
|
|
17
|
-
* @param token Access token
|
|
18
|
-
*/
|
|
19
|
-
authorize(token: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* Get refresh token data
|
|
22
|
-
*/
|
|
23
|
-
getrefreshTokenData(): Object;
|
|
24
|
-
}
|
package/lib/cjs/app/IAppApi.js
DELETED
package/lib/mjs/app/IAppApi.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { IApi } from '@etsoo/restclient';
|
|
2
|
-
/**
|
|
3
|
-
* Service application API, Implement interface calls between different services
|
|
4
|
-
* 服务程序接口,实现不同服务之间的接口调用
|
|
5
|
-
*/
|
|
6
|
-
export interface IAppApi {
|
|
7
|
-
/**
|
|
8
|
-
* API
|
|
9
|
-
*/
|
|
10
|
-
readonly api: IApi<any>;
|
|
11
|
-
/**
|
|
12
|
-
* Service id
|
|
13
|
-
*/
|
|
14
|
-
readonly serviceId: number;
|
|
15
|
-
/**
|
|
16
|
-
* Authorize the API
|
|
17
|
-
* @param token Access token
|
|
18
|
-
*/
|
|
19
|
-
authorize(token: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* Get refresh token data
|
|
22
|
-
*/
|
|
23
|
-
getrefreshTokenData(): Object;
|
|
24
|
-
}
|
package/lib/mjs/app/IAppApi.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/app/IAppApi.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IApi } from '@etsoo/restclient';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Service application API, Implement interface calls between different services
|
|
5
|
-
* 服务程序接口,实现不同服务之间的接口调用
|
|
6
|
-
*/
|
|
7
|
-
export interface IAppApi {
|
|
8
|
-
/**
|
|
9
|
-
* API
|
|
10
|
-
*/
|
|
11
|
-
readonly api: IApi<any>;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Service id
|
|
15
|
-
*/
|
|
16
|
-
readonly serviceId: number;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Authorize the API
|
|
20
|
-
* @param token Access token
|
|
21
|
-
*/
|
|
22
|
-
authorize(token: string): void;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Get refresh token data
|
|
26
|
-
*/
|
|
27
|
-
getrefreshTokenData(): Object;
|
|
28
|
-
}
|