@nocobase/flow-engine
Version:
A standalone flow engine for NocoBase, managing workflows, models, and actions.
39 lines (38 loc) • 1.27 kB
TypeScript
/**
* This file is part of the NocoBase (R) project.
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
* Authors: NocoBase Team.
*
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
* For more information, please refer to: https://www.nocobase.com/agreement.
*/
import type { FlowContext } from '../../flowContext';
export type RunJSVersion = 'v1' | (string & {});
export type RunJSContextCtor = new (delegate: FlowContext) => FlowRunJSContext;
export type RunJSDocMeta = {
label?: string;
properties?: Record<string, any>;
methods?: Record<string, any>;
snipastes?: Record<string, any>;
};
export declare class FlowRunJSContext {
#private;
protected _delegate: FlowContext;
[key: string]: any;
static allow?: {
keys?: ReadonlyArray<string>;
facades?: Record<string, ReadonlyArray<string>>;
};
constructor(delegate: FlowContext);
defineProperty(key: string, options: {
get?: (ctx: any) => any;
value?: any;
}): void;
defineMethod(name: string, fn: (...args: any[]) => any): void;
static injectDefaultGlobals?(): {
window?: any;
document?: any;
} | void;
static define(meta: RunJSDocMeta): void;
static getDoc(): RunJSDocMeta;
}