2021-09-08 17:32:22 +00:00
|
|
|
import { BaseAction } from "../Action";
|
|
|
|
|
import { PluginType } from "entities/Action";
|
2022-09-24 10:01:52 +00:00
|
|
|
import { LayoutOnLoadActionErrors } from "constants/AppsmithActionConstants/ActionConstants";
|
2021-09-08 17:32:22 +00:00
|
|
|
|
|
|
|
|
export type Variable = {
|
|
|
|
|
name: string;
|
|
|
|
|
value: any;
|
|
|
|
|
};
|
|
|
|
|
export interface JSCollection {
|
|
|
|
|
id: string;
|
|
|
|
|
applicationId: string;
|
2022-06-15 15:37:41 +00:00
|
|
|
workspaceId: string;
|
2021-09-08 17:32:22 +00:00
|
|
|
name: string;
|
|
|
|
|
pageId: string;
|
|
|
|
|
pluginId: string;
|
|
|
|
|
pluginType: PluginType.JS;
|
|
|
|
|
actions: Array<JSAction>;
|
|
|
|
|
body: string;
|
|
|
|
|
variables: Array<Variable>;
|
2022-12-01 06:30:50 +00:00
|
|
|
userPermissions?: string[];
|
2022-09-24 10:01:52 +00:00
|
|
|
errorReports?: Array<LayoutOnLoadActionErrors>;
|
2021-09-08 17:32:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface JSActionConfig {
|
|
|
|
|
body: string;
|
|
|
|
|
isAsync: boolean;
|
2022-03-17 12:05:17 +00:00
|
|
|
timeoutInMillisecond: number;
|
2021-09-08 17:32:22 +00:00
|
|
|
jsArguments: Array<Variable>;
|
|
|
|
|
}
|
|
|
|
|
export interface JSAction extends BaseAction {
|
|
|
|
|
actionConfiguration: JSActionConfig;
|
2022-03-17 12:05:17 +00:00
|
|
|
clientSideExecution: boolean;
|
2021-09-08 17:32:22 +00:00
|
|
|
}
|