Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@heimdallr-sdk/types

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heimdallr-sdk/types - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

295

esm/index.d.ts

@@ -1,12 +0,283 @@

export * from './common';
export * from './base';
export * from './sdk';
export * from './breadcrumb';
export * from './constant';
export * from './options';
export * from './plugin';
export * from './browser';
export * from './http';
export * from './vue';
export * from './sourcemap';
export * from './server';
type voidFun = () => void;
interface IAnyObject {
[key: string]: any;
}
type UnknownFunc = (...args: unknown[]) => void;
declare enum StoreKeyType {
SESSION_ID = "HEIMDALLR_SDK_SESSION_ID",
USER_ID = "HEIMDALLR_SDK_USER_ID",
APP = "HEIMDALLR_SDK_APP_ID"
}
declare enum MethodTypes {
GET = "GET",
POST = "POST",
PUT = "PUT",
DELETE = "DELETE"
}
declare enum EventTypes {
LIFECYCLE = 1,
ERROR = 2,
PERFORMANCE = 3,
API = 4,
DOM = 5,
ROUTE = 6,
CONSOLE = 7,
RECORD = 8,
VUE = 9,
CUSTOMER = 10,
EXTEND = 11
}
declare enum BrowserErrorTypes {
CODEERROR = 21,
RESOURCEERROR = 22,
UNHANDLEDREJECTION = 23,
PAGECRASH = 24
}
declare enum BrowserReportType {
BEACON = 1,
IMG = 2,
GET = 3,
POST = 4
}
declare enum DomTypes {
CLICK = 51
}
declare enum ConsoleTypes {
LOG = "log",
INFO = "info",
WARN = "warn",
ERROR = "error",
ASSERT = "assert"
}
declare enum HttpTypes {
XHR = 41,
FETCH = 42
}
declare enum PerTypes {
FMP = 31,
FPS = 32,
BASIC = 33,
VITALS = 34,
RESOURCE = 35
}
declare enum RouteTypes {
HASH = 61,
HISTORY = 62
}
declare enum CustomerTypes {
CUSTOMER = 111
}
type BrowserSubTypes = PageLifeType | BrowserErrorTypes | DomTypes | HttpTypes | ConsoleTypes | PerTypes | RouteTypes | CustomerTypes;
type StoreTypes = 'local' | 'session' | 'cookie' | 'global';
declare enum StoreType {
LOCAL = "local",
SESSION = "session",
COOKIE = "cookie",
GLOBAL = "global"
}
declare enum PageLifeType {
LOAD = 11,
UNLOAD = 12
}
declare enum DeviceType {
MOBILE = 1,
PC = 2
}
declare enum PlatformTypes {
BROWSER = 1,
WECHAT = 2,
NODE = 3
}
declare enum BrowserBreadcrumbTypes {
ROUTE = 11,
CLICK = 12,
CONSOLE = 13,
XHR = 14,
FETCH = 15,
UNHANDLEDREJECTION = 16,
RESOURCE = 17,
CODE_ERROR = 18,
CUSTOMER = 19,
FRAMEWORK = 20,
LIFECYCLE = 21,
CRASH = 22
}
declare enum WxBreadcrumbTypes {
API = 21,
ROUTE = 22,
CLICK = 23,
ERROR = 24,
LIFECYCLE = 25,
CUSTOMER = 26
}
declare enum BreadcrumbLevel {
FATAL = 1,
ERROR = 2,
WARN = 3,
INFO = 4,
DEBUG = 5
}
type BreadcrumbTypes = WxBreadcrumbTypes | BrowserBreadcrumbTypes | string;
interface BreadcrumbPushData {
lid: string;
bt: BreadcrumbTypes;
msg: string;
t: number;
l?: BreadcrumbLevel;
}
interface AppInfoType {
name: string;
leader: string;
desc?: string;
}
interface Dsn {
host: string;
init: string;
report: string;
}
interface ReportDataType<T> {
lid: string;
t: number;
e: EventTypes;
dat: T;
b?: BreadcrumbPushData[];
}
interface ReportDataMsgType {
st: BrowserSubTypes | number | string;
}
interface ClientInfoType {
p?: PlatformTypes;
aid?: string;
sid?: string;
uid?: string;
ttl?: string;
url?: string;
lan?: string;
ws?: string;
ds?: string;
ua?: string;
}
declare enum SDK {
NAME = "@heimdallr-sdk"
}
declare const TAG: string;
interface BasePluginType {
name: string;
monitor: (notify: (data: any) => void) => void;
transform?: (collectedData: any) => ReportDataType<any>;
[key: string]: any;
}
interface BaseOptionsType {
dsn: Dsn;
app: AppInfoType;
debug?: boolean;
enabled?: boolean;
plugins?: BasePluginType[];
maxBreadcrumbs?: number;
}
interface CustomerOptionType {
name?: string;
position?: StoreTypes;
}
interface RequestPluginOptionType {
ignoreUrls?: string[];
reportResponds?: Boolean;
}
interface LinkMsgDataType {
href?: string;
}
interface RouteDataMsgType {
from: string;
to: string;
}
interface RouteMsgType extends ReportDataMsgType, RouteDataMsgType {
}
interface IAnyMsgType extends ReportDataMsgType {
[key: string]: any;
}
interface XhrResponse<T> {
status: number;
statusText: string;
headers: Record<string, string>;
data: T;
}
interface HttpCommonRes<T = any> {
code: number;
data: T;
msg: string;
}
interface HttpRequest {
m: MethodTypes | string;
url: string;
dat?: IAnyObject;
}
interface HttpResponse {
sta?: number;
dat?: IAnyObject | string;
msg?: string;
}
interface HttpCollectDataType {
req: HttpRequest;
res: HttpResponse;
t: number;
et?: number;
}
interface HttpCollectType extends ReportDataMsgType, HttpCollectDataType {
}
interface VueInstance {
[key: string]: any;
config?: VueConfiguration;
version: string;
}
interface ViewModel {
[key: string]: any;
$root?: Record<string, unknown>;
$options?: {
[key: string]: any;
name?: string;
props?: IAnyObject;
};
$props?: Record<string, unknown>;
}
interface VueConfiguration {
errorHandler?(err: Error, vm: ViewModel | any, info: string): void;
warnHandler?(msg: string, vm: ViewModel | any, trace: string): void;
[key: string]: any;
}
interface VueReportDataType extends ReportDataMsgType {
name: string;
msg: string;
hook: string;
stk: string;
lin?: number;
col?: number;
fn?: string;
}
interface SourcemapOptionType {
url: string;
app_name: string;
err_code?: string;
err_msg?: string;
}
interface ResponseType {
code: number;
msg: string;
}
interface InterfaceResponseType<T> {
code: number;
msg: string;
data?: T;
}
export { type AppInfoType, type BaseOptionsType, type BasePluginType, BreadcrumbLevel, type BreadcrumbPushData, type BreadcrumbTypes, BrowserBreadcrumbTypes, BrowserErrorTypes, BrowserReportType, type BrowserSubTypes, type ClientInfoType, ConsoleTypes, type CustomerOptionType, CustomerTypes, DeviceType, DomTypes, type Dsn, EventTypes, type HttpCollectDataType, type HttpCollectType, type HttpCommonRes, type HttpRequest, type HttpResponse, HttpTypes, type IAnyMsgType, type IAnyObject, type InterfaceResponseType, type LinkMsgDataType, MethodTypes, PageLifeType, PerTypes, PlatformTypes, type ReportDataMsgType, type ReportDataType, type RequestPluginOptionType, type ResponseType, type RouteDataMsgType, type RouteMsgType, RouteTypes, SDK, type SourcemapOptionType, StoreKeyType, StoreType, type StoreTypes, TAG, type UnknownFunc, type ViewModel, type VueConfiguration, type VueInstance, type VueReportDataType, WxBreadcrumbTypes, type XhrResponse, type voidFun };

13

esm/index.js

@@ -1,12 +0,1 @@

export * from './common';
export * from './base';
export * from './sdk';
export * from './breadcrumb';
export * from './constant';
export * from './options';
export * from './plugin';
export * from './browser';
export * from './http';
export * from './vue';
export * from './sourcemap';
export * from './server';
var E=(E=>(E.NAME="@heimdallr-sdk",E))(E||{});const R="[@heimdallr-sdk]:";var O=(E=>(E[E.FATAL=1]="FATAL",E[E.ERROR=2]="ERROR",E[E.WARN=3]="WARN",E[E.INFO=4]="INFO",E[E.DEBUG=5]="DEBUG",E))(O||{}),C=(E=>(E.SESSION_ID="HEIMDALLR_SDK_SESSION_ID",E.USER_ID="HEIMDALLR_SDK_USER_ID",E.APP="HEIMDALLR_SDK_APP_ID",E))(C||{}),S=(E=>(E.GET="GET",E.POST="POST",E.PUT="PUT",E.DELETE="DELETE",E))(S||{}),L=(E=>(E[E.LIFECYCLE=1]="LIFECYCLE",E[E.ERROR=2]="ERROR",E[E.PERFORMANCE=3]="PERFORMANCE",E[E.API=4]="API",E[E.DOM=5]="DOM",E[E.ROUTE=6]="ROUTE",E[E.CONSOLE=7]="CONSOLE",E[E.RECORD=8]="RECORD",E[E.VUE=9]="VUE",E[E.CUSTOMER=10]="CUSTOMER",E[E.EXTEND=11]="EXTEND",E))(L||{}),A=(E=>(E[E.CODEERROR=21]="CODEERROR",E[E.RESOURCEERROR=22]="RESOURCEERROR",E[E.UNHANDLEDREJECTION=23]="UNHANDLEDREJECTION",E[E.PAGECRASH=24]="PAGECRASH",E))(A||{}),I=(E=>(E[E.BEACON=1]="BEACON",E[E.IMG=2]="IMG",E[E.GET=3]="GET",E[E.POST=4]="POST",E))(I||{}),T=(E=>(E[E.CLICK=51]="CLICK",E))(T||{}),D=(E=>(E.LOG="log",E.INFO="info",E.WARN="warn",E.ERROR="error",E.ASSERT="assert",E))(D||{}),N=(E=>(E[E.XHR=41]="XHR",E[E.FETCH=42]="FETCH",E))(N||{}),U=(E=>(E[E.FMP=31]="FMP",E[E.FPS=32]="FPS",E[E.BASIC=33]="BASIC",E[E.VITALS=34]="VITALS",E[E.RESOURCE=35]="RESOURCE",E))(U||{}),H=(E=>(E[E.HASH=61]="HASH",E[E.HISTORY=62]="HISTORY",E))(H||{}),M=(E=>(E[E.CUSTOMER=111]="CUSTOMER",E))(M||{}),P=(E=>(E.LOCAL="local",E.SESSION="session",E.COOKIE="cookie",E.GLOBAL="global",E))(P||{}),F=(E=>(E[E.LOAD=11]="LOAD",E[E.UNLOAD=12]="UNLOAD",E))(F||{}),_=(E=>(E[E.MOBILE=1]="MOBILE",E[E.PC=2]="PC",E))(_||{}),G=(E=>(E[E.BROWSER=1]="BROWSER",E[E.WECHAT=2]="WECHAT",E[E.NODE=3]="NODE",E))(G||{}),K=(E=>(E[E.ROUTE=11]="ROUTE",E[E.CLICK=12]="CLICK",E[E.CONSOLE=13]="CONSOLE",E[E.XHR=14]="XHR",E[E.FETCH=15]="FETCH",E[E.UNHANDLEDREJECTION=16]="UNHANDLEDREJECTION",E[E.RESOURCE=17]="RESOURCE",E[E.CODE_ERROR=18]="CODE_ERROR",E[E.CUSTOMER=19]="CUSTOMER",E[E.FRAMEWORK=20]="FRAMEWORK",E[E.LIFECYCLE=21]="LIFECYCLE",E[E.CRASH=22]="CRASH",E))(K||{}),B=(E=>(E[E.API=21]="API",E[E.ROUTE=22]="ROUTE",E[E.CLICK=23]="CLICK",E[E.ERROR=24]="ERROR",E[E.LIFECYCLE=25]="LIFECYCLE",E[E.CUSTOMER=26]="CUSTOMER",E))(B||{});export{O as BreadcrumbLevel,K as BrowserBreadcrumbTypes,A as BrowserErrorTypes,I as BrowserReportType,D as ConsoleTypes,M as CustomerTypes,_ as DeviceType,T as DomTypes,L as EventTypes,N as HttpTypes,S as MethodTypes,F as PageLifeType,U as PerTypes,G as PlatformTypes,H as RouteTypes,E as SDK,C as StoreKeyType,P as StoreType,R as TAG,B as WxBreadcrumbTypes};
{
"name": "@heimdallr-sdk/types",
"version": "0.0.16",
"version": "0.0.17",
"description": "@heimdallr-sdk/types",

@@ -25,5 +25,5 @@ "license": "MIT",

"scripts": {
"build": "rimraf esm && tsc -p tsconfig.json"
},
"gitHead": "cd187687df2e4fe32756115e220be5d72c4152b0"
}
"dev": "rimraf esm && rollup -c -w",
"build": "rimraf esm && rollup -c"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc