@rabstack/rab-api 1.13.0 → 1.15.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/index.cjs.js +20 -20
- package/index.esm.d.ts +10 -10
- package/index.esm.js +20 -20
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -244,8 +244,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
244
244
|
/**
|
|
245
245
|
* @param message - Human-readable error message (default: 'Unauthorized')
|
|
246
246
|
* @param errorCode - Optional machine-readable error code
|
|
247
|
-
*/ constructor(message = 'Unauthorized', errorCode){
|
|
248
|
-
super(message, 401, errorCode);
|
|
247
|
+
*/ constructor(message = 'Unauthorized', errorCode, errors){
|
|
248
|
+
super(message, 401, errorCode, errors);
|
|
249
249
|
this.name = 'UnauthorizedException';
|
|
250
250
|
Error.captureStackTrace(this, this.constructor);
|
|
251
251
|
}
|
|
@@ -262,8 +262,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
262
262
|
/**
|
|
263
263
|
* @param message - Human-readable error message (default: 'Forbidden')
|
|
264
264
|
* @param errorCode - Optional machine-readable error code
|
|
265
|
-
*/ constructor(message = 'Forbidden', errorCode){
|
|
266
|
-
super(message, 403, errorCode);
|
|
265
|
+
*/ constructor(message = 'Forbidden', errorCode, errors){
|
|
266
|
+
super(message, 403, errorCode, errors);
|
|
267
267
|
this.name = 'ForbiddenException';
|
|
268
268
|
Error.captureStackTrace(this, this.constructor);
|
|
269
269
|
}
|
|
@@ -280,8 +280,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
280
280
|
/**
|
|
281
281
|
* @param message - Human-readable error message (default: 'Not Found')
|
|
282
282
|
* @param errorCode - Optional machine-readable error code
|
|
283
|
-
*/ constructor(message = 'Not Found', errorCode){
|
|
284
|
-
super(message, 404, errorCode);
|
|
283
|
+
*/ constructor(message = 'Not Found', errorCode, errors){
|
|
284
|
+
super(message, 404, errorCode, errors);
|
|
285
285
|
this.name = 'NotFoundException';
|
|
286
286
|
Error.captureStackTrace(this, this.constructor);
|
|
287
287
|
}
|
|
@@ -298,8 +298,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
298
298
|
/**
|
|
299
299
|
* @param message - Human-readable error message (default: 'Method Not Allowed')
|
|
300
300
|
* @param errorCode - Optional machine-readable error code
|
|
301
|
-
*/ constructor(message = 'Method Not Allowed', errorCode){
|
|
302
|
-
super(message, 405, errorCode);
|
|
301
|
+
*/ constructor(message = 'Method Not Allowed', errorCode, errors){
|
|
302
|
+
super(message, 405, errorCode, errors);
|
|
303
303
|
this.name = 'MethodNotAllowedException';
|
|
304
304
|
Error.captureStackTrace(this, this.constructor);
|
|
305
305
|
}
|
|
@@ -316,8 +316,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
316
316
|
/**
|
|
317
317
|
* @param message - Human-readable error message (default: 'Request Timeout')
|
|
318
318
|
* @param errorCode - Optional machine-readable error code
|
|
319
|
-
*/ constructor(message = 'Request Timeout', errorCode){
|
|
320
|
-
super(message, 408, errorCode);
|
|
319
|
+
*/ constructor(message = 'Request Timeout', errorCode, errors){
|
|
320
|
+
super(message, 408, errorCode, errors);
|
|
321
321
|
this.name = 'RequestTimeoutException';
|
|
322
322
|
Error.captureStackTrace(this, this.constructor);
|
|
323
323
|
}
|
|
@@ -334,8 +334,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
334
334
|
/**
|
|
335
335
|
* @param message - Human-readable error message
|
|
336
336
|
* @param errorCode - Optional machine-readable error code
|
|
337
|
-
*/ constructor(message, errorCode){
|
|
338
|
-
super(message, 409, errorCode);
|
|
337
|
+
*/ constructor(message, errorCode, errors){
|
|
338
|
+
super(message, 409, errorCode, errors);
|
|
339
339
|
this.name = 'ConflictException';
|
|
340
340
|
Error.captureStackTrace(this, this.constructor);
|
|
341
341
|
}
|
|
@@ -352,8 +352,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
352
352
|
/**
|
|
353
353
|
* @param message - Human-readable error message (default: 'Payload Too Large')
|
|
354
354
|
* @param errorCode - Optional machine-readable error code
|
|
355
|
-
*/ constructor(message = 'Payload Too Large', errorCode){
|
|
356
|
-
super(message, 413, errorCode);
|
|
355
|
+
*/ constructor(message = 'Payload Too Large', errorCode, errors){
|
|
356
|
+
super(message, 413, errorCode, errors);
|
|
357
357
|
this.name = 'PayloadTooLargeException';
|
|
358
358
|
Error.captureStackTrace(this, this.constructor);
|
|
359
359
|
}
|
|
@@ -393,8 +393,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
393
393
|
/**
|
|
394
394
|
* @param message - Human-readable error message (default: 'Too Many Requests')
|
|
395
395
|
* @param errorCode - Optional machine-readable error code
|
|
396
|
-
*/ constructor(message = 'Too Many Requests', errorCode){
|
|
397
|
-
super(message, 429, errorCode);
|
|
396
|
+
*/ constructor(message = 'Too Many Requests', errorCode, errors){
|
|
397
|
+
super(message, 429, errorCode, errors);
|
|
398
398
|
this.name = 'TooManyRequestsException';
|
|
399
399
|
Error.captureStackTrace(this, this.constructor);
|
|
400
400
|
}
|
|
@@ -411,8 +411,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
411
411
|
/**
|
|
412
412
|
* @param message - Human-readable error message (default: 'Internal Server Error')
|
|
413
413
|
* @param errorCode - Optional machine-readable error code
|
|
414
|
-
*/ constructor(message = 'Internal Server Error', errorCode){
|
|
415
|
-
super(message, 500, errorCode);
|
|
414
|
+
*/ constructor(message = 'Internal Server Error', errorCode, errors){
|
|
415
|
+
super(message, 500, errorCode, errors);
|
|
416
416
|
this.name = 'InternalServerErrorException';
|
|
417
417
|
Error.captureStackTrace(this, this.constructor);
|
|
418
418
|
}
|
|
@@ -429,8 +429,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
429
429
|
/**
|
|
430
430
|
* @param message - Human-readable error message (default: 'Service Unavailable')
|
|
431
431
|
* @param errorCode - Optional machine-readable error code
|
|
432
|
-
*/ constructor(message = 'Service Unavailable', errorCode){
|
|
433
|
-
super(message, 503, errorCode);
|
|
432
|
+
*/ constructor(message = 'Service Unavailable', errorCode, errors){
|
|
433
|
+
super(message, 503, errorCode, errors);
|
|
434
434
|
this.name = 'ServiceUnavailableException';
|
|
435
435
|
Error.captureStackTrace(this, this.constructor);
|
|
436
436
|
}
|
package/index.esm.d.ts
CHANGED
|
@@ -209,7 +209,7 @@ export declare class ConflictException extends RabApiError {
|
|
|
209
209
|
* @param message - Human-readable error message
|
|
210
210
|
* @param errorCode - Optional machine-readable error code
|
|
211
211
|
*/
|
|
212
|
-
constructor(message: string, errorCode?: string);
|
|
212
|
+
constructor(message: string, errorCode?: string, errors?: string[]);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
/**
|
|
@@ -407,7 +407,7 @@ export declare class ForbiddenException extends RabApiError {
|
|
|
407
407
|
* @param message - Human-readable error message (default: 'Forbidden')
|
|
408
408
|
* @param errorCode - Optional machine-readable error code
|
|
409
409
|
*/
|
|
410
|
-
constructor(message?: string, errorCode?: string);
|
|
410
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
/**
|
|
@@ -557,7 +557,7 @@ export declare class InternalServerErrorException extends RabApiError {
|
|
|
557
557
|
* @param message - Human-readable error message (default: 'Internal Server Error')
|
|
558
558
|
* @param errorCode - Optional machine-readable error code
|
|
559
559
|
*/
|
|
560
|
-
constructor(message?: string, errorCode?: string);
|
|
560
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
561
561
|
}
|
|
562
562
|
|
|
563
563
|
export declare const isCallBackPipe: (pipe: PipeFn | PipeFnCallBack) => pipe is PipeFnCallBack;
|
|
@@ -596,7 +596,7 @@ export declare class MethodNotAllowedException extends RabApiError {
|
|
|
596
596
|
* @param message - Human-readable error message (default: 'Method Not Allowed')
|
|
597
597
|
* @param errorCode - Optional machine-readable error code
|
|
598
598
|
*/
|
|
599
|
-
constructor(message?: string, errorCode?: string);
|
|
599
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
/**
|
|
@@ -618,7 +618,7 @@ export declare class NotFoundException extends RabApiError {
|
|
|
618
618
|
* @param message - Human-readable error message (default: 'Not Found')
|
|
619
619
|
* @param errorCode - Optional machine-readable error code
|
|
620
620
|
*/
|
|
621
|
-
constructor(message?: string, errorCode?: string);
|
|
621
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
622
622
|
}
|
|
623
623
|
|
|
624
624
|
export declare type OpenApiDocsMetadata = {
|
|
@@ -715,7 +715,7 @@ export declare class PayloadTooLargeException extends RabApiError {
|
|
|
715
715
|
* @param message - Human-readable error message (default: 'Payload Too Large')
|
|
716
716
|
* @param errorCode - Optional machine-readable error code
|
|
717
717
|
*/
|
|
718
|
-
constructor(message?: string, errorCode?: string);
|
|
718
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
719
719
|
}
|
|
720
720
|
|
|
721
721
|
/**
|
|
@@ -941,7 +941,7 @@ export declare class RequestTimeoutException extends RabApiError {
|
|
|
941
941
|
* @param message - Human-readable error message (default: 'Request Timeout')
|
|
942
942
|
* @param errorCode - Optional machine-readable error code
|
|
943
943
|
*/
|
|
944
|
-
constructor(message?: string, errorCode?: string);
|
|
944
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
945
945
|
}
|
|
946
946
|
|
|
947
947
|
/**
|
|
@@ -977,7 +977,7 @@ export declare class ServiceUnavailableException extends RabApiError {
|
|
|
977
977
|
* @param message - Human-readable error message (default: 'Service Unavailable')
|
|
978
978
|
* @param errorCode - Optional machine-readable error code
|
|
979
979
|
*/
|
|
980
|
-
constructor(message?: string, errorCode?: string);
|
|
980
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
981
981
|
}
|
|
982
982
|
|
|
983
983
|
/**
|
|
@@ -999,7 +999,7 @@ export declare class TooManyRequestsException extends RabApiError {
|
|
|
999
999
|
* @param message - Human-readable error message (default: 'Too Many Requests')
|
|
1000
1000
|
* @param errorCode - Optional machine-readable error code
|
|
1001
1001
|
*/
|
|
1002
|
-
constructor(message?: string, errorCode?: string);
|
|
1002
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
1003
1003
|
}
|
|
1004
1004
|
|
|
1005
1005
|
/**
|
|
@@ -1016,7 +1016,7 @@ export declare class UnauthorizedException extends RabApiError {
|
|
|
1016
1016
|
* @param message - Human-readable error message (default: 'Unauthorized')
|
|
1017
1017
|
* @param errorCode - Optional machine-readable error code
|
|
1018
1018
|
*/
|
|
1019
|
-
constructor(message?: string, errorCode?: string);
|
|
1019
|
+
constructor(message?: string, errorCode?: string, errors?: string[]);
|
|
1020
1020
|
}
|
|
1021
1021
|
|
|
1022
1022
|
/**
|
package/index.esm.js
CHANGED
|
@@ -242,8 +242,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
242
242
|
/**
|
|
243
243
|
* @param message - Human-readable error message (default: 'Unauthorized')
|
|
244
244
|
* @param errorCode - Optional machine-readable error code
|
|
245
|
-
*/ constructor(message = 'Unauthorized', errorCode){
|
|
246
|
-
super(message, 401, errorCode);
|
|
245
|
+
*/ constructor(message = 'Unauthorized', errorCode, errors){
|
|
246
|
+
super(message, 401, errorCode, errors);
|
|
247
247
|
this.name = 'UnauthorizedException';
|
|
248
248
|
Error.captureStackTrace(this, this.constructor);
|
|
249
249
|
}
|
|
@@ -260,8 +260,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
260
260
|
/**
|
|
261
261
|
* @param message - Human-readable error message (default: 'Forbidden')
|
|
262
262
|
* @param errorCode - Optional machine-readable error code
|
|
263
|
-
*/ constructor(message = 'Forbidden', errorCode){
|
|
264
|
-
super(message, 403, errorCode);
|
|
263
|
+
*/ constructor(message = 'Forbidden', errorCode, errors){
|
|
264
|
+
super(message, 403, errorCode, errors);
|
|
265
265
|
this.name = 'ForbiddenException';
|
|
266
266
|
Error.captureStackTrace(this, this.constructor);
|
|
267
267
|
}
|
|
@@ -278,8 +278,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
278
278
|
/**
|
|
279
279
|
* @param message - Human-readable error message (default: 'Not Found')
|
|
280
280
|
* @param errorCode - Optional machine-readable error code
|
|
281
|
-
*/ constructor(message = 'Not Found', errorCode){
|
|
282
|
-
super(message, 404, errorCode);
|
|
281
|
+
*/ constructor(message = 'Not Found', errorCode, errors){
|
|
282
|
+
super(message, 404, errorCode, errors);
|
|
283
283
|
this.name = 'NotFoundException';
|
|
284
284
|
Error.captureStackTrace(this, this.constructor);
|
|
285
285
|
}
|
|
@@ -296,8 +296,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
296
296
|
/**
|
|
297
297
|
* @param message - Human-readable error message (default: 'Method Not Allowed')
|
|
298
298
|
* @param errorCode - Optional machine-readable error code
|
|
299
|
-
*/ constructor(message = 'Method Not Allowed', errorCode){
|
|
300
|
-
super(message, 405, errorCode);
|
|
299
|
+
*/ constructor(message = 'Method Not Allowed', errorCode, errors){
|
|
300
|
+
super(message, 405, errorCode, errors);
|
|
301
301
|
this.name = 'MethodNotAllowedException';
|
|
302
302
|
Error.captureStackTrace(this, this.constructor);
|
|
303
303
|
}
|
|
@@ -314,8 +314,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
314
314
|
/**
|
|
315
315
|
* @param message - Human-readable error message (default: 'Request Timeout')
|
|
316
316
|
* @param errorCode - Optional machine-readable error code
|
|
317
|
-
*/ constructor(message = 'Request Timeout', errorCode){
|
|
318
|
-
super(message, 408, errorCode);
|
|
317
|
+
*/ constructor(message = 'Request Timeout', errorCode, errors){
|
|
318
|
+
super(message, 408, errorCode, errors);
|
|
319
319
|
this.name = 'RequestTimeoutException';
|
|
320
320
|
Error.captureStackTrace(this, this.constructor);
|
|
321
321
|
}
|
|
@@ -332,8 +332,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
332
332
|
/**
|
|
333
333
|
* @param message - Human-readable error message
|
|
334
334
|
* @param errorCode - Optional machine-readable error code
|
|
335
|
-
*/ constructor(message, errorCode){
|
|
336
|
-
super(message, 409, errorCode);
|
|
335
|
+
*/ constructor(message, errorCode, errors){
|
|
336
|
+
super(message, 409, errorCode, errors);
|
|
337
337
|
this.name = 'ConflictException';
|
|
338
338
|
Error.captureStackTrace(this, this.constructor);
|
|
339
339
|
}
|
|
@@ -350,8 +350,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
350
350
|
/**
|
|
351
351
|
* @param message - Human-readable error message (default: 'Payload Too Large')
|
|
352
352
|
* @param errorCode - Optional machine-readable error code
|
|
353
|
-
*/ constructor(message = 'Payload Too Large', errorCode){
|
|
354
|
-
super(message, 413, errorCode);
|
|
353
|
+
*/ constructor(message = 'Payload Too Large', errorCode, errors){
|
|
354
|
+
super(message, 413, errorCode, errors);
|
|
355
355
|
this.name = 'PayloadTooLargeException';
|
|
356
356
|
Error.captureStackTrace(this, this.constructor);
|
|
357
357
|
}
|
|
@@ -391,8 +391,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
391
391
|
/**
|
|
392
392
|
* @param message - Human-readable error message (default: 'Too Many Requests')
|
|
393
393
|
* @param errorCode - Optional machine-readable error code
|
|
394
|
-
*/ constructor(message = 'Too Many Requests', errorCode){
|
|
395
|
-
super(message, 429, errorCode);
|
|
394
|
+
*/ constructor(message = 'Too Many Requests', errorCode, errors){
|
|
395
|
+
super(message, 429, errorCode, errors);
|
|
396
396
|
this.name = 'TooManyRequestsException';
|
|
397
397
|
Error.captureStackTrace(this, this.constructor);
|
|
398
398
|
}
|
|
@@ -409,8 +409,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
409
409
|
/**
|
|
410
410
|
* @param message - Human-readable error message (default: 'Internal Server Error')
|
|
411
411
|
* @param errorCode - Optional machine-readable error code
|
|
412
|
-
*/ constructor(message = 'Internal Server Error', errorCode){
|
|
413
|
-
super(message, 500, errorCode);
|
|
412
|
+
*/ constructor(message = 'Internal Server Error', errorCode, errors){
|
|
413
|
+
super(message, 500, errorCode, errors);
|
|
414
414
|
this.name = 'InternalServerErrorException';
|
|
415
415
|
Error.captureStackTrace(this, this.constructor);
|
|
416
416
|
}
|
|
@@ -427,8 +427,8 @@ const isCallBackPipe = (pipe)=>typeof pipe === 'function' && pipe.length == 1;
|
|
|
427
427
|
/**
|
|
428
428
|
* @param message - Human-readable error message (default: 'Service Unavailable')
|
|
429
429
|
* @param errorCode - Optional machine-readable error code
|
|
430
|
-
*/ constructor(message = 'Service Unavailable', errorCode){
|
|
431
|
-
super(message, 503, errorCode);
|
|
430
|
+
*/ constructor(message = 'Service Unavailable', errorCode, errors){
|
|
431
|
+
super(message, 503, errorCode, errors);
|
|
432
432
|
this.name = 'ServiceUnavailableException';
|
|
433
433
|
Error.captureStackTrace(this, this.constructor);
|
|
434
434
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rabstack/rab-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "A TypeScript REST API framework built on Express.js with decorator-based routing, dependency injection, and built-in validation",
|
|
5
5
|
"author": "Softin",
|
|
6
6
|
"license": "MIT",
|