import '../../contracts/script_widget.dart';

abstract class ScriptWidgetRepository {
  Future<List<InstalledScriptWidget>> listWidgets();

  Future<InstalledScriptWidget?> findWidget(String widgetId);

  Future<void> upsertWidget(InstalledScriptWidget widget);

  Future<void> deleteWidget(String widgetId);

  Future<List<ScriptWidgetSubscription>> listSubscriptions();

  Future<void> upsertSubscription(ScriptWidgetSubscription subscription);


  Future<void> replaceAllWidgets(List<InstalledScriptWidget> widgets);


  Future<void> replaceAllSubscriptions(
    List<ScriptWidgetSubscription> subscriptions,
  );
}
