logrocket
Advanced tools
Comparing version 0.6.3 to 0.6.4-rc1
@@ -0,1 +1,8 @@ | ||
### 0.6.4 | ||
* Improved Typescript definition file: | ||
- added inline documentation | ||
- fixed user traits type | ||
- removed deprecated methods | ||
- added type for captureMessage and captureException | ||
### 0.6.3 | ||
@@ -2,0 +9,0 @@ |
@@ -6,3 +6,3 @@ declare var LogRocket: LR.LogRocket; | ||
declare module LR { | ||
interface Options { | ||
interface IOptions { | ||
release?: string, | ||
@@ -29,13 +29,30 @@ console?: { | ||
interface UserTraits { | ||
[propName: string]: string, | ||
interface IUserTraits { | ||
[propName: string]: string | number | boolean, | ||
} | ||
interface ReduxMiddlewareOptions { | ||
interface IReduxMiddlewareOptions { | ||
/** Sanitizer function to scrub redux state */ | ||
stateSanitizer?(state: Object): Object, | ||
/** Sanitizer function to scrub or ignore specific redux actions */ | ||
actionSanitizer?(action: Object): null | Object, | ||
} | ||
interface ICaptureOptions { | ||
tags?: { | ||
[tagName: string]: string | number | boolean, | ||
}, | ||
extra?: { | ||
[tagName: string]: string | number | boolean, | ||
}, | ||
} | ||
interface LogRocket { | ||
init(appID: string, options?: Options): void; | ||
/** Configures LogRocket */ | ||
init( | ||
/** Your LogRocket appID (find it in LogRocket settings) */ | ||
appID: string, | ||
/** Optional configuration to change what LogRocket records */ | ||
options?: IOptions | ||
): void; | ||
@@ -49,13 +66,41 @@ // logging functions | ||
// getters | ||
version(): string; | ||
/** Identify a user with the current session, with optional user traits */ | ||
identify(uid: string, traits?: IUserTraits): void; | ||
// other functions | ||
identify(uid: string, traits?: UserTraits): void; | ||
reduxMiddleware(options?: ReduxMiddlewareOptions): any; | ||
/** Returns a redux middleware which adds redux logs to LogRocket sessions */ | ||
reduxMiddleware( | ||
/** Optional sanitizer configuration */ | ||
options?: IReduxMiddlewareOptions | ||
): any; | ||
/** Send an event to LogRocket */ | ||
track(eventName: string): void; | ||
getSessionURL(callback: (sessionURL: string) => void): void; | ||
/** Start a new session and end the current one */ | ||
startNewSession(): void; | ||
sessionURL: string; | ||
/** Get the current session URL in a callback function */ | ||
getSessionURL( | ||
/** Callback to get session URL */ | ||
callback: (sessionURL: string) => void | ||
): void; | ||
/** Current session URL if LogRocket has been loaded, null otherwise */ | ||
sessionURL: string | null; | ||
/** Manually report exceptions to LogRocket */ | ||
captureMessage( | ||
/** identifier */ | ||
message: string, | ||
/** error metadata */ | ||
options?: ICaptureOptions | ||
) | ||
/** Manually report string errors to LogRocket */ | ||
captureException( | ||
/** exception identifier */ | ||
exception: string, | ||
/** exception metadata */ | ||
options?: ICaptureOptions | ||
) | ||
} | ||
} |
{ | ||
"name": "logrocket", | ||
"version": "0.6.3", | ||
"version": "0.6.4-rc1", | ||
"description": "JavaScript SDK for [LogRocket](https://logrocket.com/)", | ||
@@ -5,0 +5,0 @@ "main": "dist/build.umd.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89259
2327