elseware-nodejs 1.3.1 → 1.5.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/index.d.cts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as express from 'express';
2
2
  import { Request, Response, NextFunction } from 'express';
3
- import { Model, PopulateOptions, Query, UpdateQuery } from 'mongoose';
3
+ import { Model, PopulateOptions, Query } from 'mongoose';
4
4
  import Joi, { Schema } from 'joi';
5
5
  import { CorsOptions } from 'cors';
6
+ import { SignOptions, JwtPayload } from 'jsonwebtoken';
6
7
 
7
8
  /**
8
9
  * Options for API factory methods
@@ -57,6 +58,18 @@ declare class APIResponse {
57
58
 
58
59
  declare const asyncHandler: (fn: (req: Request, res: Response, next: NextFunction) => Promise<void>) => (req: Request, res: Response, next: NextFunction) => Promise<void>;
59
60
 
61
+ type FieldTransform<T> = (value: T) => any;
62
+ type PickOptions<T extends Record<string, any>, K extends keyof T> = {
63
+ removeUndefined?: boolean;
64
+ removeNull?: boolean;
65
+ removeEmptyString?: boolean;
66
+ strict?: boolean;
67
+ defaults?: Partial<Record<K, any>>;
68
+ rename?: Partial<Record<K, string>>;
69
+ transform?: Partial<Record<K, FieldTransform<T[K]>>>;
70
+ };
71
+ declare function pickFields<T extends Record<string, any>, K extends keyof T>(obj: T, fields: readonly K[], options?: PickOptions<T, K>): Partial<Record<K | string, any>>;
72
+
60
73
  interface AzureBlobConfig {
61
74
  connectionString: string;
62
75
  accountName: string;
@@ -1847,27 +1860,30 @@ declare const GlobalErrorHandler: (isProd?: boolean) => (err: unknown, _req: Req
1847
1860
 
1848
1861
  declare const validate: (schema: Schema) => (req: Request, _res: Response, next: NextFunction) => void;
1849
1862
 
1850
- /**
1851
- * Generic Base Service
1852
- * Provides default CRUD operations
1853
- */
1854
- declare abstract class BaseService<T> {
1855
- protected model: Model<T>;
1856
- protected resourceName: string;
1857
- constructor(model: Model<T>, resourceName: string);
1858
- create(data: Partial<T>): Promise<T>;
1859
- findAll(): Promise<T[]>;
1860
- findById(id: string): Promise<T>;
1861
- updateById(id: string, data: UpdateQuery<T>): Promise<T>;
1862
- deleteById(id: string): Promise<T>;
1863
- }
1864
-
1865
- interface CrudService<T> {
1866
- create(data: Partial<T>): Promise<T>;
1867
- findAll(): Promise<T[]>;
1868
- findById(id: string): Promise<T>;
1869
- updateById(id: string, data: UpdateQuery<T>): Promise<T>;
1870
- deleteById(id: string): Promise<T>;
1863
+ interface JWTServiceOptions {
1864
+ accessSecret: string;
1865
+ refreshSecret: string;
1866
+ accessExpires?: SignOptions["expiresIn"];
1867
+ refreshExpires?: SignOptions["expiresIn"];
1868
+ nodeEnv?: string;
1869
+ refreshCookieName?: string;
1870
+ }
1871
+ declare class JWTService {
1872
+ private accessSecret;
1873
+ private refreshSecret;
1874
+ private accessExpires;
1875
+ private refreshExpires;
1876
+ private nodeEnv;
1877
+ private refreshCookieName;
1878
+ constructor(options: JWTServiceOptions);
1879
+ createAccessToken(payload: object): string;
1880
+ createRefreshToken(payload: object): string;
1881
+ verifyAccessToken<T extends JwtPayload = JwtPayload>(token: string): T | null;
1882
+ verifyRefreshToken<T extends JwtPayload = JwtPayload>(token: string): T | null;
1883
+ extractToken(req: Request): string | null;
1884
+ setRefreshTokenCookie(res: Response, refreshToken: string): void;
1885
+ clearRefreshTokenCookie(res: Response): void;
1886
+ sendAuthTokens(res: Response, payload: object): string;
1871
1887
  }
1872
1888
 
1873
1889
  declare function errorToString(error: unknown): string;
@@ -1882,4 +1898,4 @@ declare function toMinutes(ms: number): number;
1882
1898
  declare function toHours(ms: number): number;
1883
1899
  declare function sleep(ms: number): Promise<void>;
1884
1900
 
1885
- export { APIFactory, APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, type AdjacentEdge, type AllowedOriginsOptions, AppError, type AzureBlobConfig, AzureBlobService, BPlusTree, BTree, BaseService, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, type CloudinaryConfig, CloudinaryService, ConsistentHash, CountMinSketch, type CrudService, type DatabaseConfig, Deque, type DirectedEdge, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, type Edge, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, type Interval, IntervalTree, KDTree, LFUCache, LRUCache, type LoggerOptions, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, type Point, type Point2D, PriorityQueue, type ProgressCallback, QuadTree, Queue, RadixTree, type Rect, RedBlackTree, SegmentTree, Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, type UploadOptions, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, seconds, sleep, toHours, toMinutes, toSeconds, validate };
1901
+ export { APIFactory, APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, type AdjacentEdge, type AllowedOriginsOptions, AppError, type AzureBlobConfig, AzureBlobService, BPlusTree, BTree, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, type CloudinaryConfig, CloudinaryService, ConsistentHash, CountMinSketch, type DatabaseConfig, Deque, type DirectedEdge, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, type Edge, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, type Interval, IntervalTree, JWTService, type JWTServiceOptions, KDTree, LFUCache, LRUCache, type LoggerOptions, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, type Point, type Point2D, PriorityQueue, type ProgressCallback, QuadTree, Queue, RadixTree, type Rect, RedBlackTree, SegmentTree, Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, type UploadOptions, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, pickFields, seconds, sleep, toHours, toMinutes, toSeconds, validate };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as express from 'express';
2
2
  import { Request, Response, NextFunction } from 'express';
3
- import { Model, PopulateOptions, Query, UpdateQuery } from 'mongoose';
3
+ import { Model, PopulateOptions, Query } from 'mongoose';
4
4
  import Joi, { Schema } from 'joi';
5
5
  import { CorsOptions } from 'cors';
6
+ import { SignOptions, JwtPayload } from 'jsonwebtoken';
6
7
 
7
8
  /**
8
9
  * Options for API factory methods
@@ -57,6 +58,18 @@ declare class APIResponse {
57
58
 
58
59
  declare const asyncHandler: (fn: (req: Request, res: Response, next: NextFunction) => Promise<void>) => (req: Request, res: Response, next: NextFunction) => Promise<void>;
59
60
 
61
+ type FieldTransform<T> = (value: T) => any;
62
+ type PickOptions<T extends Record<string, any>, K extends keyof T> = {
63
+ removeUndefined?: boolean;
64
+ removeNull?: boolean;
65
+ removeEmptyString?: boolean;
66
+ strict?: boolean;
67
+ defaults?: Partial<Record<K, any>>;
68
+ rename?: Partial<Record<K, string>>;
69
+ transform?: Partial<Record<K, FieldTransform<T[K]>>>;
70
+ };
71
+ declare function pickFields<T extends Record<string, any>, K extends keyof T>(obj: T, fields: readonly K[], options?: PickOptions<T, K>): Partial<Record<K | string, any>>;
72
+
60
73
  interface AzureBlobConfig {
61
74
  connectionString: string;
62
75
  accountName: string;
@@ -1847,27 +1860,30 @@ declare const GlobalErrorHandler: (isProd?: boolean) => (err: unknown, _req: Req
1847
1860
 
1848
1861
  declare const validate: (schema: Schema) => (req: Request, _res: Response, next: NextFunction) => void;
1849
1862
 
1850
- /**
1851
- * Generic Base Service
1852
- * Provides default CRUD operations
1853
- */
1854
- declare abstract class BaseService<T> {
1855
- protected model: Model<T>;
1856
- protected resourceName: string;
1857
- constructor(model: Model<T>, resourceName: string);
1858
- create(data: Partial<T>): Promise<T>;
1859
- findAll(): Promise<T[]>;
1860
- findById(id: string): Promise<T>;
1861
- updateById(id: string, data: UpdateQuery<T>): Promise<T>;
1862
- deleteById(id: string): Promise<T>;
1863
- }
1864
-
1865
- interface CrudService<T> {
1866
- create(data: Partial<T>): Promise<T>;
1867
- findAll(): Promise<T[]>;
1868
- findById(id: string): Promise<T>;
1869
- updateById(id: string, data: UpdateQuery<T>): Promise<T>;
1870
- deleteById(id: string): Promise<T>;
1863
+ interface JWTServiceOptions {
1864
+ accessSecret: string;
1865
+ refreshSecret: string;
1866
+ accessExpires?: SignOptions["expiresIn"];
1867
+ refreshExpires?: SignOptions["expiresIn"];
1868
+ nodeEnv?: string;
1869
+ refreshCookieName?: string;
1870
+ }
1871
+ declare class JWTService {
1872
+ private accessSecret;
1873
+ private refreshSecret;
1874
+ private accessExpires;
1875
+ private refreshExpires;
1876
+ private nodeEnv;
1877
+ private refreshCookieName;
1878
+ constructor(options: JWTServiceOptions);
1879
+ createAccessToken(payload: object): string;
1880
+ createRefreshToken(payload: object): string;
1881
+ verifyAccessToken<T extends JwtPayload = JwtPayload>(token: string): T | null;
1882
+ verifyRefreshToken<T extends JwtPayload = JwtPayload>(token: string): T | null;
1883
+ extractToken(req: Request): string | null;
1884
+ setRefreshTokenCookie(res: Response, refreshToken: string): void;
1885
+ clearRefreshTokenCookie(res: Response): void;
1886
+ sendAuthTokens(res: Response, payload: object): string;
1871
1887
  }
1872
1888
 
1873
1889
  declare function errorToString(error: unknown): string;
@@ -1882,4 +1898,4 @@ declare function toMinutes(ms: number): number;
1882
1898
  declare function toHours(ms: number): number;
1883
1899
  declare function sleep(ms: number): Promise<void>;
1884
1900
 
1885
- export { APIFactory, APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, type AdjacentEdge, type AllowedOriginsOptions, AppError, type AzureBlobConfig, AzureBlobService, BPlusTree, BTree, BaseService, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, type CloudinaryConfig, CloudinaryService, ConsistentHash, CountMinSketch, type CrudService, type DatabaseConfig, Deque, type DirectedEdge, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, type Edge, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, type Interval, IntervalTree, KDTree, LFUCache, LRUCache, type LoggerOptions, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, type Point, type Point2D, PriorityQueue, type ProgressCallback, QuadTree, Queue, RadixTree, type Rect, RedBlackTree, SegmentTree, Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, type UploadOptions, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, seconds, sleep, toHours, toMinutes, toSeconds, validate };
1901
+ export { APIFactory, APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, type AdjacentEdge, type AllowedOriginsOptions, AppError, type AzureBlobConfig, AzureBlobService, BPlusTree, BTree, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, type CloudinaryConfig, CloudinaryService, ConsistentHash, CountMinSketch, type DatabaseConfig, Deque, type DirectedEdge, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, type Edge, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, type Interval, IntervalTree, JWTService, type JWTServiceOptions, KDTree, LFUCache, LRUCache, type LoggerOptions, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, type Point, type Point2D, PriorityQueue, type ProgressCallback, QuadTree, Queue, RadixTree, type Rect, RedBlackTree, SegmentTree, Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, type UploadOptions, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, pickFields, seconds, sleep, toHours, toMinutes, toSeconds, validate };
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import fs from 'fs';
3
3
  import cloudinaryModule from 'cloudinary';
4
4
  import mongoose from 'mongoose';
5
5
  import dotenv from 'dotenv';
6
+ import jwt from 'jsonwebtoken';
6
7
 
7
8
  // src/errors/appError.ts
8
9
  var AppError = class extends Error {
@@ -203,6 +204,42 @@ var APIFactory = class {
203
204
  });
204
205
  }
205
206
  };
