fiberx-backend-toolkit 0.0.58 → 0.0.60

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.
@@ -37,23 +37,35 @@ public static async ${method_name}(params: {
37
37
  recipient_email: string;
38
38
  created_by?: number | null;
39
39
  payload: ${interface_name};
40
- }) {
41
- return EmailQueueService.enqueueEmail<${interface_name}>({
42
- notification_code: "${code}",
43
- recipient_email: params.recipient_email,
44
- created_by: params.created_by ?? null,
45
- payload: params.payload,
46
- });
40
+ }): Promise {
41
+ try {
42
+ return this.email_enqueue_processor.enqueue<${interface_name}>({
43
+ notification_code: "${code}",
44
+ recipient_email: params.recipient_email,
45
+ created_by: params.created_by ?? null,
46
+ payload: params.payload,
47
+ });
48
+ }
49
+ catch(error: any) {
50
+ this.logger.error("Failed to enqueue email in method ${method_name}", { error });
51
+ throw error;
52
+ }
47
53
  }
48
54
  `;
49
55
  };
50
56
  exports.GENERATE_UTIL_METHOD_CODE = GENERATE_UTIL_METHOD_CODE;
51
57
  const GENERATE_UTIL_CLASS_CODE = (types_file_name, generated_content) => {
52
58
  return `
53
- import { EmailQueueService } from "@/services/email_queue_service";
59
+ import { EmailEnqueueProcessor } from "fiberx-backend-toolkit/dist/mailer/main";
60
+ import { LoggerUtil } from "fiberx-backend-toolkit/dist/utils/main";
54
61
  import * as Types from "@/${types_file_name}";
55
62
 
56
63
  class GeneratedEmailEnqueueUtil {
64
+ private static readonly name: string = "generated_email_enqueue_util";
65
+ private static readonly logger: LoggerUtil = new LoggerUtil(this.name);
66
+ private static email_enqueue_processor: EmailEnqueueProcessor = EmailEnqueueProcessor.getInstance();
67
+
68
+
57
69
  ${generated_content}
58
70
  }
59
71
 
@@ -33,3 +33,9 @@ export declare const DEFAULT_RBAC_CACHE_KEY = "RBAC_SNAPSHOT";
33
33
  export declare const DEFAULT_RBAC_CACHE_TTL: number;
34
34
  export declare const EMAIL_ENQUEUE_TYPES_FILE_NAME = "types/email_enqueue_type.generated.ts";
35
35
  export declare const EMAIL_ENQUEUE_UTIL_FILE_NAME = "utils/email_enqueue_util.generated.ts";
