UNPKG

imng-application-insights-ngrx

Version:

Small library to facilitate the integration of Application Insights with an NGRX metaReducer.

70 lines (65 loc) 3.48 kB
import * as i0 from '@angular/core'; import { ModuleWithProviders, InjectionToken } from '@angular/core'; import { IConfiguration, ApplicationInsights } from '@microsoft/applicationinsights-web'; import * as i1 from '@angular/common'; import * as _ngrx_effects from '@ngrx/effects'; import { Actions } from '@ngrx/effects'; import { Action } from '@ngrx/store'; import { Observable } from 'rxjs'; declare class ImngAppInsightsNgrxModule { static forRoot(appInsightsConfiguration: IConfiguration): ModuleWithProviders<ImngAppInsightsNgrxModule>; static ɵfac: i0.ɵɵFactoryDeclaration<ImngAppInsightsNgrxModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ImngAppInsightsNgrxModule, never, [typeof i1.CommonModule], never>; static ɵinj: i0.ɵɵInjectorDeclaration<ImngAppInsightsNgrxModule>; } declare const APP_INSIGHTS_CONFIG: InjectionToken<unknown>; declare class AppInsightsMonitoringService { readonly appInsightsConfig: IConfiguration; readonly appInsights: ApplicationInsights; constructor(); setAuthenticatedUserContext(userId: string): void; clearAuthenticatedUserContext(): void; logException(exception: Error, properties?: never, measurements?: { [key: string]: number; }): void; logEvent(name: string, properties?: never, measurements?: { [key: string]: number; }): void; trackEventsEffect(actions$: Actions, logPayload: boolean): Observable<Action>; trackErrorsEffect(actions$: Actions): Observable<Action>; static ɵfac: i0.ɵɵFactoryDeclaration<AppInsightsMonitoringService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AppInsightsMonitoringService>; } declare abstract class AppInsightsBaseffects { protected actions$: Actions; protected monitor: AppInsightsMonitoringService; constructor(actions$: Actions, monitor: AppInsightsMonitoringService); protected readonly noDispatch: { dispatch: boolean; }; protected getTrackLoginPipe(): Observable<Action>; protected getTrackLogoutPipe(): Observable<Action>; protected getTrackExceptionsPipe(): Observable<Action>; } declare class AppInsightsVerboseRootEffects extends AppInsightsBaseffects { trackEvents: Observable<{ type: string; payload?: never; }> & _ngrx_effects.CreateEffectMetadata; trackLogin: Observable<Action<string>> & _ngrx_effects.CreateEffectMetadata; trackLogout: Observable<Action<string>> & _ngrx_effects.CreateEffectMetadata; trackExceptions: Observable<Action<string>> & _ngrx_effects.CreateEffectMetadata; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration<AppInsightsVerboseRootEffects, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AppInsightsVerboseRootEffects>; } declare class AppInsightsInfoRootEffects extends AppInsightsBaseffects { trackEvents: Observable<Action<string>> & _ngrx_effects.CreateEffectMetadata; trackLogin: Observable<Action<string>> & _ngrx_effects.CreateEffectMetadata; trackLogout: Observable<Action<string>> & _ngrx_effects.CreateEffectMetadata; trackExceptions: Observable<Action<string>> & _ngrx_effects.CreateEffectMetadata; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration<AppInsightsInfoRootEffects, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AppInsightsInfoRootEffects>; } export { APP_INSIGHTS_CONFIG, AppInsightsInfoRootEffects, AppInsightsMonitoringService, AppInsightsVerboseRootEffects, ImngAppInsightsNgrxModule };