b59a239a82
* feat(plugin-workflow): add base client entry for workflow * fix(plugin-workflow): workflow table * feat: custom ui route (#227) * feat(plugin-workflow): add execution table * refactor(actions): expose utils of actions * fix(repo): move ".editorconfig" to root * feat(plugin-workflow): base workflow management able to add node * fix(plugin-workflow): fix empty workflow * feat(plugin-workfow): add flow canvas and style * fix(plugin-workflow): fix type for building * feat(plugin-workflow): fix add node in branch and add branch ui * feat(plugin-workflow): add calculation structure to condition config * fix(plugin-workflow): fix branch line style * feat(plugin-workflow): remove node with sub-branch * feat(plugin-workflow): add parallel node type * fix(plugin-workflow): fix dependency in client Co-authored-by: chenos <chenlinxh@gmail.com>
25 lines
585 B
TypeScript
25 lines
585 B
TypeScript
import Koa from 'koa';
|
|
import { Database } from '@nocobase/database';
|
|
import { Action } from '@nocobase/resourcer';
|
|
import lodash from 'lodash';
|
|
import * as actions from './actions';
|
|
|
|
export * as utils from './utils';
|
|
|
|
export type Next = () => Promise<any>;
|
|
|
|
export interface Context extends Koa.Context {
|
|
db: Database;
|
|
action: Action;
|
|
body: any;
|
|
[key: string]: any;
|
|
}
|
|
|
|
export function registerActions(api: any) {
|
|
api.actions(
|
|
lodash.pick(actions, ['add', 'create', 'destroy', 'get', 'list', 'remove', 'set', 'toggle', 'update', 'move']),
|
|
);
|
|
}
|
|
|
|
export default actions;
|