@kwirthmagnify/kwirth-common-back 0.5.2 → 0.5.4
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/IChannel.d.ts +25 -0
- package/dist/IChannel.js +2 -0
- package/dist/ISender.d.ts +13 -0
- package/dist/ISender.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +4 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BackChannelData, IInstanceConfig, IInstanceMessage, AccessKey, EInstanceMessageAction, IBackChannelRequirements } from '@kwirthmagnify/kwirth-common';
|
|
2
|
+
import { Request, Response } from 'express';
|
|
3
|
+
export interface IChannel {
|
|
4
|
+
readonly channelId: string;
|
|
5
|
+
readonly requirements: IBackChannelRequirements;
|
|
6
|
+
getChannelData(): BackChannelData;
|
|
7
|
+
getChannelScopeLevel(scope: string): number;
|
|
8
|
+
startChannel(): Promise<void>;
|
|
9
|
+
endpointRequest(endpoint: string, req: Request, res: Response, accessKey?: AccessKey): void;
|
|
10
|
+
websocketRequest(newWebSocket: WebSocket, instanceId: string, instanceConfig: IInstanceConfig): void;
|
|
11
|
+
processProviderEvent(providerId: string, obj: any): void;
|
|
12
|
+
addObject(webSocket: WebSocket, instanceConfig: IInstanceConfig, podNamespace: string, podName: string, containerName: string): Promise<boolean>;
|
|
13
|
+
deleteObject(webSocket: WebSocket, instanceConfig: IInstanceConfig, podNamespace: string, podName: string, containerName: string): Promise<boolean>;
|
|
14
|
+
pauseContinueInstance(webSocket: WebSocket, instanceConfig: IInstanceConfig, action: EInstanceMessageAction): void;
|
|
15
|
+
modifyInstance(webSocket: WebSocket, instanceConfig: IInstanceConfig): void;
|
|
16
|
+
containsInstance(instanceId: string): boolean;
|
|
17
|
+
containsAsset(webSocket: WebSocket, podNamespace: string, podName: string, containerName: string): boolean;
|
|
18
|
+
stopInstance(webSocket: WebSocket, instanceConfig: IInstanceConfig): void;
|
|
19
|
+
removeInstance(webSocket: WebSocket, instanceId: string): void;
|
|
20
|
+
processCommand(webSocket: WebSocket, instanceMessage: IInstanceMessage, podNamespace?: string, podName?: string, containerName?: string): Promise<boolean>;
|
|
21
|
+
containsConnection(webSocket: WebSocket): boolean;
|
|
22
|
+
removeConnection(webSocket: WebSocket): void;
|
|
23
|
+
refreshConnection(webSocket: WebSocket): boolean;
|
|
24
|
+
updateConnection(webSocket: WebSocket, instanceId: string): boolean;
|
|
25
|
+
}
|
package/dist/IChannel.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ISenderMessage, ISenderConfig, ISenderAccess } from '@kwirthmagnify/kwirth-common';
|
|
2
|
+
export { ISenderMessage, ISenderConfig, ISenderAccess };
|
|
3
|
+
export interface ISender {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
addConfig(config: ISenderConfig): void;
|
|
6
|
+
removeConfig(name: string): void;
|
|
7
|
+
hasConfig(name: string): boolean;
|
|
8
|
+
getConfigNames(): string[];
|
|
9
|
+
send(configName: string, message: ISenderMessage): Promise<void>;
|
|
10
|
+
startSender(): Promise<void>;
|
|
11
|
+
stopSender(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export type TSenderConstructor = new () => ISender;
|
package/dist/ISender.js
ADDED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,5 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./IChannel"), exports);
|
|
17
18
|
__exportStar(require("./IProvider"), exports);
|
|
19
|
+
__exportStar(require("./ISender"), exports);
|
|
18
20
|
__exportStar(require("@kwirthmagnify/kwirth-common"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kwirthmagnify/kwirth-common-back",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Backend interfaces for building Kwirth provider and channel plugins",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc"
|
|
@@ -24,9 +24,11 @@
|
|
|
24
24
|
"author": "Julio Fernandez",
|
|
25
25
|
"license": "ISC",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@kwirthmagnify/kwirth-common": "^0.5.
|
|
27
|
+
"@kwirthmagnify/kwirth-common": "^0.5.4",
|
|
28
|
+
"express": "^4.18.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
31
|
+
"@types/express": "^4.17.21",
|
|
30
32
|
"typescript": "^5.8.3"
|
|
31
33
|
}
|
|
32
34
|
}
|