export declare class ExceptionModel { time: Date; message: any; type: string; url: string; eventId: string; constructor(type: string, message: any, eventId?: string); } export declare enum ErrorType { /** 未分類的錯誤 */ Msic = "Msic", /** 無狀態的錯誤 */ NoStatus = "NoStatus", /** 500 錯誤 */ Exception = "Exception", /** 400 未知的錯誤 */ Unknown = "Unknown", /** 400 商業邏輯錯誤 */ DidBadRequest = "DidBadRequest", /** 400 後端 Model 驗證錯誤 */ InvalidModelState = "InvalidModelState" } /** Msic Error Code */ export declare enum MsicErrorCode { /** 逾時 */ NetworkTimeout = 0, /** 離線 */ ClientNetworkOffline = 1, /** ServerCORS */ ServerCORSNotEnabled = 2, /** 未預期的錯誤 */ Unknown = 3 } /** 錯誤訊息 model */ export interface ErrorMessageModel { /** 類型 */ type: ErrorType; /** 多重商業邏輯錯誤 */ codes: Array; /** 進階商業邏輯錯誤 */ moreErrors?: Array; /** 錯誤代碼(全域錯誤處理,商業邏輯並不會有此類型) */ code: string | MsicErrorCode; /** 錯誤訊息(全域錯誤處理,商業邏輯並不會有此類型) */ message: string; /** event ID,可以透過ID查詢Log得知錯誤原因*/ errorId?: string; } /** 額外的錯誤訊息 */ export interface ErrorExModel { /** 錯誤代碼 */ error: string; expandoObject: any; } /** 帶有額外資訊的警告 */ export interface WarningExModel { /** 警告代碼 */ warning: string; /** 額外資訊 */ expandoObject: any; } export interface FormDirtyConfirm { /** 實作 Form 是否 Dirty 的判斷,設定為 true,離開前會出現提示 */ isFormDirty(): boolean; } export interface UofCanUnload { /** 此 function 提供給 before-unload.decorator.ts 使用 */ uofCanUnload(): boolean; } /** * AES加密的key & iv model * - * key & iv若會用來跟後端互相傳遞,需做RSA加密 */ export interface AesModel { /** aes的key */ encAesKey: string; /** aes的iv */ encAesIv: string; }