mftsccs-browser 2.1.38-beta → 2.1.40-beta
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.
- package/dist/main.bundle.js +1 -1
- package/dist/serviceWorker.bundle.js +1 -1
- package/dist/types/Anomaly/anomaly.d.ts +1 -0
- package/dist/types/DataStructures/BaseUrl.d.ts +1 -0
- package/dist/types/Middleware/ErrorHandling.d.ts +0 -19
- package/dist/types/Middleware/logger.service.d.ts +16 -4
- package/dist/types/Services/Common/ErrorPosting.d.ts +7 -0
- package/dist/types/Services/Security/GetRequestHeader.d.ts +2 -10
- package/dist/types/app.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Handles errors in function execution by logging relevant details.
|
|
3
|
-
* @param error The error object caught during execution.
|
|
4
|
-
* @param data Additional context or data to log with the error.
|
|
5
|
-
*/
|
|
6
|
-
export declare function HandleFunctionError(error: any, data?: any): void;
|
|
7
|
-
/**
|
|
8
|
-
* Handles network errors by logging request and response details.
|
|
9
|
-
* Extend this to handle network-specific errors in `fetch` or `XMLHttpRequest`.
|
|
10
|
-
* @param request Details of the network request.
|
|
11
|
-
* @param error The error object or response details.
|
|
12
|
-
*/
|
|
13
|
-
export declare function HandleNetworkError(request: any, error: any): void;
|
|
14
|
-
/**
|
|
15
|
-
* Handles errors during DOM or event interactions by logging event-specific details.
|
|
16
|
-
* @param event The event object where the error occurred.
|
|
17
|
-
* @param error The error object caught during execution.
|
|
18
|
-
*/
|
|
19
|
-
export declare function HandleEventError(event: Event, error: any): void;
|
|
@@ -32,11 +32,13 @@ export declare class Logger {
|
|
|
32
32
|
*/
|
|
33
33
|
static formatLogData(level: string, message: string, data?: LogData): void;
|
|
34
34
|
static log(level: 'INFO' | 'ERROR' | 'DEBUG' | 'WARNING', message: string, data?: any | null): void;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Updates log data with execution details.
|
|
37
|
+
* @param logData The log data object to be updated.
|
|
38
|
+
*/
|
|
39
|
+
static logUpdate(logData: LogData): void;
|
|
40
|
+
static logfunction(myFunction: string, ...args: any[]): void;
|
|
37
41
|
static logError(startTime: number, userId: string | number, operationType?: "read" | "create" | "update" | "delete" | "search", requestFrom?: string, requestIP?: string, responseStatus?: number, responseData?: any, functionName?: string, functionParameters?: any[], userAgent?: string, conceptsUsed?: string[]): void;
|
|
38
|
-
static logWarning(startTime: number, userId: string | number, operationType?: "read" | "create" | "update" | "delete" | "search", requestFrom?: string, requestIP?: string, responseStatus?: number, responseData?: any, functionName?: string, functionParameters?: any[], userAgent?: string, conceptsUsed?: string[]): void;
|
|
39
|
-
static logDebug(startTime: number, userId: string | number, operationType?: "read" | "create" | "update" | "delete" | "search", requestFrom?: string, requestIP?: string, responseStatus?: number, responseData?: any, functionName?: string, functionParameters?: any[], userAgent?: string, conceptsUsed?: string[]): void;
|
|
40
42
|
static logApplication(type: string, message: string, data?: any): void;
|
|
41
43
|
/**
|
|
42
44
|
* Helper method to send logs to the server.
|
|
@@ -82,6 +84,11 @@ export interface LogData {
|
|
|
82
84
|
* @example "150ms"
|
|
83
85
|
*/
|
|
84
86
|
responseTime?: string;
|
|
87
|
+
/**
|
|
88
|
+
* The start and end time
|
|
89
|
+
*/
|
|
90
|
+
startTime: number;
|
|
91
|
+
endTime?: number;
|
|
85
92
|
/**
|
|
86
93
|
* The size of the response payload.
|
|
87
94
|
* @example "15KB", "1.2MB"
|
|
@@ -97,6 +104,11 @@ export interface LogData {
|
|
|
97
104
|
*/
|
|
98
105
|
functionName?: string;
|
|
99
106
|
applicationId?: number;
|
|
107
|
+
/**
|
|
108
|
+
* The error return
|
|
109
|
+
* @example function could not execute
|
|
110
|
+
*/
|
|
111
|
+
errorMessage?: string;
|
|
100
112
|
/**
|
|
101
113
|
* The parameters used in the function.
|
|
102
114
|
* This should include all inputs to the function.
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export declare function HandleHttpError(response: Response): void;
|
|
2
2
|
export declare function HandleHttpErrorObject(response: Response, output?: any): void;
|
|
3
3
|
export declare function HandleInternalError(error: any, url?: string): void;
|
|
4
|
+
/**
|
|
5
|
+
* Handle errors inside package functions
|
|
6
|
+
* @updateLog existing function log at start
|
|
7
|
+
* @param functionName name of the function that encountered the error
|
|
8
|
+
* @param error error appeared
|
|
9
|
+
*/
|
|
10
|
+
export declare function UpdatePackageLogWithError(logData: any, functionName: string, error: any): void;
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export declare function GetRequestHeader(contentType?: string, Accept?: string): {
|
|
2
|
-
|
|
3
|
-
Authorization: string;
|
|
4
|
-
Accept: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function GetRequestHeaderWithAuthorization(contentType?: string, token?: string, Accept?: string): {
|
|
7
|
-
'Content-Type': string;
|
|
8
|
-
Authorization: string;
|
|
9
|
-
Accept: string;
|
|
10
|
-
};
|
|
1
|
+
export declare function GetRequestHeader(contentType?: string, Accept?: string): {};
|
|
2
|
+
export declare function GetRequestHeaderWithAuthorization(contentType?: string, token?: string, Accept?: string): {};
|
|
11
3
|
export declare function GetOnlyTokenHeader(): Headers;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -159,6 +159,8 @@ declare function init(url?: string, aiurl?: string, accessToken?: string, nodeUr
|
|
|
159
159
|
logPackage?: boolean;
|
|
160
160
|
accessTracker?: boolean;
|
|
161
161
|
isTest?: boolean;
|
|
162
|
+
}, parameters?: {
|
|
163
|
+
logserver?: string;
|
|
162
164
|
}): Promise<true | undefined>;
|
|
163
165
|
/**
|
|
164
166
|
* Method to send message to the service worker from main thread
|