Index

lib/common/auth/auth.constants.ts

ACCESS_TOKEN_ERROR_MSG
Type : string
Default value : "ERR_TOKEN_A"

Error message for access token related errors.

AUTH_ACCESS_TOKEN_PREFIX
Type : string
Default value : "access_token"

Prefix for access token cache keys.

AUTH_JWT_CACHE_PREFIX
Type : string
Default value : "jwt"

Prefix for JWT cache keys.

AUTH_REFRESH_TOKEN_PREFIX
Type : string
Default value : "refresh_token"

Prefix for refresh token cache keys.

BRUTEFORCE_JWT_CACHE_PREFIX
Type : string
Default value : "bruteforce"

Prefix for brute force protection cache keys.

bruteForceIPKey
Default value : (ipAddress: string) => `${BRUTEFORCE_JWT_CACHE_PREFIX}:ip:${ipAddress}`

Generates a cache key for tracking brute force login attempts by IP address.

bruteForceLoginKey
Default value : (login: string) => `${BRUTEFORCE_JWT_CACHE_PREFIX}:login:${login}`

Generates a cache key for tracking brute force login attempts by login.

jwtAccessTokenKey
Default value : (accessToken: string) => { return `${AUTH_JWT_CACHE_PREFIX}:${AUTH_ACCESS_TOKEN_PREFIX}:${accessToken}`; }

Generates a cache key for an access token.

jwtRefreshTokenKey
Default value : ( accessToken: string, refreshToken: string, ) => { return `${AUTH_JWT_CACHE_PREFIX}:${AUTH_REFRESH_TOKEN_PREFIX}:${accessToken}:${refreshToken}`; }

Generates a cache key for a refresh token.

REFRESH_TOKEN_ERROR_MSG
Type : string
Default value : "ERR_TOKEN_R"

Error message for refresh token related errors.

UNKNOWN_IP
Type : string
Default value : "unknown"

Placeholder for unknown IP addresses.

lib/shared/decorators/access-token.decorator.ts

AccessToken
Default value : createParamDecorator( (data: unknown, ctx: ExecutionContext) => { const request = ctx.switchToHttp().getRequest(); return request[REQUEST_PROPS.accessToken]; }, )

A custom decorator for extracting access token from a request.

lib/shared/decorators/for-roles.decorator.ts

AllowedForMetadataKey
Type : string
Default value : "for_roles"

A constant string key used for role-based access control metadata. This key is used to annotate routes or controllers with the roles allowed to access them.

ForRoles
Default value : (...roles: string[]) => SetMetadata(AllowedForMetadataKey, roles)

ForRoles custom decorator for defining roles allowed to access a route.

lib/common/xml-data-bridge/xml-data-bridge-file-schema.ts

BODY_TOKEN
Default value : `%%%body%%%`

A placeholder string used for tokenizing the body content within templates. This token is used to dynamically replace or insert content in XML or other templated strings.

lib/common/captcha/captcha.constants.ts

CAPTCHA_CACHE_PREFIX
Type : string
Default value : "captcha"

The prefix used for storing CAPTCHA data.

lib/shared/modules/category/category.constants.ts

CATEGORY_RELATIONS
Type : []
Default value : [ "icon", "icon.name", "icon.name.lang", "icon.files", "icon.files.format", "icon.type", "icon.type.ext", "name", "name.lang", ]

An array defining the relations to be loaded with the Category entity.

lib/common/config/config.constants.ts

CONFIG_CACHE_PREFIX
Type : string
Default value : "config"

The prefix used for storing configuration items.

CONFIG_FILE_EXT_PATTERN
Type : string
Default value : ".config.ts"

The pattern for configuration file extensions.

FILES_ENCODING
Type : string
Default value : "utf-8"

The encoding used for reading and writing configuration files.

GEN_SRC_DIR
Type : string
Default value : "gen-src"

The directory where generated source files are stored.

