@buildel/buildel
Core package for connecting to socket and interacting with Buildel
BuildelSocket
const buildel = new BuildelSocket(organizationId, options);
Properties
organizationId: number
(required)
options: object
(optional)
name | type |
---|---|
socketUrl | string |
authUrl | string |
headers | Record<string, string> |
Methods
connect(): Promise<BuildelSocket>
Initializes connection
disconnect(): Promise<BuildelSocket>
Terminates connection
status()
Returns status
run(pipelineId: number, handlers?: object): BuildelRun
handlers
Properties
property | details |
---|---|
onBlockOutput (optional) | (blockId: string, outputName: string, payload: unknown) => void |
onBlockError (optional) | (blockId: string, errors: string[]) => void |
onBlockStatusChange (optional) | (blockId: string, isWorking: boolean) => void |
onStatusChange (optional) | (status: "idle" | "starting" | "running") => void |
BuildelRun
const run = buildel.run(runId);
Methods
start(initial_inputs?: InitialInput[], alias?: string): Promise<BuildelRun | undefined>
Properties
property | details |
---|---|
InitialInput (optional) | { name: string, value: string } |
stop(): Promise<BuildelRun | undefined>
push(topic: string, payload: any)
Properties
property | details | type |
---|---|---|
topic | This is a combination of blockName and fieldName separated by a colon. | string |
payload | Any structure you need | string | boolean | object | array |