import { UniqueID } from "@/core/common/domain";
import { Result } from "@repo/rdx-utils";
import { Transaction } from "sequelize";
import { TabContext } from "../entities";

export interface ITabContextRepository {
  getContextByTabId(tabId: UniqueID, transaction?: any): Promise<Result<TabContext, Error>>;

  contextExistsByTabId(tabId: UniqueID, transaction?: any): Promise<Result<boolean, Error>>;

  registerContextByTabId(
    context: TabContext,
    transaction?: Transaction
  ): Promise<Result<void, Error>>;

  unregisterContextByTabId(
    context: TabContext,
    transaction?: Transaction
  ): Promise<Result<void, Error>>;
}