36
+ export declare const CONTENT_CACHE_TTL_KEY = "CONTENT_CACHE_TTL";
37
+ export declare const CONTENT_URL_KEY = "CONTENT_URL";
38
+ export declare const CONTENT_LANG_KEY = "CONTENT_LANG";
39
+ export declare const DEFAULT_CONTENT_URL = "http://localhost:4000/content/{{type}}_content/{{lang}}.json";
40
+ export declare const DEFAULT_CONTENT_LANG = "en-GB";
41
+ export declare const DEFAULT_CONTENT_CACHE_TTL: number;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EMAIL_ENQUEUE_UTIL_FILE_NAME = exports.EMAIL_ENQUEUE_TYPES_FILE_NAME = exports.DEFAULT_RBAC_CACHE_TTL = exports.DEFAULT_RBAC_CACHE_KEY = exports.DEFAULT_TOTP_WINDOW = exports.DEFAULT_TOTP_DIGITS = exports.DEFAULT_TOTP_STEP = exports.ALPHABET_CORPUS = exports.CHARACTER_CORPUS = exports.REQUEST_RATE_LIMITTER_OPTIONS = exports.CORS_MAX_AGE_IN_MICRO_SECONDS = exports.CORS_MAX_AGE_IN_SECONDS = exports.CORS_ALLOWED_HEADERS = exports.CORS_ALLOWED_METHODS = exports.DEVICE_ID_HEADERS_NAME = exports.DEVICE_ID_COOKIE_NAME = exports.DEVICE_ID_COOKIE_MAX_AGE = exports.REQUEST_ID_HEADERS_NAME = exports.REQUEST_ID_COOKIE_NAME = exports.REQUEST_ID_COOKIE_MAX_AGE = exports.SEQUELIZE_SEEDER_META_TABLE_NAME = exports.SEQUELIZE_META_TABLE_NAME = exports.EMAIL_ENQUEUE_DIR = exports.SEEDERS_DIR = exports.MIGRATIONS_DIR = exports.MODELS_DIR = exports.SCHEMA_SNAPSHOTS_DIR = exports.SCHEMAS_DIR = exports.ENV_VAR_DIR = exports.LOG_DIR = exports.BASE_DIR = void 0;
6
+ exports.DEFAULT_CONTENT_CACHE_TTL = exports.DEFAULT_CONTENT_LANG = exports.DEFAULT_CONTENT_URL = exports.CONTENT_LANG_KEY = exports.CONTENT_URL_KEY = exports.CONTENT_CACHE_TTL_KEY = exports.EMAIL_ENQUEUE_UTIL_FILE_NAME = exports.EMAIL_ENQUEUE_TYPES_FILE_NAME = exports.DEFAULT_RBAC_CACHE_TTL = exports.DEFAULT_RBAC_CACHE_KEY = exports.DEFAULT_TOTP_WINDOW = exports.DEFAULT_TOTP_DIGITS = exports.DEFAULT_TOTP_STEP = exports.ALPHABET_CORPUS = exports.CHARACTER_CORPUS = exports.REQUEST_RATE_LIMITTER_OPTIONS = exports.CORS_MAX_AGE_IN_MICRO_SECONDS = exports.CORS_MAX_AGE_IN_SECONDS = exports.CORS_ALLOWED_HEADERS = exports.CORS_ALLOWED_METHODS = exports.DEVICE_ID_HEADERS_NAME = exports.DEVICE_ID_COOKIE_NAME = exports.DEVICE_ID_COOKIE_MAX_AGE = exports.REQUEST_ID_HEADERS_NAME = exports.REQUEST_ID_COOKIE_NAME = exports.REQUEST_ID_COOKIE_MAX_AGE = exports.SEQUELIZE_SEEDER_META_TABLE_NAME = exports.SEQUELIZE_META_TABLE_NAME = exports.EMAIL_ENQUEUE_DIR = exports.SEEDERS_DIR = exports.MIGRATIONS_DIR = exports.MODELS_DIR = exports.SCHEMA_SNAPSHOTS_DIR = exports.SCHEMAS_DIR = exports.ENV_VAR_DIR = exports.LOG_DIR = exports.BASE_DIR = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  exports.BASE_DIR = process.cwd();
9
9
  exports.LOG_DIR = path_1.default.join(exports.BASE_DIR, "logs");
@@ -42,3 +42,9 @@ exports.DEFAULT_RBAC_CACHE_KEY = "RBAC_SNAPSHOT";
42
42
  exports.DEFAULT_RBAC_CACHE_TTL = (1000 * 60 * 60 * 24); // 24 hours
43
43
  exports.EMAIL_ENQUEUE_TYPES_FILE_NAME = "types/email_enqueue_type.generated.ts";
44
44
  exports.EMAIL_ENQUEUE_UTIL_FILE_NAME = "utils/email_enqueue_util.generated.ts";
