@chopkola/common 1.0.1 → 1.0.3

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/build/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './types/user';
2
+ export * from './types/enum/error';
package/build/index.js CHANGED
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./types/user"), exports);
18
+ __exportStar(require("./types/enum/error"), exports);
@@ -0,0 +1,12 @@
1
+ export declare enum ErrorStagesEnum {
2
+ INFORMATIONAL = "INFORMATIONAL",
3
+ WARNING = "WARNING",
4
+ ERROR = "ERROR",
5
+ CRITICAL = "CRITICAL"
6
+ }
7
+ export declare enum CustomErrorCodeEnum {
8
+ CART_ORDER_EXISTS = "cart-order-exists",
9
+ CART_ORDER_PAID = "cart-order-paid",
10
+ CART_ITEM_NOT_AVAILABLE = "cart-item-not-available",
11
+ CART_ITEM_AVAILABILITY_CHECK_SKIP = "cart-item-availability-check-skip"
12
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomErrorCodeEnum = exports.ErrorStagesEnum = void 0;
4
+ var ErrorStagesEnum;
5
+ (function (ErrorStagesEnum) {
6
+ ErrorStagesEnum["INFORMATIONAL"] = "INFORMATIONAL";
7
+ ErrorStagesEnum["WARNING"] = "WARNING";
8
+ ErrorStagesEnum["ERROR"] = "ERROR";
9
+ ErrorStagesEnum["CRITICAL"] = "CRITICAL";
10
+ })(ErrorStagesEnum = exports.ErrorStagesEnum || (exports.ErrorStagesEnum = {}));
11
+ var CustomErrorCodeEnum;
12
+ (function (CustomErrorCodeEnum) {
13
+ CustomErrorCodeEnum["CART_ORDER_EXISTS"] = "cart-order-exists";
14
+ CustomErrorCodeEnum["CART_ORDER_PAID"] = "cart-order-paid";
15
+ CustomErrorCodeEnum["CART_ITEM_NOT_AVAILABLE"] = "cart-item-not-available";
16
+ CustomErrorCodeEnum["CART_ITEM_AVAILABILITY_CHECK_SKIP"] = "cart-item-availability-check-skip";
17
+ })(CustomErrorCodeEnum = exports.CustomErrorCodeEnum || (exports.CustomErrorCodeEnum = {}));
@@ -0,0 +1,17 @@
1
+ import { CustomErrorCodeEnum, ErrorStagesEnum } from "../enum/error";
2
+ export declare type RetryConfig = {
3
+ count: number;
4
+ fn: (param?: unknown) => Promise<unknown>;
5
+ param?: unknown;
6
+ };
7
+ export declare type ErrorDetails = {
8
+ serviceType: "internal" | "external";
9
+ source: string;
10
+ error?: unknown;
11
+ customError?: {
12
+ code: CustomErrorCodeEnum;
13
+ data?: unknown;
14
+ };
15
+ level?: ErrorStagesEnum;
16
+ retry?: RetryConfig;
17
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@chopkola/common",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "license": "ISC",
6
- "author": "Ode Akugbe",
6
+ "author": "akrosoft technology ltd",
7
7
  "main": "./build/index.js",
8
8
  "types": "./build/index.d.ts",
9
9
  "files": [
@@ -22,5 +22,8 @@
22
22
  "express": "^5.2.1",
23
23
  "jsonwebtoken": "^9.0.3",
24
24
  "multer": "^2.0.2"
25
+ },
26
+ "devDependencies": {
27
+ "del-cli": "^7.0.0"
25
28
  }
26
29
  }