@ukpc-lib/react 0.9.2 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +0,0 @@
1
- import React, { Component, ErrorInfo, ReactNode } from 'react';
2
- interface ErrorBoundaryProps {
3
- children: ReactNode;
4
- }
5
- export declare class ErrorBoundary extends Component<ErrorBoundaryProps> {
6
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
7
- render(): React.ReactNode;
8
- }
9
- export {};
@@ -1 +0,0 @@
1
- export declare function initializeAxiosErrorInterceptor(originalRequest: any, error: any): void;
@@ -1,6 +0,0 @@
1
- type GlobalErrorHandlerProps = {
2
- app: string;
3
- lokiUrl: string;
4
- };
5
- export declare const initializeGlobalErrorHandling: (props: GlobalErrorHandlerProps) => void;
6
- export {};
@@ -1,13 +0,0 @@
1
- import { initializeAxiosErrorInterceptor } from './axiosErrorHandler';
2
- import { ErrorBoundary } from './ErrorBoundary';
3
- import { LogToLokiParams } from './logToLoki';
4
- export type { LogToLokiParams };
5
- export declare const ErrorManager: {
6
- ErrorBoundary: typeof ErrorBoundary;
7
- initializeGlobalErrorHandling: (props: {
8
- app: string;
9
- lokiUrl: string;
10
- }) => void;
11
- initializeAxiosErrorInterceptor: typeof initializeAxiosErrorInterceptor;
12
- logToLoki: ({ app, level, message, context, exception, }: LogToLokiParams) => Promise<void>;
13
- };
@@ -1,22 +0,0 @@
1
- type LogLevel = 'info' | 'warn' | 'error' | 'debug';
2
- interface LogContext {
3
- userId?: string;
4
- module?: string;
5
- functionName?: string;
6
- request?: any;
7
- response?: any;
8
- }
9
- interface ExceptionDetails {
10
- name: string;
11
- message: string;
12
- stackTrace?: string | null;
13
- }
14
- export interface LogToLokiParams {
15
- app?: string;
16
- level: LogLevel;
17
- message: string;
18
- context?: LogContext;
19
- exception?: ExceptionDetails;
20
- }
21
- export declare const logToLoki: ({ app, level, message, context, exception, }: LogToLokiParams) => Promise<void>;
22
- export {};