b23-lib 1.2.0 → 1.2.1

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.mts CHANGED
@@ -286,6 +286,21 @@ declare const _default: {
286
286
  };
287
287
  };
288
288
 
289
+ declare const ResponseUtility: {
290
+ handleException: (functionName: string, error: any, res: any) => void;
291
+ generateResponse: (status: number, data?: any, error?: string) => {
292
+ status: number;
293
+ data: any;
294
+ error: string | undefined;
295
+ };
296
+ generateError: (status: number, error: string, knownError?: Boolean, logError?: boolean) => {
297
+ status: number;
298
+ error: string;
299
+ knownError: Boolean;
300
+ logError: boolean;
301
+ };
302
+ };
303
+
289
304
  type SuccessType = {
290
305
  status: number;
291
306
  statusText: string;
@@ -301,4 +316,4 @@ declare const Logger: {
301
316
  logInvalidPayload: (functionName: string, errorMessage: string) => void;
302
317
  };
303
318
 
304
- export { AuthUtility as Auth, DynamoDBUtility as DynamoDB, Fetch, Logger, _default as ResponseUtility, Schema, _default as Utils };
319
+ export { AuthUtility as Auth, DynamoDBUtility as DynamoDB, Fetch, Logger, ResponseUtility, Schema, _default as Utils };
package/dist/index.d.ts CHANGED
@@ -286,6 +286,21 @@ declare const _default: {
286
286
  };
287
287
  };
288
288
 
289
+ declare const ResponseUtility: {
290
+ handleException: (functionName: string, error: any, res: any) => void;
291
+ generateResponse: (status: number, data?: any, error?: string) => {
292
+ status: number;
293
+ data: any;
294
+ error: string | undefined;
295
+ };
296
+ generateError: (status: number, error: string, knownError?: Boolean, logError?: boolean) => {
297
+ status: number;
298
+ error: string;
299
+ knownError: Boolean;
300
+ logError: boolean;
301
+ };
302
+ };
303
+
289
304
  type SuccessType = {
290
305
  status: number;
291
306
  statusText: string;
@@ -301,4 +316,4 @@ declare const Logger: {
301
316
  logInvalidPayload: (functionName: string, errorMessage: string) => void;
302
317
  };
303
318
 
304
- export { AuthUtility as Auth, DynamoDBUtility as DynamoDB, Fetch, Logger, _default as ResponseUtility, Schema, _default as Utils };
319
+ export { AuthUtility as Auth, DynamoDBUtility as DynamoDB, Fetch, Logger, ResponseUtility, Schema, _default as Utils };
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ __export(src_exports, {
34
34
  DynamoDB: () => Dynamodb_default,
35
35
  Fetch: () => fetch_default,
36
36
  Logger: () => Logger_default,
37
- ResponseUtility: () => Utils_default,
37
+ ResponseUtility: () => response_default,
38
38
  Schema: () => Schema_default,
39
39
  Utils: () => Utils_default
40
40
  });
package/dist/index.mjs CHANGED
@@ -738,7 +738,7 @@ export {
738
738
  Dynamodb_default as DynamoDB,
739
739
  fetch_default as Fetch,
740
740
  Logger_default as Logger,
741
- Utils_default as ResponseUtility,
741
+ response_default as ResponseUtility,
742
742
  Schema_default as Schema,
743
743
  Utils_default as Utils
744
744
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "b23-lib",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "This repo hold common classes, type and util functiona",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",