KP_PROPERTIES_FILE_NAME
Type : string
Default value : "kp.properties"

The name of the kp properties file. It is assumed that this is the main configuration file, located in the root of the project and can override the properties of any .properties in the entire project

LOCAL_PROPERTIES_FILE_NAME
Type : string
Default value : "local.properties"

The name of the local properties file It is assumed that such files override neighboring ones .properties files and are out of version control.

PROPERTIES_FILE_EXT_PATTERN
Type : string
Default value : ".properties"

The pattern for properties file extensions.

lib/shared/decorators/current-user.decorator.ts

CurrentUser
Default value : createParamDecorator( (data: unknown, ctx: ExecutionContext) => { const request = ctx.switchToHttp().getRequest(); return request[REQUEST_PROPS.currentUser]; }, )

A custom decorator for extracting the current user from a request.

lib/common/media/media.constants.ts

DEFAULT_MEDIA_QUALITY
Type : number
Default value : 78

Default media quality value.

DEFAULT_MEDIA_TYPE
Type : string
Default value : "default"

Default media type code.

MEDIA_RELATIONS
Type : []
Default value : [ "name", "name.lang", "type", "type.formats", "type.ext", "files", "files.format", ]

Array containing relations for media.

MEDIA_TYPE_RELATIONS
Type : []
Default value : ["ext", "formats"]

Array containing relations for media type.

ORIGINAL
Type : string
Default value : "original"

Represents the original media format.

SVG
Type : string
Default value : "svg"

Represents the SVG media extension.

THUMB
Type : string
Default value : "thumb"

Represents the thumbnail media format.

lib/common/explorer/explorer.constants.ts

ENTITY_SAVE_HANDLER
Default value : Symbol("ENTITY_SAVE_HANDLER")

Token for injecting entity save handler.

TARGET_RELATIONS_BASIC
Type : []
Default value : [ "name", "name.lang", "description", "description.lang", "icon", "icon.name", "icon.name.lang", "icon.files", "icon.files.format", "icon.type", "icon.type.ext", ]

Basic target relations for entities.

TARGET_RELATIONS_FULL
Type : []
Default value : [ "name", "name.lang", "description", "description.lang", "icon", "icon.name", "icon.name.lang", "icon.files", "icon.files.format", "icon.type", "icon.type.ext", "columns", "columns.name", "columns.name.lang", "columns.description", "columns.description.lang", "columns.objectRenderer", "columns.objectRenderer.name", "columns.objectRenderer.name.lang", "columns.objectRenderer.description", "columns.objectRenderer.description.lang", "columns.sectionRenderer", "columns.sectionRenderer.name", "columns.sectionRenderer.name.lang", "columns.sectionRenderer.description", "columns.sectionRenderer.description.lang", "columns.tab", "columns.tab.name", "columns.tab.name.lang", "actions", "actions.name", "actions.name.lang", "actions.description", "actions.description.lang", "canRead", "canRead.name", "canRead.name.lang", "canWrite", "canWrite.name", "canWrite.name.lang", ]

Full target relations for entities.

TARGET_RELATIONS_OBJECT
Type : []
Default value : [ "name", "name.lang", "icon", "icon.name", "icon.name.lang", "icon.files", "icon.files.format", "icon.type", "icon.type.ext", "columns", "columns.name", "columns.name.lang", "columns.objectRenderer", "columns.objectRenderer.name", "columns.objectRenderer.name.lang", "columns.objectRenderer.description", "columns.objectRenderer.description.lang", "columns.tab", "columns.tab.name", "columns.tab.name.lang", "actions", "actions.name", "actions.name.lang", "actions.description", "actions.description.lang", ]

Target relations for object-entities.

