0.3.3 • Published 1 month ago

@buildel/buildel v0.3.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

🚀 Buildel

A flexible library for integrating with the Buildel service via WebSockets. Enables easy connection, and real-time event handling within the context of organizations and pipelines.

Installation

To install the package using npm:

npm install @buildel/buildel

Usage

Initialization

❗Before proceeding, ensure you have set up an authentication endpoint that will return authentication data for your websocket connection. The Buildel team has provided the @buildel/buildel-auth package to assist you in this process.

import { BuildelSocket } from "@buildel/buildel";

const organizationId = 123
const authUrl = '/your-api/auth-endpoint'

const buildel = new BuildelSocket(organizationId, { authUrl });

Connection

await buildel.connect();

// ... your operations ...

await buildel.disconnect();

Event handling

Run a pipeline and handle events:

const workflowId = 123
const run = buildel.run(workflowId, {
  onBlockOutput: (blockId, outputName, payload) => {
    console.log(`Output from block ${blockId}, output ${outputName}:`, payload);
  },
  onBlockStatusChange: (blockId, isWorking) => {
    console.log(`Block ${blockId} is ${isWorking ? "working" : "stopped"}`);
  },
  onStatusChange: (status) => {
    console.log(`Status changed: ${status}`);
  }
})

Pushing data

Send data to the channel:

await run.start()

run.push("your_block_name:input", 'sample payload');

License

This project is licensed under the MIT License.

0.3.3

1 month ago

0.3.0

2 months ago

0.3.2

2 months ago

0.3.1

2 months ago

0.2.9

2 months ago

0.2.8

3 months ago

0.2.7

6 months ago

0.2.6

6 months ago

0.2.5

8 months ago

0.2.4

8 months ago

0.2.3

8 months ago

0.2.2

8 months ago

0.2.1

8 months ago

0.2.0

8 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.2

12 months ago

0.1.1

1 year ago

0.1.4

12 months ago

0.1.3

12 months ago

0.1.0

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago