@alacard-project/shared 1.0.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/constants/env.constants.d.ts +24 -0
- package/dist/constants/env.constants.js +28 -0
- package/dist/constants/env.constants.js.map +1 -0
- package/dist/constants/grpc.constants.d.ts +14 -0
- package/dist/constants/grpc.constants.js +18 -0
- package/dist/constants/grpc.constants.js.map +1 -0
- package/dist/constants/http.constants.d.ts +10 -0
- package/dist/constants/http.constants.js +14 -0
- package/dist/constants/http.constants.js.map +1 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.js +22 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/logging.constants.d.ts +24 -0
- package/dist/constants/logging.constants.js +28 -0
- package/dist/constants/logging.constants.js.map +1 -0
- package/dist/constants/services.constants.d.ts +6 -0
- package/dist/constants/services.constants.js +10 -0
- package/dist/constants/services.constants.js.map +1 -0
- package/dist/contracts/config.contract.d.ts +12 -0
- package/dist/contracts/config.contract.js +3 -0
- package/dist/contracts/config.contract.js.map +1 -0
- package/dist/contracts/index.d.ts +2 -0
- package/dist/contracts/index.js +19 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/logging.contract.d.ts +101 -0
- package/dist/contracts/logging.contract.js +3 -0
- package/dist/contracts/logging.contract.js.map +1 -0
- package/dist/enums/environment.enum.d.ts +7 -0
- package/dist/enums/environment.enum.js +12 -0
- package/dist/enums/environment.enum.js.map +1 -0
- package/dist/enums/error-code.enum.d.ts +8 -0
- package/dist/enums/error-code.enum.js +13 -0
- package/dist/enums/error-code.enum.js.map +1 -0
- package/dist/enums/index.d.ts +5 -0
- package/dist/enums/index.js +22 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/enums/log-level.enum.d.ts +7 -0
- package/dist/enums/log-level.enum.js +12 -0
- package/dist/enums/log-level.enum.js.map +1 -0
- package/dist/enums/notification-type.enum.d.ts +5 -0
- package/dist/enums/notification-type.enum.js +10 -0
- package/dist/enums/notification-type.enum.js.map +1 -0
- package/dist/enums/user-role.enum.d.ts +6 -0
- package/dist/enums/user-role.enum.js +11 -0
- package/dist/enums/user-role.enum.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/dto/log-filter.dto.d.ts +29 -0
- package/dist/logging/dto/log-filter.dto.js +146 -0
- package/dist/logging/dto/log-filter.dto.js.map +1 -0
- package/dist/logging/enums/log-level.enum.d.ts +7 -0
- package/dist/logging/enums/log-level.enum.js +12 -0
- package/dist/logging/enums/log-level.enum.js.map +1 -0
- package/dist/logging/index.d.ts +1 -0
- package/dist/logging/index.js +18 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/auth.types.d.ts +9 -0
- package/dist/types/auth.types.js +3 -0
- package/dist/types/auth.types.js.map +1 -0
- package/dist/types/config.types.d.ts +26 -0
- package/dist/types/config.types.js +3 -0
- package/dist/types/config.types.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/proto-path.d.ts +1 -0
- package/dist/utils/proto-path.js +11 -0
- package/dist/utils/proto-path.js.map +1 -0
- package/package.json +23 -0
- package/proto/auth.proto +109 -0
- package/proto/config.proto +39 -0
- package/proto/dbf.proto +183 -0
- package/proto/logging.proto +143 -0
- package/proto/token.proto +50 -0
- package/proto/user.proto +87 -0
- package/src/constants/env.constants.ts +25 -0
- package/src/constants/grpc.constants.ts +15 -0
- package/src/constants/http.constants.ts +11 -0
- package/src/constants/index.ts +5 -0
- package/src/constants/logging.constants.ts +26 -0
- package/src/constants/services.constants.ts +6 -0
- package/src/contracts/config.contract.ts +14 -0
- package/src/contracts/index.ts +2 -0
- package/src/contracts/logging.contract.ts +115 -0
- package/src/enums/environment.enum.ts +7 -0
- package/src/enums/error-code.enum.ts +8 -0
- package/src/enums/index.ts +5 -0
- package/src/enums/log-level.enum.ts +7 -0
- package/src/enums/notification-type.enum.ts +5 -0
- package/src/enums/user-role.enum.ts +6 -0
- package/src/index.ts +6 -0
- package/src/logging/dto/log-filter.dto.ts +101 -0
- package/src/logging/index.ts +1 -0
- package/src/types/auth.types.ts +9 -0
- package/src/types/config.types.ts +30 -0
- package/src/types/index.ts +3 -0
- package/src/utils/proto-path.ts +15 -0
- package/tsconfig.json +24 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const ENV_KEYS: {
|
|
2
|
+
readonly NODE_ENV: "NODE_ENV";
|
|
3
|
+
readonly PORT: "PORT";
|
|
4
|
+
readonly DATABASE_URL: "DATABASE_URL";
|
|
5
|
+
readonly REDIS_HOST: "REDIS_HOST";
|
|
6
|
+
readonly REDIS_PORT: "REDIS_PORT";
|
|
7
|
+
readonly REDIS_PASSWORD: "REDIS_PASSWORD";
|
|
8
|
+
readonly KAFKA_BROKERS: "KAFKA_BROKERS";
|
|
9
|
+
readonly RABBITMQ_URL: "RABBITMQ_URL";
|
|
10
|
+
readonly JWT_SECRET: "JWT_SECRET";
|
|
11
|
+
readonly GRPC_PORT: "GRPC_PORT";
|
|
12
|
+
readonly GRPC_URL: "GRPC_URL";
|
|
13
|
+
readonly LOGGING_PROTO_PATH: "LOGGING_PROTO_PATH";
|
|
14
|
+
readonly INTERNAL_CONFIG_KEY: "INTERNAL_CONFIG_KEY";
|
|
15
|
+
readonly RATE_LIMIT_TTL: "RATE_LIMIT_TTL";
|
|
16
|
+
readonly RATE_LIMIT_MAX: "RATE_LIMIT_MAX";
|
|
17
|
+
readonly CORS_ORIGINS: "CORS_ORIGINS";
|
|
18
|
+
};
|
|
19
|
+
export declare const ENV_VALUES: {
|
|
20
|
+
readonly DEVELOPMENT: "development";
|
|
21
|
+
readonly PRODUCTION: "production";
|
|
22
|
+
readonly TEST: "test";
|
|
23
|
+
readonly STAGING: "staging";
|
|
24
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ENV_VALUES = exports.ENV_KEYS = void 0;
|
|
4
|
+
exports.ENV_KEYS = {
|
|
5
|
+
NODE_ENV: 'NODE_ENV',
|
|
6
|
+
PORT: 'PORT',
|
|
7
|
+
DATABASE_URL: 'DATABASE_URL',
|
|
8
|
+
REDIS_HOST: 'REDIS_HOST',
|
|
9
|
+
REDIS_PORT: 'REDIS_PORT',
|
|
10
|
+
REDIS_PASSWORD: 'REDIS_PASSWORD',
|
|
11
|
+
KAFKA_BROKERS: 'KAFKA_BROKERS',
|
|
12
|
+
RABBITMQ_URL: 'RABBITMQ_URL',
|
|
13
|
+
JWT_SECRET: 'JWT_SECRET',
|
|
14
|
+
GRPC_PORT: 'GRPC_PORT',
|
|
15
|
+
GRPC_URL: 'GRPC_URL',
|
|
16
|
+
LOGGING_PROTO_PATH: 'LOGGING_PROTO_PATH',
|
|
17
|
+
INTERNAL_CONFIG_KEY: 'INTERNAL_CONFIG_KEY',
|
|
18
|
+
RATE_LIMIT_TTL: 'RATE_LIMIT_TTL',
|
|
19
|
+
RATE_LIMIT_MAX: 'RATE_LIMIT_MAX',
|
|
20
|
+
CORS_ORIGINS: 'CORS_ORIGINS',
|
|
21
|
+
};
|
|
22
|
+
exports.ENV_VALUES = {
|
|
23
|
+
DEVELOPMENT: 'development',
|
|
24
|
+
PRODUCTION: 'production',
|
|
25
|
+
TEST: 'test',
|
|
26
|
+
STAGING: 'staging',
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=env.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.constants.js","sourceRoot":"","sources":["../../src/constants/env.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,kBAAkB,EAAE,oBAAoB;IACxC,mBAAmB,EAAE,qBAAqB;IAC1C,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;CACtB,CAAC;AAEE,QAAA,UAAU,GAAG;IACtB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;CACZ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const GRPC_PACKAGES: {
|
|
2
|
+
readonly LOGGING: "logging";
|
|
3
|
+
readonly CONFIG: "config";
|
|
4
|
+
};
|
|
5
|
+
export declare const GRPC_METHODS: {
|
|
6
|
+
readonly LOGGING: {
|
|
7
|
+
readonly LOG_EVENT: "LogEvent";
|
|
8
|
+
readonly LOG_USER_ACTION: "LogUserAction";
|
|
9
|
+
readonly UPDATE_SERVICE_STATUS: "UpdateServiceStatus";
|
|
10
|
+
readonly GET_SERVICE_LOGS: "GetServiceLogs";
|
|
11
|
+
readonly GET_SERVICE_STATUS: "GetServiceStatus";
|
|
12
|
+
readonly GET_USER_ACTIONS: "GetUserActions";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GRPC_METHODS = exports.GRPC_PACKAGES = void 0;
|
|
4
|
+
exports.GRPC_PACKAGES = {
|
|
5
|
+
LOGGING: 'logging',
|
|
6
|
+
CONFIG: 'config',
|
|
7
|
+
};
|
|
8
|
+
exports.GRPC_METHODS = {
|
|
9
|
+
LOGGING: {
|
|
10
|
+
LOG_EVENT: 'LogEvent',
|
|
11
|
+
LOG_USER_ACTION: 'LogUserAction',
|
|
12
|
+
UPDATE_SERVICE_STATUS: 'UpdateServiceStatus',
|
|
13
|
+
GET_SERVICE_LOGS: 'GetServiceLogs',
|
|
14
|
+
GET_SERVICE_STATUS: 'GetServiceStatus',
|
|
15
|
+
GET_USER_ACTIONS: 'GetUserActions',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=grpc.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.constants.js","sourceRoot":"","sources":["../../src/constants/grpc.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACV,CAAC;AAEE,QAAA,YAAY,GAAG;IACxB,OAAO,EAAE;QACL,SAAS,EAAE,UAAU;QACrB,eAAe,EAAE,eAAe;QAChC,qBAAqB,EAAE,qBAAqB;QAC5C,gBAAgB,EAAE,gBAAgB;QAClC,kBAAkB,EAAE,kBAAkB;QACtC,gBAAgB,EAAE,gBAAgB;KACrC;CACK,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_PREFIX = exports.HTTP_METHODS = void 0;
|
|
4
|
+
exports.HTTP_METHODS = {
|
|
5
|
+
GET: 'GET',
|
|
6
|
+
POST: 'POST',
|
|
7
|
+
PUT: 'PUT',
|
|
8
|
+
DELETE: 'DELETE',
|
|
9
|
+
PATCH: 'PATCH',
|
|
10
|
+
};
|
|
11
|
+
exports.API_PREFIX = {
|
|
12
|
+
V1: '/api/v1',
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=http.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.constants.js","sourceRoot":"","sources":["../../src/constants/http.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IACxB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACR,CAAC;AAEE,QAAA,UAAU,GAAG;IACtB,EAAE,EAAE,SAAS;CACP,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./env.constants"), exports);
|
|
18
|
+
__exportStar(require("./http.constants"), exports);
|
|
19
|
+
__exportStar(require("./services.constants"), exports);
|
|
20
|
+
__exportStar(require("./grpc.constants"), exports);
|
|
21
|
+
__exportStar(require("./logging.constants"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,mDAAiC;AACjC,uDAAqC;AACrC,mDAAiC;AACjC,sDAAoC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const LOG_RETENTION_PERIODS: {
|
|
2
|
+
readonly SHORT: 7;
|
|
3
|
+
readonly MEDIUM: 30;
|
|
4
|
+
readonly LONG: 90;
|
|
5
|
+
};
|
|
6
|
+
export declare const LOG_CLEANUP_MESSAGES: {
|
|
7
|
+
readonly SUCCESS: "Logs cleaned up successfully";
|
|
8
|
+
readonly INVALID_DATE_RANGE: "Invalid date range";
|
|
9
|
+
readonly NO_LOGS_FOUND: "No logs found for cleanup";
|
|
10
|
+
readonly CLEANUP_STARTED: "Log cleanup started";
|
|
11
|
+
readonly CLEANUP_COMPLETED: "Log cleanup completed";
|
|
12
|
+
readonly CLEANUP_FAILED: "Log cleanup failed";
|
|
13
|
+
readonly FILE_CLEANUP_SUCCESS: "File cleanup successful";
|
|
14
|
+
readonly FILE_CLEANUP_FAILED: "File cleanup failed";
|
|
15
|
+
readonly RETENTION_UPDATED: "Retention period updated";
|
|
16
|
+
};
|
|
17
|
+
export declare const LOGGING_ERROR_MESSAGES: {
|
|
18
|
+
readonly LOG_EVENT_FAILED: "Failed to log event";
|
|
19
|
+
readonly LOG_USER_ACTION_FAILED: "Failed to log user action";
|
|
20
|
+
readonly UPDATE_SERVICE_STATUS_FAILED: "Failed to update service status";
|
|
21
|
+
readonly GET_SERVICE_LOGS_FAILED: "Failed to get service logs";
|
|
22
|
+
readonly GET_SERVICE_STATUS_FAILED: "Failed to get service status";
|
|
23
|
+
readonly GET_USER_ACTIONS_FAILED: "Failed to get user actions";
|
|
24
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LOGGING_ERROR_MESSAGES = exports.LOG_CLEANUP_MESSAGES = exports.LOG_RETENTION_PERIODS = void 0;
|
|
4
|
+
exports.LOG_RETENTION_PERIODS = {
|
|
5
|
+
SHORT: 7,
|
|
6
|
+
MEDIUM: 30,
|
|
7
|
+
LONG: 90,
|
|
8
|
+
};
|
|
9
|
+
exports.LOG_CLEANUP_MESSAGES = {
|
|
10
|
+
SUCCESS: 'Logs cleaned up successfully',
|
|
11
|
+
INVALID_DATE_RANGE: 'Invalid date range',
|
|
12
|
+
NO_LOGS_FOUND: 'No logs found for cleanup',
|
|
13
|
+
CLEANUP_STARTED: 'Log cleanup started',
|
|
14
|
+
CLEANUP_COMPLETED: 'Log cleanup completed',
|
|
15
|
+
CLEANUP_FAILED: 'Log cleanup failed',
|
|
16
|
+
FILE_CLEANUP_SUCCESS: 'File cleanup successful',
|
|
17
|
+
FILE_CLEANUP_FAILED: 'File cleanup failed',
|
|
18
|
+
RETENTION_UPDATED: 'Retention period updated',
|
|
19
|
+
};
|
|
20
|
+
exports.LOGGING_ERROR_MESSAGES = {
|
|
21
|
+
LOG_EVENT_FAILED: 'Failed to log event',
|
|
22
|
+
LOG_USER_ACTION_FAILED: 'Failed to log user action',
|
|
23
|
+
UPDATE_SERVICE_STATUS_FAILED: 'Failed to update service status',
|
|
24
|
+
GET_SERVICE_LOGS_FAILED: 'Failed to get service logs',
|
|
25
|
+
GET_SERVICE_STATUS_FAILED: 'Failed to get service status',
|
|
26
|
+
GET_USER_ACTIONS_FAILED: 'Failed to get user actions',
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=logging.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging.constants.js","sourceRoot":"","sources":["../../src/constants/logging.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACjC,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;CACF,CAAC;AAEE,QAAA,oBAAoB,GAAG;IAChC,OAAO,EAAE,8BAA8B;IACvC,kBAAkB,EAAE,oBAAoB;IACxC,aAAa,EAAE,2BAA2B;IAC1C,eAAe,EAAE,qBAAqB;IACtC,iBAAiB,EAAE,uBAAuB;IAC1C,cAAc,EAAE,oBAAoB;IACpC,oBAAoB,EAAE,yBAAyB;IAC/C,mBAAmB,EAAE,qBAAqB;IAC1C,iBAAiB,EAAE,0BAA0B;CACvC,CAAC;AAEE,QAAA,sBAAsB,GAAG;IAClC,gBAAgB,EAAE,qBAAqB;IACvC,sBAAsB,EAAE,2BAA2B;IACnD,4BAA4B,EAAE,iCAAiC;IAC/D,uBAAuB,EAAE,4BAA4B;IACrD,yBAAyB,EAAE,8BAA8B;IACzD,uBAAuB,EAAE,4BAA4B;CAC/C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MICROSERVICES = void 0;
|
|
4
|
+
exports.MICROSERVICES = {
|
|
5
|
+
CONFIG: 'CONFIG_SERVICE',
|
|
6
|
+
LOGGING: 'LOGGING_SERVICE',
|
|
7
|
+
AUTH: 'AUTH_SERVICE',
|
|
8
|
+
USER: 'USER_SERVICE',
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=services.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.constants.js","sourceRoot":"","sources":["../../src/constants/services.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IACzB,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAc;CACd,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface GetConfigRequest {
|
|
2
|
+
serviceName: string;
|
|
3
|
+
environment: string;
|
|
4
|
+
version: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ConfigResponse {
|
|
7
|
+
values: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
export interface ListConfigsResponse {
|
|
10
|
+
service: string;
|
|
11
|
+
values: Record<string, string>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.contract.js","sourceRoot":"","sources":["../../src/contracts/config.contract.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./config.contract"), exports);
|
|
18
|
+
__exportStar(require("./logging.contract"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export interface LogEventGrpcRequest {
|
|
2
|
+
serviceId: string;
|
|
3
|
+
serviceName: string;
|
|
4
|
+
level: string;
|
|
5
|
+
message: string;
|
|
6
|
+
metadata: string;
|
|
7
|
+
userId?: string;
|
|
8
|
+
requestId?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface LogEventGrpcResponse {
|
|
11
|
+
success: boolean;
|
|
12
|
+
logId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface LogUserActionGrpcRequest {
|
|
15
|
+
userId: string;
|
|
16
|
+
userName: string;
|
|
17
|
+
action: string;
|
|
18
|
+
resource: string;
|
|
19
|
+
details?: string;
|
|
20
|
+
ipAddress?: string;
|
|
21
|
+
userAgent?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LogUserActionGrpcResponse {
|
|
24
|
+
success: boolean;
|
|
25
|
+
actionId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface UpdateServiceStatusGrpcRequest {
|
|
28
|
+
serviceName: string;
|
|
29
|
+
status: string;
|
|
30
|
+
version?: string;
|
|
31
|
+
uptime?: number;
|
|
32
|
+
metadata?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface UpdateServiceStatusGrpcResponse {
|
|
35
|
+
success: boolean;
|
|
36
|
+
statusId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface GetServiceLogsGrpcRequest {
|
|
39
|
+
serviceName?: string;
|
|
40
|
+
level?: string;
|
|
41
|
+
userId?: string;
|
|
42
|
+
requestId?: string;
|
|
43
|
+
startDate?: string;
|
|
44
|
+
endDate?: string;
|
|
45
|
+
limit?: number;
|
|
46
|
+
offset?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface ServiceLogEntry {
|
|
49
|
+
id: string;
|
|
50
|
+
serviceId: string;
|
|
51
|
+
serviceName: string;
|
|
52
|
+
level: string;
|
|
53
|
+
message: string;
|
|
54
|
+
metadata: string;
|
|
55
|
+
timestamp: string;
|
|
56
|
+
userId?: string;
|
|
57
|
+
requestId?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface GetServiceLogsGrpcResponse {
|
|
60
|
+
logs: ServiceLogEntry[];
|
|
61
|
+
total: number;
|
|
62
|
+
}
|
|
63
|
+
export interface GetServiceStatusGrpcRequest {
|
|
64
|
+
serviceName?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ServiceStatusEntry {
|
|
67
|
+
id: string;
|
|
68
|
+
serviceName: string;
|
|
69
|
+
status: string;
|
|
70
|
+
lastHeartbeat: string;
|
|
71
|
+
version?: string;
|
|
72
|
+
uptime?: number;
|
|
73
|
+
metadata?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface GetServiceStatusGrpcResponse {
|
|
76
|
+
statuses: ServiceStatusEntry[];
|
|
77
|
+
}
|
|
78
|
+
export interface GetUserActionsGrpcRequest {
|
|
79
|
+
userId?: string;
|
|
80
|
+
action?: string;
|
|
81
|
+
resource?: string;
|
|
82
|
+
startDate?: string;
|
|
83
|
+
endDate?: string;
|
|
84
|
+
limit?: number;
|
|
85
|
+
offset?: number;
|
|
86
|
+
}
|
|
87
|
+
export interface UserActionEntry {
|
|
88
|
+
id: string;
|
|
89
|
+
userId: string;
|
|
90
|
+
userName: string;
|
|
91
|
+
action: string;
|
|
92
|
+
resource: string;
|
|
93
|
+
details: string;
|
|
94
|
+
timestamp: string;
|
|
95
|
+
ipAddress?: string;
|
|
96
|
+
userAgent?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface GetUserActionsGrpcResponse {
|
|
99
|
+
actions: UserActionEntry[];
|
|
100
|
+
total: number;
|
|
101
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging.contract.js","sourceRoot":"","sources":["../../src/contracts/logging.contract.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Environment = void 0;
|
|
4
|
+
var Environment;
|
|
5
|
+
(function (Environment) {
|
|
6
|
+
Environment["DEVELOPMENT"] = "development";
|
|
7
|
+
Environment["STAGING"] = "staging";
|
|
8
|
+
Environment["PRODUCTION"] = "production";
|
|
9
|
+
Environment["TEST"] = "test";
|
|
10
|
+
Environment["LOCAL"] = "local";
|
|
11
|
+
})(Environment || (exports.Environment = Environment = {}));
|
|
12
|
+
//# sourceMappingURL=environment.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.enum.js","sourceRoot":"","sources":["../../src/enums/environment.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAMX;AAND,WAAY,WAAW;IACnB,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;IACnB,wCAAyB,CAAA;IACzB,4BAAa,CAAA;IACb,8BAAe,CAAA;AACnB,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare enum ErrorCode {
|
|
2
|
+
INTERNAL_ERROR = "INTERNAL_ERROR",
|
|
3
|
+
VALIDATION_ERROR = "VALIDATION_ERROR",
|
|
4
|
+
AUTHENTICATION_ERROR = "AUTHENTICATION_ERROR",
|
|
5
|
+
AUTHORIZATION_ERROR = "AUTHORIZATION_ERROR",
|
|
6
|
+
NOT_FOUND = "NOT_FOUND",
|
|
7
|
+
INVALID_TOKEN = "INVALID_TOKEN"
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorCode = void 0;
|
|
4
|
+
var ErrorCode;
|
|
5
|
+
(function (ErrorCode) {
|
|
6
|
+
ErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
|
7
|
+
ErrorCode["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
8
|
+
ErrorCode["AUTHENTICATION_ERROR"] = "AUTHENTICATION_ERROR";
|
|
9
|
+
ErrorCode["AUTHORIZATION_ERROR"] = "AUTHORIZATION_ERROR";
|
|
10
|
+
ErrorCode["NOT_FOUND"] = "NOT_FOUND";
|
|
11
|
+
ErrorCode["INVALID_TOKEN"] = "INVALID_TOKEN";
|
|
12
|
+
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
13
|
+
//# sourceMappingURL=error-code.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-code.enum.js","sourceRoot":"","sources":["../../src/enums/error-code.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAOX;AAPD,WAAY,SAAS;IACjB,8CAAiC,CAAA;IACjC,kDAAqC,CAAA;IACrC,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;IAC3C,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;AACnC,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./environment.enum"), exports);
|
|
18
|
+
__exportStar(require("./user-role.enum"), exports);
|
|
19
|
+
__exportStar(require("./log-level.enum"), exports);
|
|
20
|
+
__exportStar(require("./notification-type.enum"), exports);
|
|
21
|
+
__exportStar(require("./error-code.enum"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,2DAAyC;AACzC,oDAAkC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLevel = void 0;
|
|
4
|
+
var LogLevel;
|
|
5
|
+
(function (LogLevel) {
|
|
6
|
+
LogLevel["DEBUG"] = "DEBUG";
|
|
7
|
+
LogLevel["INFO"] = "INFO";
|
|
8
|
+
LogLevel["WARN"] = "WARN";
|
|
9
|
+
LogLevel["ERROR"] = "ERROR";
|
|
10
|
+
LogLevel["FATAL"] = "FATAL";
|
|
11
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
12
|
+
//# sourceMappingURL=log-level.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-level.enum.js","sourceRoot":"","sources":["../../src/enums/log-level.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,2BAAe,CAAA;AACnB,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationType = void 0;
|
|
4
|
+
var NotificationType;
|
|
5
|
+
(function (NotificationType) {
|
|
6
|
+
NotificationType["EMAIL"] = "EMAIL";
|
|
7
|
+
NotificationType["SMS"] = "SMS";
|
|
8
|
+
NotificationType["PUSH"] = "PUSH";
|
|
9
|
+
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
10
|
+
//# sourceMappingURL=notification-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-type.enum.js","sourceRoot":"","sources":["../../src/enums/notification-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,mCAAe,CAAA;IACf,+BAAW,CAAA;IACX,iCAAa,CAAA;AACjB,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserRole = void 0;
|
|
4
|
+
var UserRole;
|
|
5
|
+
(function (UserRole) {
|
|
6
|
+
UserRole["ADMIN"] = "ADMIN";
|
|
7
|
+
UserRole["PARTNER"] = "PARTNER";
|
|
8
|
+
UserRole["CLIENT"] = "CLIENT";
|
|
9
|
+
UserRole["USER"] = "USER";
|
|
10
|
+
})(UserRole || (exports.UserRole = UserRole = {}));
|
|
11
|
+
//# sourceMappingURL=user-role.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-role.enum.js","sourceRoot":"","sources":["../../src/enums/user-role.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAKX;AALD,WAAY,QAAQ;IAChB,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;AACjB,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums"), exports);
|
|
18
|
+
__exportStar(require("./constants"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
__exportStar(require("./contracts"), exports);
|
|
21
|
+
__exportStar(require("./utils/proto-path"), exports);
|
|
22
|
+
__exportStar(require("./logging"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB;AACxB,8CAA4B;AAC5B,qDAAmC;AACnC,4CAA0B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LogLevel } from '../../enums';
|
|
2
|
+
export declare class LogFilterDto {
|
|
3
|
+
startDate?: string;
|
|
4
|
+
endDate?: string;
|
|
5
|
+
serviceName?: string;
|
|
6
|
+
level?: LogLevel;
|
|
7
|
+
userId?: string;
|
|
8
|
+
requestId?: string;
|
|
9
|
+
page?: number;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class LogCleanupDto {
|
|
13
|
+
startDate: string;
|
|
14
|
+
endDate: string;
|
|
15
|
+
serviceName?: string;
|
|
16
|
+
level?: LogLevel;
|
|
17
|
+
}
|
|
18
|
+
export declare class RetentionPeriodDto {
|
|
19
|
+
retentionDays: number;
|
|
20
|
+
}
|
|
21
|
+
export declare class UserActionFilterDto {
|
|
22
|
+
startDate?: string;
|
|
23
|
+
endDate?: string;
|
|
24
|
+
userId?: string;
|
|
25
|
+
action?: string;
|
|
26
|
+
resource?: string;
|
|
27
|
+
page?: number;
|
|
28
|
+
pageSize?: number;
|
|
29
|
+
}
|