@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 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
@@ -1,3 +1,4 @@
1
1
  export * from './initializer';
2
2
  export * from './regions';
3
3
  export * from './plugin-bootstrapper';
4
+ export * from './api';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Framework Integració modular",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/fim-sandbox/tree/app#readme",
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
@@ -1,3 +1,4 @@
1
1
  export * from "./initializer";
2
2
  export * from "./regions";
3
3
  export * from "./plugin-bootstrapper";
4
+ export * from "./api";