45
+ exports.CONTENT_CACHE_TTL_KEY = "CONTENT_CACHE_TTL";
46
+ exports.CONTENT_URL_KEY = "CONTENT_URL";
47
+ exports.CONTENT_LANG_KEY = "CONTENT_LANG";
48
+ exports.DEFAULT_CONTENT_URL = "http://localhost:4000/content/{{type}}_content/{{lang}}.json";
49
+ exports.DEFAULT_CONTENT_LANG = "en-GB";
50
+ exports.DEFAULT_CONTENT_CACHE_TTL = (1000 * 60 * 60 * 24); // 24 hours
@@ -1,6 +1,5 @@
1
1
  import { EmailEnqueueGeneratorOptions, EmailEnqueueDataProvider } from "../../types/mailer_type";
2
2
  declare class EmailEnqueueGenerator<TTemplate, TNotification> {
3
- private readonly provider;
4
3
  private static instance;
5
4
  readonly name: string;
6
5
  private readonly logger;
@@ -9,6 +8,7 @@ declare class EmailEnqueueGenerator<TTemplate, TNotification> {
9
8
  private readonly util_file_path;
10
9
  private readonly batch_size;
11
10
  private readonly options;
11
+ private readonly provider;
12
12
  private constructor();
13
13
  static initialize<TTemplate, TNotification>(provider: EmailEnqueueDataProvider<TTemplate, TNotification>, options: EmailEnqueueGeneratorOptions): EmailEnqueueGenerator<TTemplate, TNotification>;
14
14
  static getInstance<TTemplate, TNotification>(): EmailEnqueueGenerator<TTemplate, TNotification>;
@@ -9,7 +9,6 @@ const constants_1 = require("../../config/constants");
9
9
  const main_1 = require("../../utils/main");
10
10
  const email_enqueue_code_template_1 = require("../../code_templates/email_enqueue_code_template");
11
11
  class EmailEnqueueGenerator {
12
- provider;
13
12
  static instance = null;
14
13
  name = "email_enqueue_generator";
15
14
  logger = new main_1.LoggerUtil(this.name);
@@ -18,6 +17,7 @@ class EmailEnqueueGenerator {
18
17
  util_file_path;
19
18
  batch_size;
20
19
  options;
20
+ provider;
21
21
  constructor(provider, options) {
22
22
  this.provider = provider;
23
23
  this.options = options;
@@ -0,0 +1,3 @@
1
+ import EmailEnqueueGenerator from "./generators/email_enqueue_generator";
2
+ import EmailEnqueueProcessor from "./processors/email_enqueue_processor";
3
+ export { EmailEnqueueGenerator, EmailEnqueueProcessor };
@@ -1 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EmailEnqueueProcessor = exports.EmailEnqueueGenerator = void 0;
7
+ const email_enqueue_generator_1 = __importDefault(require("./generators/email_enqueue_generator"));
8
+ exports.EmailEnqueueGenerator = email_enqueue_generator_1.default;
9
+ const email_enqueue_processor_1 = __importDefault(require("./processors/email_enqueue_processor"));
10
+ exports.EmailEnqueueProcessor = email_enqueue_processor_1.default;
@@ -0,0 +1,16 @@
1
+ import { EmailEnqueueProcessorDataProvider, EmailQueueAdapter, EmailEnqueueInput } from "../../types/mailer_type";
2
+ declare class EmailEnqueueProcessor<TNotification, TTemplate, TMailerConfig, TQueueEntity> {
3
+ private static instance;
4
+ readonly name: string;
5
+ private readonly logger;
6
+ private readonly content_manager;
7
+ private readonly provider;
8
+ private readonly queue_adapter;
9
+ private constructor();
10
+ private LoadEmailContentPayload;
11
+ private validate;
12
+ static initialize<TNotification, TTemplate, TMailerConfig, TQueueEntity>(provider: EmailEnqueueProcessorDataProvider<TNotification, TTemplate, TMailerConfig>, queue_adapter: EmailQueueAdapter<TQueueEntity, TNotification, TTemplate, TMailerConfig>): EmailEnqueueProcessor<TNotification, TTemplate, TMailerConfig, TQueueEntity>;
13
+ static getInstance<TNotification, TTemplate, TMailerConfig, TQueueEntity>(): EmailEnqueueProcessor<TNotification, TTemplate, TMailerConfig, TQueueEntity>;
14
+ enqueue<TPayload>(input: EmailEnqueueInput<TPayload>): Promise<TQueueEntity>;
15
+ }
16
+ export default EmailEnqueueProcessor;
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const main_1 = require("../../utils/main");
4
+ class EmailEnqueueProcessor {
5
+ static instance = null;
6
+ name = "email_enqueue_processor";
7
+ logger = new main_1.LoggerUtil(this.name);
8
+ content_manager = main_1.ContentManagerUtil.getInstance();
9
+ provider;
10
+ queue_adapter;
11
+ constructor(provider, queue_adapter) {
12
+ this.provider = provider;
13
+ this.queue_adapter = queue_adapter;
14
+ }
15
+ // method to load email lanaguage payload
16
+ async LoadEmailContentPayload(notification_code) {
17
+ try {
18
+ const content_payload = await this.content_manager?.getValue(notification_code, "email");
19
+ return content_payload ? content_payload : {};
20
+ }
21
+ catch (error) {
22
+ this.logger.error("Failed to load email content", { notification_code, error });
23
+ throw error;
24
+ }
25
+ }
26
+ // Method to validate email payload against required placeholders
27
+ validate(required, payload) {
28
+ if (!required) {
29
+ return;
30
+ }
31
+ const missing = [];
32
+ const check_patch = (obj, path) => {
33
+ return path.split(".").reduce((o, k) => o?.[k], obj);
34
+ };
35
+ for (const p of required.static_data ?? []) {
36
+ if (check_patch(payload["static_data"], p) === undefined) {
37
+ missing.push(`static_data.${p}`);
38
+ }
39
+ }
40
+ for (const p of required.db_data ?? []) {
41
+ if (check_patch(payload["db_data"], p) === undefined) {
42
+ missing.push(`db_data.${p}`);
43
+ }
44
+ }
45
+ if (missing.length) {
46
+ throw new Error(`Missing required email placeholders: ${missing.join(", ")}`);
47
+ }
48
+ }
49
+ // ==============================
50
+ // Singleton
51
+ // ==============================
52
+ static initialize(provider, queue_adapter) {
53
+ if (this.instance) {
54
+ throw new Error("EmailEnqueueProcessor already initialized.");
55
+ }
56
+ this.instance = new EmailEnqueueProcessor(provider, queue_adapter);
57
+ return this.instance;
58
+ }
59
+ static getInstance() {
60
+ if (!this.instance) {
61
+ throw new Error("EmailEnqueueProcessor not initialized.");
62
+ }
63
+ return this.instance;
64
+ }
65
+ // ==============================
66
+ // Main Enqueue Method
67
+ // ==============================
68
+ async enqueue(input) {
69
+ try {
70
+ const { notification_code, payload: data_payload, recipient_email, created_by, scheduled_at = null, } = input;
71
+ this.logger.info("Enqueue email request received", { notification_code, recipient_email, scheduled_at });
72
+ // 1️⃣ Resolve notification
73
+ const template = await this.provider.fetchActiveTemplate(notification_code);
74
+ if (!template) {
75
+ this.logger.error("Failed to fetch active template", { notification_code });
76
+ throw new Error("Failed to fetch active template.");
77
+ }
78
+ this.logger.info("Template record resolved", { notification_code });
79
+ const notification = this.provider.getNotificationFromTemplate(template);
80
+ if (!template) {
81
+ this.logger.error("Failed to fetch notification record from template", { notification });
82
+ throw new Error("Failed to fetch notification record from template");
83
+ }
84
+ this.logger.info("Template record resolved", { notification_code });
85
+ const content_payload = await this.LoadEmailContentPayload(notification_code);
86
+ const full_payload = { static_content: content_payload, db_content: data_payload };
87
+ // 4️⃣ Validate
88
+ this.validate(this.provider.getRequiredPlaceholders(template), full_payload);
89
+ // 5️⃣ Resolve mailer config
90
+ const mailer_config = await this.provider.fetchDefaultMailerConfig();
91
+ if (!mailer_config) {
92
+ this.logger.error("No active default mailer configuration found");
93
+ throw new Error("No active default mailer configuration found");
94
+ }
95
+ this.logger.info("Mailer configuration selected");
96
+ // 6️⃣ Enqueue via adapter
97
+ const queue_entity = await this.queue_adapter.enqueue({
98
+ notification,
99
+ template,
100
+ mailer_config,
101
+ recipient_email,
102
+ payload: full_payload,
103
+ scheduled_at,
104
+ created_by
105
+ });
106
+ if (!queue_entity) {
107
+ this.logger.error("Failed to enqueue email", { notification_code, recipient_email });
108
+ throw new Error("Failed to enqueue email");
109
+ }
110
+ this.logger.info("✅ Email successfully enqueued", { notification_code, recipient_email });
111
+ return queue_entity;
112
+ }
113
+ catch (error) {
114
+ this.logger.error("❌ Failed to enqueue email", { error, input });
115
+ throw error;
116
+ }
117
+ }
118
+ }
119
+ exports.default = EmailEnqueueProcessor;
@@ -14,3 +14,28 @@ export interface EmailEnqueueDataProvider<TTemplate, TNotification> {
14
14
  getNotificationCode(notification: TNotification): string;
15
15
  getRequiredPlaceholders(template: TTemplate): EmailTemplatePlaceholders | null;
16
16
  }
17
+ export interface EmailEnqueueInput<TPayload> {
18
+ notification_code: string;
19
+ payload: TPayload;
20
+ recipient_member_id?: number;
21
+ recipient_email: string;
22
+ created_by?: number | null;
23
+ scheduled_at?: Date | null;
24
+ }
25
+ export interface EmailEnqueueProcessorDataProvider<TNotification, TTemplate, TMailerConfig> {
26
+ fetchActiveTemplate(notification_code: string): Promise<TTemplate | null>;
27
+ getNotificationFromTemplate(template: TTemplate): TNotification;
28
+ fetchDefaultMailerConfig(): Promise<TMailerConfig | null>;
29
+ getRequiredPlaceholders(template: TTemplate): EmailTemplatePlaceholders | null;
30
+ }
31
+ export interface EmailQueueAdapter<TQueueEntity, TNotification, TTemplate, TMailerConfig> {
32
+ enqueue(data: {
33
+ notification: TNotification;
34
+ template: TTemplate;
35
+ mailer_config: TMailerConfig;
36
+ recipient_email: string;
37
+ payload: Record<string, any>;
38
+ scheduled_at?: Date | null;
39
+ created_by?: number | null;
40
+ }): Promise<TQueueEntity>;
41
+ }
@@ -6,3 +6,4 @@ export * from "./database_type";
6
6
  export * from "./module_type";
7
7
  export * from "./express_decelaration";
8
8
  export * from "./rbac_type";
9
+ export * from "./mailer_type";
@@ -22,3 +22,4 @@ __exportStar(require("./database_type"), exports);
22
22
  __exportStar(require("./module_type"), exports);
23
23
  __exportStar(require("./express_decelaration"), exports);
24
24
  __exportStar(require("./rbac_type"), exports);
25
+ __exportStar(require("./mailer_type"), exports);
@@ -68,3 +68,9 @@ export interface GenerateSecretResult {
68
68
  secret_key: string;
69
69
  otpauth_url: string;
70
70
  }
71
+ export type ContentType = "app" | "email";
72
+ export type LanguageCodeType = string;
73
+ export interface CachedContentInterface {
74
+ app?: Record<string, any>;
75
+ email?: Record<string, any>;
76
+ }
@@ -0,0 +1,21 @@
1
+ import { ContentType, LanguageCodeType } from "../types/util_type";
2
+ declare class ContentManagerUtil {
3
+ private static instance;
4
+ readonly name: string;
5
+ private readonly env_manager;
6
+ private readonly logger;
7
+ private readonly content_cache_ttl_ms;
8
+ private readonly cache;
9
+ private readonly content_url_template?;
10
+ private readonly default_language;
11
+ private constructor();
12
+ private cleanUpCache;
13
+ private getCacheKey;
14
+ private resolvePath;
15
+ private loadContent;
16
+ static getInstance(): ContentManagerUtil;
17
+ getContent(type: ContentType, lang?: LanguageCodeType): Promise<Record<string, any>>;
18
+ getValue<T = any>(path: string, type: ContentType, default_value?: T, lang?: LanguageCodeType): Promise<T | undefined>;
19
+ reload(type?: ContentType, lang?: LanguageCodeType): Promise<void>;
20
+ }
21
+ export default ContentManagerUtil;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const axios_1 = __importDefault(require("axios"));
7
+ const main_1 = require("../utils/main");
8
+ const constants_1 = require("../config/constants");
9
+ class ContentManagerUtil {
10
+ static instance;
11
+ name = "content_manager_util";
12
+ env_manager = main_1.EnvManagerUtil.getInstance();
13
+ logger = new main_1.LoggerUtil(this.name);
14
+ content_cache_ttl_ms;
15
+ cache;
16
+ content_url_template;
17
+ default_language;
18
+ constructor() {
19
+ this.content_cache_ttl_ms = this.env_manager.getEnvVar(constants_1.CONTENT_CACHE_TTL_KEY, constants_1.DEFAULT_CONTENT_CACHE_TTL) ?? constants_1.DEFAULT_CONTENT_CACHE_TTL;
20
+ this.cache = new main_1.InMemoryCacheUtil();
21
+ this.content_url_template = this.env_manager.getEnvVar(constants_1.CONTENT_URL_KEY, constants_1.DEFAULT_CONTENT_URL);
22
+ this.default_language = this.env_manager.getEnvVar(constants_1.CONTENT_LANG_KEY, constants_1.DEFAULT_CONTENT_LANG) ?? constants_1.DEFAULT_CONTENT_LANG;
23
+ this.cleanUpCache();
24
+ }
25
+ // Method to clean cache up
26
+ cleanUpCache() {
27
+ //periodic cleanup (every 2 minutes)
28
+ setInterval(() => { this.cache.cleanup(); }, 120_000);
29
+ }
30
+ getCacheKey(type, lang) {
31
+ return `content:${type}:${lang}`;
32
+ }
33
+ resolvePath(obj, path) {
34
+ return path
35
+ .split(".")
36
+ .reduce((acc, key) => (acc ? acc[key] : undefined), obj);
37
+ }
38
+ // Method to Load content from remote JSON endpoint
39
+ async loadContent(type, lang) {
40
+ const url = this.content_url_template
41
+ ?.replace("{{type}}", type)
42
+ ?.replace("{{lang}}", lang);
43
+ if (!url) {
44
+ throw new Error(`Invalid content URL for type=${type} lang=${lang}`);
45
+ }
46
+ try {
47
+ const response = await axios_1.default.get(url, { timeout: 5000 });
48
+ return response.data;
49
+ }
50
+ catch (error) {
51
+ this.logger.error(`Failed to load ${type} content for ${lang} from ${url}`, { error });
52
+ throw new Error(`Failed to load ${type} content for ${lang}`);
53
+ }
54
+ }
55
+ // 🔒 Singleton
56
+ static getInstance() {
57
+ if (!ContentManagerUtil.instance) {
58
+ ContentManagerUtil.instance = new ContentManagerUtil();
59
+ }
60
+ return ContentManagerUtil.instance;
61
+ }
62
+ // Method to Get whole content object (cached)
63
+ async getContent(type, lang) {
64
+ const language = lang || this.default_language;
65
+ const cache_key = this.getCacheKey(type, language);
66
+ const cached = this.cache.get(cache_key);
67
+ if (cached?.[type]) {
68
+ return cached[type];
69
+ }
70
+ const content = await this.loadContent(type, language);
71
+ this.cache.set(cache_key, { [type]: content }, this.content_cache_ttl_ms);
72
+ return content;
73
+ }
74
+ // Method to Get nested value by dotted path
75
+ async getValue(path, type, default_value, lang) {
76
+ const content = await this.getContent(type, lang);
77
+ const value = this.resolvePath(content, path);
78
+ return value ?? default_value;
79
+ }
80
+ // Method to Reload content (clear cache)
81
+ async reload(type, lang) {
82
+ const language = lang || this.default_language;
83
+ if (type) {
84
+ this.cache.delete(this.getCacheKey(type, language));
85
+ }
86
+ else {
87
+ this.cache.clear();
88
+ }
89
+ }
90
+ }
91
+ exports.default = ContentManagerUtil;
@@ -9,4 +9,5 @@ import InMemoryCacheUtil from "./cache_util";
9
9
  import UUIDGeneratorUtil from "./uuid_gen_util";
10
10
  import EncryptorDecryptorUtil from "./encryptor_decryptor_util";
11
11
  import TOTPServiceUtil from "./totp_service_util";
12
- export { LoggerUtil, InputTransformerUtil, InputValidatorUtil, EnvManagerUtil, SqlFormatterUtil, ServerUtil, SafeExecuteUtil, InMemoryCacheUtil, UUIDGeneratorUtil, EncryptorDecryptorUtil, TOTPServiceUtil };
12
+ import ContentManagerUtil from "./content_manager_util";
13
+ export { LoggerUtil, InputTransformerUtil, InputValidatorUtil, EnvManagerUtil, SqlFormatterUtil, ServerUtil, SafeExecuteUtil, InMemoryCacheUtil, UUIDGeneratorUtil, EncryptorDecryptorUtil, TOTPServiceUtil, ContentManagerUtil };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TOTPServiceUtil = exports.EncryptorDecryptorUtil = exports.UUIDGeneratorUtil = exports.InMemoryCacheUtil = exports.SafeExecuteUtil = exports.ServerUtil = exports.SqlFormatterUtil = exports.EnvManagerUtil = exports.InputValidatorUtil = exports.InputTransformerUtil = exports.LoggerUtil = void 0;
6
+ exports.ContentManagerUtil = exports.TOTPServiceUtil = exports.EncryptorDecryptorUtil = exports.UUIDGeneratorUtil = exports.InMemoryCacheUtil = exports.SafeExecuteUtil = exports.ServerUtil = exports.SqlFormatterUtil = exports.EnvManagerUtil = exports.InputValidatorUtil = exports.InputTransformerUtil = exports.LoggerUtil = void 0;
7
7
  const logger_util_1 = __importDefault(require("./logger_util"));
8
8
  exports.LoggerUtil = logger_util_1.default;
9
9
  const input_transformer_util_1 = __importDefault(require("./input_transformer_util"));
@@ -26,3 +26,5 @@ const encryptor_decryptor_util_1 = __importDefault(require("./encryptor_decrypto
26
26
  exports.EncryptorDecryptorUtil = encryptor_decryptor_util_1.default;
27
27
  const totp_service_util_1 = __importDefault(require("./totp_service_util"));
28
28
  exports.TOTPServiceUtil = totp_service_util_1.default;
29
+ const content_manager_util_1 = __importDefault(require("./content_manager_util"));
30
+ exports.ContentManagerUtil = content_manager_util_1.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fiberx-backend-toolkit",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "description": "A TypeScript backend toolkit providing shared domain logic, infrastructure helpers, and utilities for FiberX server-side applications and services.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",