use showDialog directly

This commit is contained in:
Alex Tran
2025-12-04 04:18:35 +00:00
parent 288ba44825
commit 5eccffc084
13 changed files with 73 additions and 98 deletions

View File

@@ -5,10 +5,8 @@ import type { JSONSchema } from 'src/types/plugin-schema.types';
import { ValidateEnum } from 'src/validation';
export class PluginTriggerResponseDto {
name!: string;
@ValidateEnum({ enum: PluginTriggerType, name: 'PluginTriggerType' })
type!: PluginTriggerType;
description!: string;
@ValidateEnum({ enum: PluginContextType, name: 'PluginContextType' })
contextType!: PluginContextType;
}

View File

@@ -1,23 +1,17 @@
import { PluginContext, PluginTriggerType } from 'src/enum';
export type PluginTrigger = {
name: string;
type: PluginTriggerType;
description: string;
contextType: PluginContext;
};
export const pluginTriggers: PluginTrigger[] = [
{
name: 'Asset Uploaded',
type: PluginTriggerType.AssetCreate,
description: 'Triggered when a new asset is uploaded',
contextType: PluginContext.Asset,
},
{
name: 'Person Recognized',
type: PluginTriggerType.PersonRecognized,
description: 'Triggered when a person is detected',
contextType: PluginContext.Person,
},
];