UNPKG

@uoa/error-pages

Version:

University of Auckland error page library for intercepting client/server errors & redirecting to custom error pages.

172 lines (163 loc) 4.7 kB
import * as i0 from '@angular/core'; import { EnvironmentProviders } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; declare class UoaErrorsConfig { clientErrorCodes: number[]; serverErrorCodes: number[]; showErrorAsToast: boolean; returnUrl: string; returnButtonText: string; ErrorPageContent: { ErrorCode400: { title: string; content: string; }; ErrorCode401: { title: string; content: string; }; ErrorCode403: { title: string; content: string; }; ErrorCode404: { title: string; content: string; }; ErrorCode405: { title: string; content: string; }; ErrorCode406: { title: string; content: string; }; ErrorCode407: { title: string; content: string; }; ErrorCode408: { title: string; content: string; }; ErrorCode409: { title: string; content: string; }; ErrorCode410: { title: string; content: string; }; ErrorCode411: { title: string; content: string; }; ErrorCode412: { title: string; content: string; }; ErrorCode413: { title: string; content: string; }; ErrorCode414: { title: string; content: string; }; ErrorCode415: { title: string; content: string; }; ErrorCode418: { title: string; content: string; }; ErrorCode429: { title: string; content: string; }; ErrorCode431: { title: string; content: string; }; ErrorCode500: { title: string; content: string; }; ErrorCode501: { title: string; content: string; }; ErrorCode502: { title: string; content: string; }; ErrorCode503: { title: string; content: string; }; ErrorCode504: { title: string; content: string; }; ErrorCode505: { title: string; content: string; }; ErrorCode506: { title: string; content: string; }; ErrorCodeDefault: { title: string; content: string; }; }; static ɵfac: i0.ɵɵFactoryDeclaration<UoaErrorsConfig, never>; static ɵprov: i0.ɵɵInjectableDeclaration<UoaErrorsConfig>; } interface ErrorContentDto { title: string; content: string; } interface ByPassDto { url: string; status: number[]; } declare class BypassErrorService { private _serverErrorbypassList; private _clientErrorbypassList; constructor(); private _getObjectInBypassList; private _removeObjectFromBypassList; bypassError(urlString: string, statusCodes: number[]): void; private _addToServerErrorBypassList; getObjectServerErrorBypassList(url: string): ByPassDto; removeErrorServerErrorBypassList(bypassObject: ByPassDto): void; private _addToClientErrorBypassList; getObjectClientErrorBypassList(url: string): ByPassDto; removeObjectClientErrorBypassList(bypassObject: ByPassDto): void; static ɵfac: i0.ɵɵFactoryDeclaration<BypassErrorService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<BypassErrorService>; } declare abstract class ErrorToastService { abstract createToast(toastObject: ErrorContentDto): void; static ɵfac: i0.ɵɵFactoryDeclaration<ErrorToastService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ErrorToastService>; } declare function provideErrorPages(): EnvironmentProviders; declare class ErrorPage { private _route; private _errorConfigService; private _errorCodes; errorCode: string; errorObject: ErrorContentDto; returnUrl: string; returnButtonText: string; constructor(_route: ActivatedRoute, _errorConfigService: UoaErrorsConfig); static ɵfac: i0.ɵɵFactoryDeclaration<ErrorPage, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ErrorPage, "lib-error", never, {}, {}, never, never, true, never>; } export { BypassErrorService, ErrorPage, ErrorToastService, UoaErrorsConfig, provideErrorPages }; export type { ErrorContentDto }; //# sourceMappingURL=index.d.ts.map