All files / core/lib Adapter.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  2x                                  
import { Event, IBreadcrumb, IUser } from './Interfaces';
 
export interface IAdapter {
  readonly options: {};
  install(): Promise<boolean>;
  setOptions(options: {}): IAdapter;
  send(event: Event): Promise<Event>;
  captureException(exception: Error): Promise<Event>;
  captureMessage(message: string): Promise<Event>;
  captureBreadcrumb(crumb: IBreadcrumb): Promise<IBreadcrumb>;
 
  // These should be removed at some point in the future
  // only the client should handle global stuff
  setUserContext?(user?: IUser): IAdapter;
  setTagsContext?(tags?: { [key: string]: any }): IAdapter;
  setExtraContext?(extra?: { [key: string]: any }): IAdapter;
  clearContext?(): IAdapter;
}