207
+
208
+ // src/api/pickFields.ts
209
+ function pickFields(obj, fields, options = {}) {
210
+ const removeUndefined = options.removeUndefined ?? false;
211
+ const removeNull = options.removeNull ?? false;
212
+ const removeEmptyString = options.removeEmptyString ?? false;
213
+ const strict = options.strict ?? false;
214
+ const defaults = options.defaults ?? {};
215
+ const rename = options.rename ?? {};
216
+ const transform = options.transform ?? {};
217
+ const result = {};
218
+ if (strict) {
219
+ for (const key of Object.keys(obj)) {
220
+ if (!fields.includes(key)) {
221
+ throw new Error(`Unknown field: ${key}`);
222
+ }
223
+ }
224
+ }
225
+ for (const field of fields) {
226
+ let value = obj[field];
227
+ if (value === void 0 && field in defaults) {
228
+ value = defaults[field];
229
+ }
230
+ if (removeUndefined && value === void 0) continue;
231
+ if (removeNull && value === null) continue;
232
+ if (removeEmptyString && value === "") continue;
233
+ if (transform[field]) {
234
+ value = transform[field](value);
235
+ }
236
+ const outputKey = rename[field] ?? field;
237
+ if (Object.prototype.hasOwnProperty.call(obj, field) || field in defaults) {
238
+ result[outputKey] = value;
239
+ }
240
+ }
241
+ return result;
242
+ }
206
243
  var AzureBlobService = class {
207
244
  containerName;
208
245
  blobServiceClient;
@@ -5250,51 +5287,96 @@ var validate = (schema) => (req, _res, next) => {
5250
5287
  }
5251
5288
  next();
5252
5289
  };
