PromucFlow_constructor/app/client/src/ce/constants/ModuleConstants.ts
ashit-rath 053db40e30
chore: update module constants (#33673)
## Description
Updates to module constants for easy extension in EE


PR for https://github.com/appsmithorg/appsmith-ee/pull/4257

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9218704577>
> Commit: ca8fbda349f665207bbd1c36339a8ac01c60b43d
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9218704577&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->






## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-05-27 17:50:06 +05:30

35 lines
651 B
TypeScript

import type { PluginType } from "entities/Action";
type ID = string;
export enum MODULE_TYPE {
QUERY = "QUERY_MODULE",
JS = "JS_MODULE",
UI = "UI_MODULE",
}
export interface ModuleInput {
id: string;
propertyName: string;
}
export interface ModuleInputSection {
id: string;
children?: ModuleInput[];
}
export interface Module
extends Pick<ModuleMetadata, "pluginId" | "pluginType" | "datasourceId"> {
id: ID;
name: string;
packageId: ID;
inputsForm: ModuleInputSection[];
type: MODULE_TYPE;
}
export interface ModuleMetadata {
moduleId: string;
datasourceId?: string;
pluginId: string;
pluginType: PluginType;
}