@flowconsole/sdk 0.0.0-beta-20260127184843

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+
2
+ MIT License
3
+
4
+ Copyright (c) 2026 FlowConsole
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # FlowConsole SDK
2
+
3
+ FlowConsole SDK contains the typed DSL for describing systems, components, and flows that the FlowConsole engine renders. It is built with `jsii`, so the same definitions are published to npm, PyPI, Maven, NuGet, and Go modules.
4
+
5
+ ## Install
6
+ - Node.js: `npm install @flowconsole/sdk`
7
+ - Python (PyPI): `pip install flowconsole-sdk`
8
+ - .NET: `dotnet add package FlowConsole.Sdk`
9
+ - Maven:
10
+ ```xml
11
+ <dependency>
12
+ <groupId>flowconsole</groupId>
13
+ <artifactId>sdk</artifactId>
14
+ <version>0.0.1</version>
15
+ </dependency>
16
+ ```
17
+ - Go: `go get github.com/slackmaster9999/flowconsole`
18
+
19
+ ## Quick start (TypeScript)
20
+ When executed inside the FlowConsole runtime (as used by the playground/app), the SDK attaches flow helpers to your entities so you can describe interactions fluently:
21
+
22
+ ```ts
23
+ import { User, ReactApp, RestApi, Postgres } from '@flowconsole/sdk';
24
+
25
+ const user: User = { name: 'Customer', description: 'end user' };
26
+ const frontApp: ReactApp = { name: 'Customer Dashboard', description: 'React app' };
27
+ const restApi: RestApi = { name: 'Backend', description: 'Java REST API' };
28
+ const db: Postgres = { name: 'main_db', description: 'Database' };
29
+
30
+ user
31
+ .sendsRequestTo(frontApp, 'opens in browser')
32
+ .then(frontApp)
33
+ .sendsRequestTo(restApi, 'GET /api/v1/dashboard/:id')
34
+ .then(restApi)
35
+ .sendsRequestTo(db, 'fetch dashboard data');
36
+ ```
37
+
38
+ ## Python package
39
+ - Package name: `flowconsole-sdk`, import module: `flowconsole`.
40
+ - Generated via `jsii-pacmak`; property names mirror the TypeScript definitions.
41
+ - The package ships the DSL types; use it alongside the FlowConsole engine that evaluates the objects you build.
42
+
43
+ ## Building multi-language packages
44
+ 1. Install dependencies from the repo root: `pnpm install`.
45
+ 2. Build the TypeScript sources: `pnpm --filter @flowconsole/sdk build`.
46
+ 3. Generate language-specific artifacts (including PyPI): `pnpm --filter @flowconsole/sdk package`. Artifacts are written to `src/sdk/dist/` (for JavaScript) and language subfolders such as `dist/python` (PyPI wheel/sdist). This README is used as the long description on PyPI.
47
+
48
+ ## License
49
+ MIT — see `src/sdk/LICENSE`.
@@ -0,0 +1,72 @@
1
+ export type ConnectionKind = 'sync' | 'async' | 'event' | 'dependency';
2
+ export type ComponentTone = 'primary' | 'muted' | 'success' | 'warning' | 'danger';
3
+ export declare class ConnectionOptions {
4
+ detail?: string;
5
+ kind?: ConnectionKind;
6
+ icon?: string;
7
+ muted?: boolean;
8
+ }
9
+ export type ParentContainer = Container | ComputerSystem;
10
+ export interface ComponentArgs {
11
+ readonly id?: string;
12
+ readonly name?: string;
13
+ readonly description?: string;
14
+ readonly belongsTo?: ParentContainer;
15
+ readonly tags?: string[];
16
+ readonly badge?: string;
17
+ readonly tone?: ComponentTone;
18
+ }
19
+ export interface UserArgs extends ComponentArgs {
20
+ readonly role?: string;
21
+ }
22
+ export declare class Component {
23
+ id?: string;
24
+ name?: string;
25
+ description?: string;
26
+ belongsTo?: ParentContainer;
27
+ root?: ParentContainer;
28
+ tags?: string[];
29
+ badge?: string;
30
+ tone?: ComponentTone;
31
+ constructor(args: ComponentArgs);
32
+ sendsRequest(target: Component, label: string, options?: ConnectionOptions): Component;
33
+ then(target: Component): Component;
34
+ getDataFrom(target: Component, label: string, options?: ConnectionOptions): Component;
35
+ executesRequest?(action: string): Component;
36
+ }
37
+ export declare class User extends Component {
38
+ role?: string;
39
+ constructor(args: UserArgs);
40
+ }
41
+ export declare class ComputerSystem extends Component {
42
+ domain?: string;
43
+ }
44
+ export declare class Container extends Component {
45
+ technology?: string;
46
+ }
47
+ export declare class ReactApp extends Component {
48
+ framework?: string;
49
+ url?: string;
50
+ }
51
+ export declare class RestApi extends Component {
52
+ method?: string;
53
+ endpoint?: string;
54
+ }
55
+ export declare class Redis extends Component {
56
+ cluster?: string;
57
+ }
58
+ export declare class Postgres extends Component {
59
+ schema?: string;
60
+ }
61
+ export declare class KafkaTopic extends Component {
62
+ partitionCount?: number;
63
+ }
64
+ export declare class MessageQueue extends Component {
65
+ throughput?: string;
66
+ }
67
+ export declare class ExternalService extends Component {
68
+ vendor?: string;
69
+ }
70
+ export declare class BackgroundJob extends Component {
71
+ schedule?: string;
72
+ }
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.BackgroundJob = exports.ExternalService = exports.MessageQueue = exports.KafkaTopic = exports.Postgres = exports.Redis = exports.RestApi = exports.ReactApp = exports.Container = exports.ComputerSystem = exports.User = exports.Component = exports.ConnectionOptions = void 0;
5
+ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
6
+ class ConnectionOptions {
7
+ }
8
+ exports.ConnectionOptions = ConnectionOptions;
9
+ _a = JSII_RTTI_SYMBOL_1;
10
+ ConnectionOptions[_a] = { fqn: "@flowconsole/sdk.ConnectionOptions", version: "0.0.1" };
11
+ ;
12
+ class Component {
13
+ constructor(args) {
14
+ this.id = args.id;
15
+ this.name = args.name;
16
+ this.description = args.description;
17
+ this.belongsTo = args.belongsTo;
18
+ this.tags = args.tags;
19
+ this.badge = args.badge;
20
+ this.tone = args.tone;
21
+ }
22
+ sendsRequest(target, label, options) {
23
+ return target;
24
+ }
25
+ then(target) {
26
+ return target;
27
+ }
28
+ getDataFrom(target, label, options) {
29
+ return target;
30
+ }
31
+ ;
32
+ executesRequest(action) {
33
+ return this;
34
+ }
35
+ }
36
+ exports.Component = Component;
37
+ _b = JSII_RTTI_SYMBOL_1;
38
+ Component[_b] = { fqn: "@flowconsole/sdk.Component", version: "0.0.1" };
39
+ class User extends Component {
40
+ constructor(args) {
41
+ super(args);
42
+ this.role = args.role;
43
+ }
44
+ }
45
+ exports.User = User;
46
+ _c = JSII_RTTI_SYMBOL_1;
47
+ User[_c] = { fqn: "@flowconsole/sdk.User", version: "0.0.1" };
48
+ class ComputerSystem extends Component {
49
+ }
50
+ exports.ComputerSystem = ComputerSystem;
51
+ _d = JSII_RTTI_SYMBOL_1;
52
+ ComputerSystem[_d] = { fqn: "@flowconsole/sdk.ComputerSystem", version: "0.0.1" };
53
+ class Container extends Component {
54
+ }
55
+ exports.Container = Container;
56
+ _e = JSII_RTTI_SYMBOL_1;
57
+ Container[_e] = { fqn: "@flowconsole/sdk.Container", version: "0.0.1" };
58
+ class ReactApp extends Component {
59
+ }
60
+ exports.ReactApp = ReactApp;
61
+ _f = JSII_RTTI_SYMBOL_1;
62
+ ReactApp[_f] = { fqn: "@flowconsole/sdk.ReactApp", version: "0.0.1" };
63
+ class RestApi extends Component {
64
+ }
65
+ exports.RestApi = RestApi;
66
+ _g = JSII_RTTI_SYMBOL_1;
67
+ RestApi[_g] = { fqn: "@flowconsole/sdk.RestApi", version: "0.0.1" };
68
+ class Redis extends Component {
69
+ }
70
+ exports.Redis = Redis;
71
+ _h = JSII_RTTI_SYMBOL_1;
72
+ Redis[_h] = { fqn: "@flowconsole/sdk.Redis", version: "0.0.1" };
73
+ class Postgres extends Component {
74
+ }
75
+ exports.Postgres = Postgres;
76
+ _j = JSII_RTTI_SYMBOL_1;
77
+ Postgres[_j] = { fqn: "@flowconsole/sdk.Postgres", version: "0.0.1" };
78
+ class KafkaTopic extends Component {
79
+ }
80
+ exports.KafkaTopic = KafkaTopic;
81
+ _k = JSII_RTTI_SYMBOL_1;
82
+ KafkaTopic[_k] = { fqn: "@flowconsole/sdk.KafkaTopic", version: "0.0.1" };
83
+ class MessageQueue extends Component {
84
+ }
85
+ exports.MessageQueue = MessageQueue;
86
+ _l = JSII_RTTI_SYMBOL_1;
87
+ MessageQueue[_l] = { fqn: "@flowconsole/sdk.MessageQueue", version: "0.0.1" };
88
+ class ExternalService extends Component {
89
+ }
90
+ exports.ExternalService = ExternalService;
91
+ _m = JSII_RTTI_SYMBOL_1;
92
+ ExternalService[_m] = { fqn: "@flowconsole/sdk.ExternalService", version: "0.0.1" };
93
+ class BackgroundJob extends Component {
94
+ }
95
+ exports.BackgroundJob = BackgroundJob;
96
+ _o = JSII_RTTI_SYMBOL_1;
97
+ BackgroundJob[_o] = { fqn: "@flowconsole/sdk.BackgroundJob", version: "0.0.1" };
98
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxvd2NvbnNvbGUtc2RrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vZmxvd2NvbnNvbGUtc2RrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBR0EsT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XG4gIG1ldGhvZD86IHN0cmluZztcbiAgZW5kcG9pbnQ/OiBzdHJpbmc7XG59XG5cbmV4cG9ydCBjbGFzcyBSZWRpcyBleHRlbmRzIENvbXBvbmVudCB7XG4gIGNsdXN0ZXI/OiBzdHJpbmc7XG59XG5cbmV4cG9ydCBjbGFzcyBQb3N0Z3JlcyBleHRlbmRzIENvbXBvbmVudCB7XG4gIHNjaGVtYT86IHN0cmluZztcbn1cblxuZXhwb3J0IGNsYXNzIEthZmthVG9waWMgZXh0ZW5kcyBDb21wb25lbnQge1xuICBwYXJ0aXRpb25Db3VudD86IG51bWJlcjtcbn1cblxuZXhwb3J0IGNsYXNzIE1lc3NhZ2VRdWV1ZSBleHRlbmRzIENvbXBvbmVudCB7XG4gIHRocm91Z2hwdXQ/OiBzdHJpbmc7XG59XG5cbmV4cG9ydCBjbGFzcyBFeHRlcm5hbFNlcnZpY2UgZXh0ZW5kcyBDb21wb25lbnQge1xuICB2ZW5kb3I/OiBzdHJpbmc7XG59XG5cbmV4cG9ydCBjbGFzcyBCYWNrZ3JvdW5kSm9iIGV4dGVuZHMgQ29tcG9uZW50IHtcbiAgc2NoZWR1bGU/OiBzdHJpbmc7XG59Il19
@@ -0,0 +1,117 @@
1
+ export type ConnectionKind = 'sync' | 'async' | 'event' | 'dependency';
2
+ export type ComponentTone = 'primary' | 'muted' | 'success' | 'warning' | 'danger';
3
+
4
+ export class ConnectionOptions {
5
+ detail?: string;
6
+ kind?: ConnectionKind;
7
+ icon?: string;
8
+ muted?: boolean;
9
+ };
10
+
11
+ export type ParentContainer = Container | ComputerSystem;
12
+
13
+ export interface ComponentArgs {
14
+ readonly id?: string,
15
+ readonly name?: string,
16
+ readonly description?: string,
17
+ readonly belongsTo?: ParentContainer,
18
+ readonly tags?: string[],
19
+ readonly badge?: string,
20
+ readonly tone?: ComponentTone
21
+ }
22
+
23
+ export interface UserArgs extends ComponentArgs {
24
+ readonly role?: string;
25
+ }
26
+
27
+ export class Component {
28
+
29
+ id?: string;
30
+ name?: string;
31
+ description?: string;
32
+ belongsTo?: ParentContainer;
33
+ root?: ParentContainer;
34
+ tags?: string[];
35
+ badge?: string;
36
+ tone?: ComponentTone;
37
+
38
+ constructor(args: ComponentArgs) {
39
+ this.id = args.id;
40
+ this.name = args.name;
41
+ this.description = args.description;
42
+ this.belongsTo = args.belongsTo;
43
+ this.tags = args.tags;
44
+ this.badge = args.badge;
45
+ this.tone = args.tone;
46
+ }
47
+
48
+ public sendsRequest(target: Component, label: string, options?: ConnectionOptions): Component{
49
+ return target;
50
+ }
51
+
52
+ public then(target: Component): Component
53
+ {
54
+ return target
55
+ }
56
+
57
+ public getDataFrom(target: Component, label: string, options?: ConnectionOptions): Component
58
+ {
59
+ return target;
60
+ };
61
+
62
+ executesRequest?(action: string): Component
63
+ {
64
+ return this;
65
+ }
66
+ }
67
+
68
+ export class User extends Component {
69
+ role?: string;
70
+
71
+ constructor(args: UserArgs) {
72
+ super(args);
73
+ this.role = args.role;
74
+ }
75
+ }
76
+
77
+ export class ComputerSystem extends Component {
78
+ domain?: string;
79
+ }
80
+
81
+ export class Container extends Component {
82
+ technology?: string;
83
+ }
84
+
85
+ export class ReactApp extends Component {
86
+ framework?: string;
87
+ url?: string;
88
+ }
89
+
90
+ export class RestApi extends Component {
91
+ method?: string;
92
+ endpoint?: string;
93
+ }
94
+
95
+ export class Redis extends Component {
96
+ cluster?: string;
97
+ }
98
+
99
+ export class Postgres extends Component {
100
+ schema?: string;
101
+ }
102
+
103
+ export class KafkaTopic extends Component {
104
+ partitionCount?: number;
105
+ }
106
+
107
+ export class MessageQueue extends Component {
108
+ throughput?: string;
109
+ }
110
+
111
+ export class ExternalService extends Component {
112
+ vendor?: string;
113
+ }
114
+
115
+ export class BackgroundJob extends Component {
116
+ schedule?: string;
117
+ }
package/package.json ADDED
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "@flowconsole/sdk",
3
+ "version": "0.0.0-beta-20260127184843",
4
+ "description": "FlowConsole SDK",
5
+ "main": "dist/flowconsole-sdk.js",
6
+ "keywords": [],
7
+ "author": {
8
+ "name": "Vladimir Golubev",
9
+ "email": "v@flowconsole.tech"
10
+ },
11
+ "repository": {
12
+ "url": "https://github.com/slackmaster9999/flowconsole.git",
13
+ "directory": "src/sdk"
14
+ },
15
+ "license": "MIT",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/flowconsole-sdk.d.ts",
19
+ "require": "./dist/flowconsole-sdk.js"
20
+ },
21
+ "./flowconsole-sdk.ts": "./flowconsole-sdk.ts",
22
+ "./*": "./*"
23
+ },
24
+ "files": [
25
+ "dist/flowconsole-sdk.js",
26
+ "dist/flowconsole-sdk.d.ts",
27
+ ".jsii",
28
+ ".jsii.gz",
29
+ "flowconsole-sdk.ts"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "stability": "stable",
35
+ "types": "dist/flowconsole-sdk.d.ts",
36
+ "jsii": {
37
+ "outdir": "dist",
38
+ "versionFormat": "full",
39
+ "targets": {
40
+ "java": {
41
+ "package": "flowconsole.sdk",
42
+ "maven": {
43
+ "groupId": "flowconsole",
44
+ "artifactId": "sdk"
45
+ }
46
+ },
47
+ "python": {
48
+ "distName": "flowconsole-sdk",
49
+ "module": "flowconsole"
50
+ },
51
+ "dotnet": {
52
+ "namespace": "FlowConsole",
53
+ "packageId": "FlowConsole.Sdk",
54
+ "iconUrl": "https://raw.githubusercontent.com/slackmaster9999/flowconsole/main/src/docs/public/_static/favicons/android-chrome-512x512.png"
55
+ },
56
+ "go": {
57
+ "packageName": "flowconsole",
58
+ "moduleName": "github.com/slackmaster9999/flowconsole"
59
+ }
60
+ },
61
+ "tsconfig": "tsconfig.json",
62
+ "validateTsconfig": "minimal",
63
+ "tsc": {
64
+ "outDir": "dist",
65
+ "rootDir": "."
66
+ }
67
+ },
68
+ "devDependencies": {
69
+ "jsii": "^5.9.22",
70
+ "jsii-pacmak": "^1.125.0"
71
+ },
72
+ "scripts": {
73
+ "build": "jsii",
74
+ "build:watch": "jsii --watch",
75
+ "package": "jsii-pacmak --clean --verbose",
76
+ "test": "echo \"Error: no test specified\" && exit 1"
77
+ }
78
+ }