@uxland/primary-shell 1.0.10 → 1.0.11
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/api.d.ts +34 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/api.ts +45 -0
- package/src/index.ts +1 -0
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { HarmonixApi, IPluginInfo } from '@uxland/fim-core';
|
|
2
|
+
|
|
3
|
+
interface PrimariaHttpClient {
|
|
4
|
+
get(url: string): Promise<any>;
|
|
5
|
+
post(url: string, data: any): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
interface PrimariaRegionManager {
|
|
8
|
+
injectView(regionName: string, view: any): Promise<any>;
|
|
9
|
+
removeView(regionName: string, viewId: string): Promise<any>;
|
|
10
|
+
activateView(regionName: string, viewId: string): Promise<any>;
|
|
11
|
+
deactivateView(regionName: string, viewId: string): Promise<any>;
|
|
12
|
+
}
|
|
13
|
+
interface NotifyOptions {
|
|
14
|
+
message: string;
|
|
15
|
+
delay: number;
|
|
16
|
+
dissmissible: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface PrimariaInteractionManager {
|
|
19
|
+
notify(options: NotifyOptions): Promise<any>;
|
|
20
|
+
}
|
|
21
|
+
interface PrimariaMediator {
|
|
22
|
+
publish(event: string, data: any): Promise<any>;
|
|
23
|
+
subscribe(event: string, handler: any): Promise<any>;
|
|
24
|
+
sendCommand(command: string, data: any): Promise<any>;
|
|
25
|
+
registerCommand(command: string, handler: any): Promise<any>;
|
|
26
|
+
}
|
|
27
|
+
export interface PrimariaApi extends HarmonixApi<PrimariaHttpClient, PrimariaRegionManager, PrimariaInteractionManager, PrimariaMediator, IPluginInfo> {
|
|
28
|
+
httpClient: PrimariaHttpClient;
|
|
29
|
+
regionManager: PrimariaRegionManager;
|
|
30
|
+
interactionManager: PrimariaInteractionManager;
|
|
31
|
+
mediator: PrimariaMediator;
|
|
32
|
+
pluginInfo: IPluginInfo;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
package/src/api.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { HarmonixApi, IPluginInfo } from "@uxland/fim-core";
|
|
2
|
+
|
|
3
|
+
interface PrimariaHttpClient {
|
|
4
|
+
get(url: string): Promise<any>;
|
|
5
|
+
post(url: string, data: any): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface PrimariaRegionManager {
|
|
9
|
+
injectView(regionName: string, view: any): Promise<any>;
|
|
10
|
+
removeView(regionName: string, viewId: string): Promise<any>;
|
|
11
|
+
activateView(regionName: string, viewId: string): Promise<any>;
|
|
12
|
+
deactivateView(regionName: string, viewId: string): Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface NotifyOptions {
|
|
16
|
+
message: string;
|
|
17
|
+
delay: number;
|
|
18
|
+
dissmissible: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface PrimariaInteractionManager {
|
|
22
|
+
notify(options: NotifyOptions): Promise<any>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface PrimariaMediator {
|
|
26
|
+
publish(event: string, data: any): Promise<any>;
|
|
27
|
+
subscribe(event: string, handler: any): Promise<any>;
|
|
28
|
+
sendCommand(command: string, data: any): Promise<any>;
|
|
29
|
+
registerCommand(command: string, handler: any): Promise<any>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface PrimariaApi
|
|
33
|
+
extends HarmonixApi<
|
|
34
|
+
PrimariaHttpClient,
|
|
35
|
+
PrimariaRegionManager,
|
|
36
|
+
PrimariaInteractionManager,
|
|
37
|
+
PrimariaMediator,
|
|
38
|
+
IPluginInfo
|
|
39
|
+
> {
|
|
40
|
+
httpClient: PrimariaHttpClient;
|
|
41
|
+
regionManager: PrimariaRegionManager;
|
|
42
|
+
interactionManager: PrimariaInteractionManager;
|
|
43
|
+
mediator: PrimariaMediator;
|
|
44
|
+
pluginInfo: IPluginInfo;
|
|
45
|
+
}
|
package/src/index.ts
CHANGED