diff --git a/i18n/en.json b/i18n/en.json index 6d8449dcc7..51399a218c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -2144,7 +2144,11 @@ "trash_page_title": "Trash ({count})", "trashed_items_will_be_permanently_deleted_after": "Trashed items will be permanently deleted after {days, plural, one {# day} other {# days}}.", "trigger": "Trigger", + "trigger_asset_uploaded": "Asset Uploaded", + "trigger_asset_uploaded_description": "Triggered when a new asset is uploaded", "trigger_description": "An event that kick off the workflow", + "trigger_person_recognized": "Person Recognized", + "trigger_person_recognized_description": "Triggered when a person is detected", "trigger_type": "Trigger type", "troubleshoot": "Troubleshoot", "type": "Type", diff --git a/mobile/openapi/lib/model/plugin_trigger_response_dto.dart b/mobile/openapi/lib/model/plugin_trigger_response_dto.dart index 4eabecdc42..a6ee1c6b69 100644 --- a/mobile/openapi/lib/model/plugin_trigger_response_dto.dart +++ b/mobile/openapi/lib/model/plugin_trigger_response_dto.dart @@ -14,42 +14,30 @@ class PluginTriggerResponseDto { /// Returns a new [PluginTriggerResponseDto] instance. PluginTriggerResponseDto({ required this.contextType, - required this.description, - required this.name, required this.type, }); PluginContextType contextType; - String description; - - String name; - PluginTriggerType type; @override bool operator ==(Object other) => identical(this, other) || other is PluginTriggerResponseDto && other.contextType == contextType && - other.description == description && - other.name == name && other.type == type; @override int get hashCode => // ignore: unnecessary_parenthesis (contextType.hashCode) + - (description.hashCode) + - (name.hashCode) + (type.hashCode); @override - String toString() => 'PluginTriggerResponseDto[contextType=$contextType, description=$description, name=$name, type=$type]'; + String toString() => 'PluginTriggerResponseDto[contextType=$contextType, type=$type]'; Map toJson() { final json = {}; json[r'contextType'] = this.contextType; - json[r'description'] = this.description; - json[r'name'] = this.name; json[r'type'] = this.type; return json; } @@ -64,8 +52,6 @@ class PluginTriggerResponseDto { return PluginTriggerResponseDto( contextType: PluginContextType.fromJson(json[r'contextType'])!, - description: mapValueOfType(json, r'description')!, - name: mapValueOfType(json, r'name')!, type: PluginTriggerType.fromJson(json[r'type'])!, ); } @@ -115,8 +101,6 @@ class PluginTriggerResponseDto { /// The list of required keys that must be present in a JSON. static const requiredKeys = { 'contextType', - 'description', - 'name', 'type', }; } diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index ad0c05571f..3296306b5c 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -18459,12 +18459,6 @@ } ] }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, "type": { "allOf": [ { @@ -18475,8 +18469,6 @@ }, "required": [ "contextType", - "description", - "name", "type" ], "type": "object" diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index 644299b188..996731a55e 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -968,8 +968,6 @@ export type PluginResponseDto = { }; export type PluginTriggerResponseDto = { contextType: PluginContextType; - description: string; - name: string; "type": PluginTriggerType; }; export type QueueResponseDto = { diff --git a/server/src/dtos/plugin.dto.ts b/server/src/dtos/plugin.dto.ts index 0ba81c4518..a802bb1201 100644 --- a/server/src/dtos/plugin.dto.ts +++ b/server/src/dtos/plugin.dto.ts @@ -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; } diff --git a/server/src/plugins.ts b/server/src/plugins.ts index 2adf748e64..77f35e79f6 100644 --- a/server/src/plugins.ts +++ b/server/src/plugins.ts @@ -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, }, ]; diff --git a/web/src/lib/components/workflows/WorkflowSummary.svelte b/web/src/lib/components/workflows/WorkflowSummary.svelte index 9ac991fa0a..0ead163efe 100644 --- a/web/src/lib/components/workflows/WorkflowSummary.svelte +++ b/web/src/lib/components/workflows/WorkflowSummary.svelte @@ -1,5 +1,10 @@