opticore-webapp-core 1.0.7 → 1.0.8
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.cjs +232 -187
- package/dist/index.d.cts +38 -22
- package/dist/index.d.ts +38 -22
- package/dist/index.js +242 -197
- package/dist/utils/translations/message.translation.en.json +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -2,6 +2,7 @@ import { StackTraceError } from 'opticore-catch-exception-error';
|
|
|
2
2
|
import mySQL from 'mysql';
|
|
3
3
|
import { ConnectionOptions } from 'tls';
|
|
4
4
|
import { CustomTypesConfig } from 'pg';
|
|
5
|
+
import stream from 'stream';
|
|
5
6
|
import { ServerResponse, IncomingMessage } from 'node:http';
|
|
6
7
|
|
|
7
8
|
declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
@@ -10,15 +11,17 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
10
11
|
*
|
|
11
12
|
* @param rsaKey
|
|
12
13
|
* @param keyType
|
|
14
|
+
* @param localeLanguage
|
|
13
15
|
* @protected
|
|
14
16
|
*
|
|
15
17
|
* Return ErrorHandler | string
|
|
16
18
|
*/
|
|
17
|
-
protected static verifyExistingKey(rsaKey: string, keyType: string): StackTraceError | string;
|
|
19
|
+
protected static verifyExistingKey(rsaKey: string, keyType: string, localeLanguage: string): StackTraceError | string;
|
|
18
20
|
/**
|
|
19
21
|
*
|
|
20
22
|
* @param privateKey
|
|
21
23
|
* @param payload
|
|
24
|
+
* @param localeLanguage
|
|
22
25
|
* @private
|
|
23
26
|
*
|
|
24
27
|
* Return Buffer
|
|
@@ -29,6 +32,7 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
29
32
|
* @param privateKey
|
|
30
33
|
* @param publicKey
|
|
31
34
|
* @param payload
|
|
35
|
+
* @param localeLanguage
|
|
32
36
|
* @private
|
|
33
37
|
*/
|
|
34
38
|
private static decryptionWithPublicKey;
|
|
@@ -36,6 +40,7 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
36
40
|
*
|
|
37
41
|
* @param privateKey
|
|
38
42
|
* @param payload
|
|
43
|
+
* @param localeLanguage
|
|
39
44
|
* @private
|
|
40
45
|
*/
|
|
41
46
|
private static signWithRSAKey;
|
|
@@ -44,8 +49,9 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
44
49
|
* @param privateKey
|
|
45
50
|
* @param publicKey
|
|
46
51
|
* @param payload
|
|
52
|
+
* @param localeLanguage
|
|
47
53
|
*/
|
|
48
|
-
static verifyRSAKey(privateKey: string, publicKey: string, payload: any): string | Error;
|
|
54
|
+
static verifyRSAKey(privateKey: string, publicKey: string, payload: any, localeLanguage: string): string | Error;
|
|
49
55
|
/**
|
|
50
56
|
*
|
|
51
57
|
* @param props
|
|
@@ -57,18 +63,20 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
declare class SAsymmetricCryptionDataWithPublicRSAKey {
|
|
60
|
-
private static
|
|
66
|
+
private static logger;
|
|
61
67
|
/**
|
|
62
68
|
*
|
|
63
69
|
* @param rsaKey
|
|
64
70
|
* @param keyType
|
|
71
|
+
* @param localeLanguage
|
|
65
72
|
* @protected
|
|
66
73
|
*/
|
|
67
|
-
protected static verifyExistingKey(rsaKey: string, keyType: string): string | Error;
|
|
74
|
+
protected static verifyExistingKey(rsaKey: string, keyType: string, localeLanguage: string): string | Error;
|
|
68
75
|
/**
|
|
69
76
|
*
|
|
70
77
|
* @param publicKey
|
|
71
78
|
* @param payload
|
|
79
|
+
* @param localeLanguage
|
|
72
80
|
* @private
|
|
73
81
|
*/
|
|
74
82
|
private static encryptionWithPublicKey;
|
|
@@ -77,6 +85,7 @@ declare class SAsymmetricCryptionDataWithPublicRSAKey {
|
|
|
77
85
|
* @param privateKey
|
|
78
86
|
* @param publicKey
|
|
79
87
|
* @param payload
|
|
88
|
+
* @param localeLanguage
|
|
80
89
|
* @private
|
|
81
90
|
*/
|
|
82
91
|
private static decryptionWithPrivateKey;
|
|
@@ -84,6 +93,7 @@ declare class SAsymmetricCryptionDataWithPublicRSAKey {
|
|
|
84
93
|
*
|
|
85
94
|
* @param publicKey
|
|
86
95
|
* @param payload
|
|
96
|
+
* @param localeLanguage
|
|
87
97
|
* @private
|
|
88
98
|
*/
|
|
89
99
|
private static signWithPublicRSAKey;
|
|
@@ -92,8 +102,9 @@ declare class SAsymmetricCryptionDataWithPublicRSAKey {
|
|
|
92
102
|
* @param privateKey
|
|
93
103
|
* @param publicKey
|
|
94
104
|
* @param payload
|
|
105
|
+
* @param localeLanguage
|
|
95
106
|
*/
|
|
96
|
-
static verifyPublicRSAKey(privateKey: string, publicKey: string, payload: any): string | StackTraceError;
|
|
107
|
+
static verifyPublicRSAKey(privateKey: string, publicKey: string, payload: any, localeLanguage: string): string | StackTraceError;
|
|
97
108
|
private static traceError;
|
|
98
109
|
}
|
|
99
110
|
|
|
@@ -114,13 +125,14 @@ declare function SCheckerMongoDatabaseConnection(url: string, user: string | any
|
|
|
114
125
|
* @param database
|
|
115
126
|
* @param dbHost
|
|
116
127
|
* @param password
|
|
128
|
+
* @param localeLanguage
|
|
117
129
|
* @constructor
|
|
118
130
|
*
|
|
119
131
|
* Return void
|
|
120
132
|
*/
|
|
121
|
-
declare function SCheckerMySqlDatabaseConnection(dbConnection: mySQL.Connection, user: string, database: string, dbHost: string, password: string): void;
|
|
133
|
+
declare function SCheckerMySqlDatabaseConnection(localeLanguage: string, dbConnection: mySQL.Connection, user: string, database: string, dbHost: string, password: string): void;
|
|
122
134
|
|
|
123
|
-
declare function SCheckerPostgresDatabaseConnection(connectionString: any, keepAlive?: boolean | undefined, stream?: any, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined): Promise<void>;
|
|
135
|
+
declare function SCheckerPostgresDatabaseConnection(localeLanguage: string, connectionString: any, keepAlive?: boolean | undefined, stream?: any, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined): Promise<void>;
|
|
124
136
|
|
|
125
137
|
declare const CLogLevel: {
|
|
126
138
|
readonly debug: "DEBUG";
|
|
@@ -169,15 +181,13 @@ declare class RSAKeyEncryption {
|
|
|
169
181
|
|
|
170
182
|
declare class YamlParsing {
|
|
171
183
|
private static logger;
|
|
172
|
-
static
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
* @param defaultLocalLang
|
|
176
|
-
*/
|
|
177
|
-
static __init(defaultLocalLang: string): typeof YamlParsing;
|
|
184
|
+
private static localeLanguage;
|
|
185
|
+
static __init(localeLanguage: string): typeof YamlParsing;
|
|
186
|
+
static readFile(filePath: string, localeLanguage: string): Promise<void>;
|
|
178
187
|
/**
|
|
179
188
|
*
|
|
180
189
|
* @param content
|
|
190
|
+
* @param localeLanguage
|
|
181
191
|
* @private
|
|
182
192
|
*/
|
|
183
193
|
private static parsing;
|
|
@@ -194,11 +204,11 @@ declare class Environment<T> {
|
|
|
194
204
|
get<K extends keyof T>(key: K): T[K];
|
|
195
205
|
}
|
|
196
206
|
|
|
197
|
-
declare const MMongoCheckerDatabase: (optionalArgumentConnection: string | any) => Promise<void>;
|
|
207
|
+
declare const MMongoCheckerDatabase: (optionalArgumentConnection: string | any, localLanguage: string) => Promise<void>;
|
|
198
208
|
|
|
199
|
-
declare const MMySqlCheckerDatabase: (optionalArgumentConnection: string | any) => void;
|
|
209
|
+
declare const MMySqlCheckerDatabase: (optionalArgumentConnection: string | any, localLanguage: string) => void;
|
|
200
210
|
|
|
201
|
-
declare const MPostgresCheckerDatabase: (
|
|
211
|
+
declare const MPostgresCheckerDatabase: (localLanguage: string, keepAlive?: boolean | undefined, stream?: (() => (stream.Duplex | undefined)) | undefined, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined) => Promise<void>;
|
|
202
212
|
|
|
203
213
|
declare const loggerConfig: {
|
|
204
214
|
logLevels: string[];
|
|
@@ -300,6 +310,8 @@ declare const CSignRSAKeyComponent: {
|
|
|
300
310
|
};
|
|
301
311
|
|
|
302
312
|
declare class Utility {
|
|
313
|
+
private localLang;
|
|
314
|
+
constructor(localLanguage: string);
|
|
303
315
|
/**
|
|
304
316
|
*
|
|
305
317
|
* @param data
|
|
@@ -357,9 +369,10 @@ declare class PathModuleVerifier {
|
|
|
357
369
|
/**
|
|
358
370
|
* Verifies if modules at specific paths are loaded.
|
|
359
371
|
* If any module is not loaded, it throws an error.
|
|
372
|
+
* @param localLanguage
|
|
360
373
|
* @param modulePaths - An array of paths to the modules to verify.
|
|
361
374
|
*/
|
|
362
|
-
static verifyModulePaths(modulePaths: string[]): void;
|
|
375
|
+
static verifyModulePaths(localLanguage: string, modulePaths: string[]): void;
|
|
363
376
|
/**
|
|
364
377
|
* Checks if a specific module at a given path is loaded in the Node.js require cache.
|
|
365
378
|
* @param modulePath - The path to the module.
|
|
@@ -397,45 +410,48 @@ type TParseFunction = (rawBody: string) => any;
|
|
|
397
410
|
/**
|
|
398
411
|
*
|
|
399
412
|
* @param options
|
|
413
|
+
* @param localLanguage
|
|
400
414
|
*
|
|
401
415
|
* Use by this: TJSONBodyParser({ type: 'application/vnd.custom-type' })
|
|
402
416
|
*
|
|
403
417
|
* in express, it can be used like this: app.use(TJSONBodyParser({ type: 'application/vnd.custom-type' }));
|
|
404
418
|
*
|
|
405
419
|
*/
|
|
406
|
-
declare function TJSONBodyParser(options: IBodyParserOptions): void;
|
|
420
|
+
declare function TJSONBodyParser(options: IBodyParserOptions, localLanguage: string): void;
|
|
407
421
|
|
|
408
422
|
/**
|
|
409
423
|
*
|
|
410
424
|
* @param options
|
|
425
|
+
* @param localLanguage
|
|
411
426
|
*
|
|
412
427
|
* Use by this: TRawBodyParser({ type: 'application/vnd.custom-type' })
|
|
413
428
|
*
|
|
414
429
|
* in express, it can be used like this: app.use(rawBodyParserType({ type: 'application/vnd.custom-type' }));
|
|
415
430
|
*
|
|
416
431
|
*/
|
|
417
|
-
declare function TRawBodyParser(options: IBodyParserOptions): void;
|
|
432
|
+
declare function TRawBodyParser(options: IBodyParserOptions, localLanguage: string): void;
|
|
418
433
|
|
|
419
434
|
/**
|
|
420
435
|
*
|
|
421
436
|
* @param options
|
|
437
|
+
* @param localLanguage
|
|
422
438
|
*
|
|
423
439
|
* Use by this: textBodyParserType({ type: 'text/html' })
|
|
424
440
|
*
|
|
425
441
|
* in express, it can be used like this: app.use(textBodyParserType({ type: 'text/html' }));
|
|
426
442
|
*
|
|
427
443
|
*/
|
|
428
|
-
declare function TTextBodyParser(options: IBodyParserOptions): void;
|
|
444
|
+
declare function TTextBodyParser(options: IBodyParserOptions, localLanguage: string): void;
|
|
429
445
|
|
|
430
446
|
/**
|
|
431
447
|
*
|
|
432
448
|
* @param options
|
|
433
|
-
*
|
|
449
|
+
* @param localLanguage
|
|
434
450
|
* Use by this: urlencodedBodyParserType({ type: 'application/x-www-form-urlencoded' })
|
|
435
451
|
*
|
|
436
452
|
* in express, it can be used like this: app.use(urlencodedBodyParserType({ type: 'application/x-www-form-urlencoded' }));
|
|
437
453
|
*
|
|
438
454
|
*/
|
|
439
|
-
declare function TUrlencodedBodyParser(options: IBodyParserOptions): void;
|
|
455
|
+
declare function TUrlencodedBodyParser(options: IBodyParserOptions, localLanguage: string): void;
|
|
440
456
|
|
|
441
457
|
export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, MMongoCheckerDatabase, MMySqlCheckerDatabase, MPostgresCheckerDatabase, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, SCheckerMongoDatabaseConnection, SCheckerMySqlDatabaseConnection, SCheckerPostgresDatabaseConnection, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, Utility, YamlParsing, dateTimeFormatted, loggerConfig, optionalArgumentConnectionUtil };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { StackTraceError } from 'opticore-catch-exception-error';
|
|
|
2
2
|
import mySQL from 'mysql';
|
|
3
3
|
import { ConnectionOptions } from 'tls';
|
|
4
4
|
import { CustomTypesConfig } from 'pg';
|
|
5
|
+
import stream from 'stream';
|
|
5
6
|
import { ServerResponse, IncomingMessage } from 'node:http';
|
|
6
7
|
|
|
7
8
|
declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
@@ -10,15 +11,17 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
10
11
|
*
|
|
11
12
|
* @param rsaKey
|
|
12
13
|
* @param keyType
|
|
14
|
+
* @param localeLanguage
|
|
13
15
|
* @protected
|
|
14
16
|
*
|
|
15
17
|
* Return ErrorHandler | string
|
|
16
18
|
*/
|
|
17
|
-
protected static verifyExistingKey(rsaKey: string, keyType: string): StackTraceError | string;
|
|
19
|
+
protected static verifyExistingKey(rsaKey: string, keyType: string, localeLanguage: string): StackTraceError | string;
|
|
18
20
|
/**
|
|
19
21
|
*
|
|
20
22
|
* @param privateKey
|
|
21
23
|
* @param payload
|
|
24
|
+
* @param localeLanguage
|
|
22
25
|
* @private
|
|
23
26
|
*
|
|
24
27
|
* Return Buffer
|
|
@@ -29,6 +32,7 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
29
32
|
* @param privateKey
|
|
30
33
|
* @param publicKey
|
|
31
34
|
* @param payload
|
|
35
|
+
* @param localeLanguage
|
|
32
36
|
* @private
|
|
33
37
|
*/
|
|
34
38
|
private static decryptionWithPublicKey;
|
|
@@ -36,6 +40,7 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
36
40
|
*
|
|
37
41
|
* @param privateKey
|
|
38
42
|
* @param payload
|
|
43
|
+
* @param localeLanguage
|
|
39
44
|
* @private
|
|
40
45
|
*/
|
|
41
46
|
private static signWithRSAKey;
|
|
@@ -44,8 +49,9 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
44
49
|
* @param privateKey
|
|
45
50
|
* @param publicKey
|
|
46
51
|
* @param payload
|
|
52
|
+
* @param localeLanguage
|
|
47
53
|
*/
|
|
48
|
-
static verifyRSAKey(privateKey: string, publicKey: string, payload: any): string | Error;
|
|
54
|
+
static verifyRSAKey(privateKey: string, publicKey: string, payload: any, localeLanguage: string): string | Error;
|
|
49
55
|
/**
|
|
50
56
|
*
|
|
51
57
|
* @param props
|
|
@@ -57,18 +63,20 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
|
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
declare class SAsymmetricCryptionDataWithPublicRSAKey {
|
|
60
|
-
private static
|
|
66
|
+
private static logger;
|
|
61
67
|
/**
|
|
62
68
|
*
|
|
63
69
|
* @param rsaKey
|
|
64
70
|
* @param keyType
|
|
71
|
+
* @param localeLanguage
|
|
65
72
|
* @protected
|
|
66
73
|
*/
|
|
67
|
-
protected static verifyExistingKey(rsaKey: string, keyType: string): string | Error;
|
|
74
|
+
protected static verifyExistingKey(rsaKey: string, keyType: string, localeLanguage: string): string | Error;
|
|
68
75
|
/**
|
|
69
76
|
*
|
|
70
77
|
* @param publicKey
|
|
71
78
|
* @param payload
|
|
79
|
+
* @param localeLanguage
|
|
72
80
|
* @private
|
|
73
81
|
*/
|
|
74
82
|
private static encryptionWithPublicKey;
|
|
@@ -77,6 +85,7 @@ declare class SAsymmetricCryptionDataWithPublicRSAKey {
|
|
|
77
85
|
* @param privateKey
|
|
78
86
|
* @param publicKey
|
|
79
87
|
* @param payload
|
|
88
|
+
* @param localeLanguage
|
|
80
89
|
* @private
|
|
81
90
|
*/
|
|
82
91
|
private static decryptionWithPrivateKey;
|
|
@@ -84,6 +93,7 @@ declare class SAsymmetricCryptionDataWithPublicRSAKey {
|
|
|
84
93
|
*
|
|
85
94
|
* @param publicKey
|
|
86
95
|
* @param payload
|
|
96
|
+
* @param localeLanguage
|
|
87
97
|
* @private
|
|
88
98
|
*/
|
|
89
99
|
private static signWithPublicRSAKey;
|
|
@@ -92,8 +102,9 @@ declare class SAsymmetricCryptionDataWithPublicRSAKey {
|
|
|
92
102
|
* @param privateKey
|
|
93
103
|
* @param publicKey
|
|
94
104
|
* @param payload
|
|
105
|
+
* @param localeLanguage
|
|
95
106
|
*/
|
|
96
|
-
static verifyPublicRSAKey(privateKey: string, publicKey: string, payload: any): string | StackTraceError;
|
|
107
|
+
static verifyPublicRSAKey(privateKey: string, publicKey: string, payload: any, localeLanguage: string): string | StackTraceError;
|
|
97
108
|
private static traceError;
|
|
98
109
|
}
|
|
99
110
|
|
|
@@ -114,13 +125,14 @@ declare function SCheckerMongoDatabaseConnection(url: string, user: string | any
|
|
|
114
125
|
* @param database
|
|
115
126
|
* @param dbHost
|
|
116
127
|
* @param password
|
|
128
|
+
* @param localeLanguage
|
|
117
129
|
* @constructor
|
|
118
130
|
*
|
|
119
131
|
* Return void
|
|
120
132
|
*/
|
|
121
|
-
declare function SCheckerMySqlDatabaseConnection(dbConnection: mySQL.Connection, user: string, database: string, dbHost: string, password: string): void;
|
|
133
|
+
declare function SCheckerMySqlDatabaseConnection(localeLanguage: string, dbConnection: mySQL.Connection, user: string, database: string, dbHost: string, password: string): void;
|
|
122
134
|
|
|
123
|
-
declare function SCheckerPostgresDatabaseConnection(connectionString: any, keepAlive?: boolean | undefined, stream?: any, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined): Promise<void>;
|
|
135
|
+
declare function SCheckerPostgresDatabaseConnection(localeLanguage: string, connectionString: any, keepAlive?: boolean | undefined, stream?: any, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined): Promise<void>;
|
|
124
136
|
|
|
125
137
|
declare const CLogLevel: {
|
|
126
138
|
readonly debug: "DEBUG";
|
|
@@ -169,15 +181,13 @@ declare class RSAKeyEncryption {
|
|
|
169
181
|
|
|
170
182
|
declare class YamlParsing {
|
|
171
183
|
private static logger;
|
|
172
|
-
static
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
* @param defaultLocalLang
|
|
176
|
-
*/
|
|
177
|
-
static __init(defaultLocalLang: string): typeof YamlParsing;
|
|
184
|
+
private static localeLanguage;
|
|
185
|
+
static __init(localeLanguage: string): typeof YamlParsing;
|
|
186
|
+
static readFile(filePath: string, localeLanguage: string): Promise<void>;
|
|
178
187
|
/**
|
|
179
188
|
*
|
|
180
189
|
* @param content
|
|
190
|
+
* @param localeLanguage
|
|
181
191
|
* @private
|
|
182
192
|
*/
|
|
183
193
|
private static parsing;
|
|
@@ -194,11 +204,11 @@ declare class Environment<T> {
|
|
|
194
204
|
get<K extends keyof T>(key: K): T[K];
|
|
195
205
|
}
|
|
196
206
|
|
|
197
|
-
declare const MMongoCheckerDatabase: (optionalArgumentConnection: string | any) => Promise<void>;
|
|
207
|
+
declare const MMongoCheckerDatabase: (optionalArgumentConnection: string | any, localLanguage: string) => Promise<void>;
|
|
198
208
|
|
|
199
|
-
declare const MMySqlCheckerDatabase: (optionalArgumentConnection: string | any) => void;
|
|
209
|
+
declare const MMySqlCheckerDatabase: (optionalArgumentConnection: string | any, localLanguage: string) => void;
|
|
200
210
|
|
|
201
|
-
declare const MPostgresCheckerDatabase: (
|
|
211
|
+
declare const MPostgresCheckerDatabase: (localLanguage: string, keepAlive?: boolean | undefined, stream?: (() => (stream.Duplex | undefined)) | undefined, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined) => Promise<void>;
|
|
202
212
|
|
|
203
213
|
declare const loggerConfig: {
|
|
204
214
|
logLevels: string[];
|
|
@@ -300,6 +310,8 @@ declare const CSignRSAKeyComponent: {
|
|
|
300
310
|
};
|
|
301
311
|
|
|
302
312
|
declare class Utility {
|
|
313
|
+
private localLang;
|
|
314
|
+
constructor(localLanguage: string);
|
|
303
315
|
/**
|
|
304
316
|
*
|
|
305
317
|
* @param data
|
|
@@ -357,9 +369,10 @@ declare class PathModuleVerifier {
|
|
|
357
369
|
/**
|
|
358
370
|
* Verifies if modules at specific paths are loaded.
|
|
359
371
|
* If any module is not loaded, it throws an error.
|
|
372
|
+
* @param localLanguage
|
|
360
373
|
* @param modulePaths - An array of paths to the modules to verify.
|
|
361
374
|
*/
|
|
362
|
-
static verifyModulePaths(modulePaths: string[]): void;
|
|
375
|
+
static verifyModulePaths(localLanguage: string, modulePaths: string[]): void;
|
|
363
376
|
/**
|
|
364
377
|
* Checks if a specific module at a given path is loaded in the Node.js require cache.
|
|
365
378
|
* @param modulePath - The path to the module.
|
|
@@ -397,45 +410,48 @@ type TParseFunction = (rawBody: string) => any;
|
|
|
397
410
|
/**
|
|
398
411
|
*
|
|
399
412
|
* @param options
|
|
413
|
+
* @param localLanguage
|
|
400
414
|
*
|
|
401
415
|
* Use by this: TJSONBodyParser({ type: 'application/vnd.custom-type' })
|
|
402
416
|
*
|
|
403
417
|
* in express, it can be used like this: app.use(TJSONBodyParser({ type: 'application/vnd.custom-type' }));
|
|
404
418
|
*
|
|
405
419
|
*/
|
|
406
|
-
declare function TJSONBodyParser(options: IBodyParserOptions): void;
|
|
420
|
+
declare function TJSONBodyParser(options: IBodyParserOptions, localLanguage: string): void;
|
|
407
421
|
|
|
408
422
|
/**
|
|
409
423
|
*
|
|
410
424
|
* @param options
|
|
425
|
+
* @param localLanguage
|
|
411
426
|
*
|
|
412
427
|
* Use by this: TRawBodyParser({ type: 'application/vnd.custom-type' })
|
|
413
428
|
*
|
|
414
429
|
* in express, it can be used like this: app.use(rawBodyParserType({ type: 'application/vnd.custom-type' }));
|
|
415
430
|
*
|
|
416
431
|
*/
|
|
417
|
-
declare function TRawBodyParser(options: IBodyParserOptions): void;
|
|
432
|
+
declare function TRawBodyParser(options: IBodyParserOptions, localLanguage: string): void;
|
|
418
433
|
|
|
419
434
|
/**
|
|
420
435
|
*
|
|
421
436
|
* @param options
|
|
437
|
+
* @param localLanguage
|
|
422
438
|
*
|
|
423
439
|
* Use by this: textBodyParserType({ type: 'text/html' })
|
|
424
440
|
*
|
|
425
441
|
* in express, it can be used like this: app.use(textBodyParserType({ type: 'text/html' }));
|
|
426
442
|
*
|
|
427
443
|
*/
|
|
428
|
-
declare function TTextBodyParser(options: IBodyParserOptions): void;
|
|
444
|
+
declare function TTextBodyParser(options: IBodyParserOptions, localLanguage: string): void;
|
|
429
445
|
|
|
430
446
|
/**
|
|
431
447
|
*
|
|
432
448
|
* @param options
|
|
433
|
-
*
|
|
449
|
+
* @param localLanguage
|
|
434
450
|
* Use by this: urlencodedBodyParserType({ type: 'application/x-www-form-urlencoded' })
|
|
435
451
|
*
|
|
436
452
|
* in express, it can be used like this: app.use(urlencodedBodyParserType({ type: 'application/x-www-form-urlencoded' }));
|
|
437
453
|
*
|
|
438
454
|
*/
|
|
439
|
-
declare function TUrlencodedBodyParser(options: IBodyParserOptions): void;
|
|
455
|
+
declare function TUrlencodedBodyParser(options: IBodyParserOptions, localLanguage: string): void;
|
|
440
456
|
|
|
441
457
|
export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, MMongoCheckerDatabase, MMySqlCheckerDatabase, MPostgresCheckerDatabase, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, SCheckerMongoDatabaseConnection, SCheckerMySqlDatabaseConnection, SCheckerPostgresDatabaseConnection, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, Utility, YamlParsing, dateTimeFormatted, loggerConfig, optionalArgumentConnectionUtil };
|