@xemahq/xema-shell-api-client 0.2.7 → 0.2.8
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.
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
* OpenAPI spec version: 0.1.1
|
|
5
5
|
*/
|
|
6
6
|
import type { ShellHelpCommandResponseDtoDataEnvelope, ShellHelpListResponseDtoDataEnvelope, ShellParseResponseDtoDataEnvelope, ShellRunRequestDto, ShellRunResponseDtoDataEnvelope } from '../../models';
|
|
7
|
+
export declare const getShellControllerWebsocketUpgradeRequiredUrl: () => string;
|
|
8
|
+
/**
|
|
9
|
+
* Interactive Shell session transport. Clients must open it with a WebSocket upgrade carrying the bearer as the second subprotocol (`xema-shell.v1`, <token>); a plain HTTP GET is answered 426. Declared here so the path is part of this service's public surface — public-gateway-api derives its browser allow-list from this document and refuses any upgrade to a path that is absent from it.
|
|
10
|
+
* @summary Shell WebSocket endpoint (upgrade required)
|
|
11
|
+
*/
|
|
12
|
+
export declare const shellControllerWebsocketUpgradeRequired: (options?: RequestInit) => Promise<unknown>;
|
|
7
13
|
export declare const getShellControllerRunUrl: () => string;
|
|
8
14
|
/**
|
|
9
15
|
* Parses `argv`, looks up the command descriptor, dispatches through xema-capability-router, and returns the structured result.
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shellHelpControllerGetCommand = exports.getShellHelpControllerGetCommandUrl = exports.shellHelpControllerListCommands = exports.getShellHelpControllerListCommandsUrl = exports.shellControllerParse = exports.getShellControllerParseUrl = exports.shellControllerRun = exports.getShellControllerRunUrl = void 0;
|
|
3
|
+
exports.shellHelpControllerGetCommand = exports.getShellHelpControllerGetCommandUrl = exports.shellHelpControllerListCommands = exports.getShellHelpControllerListCommandsUrl = exports.shellControllerParse = exports.getShellControllerParseUrl = exports.shellControllerRun = exports.getShellControllerRunUrl = exports.shellControllerWebsocketUpgradeRequired = exports.getShellControllerWebsocketUpgradeRequiredUrl = void 0;
|
|
4
4
|
const custom_fetch_1 = require("../../custom-fetch");
|
|
5
|
+
const getShellControllerWebsocketUpgradeRequiredUrl = () => {
|
|
6
|
+
return `/shell/ws`;
|
|
7
|
+
};
|
|
8
|
+
exports.getShellControllerWebsocketUpgradeRequiredUrl = getShellControllerWebsocketUpgradeRequiredUrl;
|
|
9
|
+
/**
|
|
10
|
+
* Interactive Shell session transport. Clients must open it with a WebSocket upgrade carrying the bearer as the second subprotocol (`xema-shell.v1`, <token>); a plain HTTP GET is answered 426. Declared here so the path is part of this service's public surface — public-gateway-api derives its browser allow-list from this document and refuses any upgrade to a path that is absent from it.
|
|
11
|
+
* @summary Shell WebSocket endpoint (upgrade required)
|
|
12
|
+
*/
|
|
13
|
+
const shellControllerWebsocketUpgradeRequired = async (options) => {
|
|
14
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getShellControllerWebsocketUpgradeRequiredUrl)(), {
|
|
15
|
+
...options,
|
|
16
|
+
method: 'GET'
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
exports.shellControllerWebsocketUpgradeRequired = shellControllerWebsocketUpgradeRequired;
|
|
5
20
|
const getShellControllerRunUrl = () => {
|
|
6
21
|
return `/shell/run`;
|
|
7
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/xema-shell-api-client",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"service": "xema-shell-api",
|
|
20
20
|
"biome": "xema-shell",
|
|
21
21
|
"target": "server",
|
|
22
|
-
"generator": "@xemahq/api-client-generator@0.15.
|
|
22
|
+
"generator": "@xemahq/api-client-generator@0.15.2",
|
|
23
23
|
"source": "openapi.public.json"
|
|
24
24
|
},
|
|
25
25
|
"license": "LicenseRef-Xema-BSL-1.1",
|