import {
  SubscriptionServiceEvent,
  SubscriptionServiceEventType,
} from '../../../../../../../server-services/subscription-event';
import { CacheInterface } from '../../../../cache-logic-interface';

export type WorkspaceChangeSubscriptionHandlerMap = {
  [event in SubscriptionServiceEvent]?: WorkspaceChangeSubscriptionCMDType;
};
export type WorkspaceChangeSubscriptionCMDType = {
  [cmd in SubscriptionServiceEventType]?: WorkspaceChangeSubscriptionSpecificHandler;
};
export type WorkspaceChangeSubscriptionSpecificHandler = (
  cache: CacheInterface,
  /**
   * You can cast it to the specific subclass from WorkspaceSubscriptionRecord
   */
  event
) => void;
