mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 02:15:21 +00:00
64 lines
1.3 KiB
TypeScript
64 lines
1.3 KiB
TypeScript
import { ActionTypeEnum } from '@app/common/constants/automation.enum';
|
|
import { EffectiveTime } from '../dtos';
|
|
|
|
export interface AddAutomationInterface {
|
|
success: boolean;
|
|
msg?: string;
|
|
result: {
|
|
id: string;
|
|
};
|
|
}
|
|
export interface GetAutomationBySpaceInterface {
|
|
success: boolean;
|
|
msg?: string;
|
|
result: {
|
|
list: Array<{
|
|
id: string;
|
|
name: string;
|
|
status: string;
|
|
}>;
|
|
};
|
|
}
|
|
export interface DeleteAutomationInterface {
|
|
success: boolean;
|
|
msg?: string;
|
|
result: boolean;
|
|
}
|
|
export interface Action {
|
|
actionExecutor: string;
|
|
entityId: string;
|
|
actionType?: ActionTypeEnum;
|
|
[key: string]: any; // Allow additional properties
|
|
}
|
|
|
|
export interface Condition {
|
|
entityType: string;
|
|
entityId: string;
|
|
[key: string]: any; // Allow additional properties
|
|
}
|
|
|
|
export interface AutomationResponseData {
|
|
id: string;
|
|
name: string;
|
|
status: string;
|
|
spaceId?: string;
|
|
runningMode?: string;
|
|
actions: Action[];
|
|
conditions: Condition[];
|
|
[key: string]: any; // Allow additional properties
|
|
}
|
|
export interface AutomationDetailsResult {
|
|
id: string;
|
|
name: string;
|
|
type: string;
|
|
}
|
|
|
|
export interface AddAutomationParams {
|
|
actions: Action[];
|
|
conditions: Condition[];
|
|
automationName: string;
|
|
effectiveTime: EffectiveTime;
|
|
decisionExpr: string;
|
|
spaceTuyaId: string;
|
|
}
|