/** * 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. */ /** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This program is offered under a commercial license. * For more information, see */ import Joi from 'joi'; import WorkflowPluginServer, { EventOptions, Trigger, WorkflowModel } from '@nocobase/plugin-workflow'; import { Next } from '@nocobase/actions'; import { ResourcerContext } from '@nocobase/resourcer'; export default class CustomActionTrigger extends Trigger { static TYPE: string; configSchema: Joi.ObjectSchema; validateConfig(config: Record): Record; globalTriggerAction(context: ResourcerContext, next: Next): Promise; triggerAction: (context: ResourcerContext, next: Next) => Promise; constructor(workflow: WorkflowPluginServer); private processEvents; private scheduleAsyncWorkflowTriggers; validateContext(values: any, workflow: WorkflowModel): { data: string; filterByTk?: undefined; } | { filterByTk: string; data?: undefined; }; execute(workflow: WorkflowModel, values: Record, options: EventOptions): Promise; }