5253
-
5254
- // src/services/base.service.ts
5255
- var BaseService = class {
5256
- model;
5257
- resourceName;
5258
- constructor(model, resourceName) {
5259
- this.model = model;
5260
- this.resourceName = resourceName;
5261
- }
5262
- async create(data) {
5263
- const doc = await this.model.create(data);
5264
- return doc;
5265
- }
5266
- async findAll() {
5267
- return this.model.find();
5268
- }
5269
- async findById(id) {
5270
- const doc = await this.model.findById(id);
5271
- if (!doc) {
5272
- throw new AppError(`${this.resourceName} not found`, 404, {
5273
- code: `${this.resourceName.toUpperCase()}_NOT_FOUND`
5274
- });
5275
- }
5276
- return doc;
5290
+ var JWTService = class {
5291
+ accessSecret;
5292
+ refreshSecret;
5293
+ accessExpires;
5294
+ refreshExpires;
5295
+ nodeEnv;
5296
+ refreshCookieName;
5297
+ constructor(options) {
5298
+ this.accessSecret = options.accessSecret;
5299
+ this.refreshSecret = options.refreshSecret;
5300
+ this.accessExpires = options.accessExpires || "15m";
5301
+ this.refreshExpires = options.refreshExpires || "30d";
5302
+ this.nodeEnv = options.nodeEnv || "development";
5303
+ this.refreshCookieName = options.refreshCookieName || "refreshJwt";
5304
+ }
5305
+ // ---------------------------------
5306
+ // Access and Refresh Token Creation
5307
+ // ---------------------------------
5308
+ createAccessToken(payload) {
5309
+ return jwt.sign(payload, this.accessSecret, {
5310
+ expiresIn: this.accessExpires
5311
+ });
5277
5312
  }
5278
- async updateById(id, data) {
5279
- const doc = await this.model.findByIdAndUpdate(id, data, {
5280
- new: true,
5281
- runValidators: true
5313
+ createRefreshToken(payload) {
5314
+ return jwt.sign(payload, this.refreshSecret, {
5315
+ expiresIn: this.refreshExpires
5282
5316
  });
5283
- if (!doc) {
5284
- throw new AppError(`${this.resourceName} not found`, 404, {
5285
- code: `${this.resourceName.toUpperCase()}_NOT_FOUND`
5286
- });
5317
+ }
5318
+ // ---------------------------------
5319
+ // Token Verification
5320
+ // ---------------------------------
5321
+ verifyAccessToken(token) {
5322
+ try {
5323
+ return jwt.verify(token, this.accessSecret);
5324
+ } catch (err) {
5325
+ console.error("Access token verification failed:", err.message);
5326
+ return null;
5287
5327
  }
5288
- return doc;
5289
5328
  }
5290
- async deleteById(id) {
5291
- const doc = await this.model.findByIdAndDelete(id);
5292
- if (!doc) {
5293
- throw new AppError(`${this.resourceName} not found`, 404, {
5294
- code: `${this.resourceName.toUpperCase()}_NOT_FOUND`
5295
- });
5329
+ verifyRefreshToken(token) {
5330
+ try {
5331
+ return jwt.verify(token, this.refreshSecret);
5332
+ } catch (err) {
5333
+ console.error("Refresh token verification failed:", err.message);
5334
+ return null;
5335
+ }
5336
+ }
5337
+ // ---------------------------------
5338
+ // Token Extraction
5339
+ // ---------------------------------
5340
+ extractToken(req) {
5341
+ if (req.headers.authorization?.startsWith("Bearer ")) {
5342
+ return req.headers.authorization.split(" ")[1];
5343
+ }
5344
+ if (req.cookies?.[this.refreshCookieName]) {
5345
+ return req.cookies[this.refreshCookieName];
5296
5346
  }
5297
- return doc;
5347
+ if (req.cookies?.jwt) {
5348
+ return req.cookies.jwt;
5349
+ }
5350
+ return null;
5351
+ }
5352
+ // ---------------------------------
5353
+ // Cookie Helpers
5354
+ // ---------------------------------
5355
+ setRefreshTokenCookie(res, refreshToken) {
5356
+ res.cookie(this.refreshCookieName, refreshToken, {
5357
+ httpOnly: true,
5358
+ secure: this.nodeEnv === "production",
5359
+ sameSite: this.nodeEnv === "production" ? "none" : "lax",
5360
+ maxAge: 30 * 24 * 60 * 60 * 1e3,
5361
+ path: "/"
5362
+ });
5363
+ }
5364
+ clearRefreshTokenCookie(res) {
5365
+ res.clearCookie(this.refreshCookieName, {
5366
+ httpOnly: true,
5367
+ secure: this.nodeEnv === "production",
5368
+ sameSite: this.nodeEnv === "production" ? "none" : "lax",
5369
+ path: "/"
5370
+ });
5371
+ }
5372
+ // ---------------------------------
5373
+ // Login Helpers
5374
+ // ---------------------------------
5375
+ sendAuthTokens(res, payload) {
5376
+ const accessToken = this.createAccessToken(payload);
5377
+ const refreshToken = this.createRefreshToken(payload);
5378
+ this.setRefreshTokenCookie(res, refreshToken);
5379
+ return accessToken;
5298
5380
  }
5299
5381
  };
5300
5382
 
@@ -5327,6 +5409,6 @@ function sleep(ms) {
5327
5409
  return new Promise((resolve) => setTimeout(resolve, ms));
5328
5410
  }
5329
5411
 
5330
- export { APIFactory, apiFeatures_default as APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, AppError, AzureBlobService, BPlusTree, BTree, BaseService, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, CloudinaryService, ConsistentHash, CountMinSketch, Deque, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, IntervalTree, KDTree, LFUCache, LRUCache, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, PriorityQueue, QuadTree, Queue, RadixTree, RedBlackTree, SegmentTree, Set2 as Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, seconds, sleep, toHours, toMinutes, toSeconds, validate };
5412
+ export { APIFactory, apiFeatures_default as APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, AppError, AzureBlobService, BPlusTree, BTree, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, CloudinaryService, ConsistentHash, CountMinSketch, Deque, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, IntervalTree, JWTService, KDTree, LFUCache, LRUCache, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, PriorityQueue, QuadTree, Queue, RadixTree, RedBlackTree, SegmentTree, Set2 as Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, pickFields, seconds, sleep, toHours, toMinutes, toSeconds, validate };
5331
5413
  //# sourceMappingURL=index.js.map
5332
5414
  //# sourceMappingURL=index.js.map