export interface OssServiceType {
  getOss: () => Promise<any>;
  upload: (file: File | string, key: string, progress: Function, error: Function, complete: Function) => Promise<any>;
  getObject: (key: string, isBinary: boolean) => Promise<any>;
  putObject: (key: string, data: any) => Promise<any>;
  deleteObject: (key: string) => Promise<any>;
  listObject: (key: string) => Promise<any>;
  getSignedUrl: (key: string, isBinary?: boolean) => Promise<any>;
  headObject?: (key: string) => Promise<any>;
}

export interface OssServiceFactory {
  init: () => OssServiceType;
}

export interface RemoteServiceType {
  get?: (url: string, responseType: string) => Promise<any>;
  post?: (url: string, data: any, contentType: string, responseType: string) => Promise<any>;
  head?: (url: string, responseType: string) => void;
  delete?: (url: string, responseType: string) => Promise<any>;
  put?: (url: string, data: any, contentType?: string, responseType?: string) => Promise<any>;
}