import { ruleSetInfo } from '../../apim/apim-governance-info.interface.js';

export interface IStudioApimGovernanceIndexedDBHandler {
  /**
   * Set governance rule sets for a connection
   * @param connection_name The name of the connection
   * @param ruleSets The rule sets to save
   */
  setGovernanceRuleSets(
    connection_name: string,
    org_name: string,
    ruleSets: ruleSetInfo[],
  ): Promise<void>;

  /**
   * Get governance rule sets for a connection
   * @param connection_name The name of the connection
   */
  getGovernanceRuleSets(
    connection_name: string,
    org_name: string,
  ): Promise<ruleSetInfo[]>;

  /**
   * Update the enabled status of a specific ruleset
   * @param connection_name The name of the connection
   * @param rulesetId The ID of the ruleset to update
   * @param enabled Whether the ruleset should be enabled or disabled
   */
  updateRulesetStatus(
    connection_name: string,
    org_name: string,
    rulesetId: string,
    enabled: boolean,
  ): Promise<void>;

  setSelectedGovernanceConnection(
    connection_name: string,
    org_name: string,
  ): Promise<void>;

  getSelectedGovernanceConnection(): Promise<string>;
}
