import { IBaseFleioObjectModel } from '../../base-model/base-fleio-object.model';
import { IUserModel } from '../../client-user/model/user.model';

export interface IOperationModel extends IBaseFleioObjectModel {
  extra_info: {
    primary_object_url?: string;
    [key: string]: string;
  } & ReadonlyMap<string, string>;
  created_at: Date;
  status: string;
  seen: boolean;
  initiating_user: IUserModel;
  operation_type: string;
  primary_object_id: string;
  progress: {
    completed_steps: number;
    total_steps: number;
    steps_details: Array<{
      display: string;
      status: string;
      error_message?: string;
    }>;
  };
  completed: boolean;
  can_retry: boolean;
  params: string;

  // these variables are for UI use only
  expanded?: boolean;
}
