aegis.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import Core, { Config, SendOption, SendSuccess, SendFail } from "../../core/src";
  2. export interface ViolaConfig extends Config {
  3. reportApiSpeed?: boolean;
  4. beforeReportSpeed?: Function;
  5. offlineLog?: boolean;
  6. dbConfig?: any;
  7. offlineLogExp?: number;
  8. extRequestOpts?: {
  9. [key: string]: string | number | boolean;
  10. };
  11. }
  12. /**
  13. * 平台编码
  14. */
  15. declare enum PLATFORM {
  16. /** 安卓 */
  17. ANR = 1,
  18. /** iOS */
  19. IOS = 2,
  20. /** 其他(默认) */
  21. DEFAULT = 100
  22. }
  23. export default class Aegis extends Core {
  24. static sessionID: string;
  25. static asyncPluginIndex: number;
  26. originRequest: (options: Record<string, any>, cb: Function) => Promise<unknown>;
  27. extRequestOpts: {};
  28. speedLogPipeline: import("../../core/src").Pipeline<any, any>;
  29. constructor(config: ViolaConfig);
  30. /**
  31. * 获取平台编号
  32. */
  33. getPlatform(): PLATFORM;
  34. /**
  35. * 设置viola-sdk专用配置
  36. */
  37. initViolaConfig(config: ViolaConfig): void;
  38. get _bean(): string;
  39. request: (options: SendOption, success?: SendSuccess | undefined, fail?: SendFail | undefined) => void;
  40. uploadLogs(params?: any, conds?: any): void;
  41. }
  42. export {};