@kwirthmagnify/kwirth-common-back 0.5.43 → 0.5.44
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/IBackChannelObject.d.ts +4 -1
- package/dist/IFederation.d.ts +20 -0
- package/dist/IFederation.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ISenderAccess, IWebhookAccess, IUserInfo } from '@kwirthmagnify/kwirth-common';
|
|
1
|
+
import { ISenderAccess, IWebhookAccess, IUserInfo, IInstanceConfig } from '@kwirthmagnify/kwirth-common';
|
|
2
|
+
import { IClusterEndpoint, IRemoteChannelHandlers, IRemoteChannelHandle } from './IFederation';
|
|
2
3
|
export interface IBackChannelObject {
|
|
3
4
|
writeStorage?(id: string, secret: boolean, data: any): Promise<void>;
|
|
4
5
|
readStorage?(id: string, secret: boolean): Promise<any>;
|
|
@@ -12,4 +13,6 @@ export interface IBackChannelObject {
|
|
|
12
13
|
getPluginConfig?(pluginId: string): Promise<Record<string, unknown>>;
|
|
13
14
|
senders?: ISenderAccess;
|
|
14
15
|
webhooks?: IWebhookAccess;
|
|
16
|
+
openRemoteChannel?(endpoint: IClusterEndpoint, config: IInstanceConfig, handlers: IRemoteChannelHandlers): IRemoteChannelHandle;
|
|
17
|
+
readUserStore?(userId: string, group: string, key: string): Promise<unknown>;
|
|
15
18
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IInstanceMessage } from '@kwirthmagnify/kwirth-common';
|
|
2
|
+
export interface IClusterEndpoint {
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
accessString: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare enum ERemoteConnState {
|
|
9
|
+
CONNECTED = "connected",
|
|
10
|
+
RECONNECTING = "reconnecting",
|
|
11
|
+
DOWN = "down"
|
|
12
|
+
}
|
|
13
|
+
export interface IRemoteChannelHandlers {
|
|
14
|
+
onMessage: (msg: IInstanceMessage) => void;
|
|
15
|
+
onState: (state: ERemoteConnState) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface IRemoteChannelHandle {
|
|
18
|
+
send: (msg: IInstanceMessage) => void;
|
|
19
|
+
close: () => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ERemoteConnState = void 0;
|
|
4
|
+
// Estado de una conexión remota gestionada por el core. Nunca string literals.
|
|
5
|
+
var ERemoteConnState;
|
|
6
|
+
(function (ERemoteConnState) {
|
|
7
|
+
ERemoteConnState["CONNECTED"] = "connected";
|
|
8
|
+
ERemoteConnState["RECONNECTING"] = "reconnecting";
|
|
9
|
+
ERemoteConnState["DOWN"] = "down";
|
|
10
|
+
})(ERemoteConnState || (exports.ERemoteConnState = ERemoteConnState = {}));
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./IBackChannelObject"), exports);
|
|
18
|
+
__exportStar(require("./IFederation"), exports);
|
|
18
19
|
__exportStar(require("./ILogin"), exports);
|
|
19
20
|
__exportStar(require("./IChannel"), exports);
|
|
20
21
|
__exportStar(require("./IProvider"), exports);
|