TARGET_RELATIONS_SECTION
Type : []
Default value : [ "name", "name.lang", "icon", "icon.name", "icon.name.lang", "icon.files", "icon.files.format", "icon.type", "icon.type.ext", "columns", "columns.name", "columns.name.lang", "columns.sectionRenderer", "columns.sectionRenderer.name", "columns.sectionRenderer.name.lang", "columns.sectionRenderer.description", "columns.sectionRenderer.description.lang", "actions", "actions.name", "actions.name.lang", "actions.description", "actions.description.lang", ]

Target relations for section-entities.

lib/shared/utils/files.utils.ts

fileTypeModule
Default value : {} as { lib: typeof import("file-type") }

Object to hold the dynamically imported file-type module.

lib/common/config/config.init-fn.ts

InitConfig
Default value : async () => { const mod = ConfigModule.forInitializer(); const app = await NestFactory.createApplicationContext(mod); await app.init(); const logger: Logger = app.select(LogModule).get(LOGGER); EnvLoader.loadEnvironment(logger); const configService = app.select(mod).get(ConfigService); const genCnfDir = `${process.cwd()}/${process.env.CONFIG_SRC_DIR}`; await configService.initWithPropertiesFiles(genCnfDir); await app.close(); process.exit(0); }

Asynchronously initializes the application context with the ConfigModule, loads environment variables, and initializes the configuration service with .properties files. This function used for initialize config store

lib/shared/modules/log/log.constants.ts

LOGGER
Default value : Symbol("LOGGER_SERVICE")

Symbol used as a token for the LogService.

lib/shared/modules/messages-broker/messages-broker.constants.ts

MESSAGES_BROKER
Default value : Symbol("MSG_BROKER")

Symbol used as a token for injecting the MessagesBrokerService.

lib/shared/modules/ms-client/ms-client.constants.ts

MS_CLIENT
Default value : Symbol("MS_CLIENT")

Symbol used as a token for injecting the microservices' client.

MSG_BUS
Default value : Symbol("MSG_BUS")

Symbol used as a token for injecting the message bus.

lib/shared/constants.ts

MS_EXCEPTION_ID
Type : string
Default value : "MsException"

A constant representing the exception identifier for microservices.

REQUEST_PROPS
Type : object
Default value : { /** * @property accessToken * The property name for storing the access token in the request. */ accessToken: "accessToken", /** * @property currentUser * The property name for storing the current user in the request. */ currentUser: "currentUser", }

An object containing properties used for request handling.

lib/common/xml-data-bridge/xml-data-bridge.constants.ts

parser

Stored xml-parser instance

ReadOperatorRe
Default value : /\$\{@read:([^}]*)}/

Regex for detect read-operator in xml-schema

rootToken
Type : string
Default value : "@root"

Representing root-node identifier

lib/shared/modules/cache/cache.constants.ts

REDIS_CLIENT
Default value : Symbol("REDIS_CLIENT")

A symbol used for injecting the Redis client.

lib/common/process/process.constants.ts

REGISTERED_PROCESSES
Type : Map<string, AbstractProcess>
Default value : new Map< string, AbstractProcess >()

Store for registered processes

lib/shared/transformers/simple-json.transformer.ts

SimpleJsonTransformer
Type : ValueTransformer
Default value : { from(value: string | object) { if (typeof value === "string") { try { return JSON.parse(value); } catch (e) { return undefined; } } return value; }, to(value: object) { return value; }, }

A ValueTransformer for transforming JSON data in a database column. This transformer is used to automatically parse JSON strings from the database into JavaScript objects and vice versa.

lib/common/user/user.constants.ts

USER_RELATIONS
Type : []
Default value : [ "avatar", "avatar.name", "avatar.name.lang", "avatar.files", "avatar.files.format", "avatar.type", "avatar.type.ext", "roles", "roles.name", "roles.name.lang", ]

Array of user entity relations.

lib/shared/modules/warlock/warlock.constants.ts

WARLOCK
Default value : Symbol("WARLOCK")

Symbol used as a token for injecting the warlock mechanism.

results matching ""

    No results matching ""