import { HttpInterceptor, HttpRequest, HttpEvent, HttpHandler } from '@angular/common/http'; import { Observable } from 'rxjs'; import { RhUserSessionDto, RhSafeAny } from 'rh-base/model'; import { RhLogger } from '../log/logger'; import { RhAppConfigService } from '../config/app-config.service'; import { Router } from '@angular/router'; import { NzNotificationService } from 'ng-zorro-antd/notification'; import { NzModalService } from 'ng-zorro-antd/modal'; import * as i0 from "@angular/core"; /** 默认拦截器 * @description 会针对接口调用添加用户信息和拦截接口错误 */ export declare class RhDefaultInterceptor implements HttpInterceptor { logSer: RhLogger; protected notification: NzNotificationService; appConfigSer: RhAppConfigService; modalSer: NzModalService; router: Router; /** 设定只触发一次alert */ isAlertActive: boolean; promptDebounceFn: import("lodash").DebouncedFunc<(...args: any) => void>; constructor(logSer: RhLogger, notification: NzNotificationService, appConfigSer: RhAppConfigService, modalSer: NzModalService, router: Router); intercept(req: HttpRequest, next: HttpHandler): Observable>; /** 使用用户信息作为授权信息添加到请求头中 */ /** 处理返回的请求状态码 * @param req 请求 * @param next http处理器 * @param user 用户信息 * @param ignoreBubble 是否禁止向上冒泡,默认为`false`,一般用于用户自行处理错误,而不用冒泡再使用默认拦截器处理 */ protected statusCodeHandler(req: HttpRequest, next: HttpHandler, user: RhUserSessionDto, ignoreBubble?: boolean): Observable>; protected noticeErrorMsg(msg: string, statusCode: number, duration?: number, width?: number): void; protected navigateToLoginWindowWhenCheckError(user: RhUserSessionDto, req: HttpRequest, event: HttpEvent): void; protected logout(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }