Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/sdk-workflow/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@caido/sdk-workflow",
"version": "0.53.2-beta.0",
"version": "0.53.0",
"description": "Typing for the Caido Workflow SDK",
"author": "Caido Labs Inc. <[email protected]>",
"repository": "https://github.com/caido/sdk-js/",
Expand Down
6 changes: 6 additions & 0 deletions packages/sdk-workflow/src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import {
ConvertInput as _ConvertInput,
Data as _Data,
Decision as _Decision,
NodeInput as _NodeInput,
NodeResult as _NodeResult,
NodeInputHTTP as _NodeInputHTTP,
SDK as _SDK,
} from "caido:workflow";

Expand Down Expand Up @@ -50,6 +53,9 @@ declare global {
_ConvertInput as ConvertInput,
_Data as Data,
_Decision as Decision,
_NodeInput as NodeInput,
_NodeResult as NodeResult,
_NodeInputHTTP as NodeInputHTTP,
_SDK as SDK,
};
}
28 changes: 28 additions & 0 deletions packages/sdk-workflow/src/typing.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,34 @@ declare module "caido:workflow" {
*/
export type Decision = boolean;

/**
* The input for the JavaScript V2+ Nodes.
* @category Data
*/
export type NodeInput = {
data?: Bytes;
extra?: Record<string, any>;
};

/**
* The result for the JavaScript V2+ Nodes.
* @category Data
*/
export type NodeResult = {
data?: Bytes;
extra?: Record<string, any>;
};

/**
* The input for HTTP JavaScript Nodes.
* @category Data
*/
export type NodeInputHTTP = {
request?: Request;
response?: Response;
extra?: Record<string, any>;
};

/**
* The SDK object available to all scripts.
* @category SDK
Expand Down