@heimdallr-sdk/types
Advanced tools
Comparing version 0.0.10 to 0.0.11
import { BreadcrumbPushData } from './breadcrumb'; | ||
import { BrowserSubTypes, EventTypes } from './constant'; | ||
import { BrowserSubTypes, EventTypes, PlatformTypes } from './constant'; | ||
export interface AppInfoType { | ||
@@ -30,1 +30,10 @@ name: string; | ||
} | ||
export interface ClientInfoType { | ||
platform: PlatformTypes; | ||
app_id?: string; | ||
session_id?: string; | ||
page_title?: string; | ||
path?: string; | ||
language?: string; | ||
user_agent?: string; | ||
} |
@@ -1,13 +0,16 @@ | ||
import { BrowserBreadcrumbTypes, CodeErrorDataType, ConsoleDataMsgType, LinkMsgDataType, DomDataMsgType, PromiseErrorDataType, RouteDataMsgType } from './browser'; | ||
import { VueReportDataType } from './vue'; | ||
declare enum BaseBreadcrumbTypes { | ||
VUE = "Vue" | ||
import { BrowserBreadcrumbTypes, WxBreadcrumbTypes } from './constant'; | ||
export declare enum BreadcrumbLevel { | ||
FATAL = "fatal", | ||
ERROR = "error", | ||
WARN = "warn", | ||
INFO = "info", | ||
DEBUG = "debug" | ||
} | ||
export type BreadcrumbTypes = BrowserBreadcrumbTypes | BaseBreadcrumbTypes; | ||
export type BreadcrumbTypes = WxBreadcrumbTypes | BrowserBreadcrumbTypes | string; | ||
export interface BreadcrumbPushData { | ||
eventId: string; | ||
type: BreadcrumbTypes; | ||
data: CodeErrorDataType | LinkMsgDataType | PromiseErrorDataType | LinkMsgDataType | VueReportDataType | DomDataMsgType | RouteDataMsgType | ConsoleDataMsgType; | ||
message: string; | ||
level?: BreadcrumbLevel; | ||
time?: number; | ||
} | ||
export {}; |
@@ -1,5 +0,8 @@ | ||
var BaseBreadcrumbTypes; | ||
(function (BaseBreadcrumbTypes) { | ||
BaseBreadcrumbTypes["VUE"] = "Vue"; | ||
})(BaseBreadcrumbTypes || (BaseBreadcrumbTypes = {})); | ||
export {}; | ||
export var BreadcrumbLevel; | ||
(function (BreadcrumbLevel) { | ||
BreadcrumbLevel["FATAL"] = "fatal"; | ||
BreadcrumbLevel["ERROR"] = "error"; | ||
BreadcrumbLevel["WARN"] = "warn"; | ||
BreadcrumbLevel["INFO"] = "info"; | ||
BreadcrumbLevel["DEBUG"] = "debug"; | ||
})(BreadcrumbLevel || (BreadcrumbLevel = {})); |
@@ -1,2 +0,2 @@ | ||
import { ReportDataMsgType } from './base'; | ||
import { ClientInfoType, ReportDataMsgType } from './base'; | ||
import { BreadcrumbPushData } from './breadcrumb'; | ||
@@ -29,10 +29,2 @@ import { PageLifeType } from './constant'; | ||
} | ||
export interface ClientInfoType { | ||
app_id: string; | ||
session_id: string; | ||
page_title: string; | ||
path: string; | ||
language: string; | ||
user_agent: string; | ||
} | ||
export interface BrowserReportPayloadDataType extends ClientInfoType { | ||
@@ -96,16 +88,2 @@ [key: string]: any; | ||
} | ||
export declare enum BrowserBreadcrumbTypes { | ||
ROUTE = "Route", | ||
CLICK = "UI.Click", | ||
CONSOLE = "Console", | ||
XHR = "Xhr", | ||
FETCH = "Fetch", | ||
UNHANDLEDREJECTION = "Unhandledrejection", | ||
RESOURCE = "Resource", | ||
CODE_ERROR = "CodeError", | ||
CUSTOMER = "Customer", | ||
FRAMEWORK = "Framework", | ||
LIFECYCLE = "LifeCycle", | ||
CRASH = "Crash" | ||
} | ||
export {}; |
@@ -1,15 +0,1 @@ | ||
export var BrowserBreadcrumbTypes; | ||
(function (BrowserBreadcrumbTypes) { | ||
BrowserBreadcrumbTypes["ROUTE"] = "Route"; | ||
BrowserBreadcrumbTypes["CLICK"] = "UI.Click"; | ||
BrowserBreadcrumbTypes["CONSOLE"] = "Console"; | ||
BrowserBreadcrumbTypes["XHR"] = "Xhr"; | ||
BrowserBreadcrumbTypes["FETCH"] = "Fetch"; | ||
BrowserBreadcrumbTypes["UNHANDLEDREJECTION"] = "Unhandledrejection"; | ||
BrowserBreadcrumbTypes["RESOURCE"] = "Resource"; | ||
BrowserBreadcrumbTypes["CODE_ERROR"] = "CodeError"; | ||
BrowserBreadcrumbTypes["CUSTOMER"] = "Customer"; | ||
BrowserBreadcrumbTypes["FRAMEWORK"] = "Framework"; | ||
BrowserBreadcrumbTypes["LIFECYCLE"] = "LifeCycle"; | ||
BrowserBreadcrumbTypes["CRASH"] = "Crash"; | ||
})(BrowserBreadcrumbTypes || (BrowserBreadcrumbTypes = {})); | ||
export {}; |
@@ -23,5 +23,2 @@ export declare enum StoreKeyType { | ||
} | ||
export declare enum NodeErrorTypes { | ||
UNCAUGHTEXCEPTION = "uncaughtException" | ||
} | ||
export declare enum BrowserErrorTypes { | ||
@@ -33,2 +30,9 @@ CODEERROR = "code", | ||
} | ||
export declare enum NodeErrorTypes { | ||
UNCAUGHTEXCEPTION = "uncaughtException", | ||
UNHANDLEDREJECTION = "unhandledrejection" | ||
} | ||
export declare enum WxErrorTypes { | ||
UNCAUGHTEXCEPTION = "uncaughtException" | ||
} | ||
export declare enum DomTypes { | ||
@@ -86,1 +90,42 @@ CLICK = "click" | ||
} | ||
export declare enum PlatformTypes { | ||
BROWSER = "browser", | ||
NODE = "nodejs", | ||
WECHAT = "wechat" | ||
} | ||
export declare enum BrowserBreadcrumbTypes { | ||
ROUTE = "Route", | ||
CLICK = "UI.Click", | ||
CONSOLE = "Console", | ||
XHR = "Xhr", | ||
FETCH = "Fetch", | ||
UNHANDLEDREJECTION = "Unhandledrejection", | ||
RESOURCE = "Resource", | ||
CODE_ERROR = "CodeError", | ||
CUSTOMER = "Customer", | ||
FRAMEWORK = "Framework", | ||
LIFECYCLE = "LifeCycle", | ||
CRASH = "Crash" | ||
} | ||
export declare enum WxBreadcrumbTypes { | ||
API = "Api", | ||
ROUTE = "Route", | ||
CLICK = "UI.Click", | ||
ERROR = "Error", | ||
LIFECYCLE = "LifeCycle", | ||
CUSTOMER = "Customer" | ||
} | ||
export declare enum WxRouteEvents { | ||
SWITCHTAB = "switchTab", | ||
RELAUNCH = "reLaunch", | ||
REDIRECTTO = "redirectTo", | ||
NAVIGATETO = "navigateTo", | ||
NAVIGATEBACK = "navigateBack", | ||
NAVIGATETOMINIPROGRAM = "navigateToMiniProgram", | ||
ROUTEFAIL = "routeFail" | ||
} | ||
export declare enum WxXhrTypes { | ||
REQUEST = "request", | ||
DOWNLOADFILE = "downloadFile", | ||
UPLOADFILE = "uploadFile" | ||
} |
@@ -26,6 +26,2 @@ export var StoreKeyType; | ||
})(EventTypes || (EventTypes = {})); | ||
export var NodeErrorTypes; | ||
(function (NodeErrorTypes) { | ||
NodeErrorTypes["UNCAUGHTEXCEPTION"] = "uncaughtException"; | ||
})(NodeErrorTypes || (NodeErrorTypes = {})); | ||
export var BrowserErrorTypes; | ||
@@ -38,2 +34,11 @@ (function (BrowserErrorTypes) { | ||
})(BrowserErrorTypes || (BrowserErrorTypes = {})); | ||
export var NodeErrorTypes; | ||
(function (NodeErrorTypes) { | ||
NodeErrorTypes["UNCAUGHTEXCEPTION"] = "uncaughtException"; | ||
NodeErrorTypes["UNHANDLEDREJECTION"] = "unhandledrejection"; | ||
})(NodeErrorTypes || (NodeErrorTypes = {})); | ||
export var WxErrorTypes; | ||
(function (WxErrorTypes) { | ||
WxErrorTypes["UNCAUGHTEXCEPTION"] = "uncaughtException"; | ||
})(WxErrorTypes || (WxErrorTypes = {})); | ||
export var DomTypes; | ||
@@ -100,1 +105,47 @@ (function (DomTypes) { | ||
})(VueTypes || (VueTypes = {})); | ||
export var PlatformTypes; | ||
(function (PlatformTypes) { | ||
PlatformTypes["BROWSER"] = "browser"; | ||
PlatformTypes["NODE"] = "nodejs"; | ||
PlatformTypes["WECHAT"] = "wechat"; | ||
})(PlatformTypes || (PlatformTypes = {})); | ||
export var BrowserBreadcrumbTypes; | ||
(function (BrowserBreadcrumbTypes) { | ||
BrowserBreadcrumbTypes["ROUTE"] = "Route"; | ||
BrowserBreadcrumbTypes["CLICK"] = "UI.Click"; | ||
BrowserBreadcrumbTypes["CONSOLE"] = "Console"; | ||
BrowserBreadcrumbTypes["XHR"] = "Xhr"; | ||
BrowserBreadcrumbTypes["FETCH"] = "Fetch"; | ||
BrowserBreadcrumbTypes["UNHANDLEDREJECTION"] = "Unhandledrejection"; | ||
BrowserBreadcrumbTypes["RESOURCE"] = "Resource"; | ||
BrowserBreadcrumbTypes["CODE_ERROR"] = "CodeError"; | ||
BrowserBreadcrumbTypes["CUSTOMER"] = "Customer"; | ||
BrowserBreadcrumbTypes["FRAMEWORK"] = "Framework"; | ||
BrowserBreadcrumbTypes["LIFECYCLE"] = "LifeCycle"; | ||
BrowserBreadcrumbTypes["CRASH"] = "Crash"; | ||
})(BrowserBreadcrumbTypes || (BrowserBreadcrumbTypes = {})); | ||
export var WxBreadcrumbTypes; | ||
(function (WxBreadcrumbTypes) { | ||
WxBreadcrumbTypes["API"] = "Api"; | ||
WxBreadcrumbTypes["ROUTE"] = "Route"; | ||
WxBreadcrumbTypes["CLICK"] = "UI.Click"; | ||
WxBreadcrumbTypes["ERROR"] = "Error"; | ||
WxBreadcrumbTypes["LIFECYCLE"] = "LifeCycle"; | ||
WxBreadcrumbTypes["CUSTOMER"] = "Customer"; | ||
})(WxBreadcrumbTypes || (WxBreadcrumbTypes = {})); | ||
export var WxRouteEvents; | ||
(function (WxRouteEvents) { | ||
WxRouteEvents["SWITCHTAB"] = "switchTab"; | ||
WxRouteEvents["RELAUNCH"] = "reLaunch"; | ||
WxRouteEvents["REDIRECTTO"] = "redirectTo"; | ||
WxRouteEvents["NAVIGATETO"] = "navigateTo"; | ||
WxRouteEvents["NAVIGATEBACK"] = "navigateBack"; | ||
WxRouteEvents["NAVIGATETOMINIPROGRAM"] = "navigateToMiniProgram"; | ||
WxRouteEvents["ROUTEFAIL"] = "routeFail"; | ||
})(WxRouteEvents || (WxRouteEvents = {})); | ||
export var WxXhrTypes; | ||
(function (WxXhrTypes) { | ||
WxXhrTypes["REQUEST"] = "request"; | ||
WxXhrTypes["DOWNLOADFILE"] = "downloadFile"; | ||
WxXhrTypes["UPLOADFILE"] = "uploadFile"; | ||
})(WxXhrTypes || (WxXhrTypes = {})); |
@@ -5,3 +5,3 @@ import { ReportDataMsgType } from './base'; | ||
export interface HttpRequest { | ||
method: MethodTypes; | ||
method: MethodTypes | string; | ||
url: string; | ||
@@ -13,2 +13,3 @@ data?: IAnyObject; | ||
data?: IAnyObject | string; | ||
msg?: string; | ||
} | ||
@@ -15,0 +16,0 @@ export interface HttpCollectDataType { |
@@ -14,1 +14,2 @@ export * from './common'; | ||
export * from './server'; | ||
export * from './wx'; |
@@ -14,1 +14,2 @@ export * from './common'; | ||
export * from './server'; | ||
export * from './wx'; |
@@ -1,2 +0,2 @@ | ||
import { ReportDataMsgType } from "./base"; | ||
import { ClientInfoType, ReportDataMsgType } from "./base"; | ||
export interface UncaughtExceptionDataType extends ReportDataMsgType { | ||
@@ -7,5 +7,4 @@ message: string; | ||
} | ||
export interface NodeReportPayloadDataType { | ||
app_id: string; | ||
export interface NodeReportPayloadDataType extends ClientInfoType { | ||
[key: string]: any; | ||
} |
@@ -13,2 +13,3 @@ import { AppInfoType, Dsn } from './base'; | ||
plugins?: BasePluginType[]; | ||
maxBreadcrumbs?: number; | ||
} | ||
@@ -28,3 +29,2 @@ export declare enum PerformanceFeat { | ||
ignoreUrls?: string[]; | ||
maxBreadcrumbs?: number; | ||
userIdentify?: CustomerOptionType; | ||
@@ -31,0 +31,0 @@ throttleDelayTime?: number; |
{ | ||
"name": "@heimdallr-sdk/types", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "@heimdallr-sdk/types", | ||
@@ -27,3 +27,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "e5500a5747b53854e872e43997e2dd2cbed8921a" | ||
"gitHead": "84a816567f6ba7b5d1c51aa04dfe74e784859481" | ||
} |
20781
33
636