*/ public static function types(): array { return ['chat.erase_assistant', 'chat.retention', 'core.audit_retention', 'knowledge.purge', 'knowledge.repair']; } public static function allows(string $type): bool { return in_array($type, self::types(), true); } /** What the job does, in plain words (administrator text). */ public static function label(string $type): string { return match ($type) { 'chat.erase_assistant' => __('Finish deleting a deleted assistant’s conversations', 'aiwend'), 'chat.retention' => __('Delete conversations past the retention period', 'aiwend'), 'core.audit_retention' => __('Delete old activity log entries', 'aiwend'), 'knowledge.purge' => __('Remove the data of a deleted knowledge source', 'aiwend'), 'knowledge.repair' => __('Check for knowledge sources whose indexing was never queued', 'aiwend'), 'knowledge.ingest' => __('Index a knowledge source', 'aiwend'), default => __('A background task', 'aiwend'), }; } }