@arex95/vue-core 1.0.8 → 1.1.0
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/composables/auth/useAuth.d.ts +15 -18
- package/dist/composables/monitoring/useApiActivity.d.ts +5 -0
- package/dist/composables/monitoring/useUserActivity.d.ts +15 -0
- package/dist/config/axios/axiosInstance.d.ts +1 -1
- package/dist/config/global/endpointsConfig.d.ts +14 -17
- package/dist/config/global/sessionConfig.d.ts +27 -0
- package/dist/config/global/tokenConfig.d.ts +27 -11
- package/dist/enums/breakpointsEnums.d.ts +29 -0
- package/dist/enums/contentTypesEnums.d.ts +56 -0
- package/dist/enums/errorsEnums.d.ts +68 -0
- package/dist/enums/fileTypesEnums.d.ts +61 -0
- package/dist/enums/httpExceptionsEnums.d.ts +71 -0
- package/dist/enums/index.d.ts +7 -0
- package/dist/enums/keyCodesEnums.d.ts +62 -0
- package/dist/enums/storageEnums.d.ts +66 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +480 -190
- package/dist/rest/RestStd.d.ts +1 -1
- package/dist/types/AuthConfig.d.ts +5 -0
- package/dist/types/EndpointsConfig.d.ts +5 -0
- package/dist/types/SessionConfig.d.ts +3 -0
- package/dist/types/TokenConfig.d.ts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +13 -6
|
@@ -1,27 +1,24 @@
|
|
|
1
|
+
import { AuthConfig } from "@/types";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
3
|
+
* Configures authentication settings globally.
|
|
4
|
+
* Allows modifying default endpoints and storage keys.
|
|
4
5
|
*
|
|
5
|
-
* @param {Object} options -
|
|
6
|
-
* @param {Object} options.endpoints -
|
|
7
|
-
* @param {Object} options.storageKeys -
|
|
6
|
+
* @param {Object} options - Custom configuration options.
|
|
7
|
+
* @param {Object} [options.endpoints] - Custom endpoints for login, refresh, and logout.
|
|
8
|
+
* @param {Object} [options.storageKeys] - Custom storage keys for tokens.
|
|
8
9
|
*/
|
|
9
|
-
export declare function configureAuth(options:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
refreshToken?: string;
|
|
18
|
-
};
|
|
19
|
-
}): void;
|
|
20
|
-
export declare function useAuth(secretKey: string): {
|
|
10
|
+
export declare function configureAuth(options: AuthConfig): void;
|
|
11
|
+
/**
|
|
12
|
+
* Provides authentication utilities.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} [secretKey=getSecretKey()] - Encryption key.
|
|
15
|
+
* @returns {Object} Auth composable methods and properties.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useAuth(secretKey?: string): {
|
|
21
18
|
jwt: import("vue").ComputedRef<string | null>;
|
|
22
19
|
refresh_token: import("vue").ComputedRef<string | null>;
|
|
23
20
|
tokenExpiry: import("vue").ComputedRef<number | null>;
|
|
24
|
-
login: (params
|
|
21
|
+
login: (params: {} | undefined, isRememberMe: boolean) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
25
22
|
refresh: () => Promise<import("axios").AxiosResponse<any, any> | undefined>;
|
|
26
23
|
logout: (params?: {}) => Promise<void>;
|
|
27
24
|
cleanStorage: () => Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook para detectar la inactividad del usuario.
|
|
3
|
+
* @param timeout - Tiempo en milisegundos antes de considerar al usuario inactivo. Por defecto es 5 minutos.
|
|
4
|
+
* @param useDefaultEvents - Si se deben usar los eventos por defecto (mousemove, keydown, scroll, touchstart).
|
|
5
|
+
* @param customEvents - Lista personalizada de eventos para detectar actividad.
|
|
6
|
+
* @returns Un objeto con el estado de inactividad, funciones para controlar el temporizador y registrar callbacks.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useUserInactivity(timeout?: number, useDefaultEvents?: boolean, customEvents?: Array<keyof WindowEventMap>): {
|
|
9
|
+
isInactive: import("vue").Ref<boolean, boolean>;
|
|
10
|
+
startInactivityTimer: () => void;
|
|
11
|
+
stopInactivityTimer: () => void;
|
|
12
|
+
resetInactivityTimer: () => void;
|
|
13
|
+
onTimeout: (callback: () => void) => void;
|
|
14
|
+
removeTimeoutCallback: (callback: () => void) => void;
|
|
15
|
+
};
|
|
@@ -3,7 +3,7 @@ import { AxiosInstance } from 'axios';
|
|
|
3
3
|
* Configures the global Axios instance with a base URL.
|
|
4
4
|
* @param {string} baseURL - The base URL for the Axios instance.
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const configAxios: (baseURL: string) => void;
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves the configured Axios instance.
|
|
9
9
|
* @returns {AxiosService} The configured Axios instance.
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
+
import { EndpointsConfig } from "@/types";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
3
|
+
* Configures authentication endpoint URLs globally.
|
|
4
|
+
* This function freezes the object to prevent further modifications.
|
|
4
5
|
*
|
|
5
|
-
* @param {string} loginEndpoint - URL
|
|
6
|
-
* @param {string} refreshEndpoint - URL
|
|
7
|
-
* @param {string} logoutEndpoint - URL
|
|
6
|
+
* @param {string} loginEndpoint - URL of the login endpoint.
|
|
7
|
+
* @param {string} refreshEndpoint - URL of the refresh token endpoint.
|
|
8
|
+
* @param {string} logoutEndpoint - URL of the logout endpoint.
|
|
8
9
|
*
|
|
9
|
-
* @returns {void}
|
|
10
|
+
* @returns {void} Does not return anything but freezes the endpoint configuration object.
|
|
10
11
|
*/
|
|
11
|
-
export declare function
|
|
12
|
+
export declare function configEndpoints(loginEndpoint: string, refreshEndpoint: string, logoutEndpoint: string): void;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Retrieves the configured authentication endpoint URLs.
|
|
14
15
|
*
|
|
15
|
-
* @returns {
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
16
|
+
* @returns {EndpointsConfig} An object containing the configured authentication endpoints.
|
|
17
|
+
* @property {string} LOGIN - URL of the login endpoint.
|
|
18
|
+
* @property {string} REFRESH - URL of the refresh token endpoint.
|
|
19
|
+
* @property {string} LOGOUT - URL of the logout endpoint.
|
|
19
20
|
*/
|
|
20
|
-
export declare function getEndpointsConfig():
|
|
21
|
-
LOGIN: string;
|
|
22
|
-
REFRESH: string;
|
|
23
|
-
LOGOUT: string;
|
|
24
|
-
};
|
|
21
|
+
export declare function getEndpointsConfig(): EndpointsConfig;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configures the session identifier for the active browser session.
|
|
3
|
+
* Once configured, it cannot be modified.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} sessionIdParam - The unique session identifier.
|
|
6
|
+
*
|
|
7
|
+
* @returns {void} Does not return anything, but freezes the session configuration.
|
|
8
|
+
*/
|
|
9
|
+
export declare function configSession(sessionIdParam: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves the current session identifier configuration.
|
|
12
|
+
*
|
|
13
|
+
* @returns {string} The unique session identifier.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getSessionConfig(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Generates a new UUID for the current session.
|
|
18
|
+
*
|
|
19
|
+
* @returns {void} Does not return anything, but updates the session identifier.
|
|
20
|
+
*/
|
|
21
|
+
export declare function regenerateSessionId(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the current session identifier.
|
|
24
|
+
*
|
|
25
|
+
* @returns {string} The unique session identifier.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getSessionId(): string;
|
|
@@ -1,15 +1,31 @@
|
|
|
1
|
+
import { TokenConfig } from "@/types";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @param {string}
|
|
3
|
+
* Configures the global keys for access and refresh tokens.
|
|
4
|
+
* Once set, they cannot be modified.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} accessTokenKey - The name of the access token key.
|
|
7
|
+
* @param {string} refreshTokenKey - The name of the refresh token key.
|
|
8
|
+
*
|
|
9
|
+
* @returns {void} Does not return anything but freezes the token configuration object.
|
|
6
10
|
*/
|
|
7
|
-
export declare function
|
|
11
|
+
export declare function configTokens(accessTokenKey: string, refreshTokenKey: string): void;
|
|
8
12
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
13
|
+
* Retrieves the current token configuration.
|
|
14
|
+
*
|
|
15
|
+
* @returns {TokenConfig} The configuration of the access and refresh token keys.
|
|
11
16
|
*/
|
|
12
|
-
export declare function getTokenConfig():
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
export declare function getTokenConfig(): TokenConfig;
|
|
18
|
+
/**
|
|
19
|
+
* Sets the secret key for use in authentication.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} key - The new secret key.
|
|
22
|
+
*
|
|
23
|
+
* @returns {void} Does not return anything, but updates the secret key.
|
|
24
|
+
*/
|
|
25
|
+
export declare function setSecretKey(key: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves the current secret key.
|
|
28
|
+
*
|
|
29
|
+
* @returns {string} The configured secret key.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getSecretKey(): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum defining available screen sizes.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ScreenSize {
|
|
5
|
+
XS = "XS",
|
|
6
|
+
SM = "SM",
|
|
7
|
+
MD = "MD",
|
|
8
|
+
LG = "LG",
|
|
9
|
+
XL = "XL",
|
|
10
|
+
XXL = "XXL"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Enum defining breakpoints for design based on screen width.
|
|
14
|
+
* Values are in pixels.
|
|
15
|
+
*/
|
|
16
|
+
export declare enum ScreenBreakpoint {
|
|
17
|
+
XS = 480,
|
|
18
|
+
SM = 576,
|
|
19
|
+
MD = 768,
|
|
20
|
+
LG = 992,
|
|
21
|
+
XL = 1200,
|
|
22
|
+
XXL = 1600
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Map that associates each screen size defined in `ScreenSize` with its corresponding pixel value from `ScreenBreakpoint`.
|
|
26
|
+
* @type {Map<ScreenSize, number>}
|
|
27
|
+
*/
|
|
28
|
+
declare const screenMap: Map<ScreenSize, number>;
|
|
29
|
+
export { screenMap };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing different content types for HTTP headers.
|
|
3
|
+
* @readonly
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ContentTypeEnum {
|
|
6
|
+
/**
|
|
7
|
+
* Content type for JSON.
|
|
8
|
+
* @constant
|
|
9
|
+
*/
|
|
10
|
+
JSON = "application/json;charset=UTF-8",
|
|
11
|
+
/**
|
|
12
|
+
* Content type for URL-encoded form data.
|
|
13
|
+
* @constant
|
|
14
|
+
*/
|
|
15
|
+
FORM_URLENCODED = "application/x-www-form-urlencoded;charset=UTF-8",
|
|
16
|
+
/**
|
|
17
|
+
* Content type for multipart form data with file uploads.
|
|
18
|
+
* @constant
|
|
19
|
+
*/
|
|
20
|
+
FORM_DATA = "multipart/form-data;charset=UTF-8",
|
|
21
|
+
/**
|
|
22
|
+
* Content type for plain text.
|
|
23
|
+
* @constant
|
|
24
|
+
*/
|
|
25
|
+
TEXT_PLAIN = "text/plain;charset=UTF-8",
|
|
26
|
+
/**
|
|
27
|
+
* Content type for XML data.
|
|
28
|
+
* @constant
|
|
29
|
+
*/
|
|
30
|
+
XML = "application/xml;charset=UTF-8",
|
|
31
|
+
/**
|
|
32
|
+
* Content type for HTML data.
|
|
33
|
+
* @constant
|
|
34
|
+
*/
|
|
35
|
+
HTML = "text/html;charset=UTF-8",
|
|
36
|
+
/**
|
|
37
|
+
* Content type for JavaScript files.
|
|
38
|
+
* @constant
|
|
39
|
+
*/
|
|
40
|
+
JS = "application/javascript;charset=UTF-8",
|
|
41
|
+
/**
|
|
42
|
+
* Content type for CSV files.
|
|
43
|
+
* @constant
|
|
44
|
+
*/
|
|
45
|
+
CSV = "text/csv;charset=UTF-8",
|
|
46
|
+
/**
|
|
47
|
+
* Content type for PDF files.
|
|
48
|
+
* @constant
|
|
49
|
+
*/
|
|
50
|
+
PDF = "application/pdf",
|
|
51
|
+
/**
|
|
52
|
+
* Content type for octet-stream (binary data).
|
|
53
|
+
* @constant
|
|
54
|
+
*/
|
|
55
|
+
OCTET_STREAM = "application/octet-stream"
|
|
56
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing different types of errors.
|
|
3
|
+
* @readonly
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ErrorEnum {
|
|
6
|
+
WARNING = "warning",
|
|
7
|
+
ERROR = "error",
|
|
8
|
+
CRITICAL = "critical",
|
|
9
|
+
VALIDATION = "validation",
|
|
10
|
+
COMPONENT = "component",
|
|
11
|
+
NETWORK = "network",
|
|
12
|
+
AUTHENTICATION = "authentication",
|
|
13
|
+
RUNTIME = "runtime",
|
|
14
|
+
TYPE = "type",
|
|
15
|
+
REFERENCE = "reference",
|
|
16
|
+
SYNTAX = "syntax",
|
|
17
|
+
RANGE = "range",
|
|
18
|
+
EVAL = "eval",
|
|
19
|
+
URI = "uri"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Enum representing different error messages.
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
export declare enum ErrorMessages {
|
|
26
|
+
WARNING = "Algo no est\u00E1 del todo bien. Verifica y vuelve a intentar.",
|
|
27
|
+
ERROR = "Ocurri\u00F3 un error inesperado.",
|
|
28
|
+
CRITICAL = "Error cr\u00EDtico. Contacta al soporte t\u00E9cnico.",
|
|
29
|
+
VALIDATION = "Hay errores en el formulario. Revisa los campos.",
|
|
30
|
+
COMPONENT = "Error en la carga del componente. Intenta recargar.",
|
|
31
|
+
NETWORK = "Problema de conexi\u00F3n. Verifica tu internet.",
|
|
32
|
+
AUTHENTICATION = "No tienes permisos para realizar esta acci\u00F3n.",
|
|
33
|
+
RUNTIME = "Error de ejecuci\u00F3n. Intenta nuevamente.",
|
|
34
|
+
TYPE = "Tipo de error no identificado.",
|
|
35
|
+
REFERENCE = "Referencia no v\u00E1lida.",
|
|
36
|
+
SYNTAX = "Error de sintaxis en el c\u00F3digo.",
|
|
37
|
+
RANGE = "Error en el rango de valores.",
|
|
38
|
+
EVAL = "Error en la evaluaci\u00F3n.",
|
|
39
|
+
URI = "URI no v\u00E1lida."
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Enum representing different error styles.
|
|
43
|
+
* @readonly
|
|
44
|
+
*/
|
|
45
|
+
export declare enum ErrorStyles {
|
|
46
|
+
WARNING = "color: orange; font-weight: bold;",
|
|
47
|
+
ERROR = "color: red; font-weight: bold;",
|
|
48
|
+
CRITICAL = "color: white; background-color: red; font-weight: bold; padding: 2px;",
|
|
49
|
+
VALIDATION = "color: blue; font-weight: bold;",
|
|
50
|
+
COMPONENT = "color: purple; font-weight: bold;",
|
|
51
|
+
NETWORK = "color: cyan; font-weight: bold;",
|
|
52
|
+
AUTHENTICATION = "color: brown; font-weight: bold;",
|
|
53
|
+
RUNTIME = "color: darkred; font-weight: bold;",
|
|
54
|
+
TYPE = "color: gray; font-weight: bold;",
|
|
55
|
+
REFERENCE = "color: darkorange; font-weight: bold;",
|
|
56
|
+
SYNTAX = "color: darkblue; font-weight: bold;",
|
|
57
|
+
RANGE = "color: darkgreen; font-weight: bold;",
|
|
58
|
+
EVAL = "color: darkviolet; font-weight: bold;",
|
|
59
|
+
URI = "color: darkcyan; font-weight: bold;"
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A record mapping ErrorEnum to their corresponding error messages.
|
|
63
|
+
*/
|
|
64
|
+
export declare const ERROR_MESSAGES: Record<ErrorEnum, string>;
|
|
65
|
+
/**
|
|
66
|
+
* A record mapping ErrorEnum to their corresponding error styles.
|
|
67
|
+
*/
|
|
68
|
+
export declare const ERROR_STYLES: Record<ErrorEnum, string>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing various MIME types for different file categories.
|
|
3
|
+
* @readonly
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ImageTypes {
|
|
6
|
+
APNG = "image/apng",
|
|
7
|
+
BMP = "image/bmp",
|
|
8
|
+
GIF = "image/gif",
|
|
9
|
+
JPEG = "image/jpeg",
|
|
10
|
+
PJPEG = "image/pjpeg",
|
|
11
|
+
PNG = "image/png",
|
|
12
|
+
SVG = "image/svg+xml",
|
|
13
|
+
TIFF = "image/tiff",
|
|
14
|
+
WEBP = "image/webp",
|
|
15
|
+
XICON = "image/x-icon"
|
|
16
|
+
}
|
|
17
|
+
export declare enum AudioTypes {
|
|
18
|
+
Audios = "audio/*"
|
|
19
|
+
}
|
|
20
|
+
export declare enum VideoTypes {
|
|
21
|
+
Videos = "video/*"
|
|
22
|
+
}
|
|
23
|
+
export declare enum TextTypes {
|
|
24
|
+
PlainText = "text/plain",
|
|
25
|
+
HTML = "text/html",
|
|
26
|
+
CSS = "text/css",
|
|
27
|
+
JavaScript = "application/javascript",
|
|
28
|
+
CSV = "text/csv",
|
|
29
|
+
JSON = "application/json",
|
|
30
|
+
XML = "application/xml"
|
|
31
|
+
}
|
|
32
|
+
export declare enum DocumentTypes {
|
|
33
|
+
PDF = "application/pdf",
|
|
34
|
+
Word = "application/msword",
|
|
35
|
+
WordOpenXML = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
36
|
+
Excel = "application/vnd.ms-excel",
|
|
37
|
+
ExcelOpenXML = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
38
|
+
PowerPoint = "application/vnd.ms-powerpoint",
|
|
39
|
+
PowerPointOpenXML = "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
40
|
+
}
|
|
41
|
+
export declare enum ArchiveTypes {
|
|
42
|
+
ZIP = "application/zip",
|
|
43
|
+
GZIP = "application/gzip",
|
|
44
|
+
TAR = "application/x-tar",
|
|
45
|
+
RAR = "application/x-rar-compressed"
|
|
46
|
+
}
|
|
47
|
+
export declare enum FontTypes {
|
|
48
|
+
TrueType = "font/ttf",
|
|
49
|
+
OpenType = "font/otf",
|
|
50
|
+
WebOpenFont = "font/woff",
|
|
51
|
+
WebOpenFont2 = "font/woff2"
|
|
52
|
+
}
|
|
53
|
+
export declare enum AppTypes {
|
|
54
|
+
Executable = "application/octet-stream",
|
|
55
|
+
AndroidAPK = "application/vnd.android.package-archive",
|
|
56
|
+
Java = "application/java-archive"
|
|
57
|
+
}
|
|
58
|
+
export declare enum OtherTypes {
|
|
59
|
+
JSONLD = "application/ld+json",
|
|
60
|
+
WASM = "application/wasm"
|
|
61
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing all HTTP exception codes.
|
|
3
|
+
* @readonly
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ExceptionEnum {
|
|
6
|
+
CONTINUE = 100,
|
|
7
|
+
SWITCHING_PROTOCOLS = 101,
|
|
8
|
+
PROCESSING = 102,
|
|
9
|
+
EARLY_HINTS = 103,
|
|
10
|
+
OK = 200,
|
|
11
|
+
CREATED = 201,
|
|
12
|
+
ACCEPTED = 202,
|
|
13
|
+
NON_AUTHORITATIVE_INFORMATION = 203,
|
|
14
|
+
NO_CONTENT = 204,
|
|
15
|
+
RESET_CONTENT = 205,
|
|
16
|
+
PARTIAL_CONTENT = 206,
|
|
17
|
+
MULTI_STATUS = 207,
|
|
18
|
+
ALREADY_REPORTED = 208,
|
|
19
|
+
IM_USED = 226,
|
|
20
|
+
MULTIPLE_CHOICES = 300,
|
|
21
|
+
MOVED_PERMANENTLY = 301,
|
|
22
|
+
FOUND = 302,
|
|
23
|
+
SEE_OTHER = 303,
|
|
24
|
+
NOT_MODIFIED = 304,
|
|
25
|
+
USE_PROXY = 305,
|
|
26
|
+
UNUSED = 306,// Deprecated
|
|
27
|
+
TEMPORARY_REDIRECT = 307,
|
|
28
|
+
PERMANENT_REDIRECT = 308,
|
|
29
|
+
BAD_REQUEST = 400,
|
|
30
|
+
UNAUTHORIZED = 401,
|
|
31
|
+
PAYMENT_REQUIRED = 402,
|
|
32
|
+
FORBIDDEN = 403,
|
|
33
|
+
NOT_FOUND = 404,
|
|
34
|
+
METHOD_NOT_ALLOWED = 405,
|
|
35
|
+
NOT_ACCEPTABLE = 406,
|
|
36
|
+
PROXY_AUTHENTICATION_REQUIRED = 407,
|
|
37
|
+
REQUEST_TIMEOUT = 408,
|
|
38
|
+
CONFLICT = 409,
|
|
39
|
+
GONE = 410,
|
|
40
|
+
LENGTH_REQUIRED = 411,
|
|
41
|
+
PRECONDITION_FAILED = 412,
|
|
42
|
+
PAYLOAD_TOO_LARGE = 413,
|
|
43
|
+
URI_TOO_LONG = 414,
|
|
44
|
+
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
45
|
+
RANGE_NOT_SATISFIABLE = 416,
|
|
46
|
+
EXPECTATION_FAILED = 417,
|
|
47
|
+
IM_A_TEAPOT = 418,// RFC 2324 - Easter egg
|
|
48
|
+
MISDIRECTED_REQUEST = 421,
|
|
49
|
+
UNPROCESSABLE_ENTITY = 422,
|
|
50
|
+
LOCKED = 423,
|
|
51
|
+
FAILED_DEPENDENCY = 424,
|
|
52
|
+
TOO_EARLY = 425,
|
|
53
|
+
UPGRADE_REQUIRED = 426,
|
|
54
|
+
PRECONDITION_REQUIRED = 428,
|
|
55
|
+
TOO_MANY_REQUESTS = 429,
|
|
56
|
+
REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
|
|
57
|
+
UNAVAILABLE_FOR_LEGAL_REASONS = 451,
|
|
58
|
+
INTERNAL_SERVER_ERROR = 500,
|
|
59
|
+
NOT_IMPLEMENTED = 501,
|
|
60
|
+
BAD_GATEWAY = 502,
|
|
61
|
+
SERVICE_UNAVAILABLE = 503,
|
|
62
|
+
GATEWAY_TIMEOUT = 504,
|
|
63
|
+
HTTP_VERSION_NOT_SUPPORTED = 505,
|
|
64
|
+
VARIANT_ALSO_NEGOTIATES = 506,
|
|
65
|
+
INSUFFICIENT_STORAGE = 507,
|
|
66
|
+
LOOP_DETECTED = 508,
|
|
67
|
+
NOT_EXTENDED = 510,
|
|
68
|
+
NETWORK_AUTHENTICATION_REQUIRED = 511,
|
|
69
|
+
NET_WORK_ERROR = 10000,// Custom network error
|
|
70
|
+
PAGE_NOT_DATA = 10100
|
|
71
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum for key codes used in keyboard events.
|
|
3
|
+
* This object holds various key codes commonly used for handling keyboard events.
|
|
4
|
+
* The keys defined here correspond to specific key codes that can be used to detect
|
|
5
|
+
* user input in web applications.
|
|
6
|
+
* @readonly
|
|
7
|
+
* @enum {number}
|
|
8
|
+
*/
|
|
9
|
+
export declare enum KeyCodeEnum {
|
|
10
|
+
/** Arrow Up key */
|
|
11
|
+
UP = 38,
|
|
12
|
+
/** Arrow Down key */
|
|
13
|
+
DOWN = 40,
|
|
14
|
+
/** Enter key */
|
|
15
|
+
ENTER = 13,
|
|
16
|
+
/** Escape key */
|
|
17
|
+
ESC = 27,
|
|
18
|
+
/** Spacebar key */
|
|
19
|
+
SPACE = 32,
|
|
20
|
+
/** Tab key */
|
|
21
|
+
TAB = 9,
|
|
22
|
+
/** Backspace key */
|
|
23
|
+
BACKSPACE = 8,
|
|
24
|
+
/** Delete key */
|
|
25
|
+
DELETE = 46,
|
|
26
|
+
/** Arrow Left key */
|
|
27
|
+
LEFT = 37,
|
|
28
|
+
/** Arrow Right key */
|
|
29
|
+
RIGHT = 39,
|
|
30
|
+
/** Shift key */
|
|
31
|
+
SHIFT = 16,
|
|
32
|
+
/** Control key */
|
|
33
|
+
CONTROL = 17,
|
|
34
|
+
/** Alt key */
|
|
35
|
+
ALT = 18,
|
|
36
|
+
/** Caps Lock key */
|
|
37
|
+
CAPS_LOCK = 20,
|
|
38
|
+
/** F1 key */
|
|
39
|
+
F1 = 112,
|
|
40
|
+
/** F2 key */
|
|
41
|
+
F2 = 113,
|
|
42
|
+
/** F3 key */
|
|
43
|
+
F3 = 114,
|
|
44
|
+
/** F4 key */
|
|
45
|
+
F4 = 115,
|
|
46
|
+
/** F5 key */
|
|
47
|
+
F5 = 116,
|
|
48
|
+
/** F6 key */
|
|
49
|
+
F6 = 117,
|
|
50
|
+
/** F7 key */
|
|
51
|
+
F7 = 118,
|
|
52
|
+
/** F8 key */
|
|
53
|
+
F8 = 119,
|
|
54
|
+
/** F9 key */
|
|
55
|
+
F9 = 120,
|
|
56
|
+
/** F10 key */
|
|
57
|
+
F10 = 121,
|
|
58
|
+
/** F11 key */
|
|
59
|
+
F11 = 122,
|
|
60
|
+
/** F12 key */
|
|
61
|
+
F12 = 123
|
|
62
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum for different storage keys used in the application.
|
|
3
|
+
* This enum contains the keys for storing authentication token, locale information, user info, roles, and more.
|
|
4
|
+
* @readonly
|
|
5
|
+
* @enum {string}
|
|
6
|
+
*/
|
|
7
|
+
export declare enum StorageKeyEnum {
|
|
8
|
+
/**
|
|
9
|
+
* Key used for storing the authentication token.
|
|
10
|
+
* @constant {string}
|
|
11
|
+
*/
|
|
12
|
+
TOKEN_KEY = "TOKEN__",
|
|
13
|
+
/**
|
|
14
|
+
* Key used for storing the locale information.
|
|
15
|
+
* @constant {string}
|
|
16
|
+
*/
|
|
17
|
+
LOCALE_KEY = "LOCALE__",
|
|
18
|
+
/**
|
|
19
|
+
* Key used for storing user information.
|
|
20
|
+
* @constant {string}
|
|
21
|
+
*/
|
|
22
|
+
USER_INFO_KEY = "USER__INFO__",
|
|
23
|
+
/**
|
|
24
|
+
* Key used for storing role information.
|
|
25
|
+
* @constant {string}
|
|
26
|
+
*/
|
|
27
|
+
ROLES_KEY = "ROLES__KEY__",
|
|
28
|
+
/**
|
|
29
|
+
* Key used for storing project configuration.
|
|
30
|
+
* @constant {string}
|
|
31
|
+
*/
|
|
32
|
+
PROJ_CFG_KEY = "PROJ__CFG__KEY__",
|
|
33
|
+
/**
|
|
34
|
+
* Key used for storing lock information.
|
|
35
|
+
* @constant {string}
|
|
36
|
+
*/
|
|
37
|
+
LOCK_INFO_KEY = "LOCK__INFO__KEY__",
|
|
38
|
+
/**
|
|
39
|
+
* Key used for base global local cache.
|
|
40
|
+
* @constant {string}
|
|
41
|
+
*/
|
|
42
|
+
APP_LOCAL_CACHE_KEY = "COMMON__LOCAL__KEY",
|
|
43
|
+
/**
|
|
44
|
+
* Key used for base global session cache.
|
|
45
|
+
* @constant {string}
|
|
46
|
+
*/
|
|
47
|
+
APP_SESSION_CACHE_KEY = "COMMON__SESSION__KEY"
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Enum defining types of storage.
|
|
51
|
+
* @readonly
|
|
52
|
+
* @enum {number}
|
|
53
|
+
*/
|
|
54
|
+
export declare const StorageTypeEnum: {
|
|
55
|
+
/**
|
|
56
|
+
* Represents session storage.
|
|
57
|
+
* @constant {number}
|
|
58
|
+
*/
|
|
59
|
+
readonly SESSION: 0;
|
|
60
|
+
/**
|
|
61
|
+
* Represents local storage.
|
|
62
|
+
* @constant {number}
|
|
63
|
+
*/
|
|
64
|
+
readonly LOCAL: 1;
|
|
65
|
+
};
|
|
66
|
+
export type StorageTypeEnum = keyof typeof StorageTypeEnum;
|