Quick Start
Step 1. Create a file
Create file xxx.action.ts and place it under folder apitable/packages/room-server/src/automation/actions.
Step 2. Create an implementation class
In the new file, create IBaseAction implementation class and annotate @AutomationAction.
@AutomationAction("Xxx")
export class XxxAction implements IBaseAction {
async endpoint(input: any): Promise<IActionResponse<any>> {
console.log(`Entry customer connector. the input is ${input.info}`)
return Promise.resolve(undefined);
}
getInputSchema(): IJsonSchema {
return {
type: "object",
properties: {
info: {
type: "string",
title: "info"
}
}
};
}
getOutputSchema(): IJsonSchema {
return { };
}
getUISchema(): IUiSchema {
return { };
}
}Step 3. Import the robot action into the application
// apitable/packages/room-server/src/automation/actions/index.ts
import { XxxAction } from "./xxx.action";
@Module({
imports: [
XxxAction
],
})
export class AutomationActionModule {}