/** * 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 Joi from 'joi'; import { EventOptions, Trigger, WorkflowModel } from '@nocobase/plugin-workflow'; export default class RequestInterceptionTrigger extends Trigger { static TYPE: string; configSchema: Joi.ObjectSchema; validateConfig(config: Record): Record; sync: boolean; middleware: (context: any, next: any) => Promise; constructor(workflow: any); validateContext(values: any): { target: string; userId?: undefined; } | { userId: string; target?: undefined; }; execute(workflow: WorkflowModel, values: any, options: EventOptions): Promise; }