core-mb 1.1.3 → 1.1.4

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.
@@ -0,0 +1,2 @@
1
+ export * from "./item";
2
+ export * from "./stock";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./item"), exports);
18
+ __exportStar(require("./stock"), exports);
@@ -0,0 +1,15 @@
1
+ export declare enum ProductionOptionEnums {
2
+ STANDARD = 0,
3
+ VARIANT = 1,
4
+ COMPOSITE = 2
5
+ }
6
+ export declare enum ProductSerialTypeEnums {
7
+ SERIAL = 0,
8
+ NON_INVENTORY = 1,
9
+ STANDARD = 2,
10
+ LICENSE = 3
11
+ }
12
+ export declare enum TypeOfProductGenerateSKU {
13
+ MANAUL = 1,
14
+ AUTO = 2
15
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypeOfProductGenerateSKU = exports.ProductSerialTypeEnums = exports.ProductionOptionEnums = void 0;
4
+ var ProductionOptionEnums;
5
+ (function (ProductionOptionEnums) {
6
+ ProductionOptionEnums[ProductionOptionEnums["STANDARD"] = 0] = "STANDARD";
7
+ ProductionOptionEnums[ProductionOptionEnums["VARIANT"] = 1] = "VARIANT";
8
+ ProductionOptionEnums[ProductionOptionEnums["COMPOSITE"] = 2] = "COMPOSITE";
9
+ })(ProductionOptionEnums || (exports.ProductionOptionEnums = ProductionOptionEnums = {}));
10
+ var ProductSerialTypeEnums;
11
+ (function (ProductSerialTypeEnums) {
12
+ ProductSerialTypeEnums[ProductSerialTypeEnums["SERIAL"] = 0] = "SERIAL";
13
+ ProductSerialTypeEnums[ProductSerialTypeEnums["NON_INVENTORY"] = 1] = "NON_INVENTORY";
14
+ ProductSerialTypeEnums[ProductSerialTypeEnums["STANDARD"] = 2] = "STANDARD";
15
+ ProductSerialTypeEnums[ProductSerialTypeEnums["LICENSE"] = 3] = "LICENSE";
16
+ })(ProductSerialTypeEnums || (exports.ProductSerialTypeEnums = ProductSerialTypeEnums = {}));
17
+ var TypeOfProductGenerateSKU;
18
+ (function (TypeOfProductGenerateSKU) {
19
+ TypeOfProductGenerateSKU[TypeOfProductGenerateSKU["MANAUL"] = 1] = "MANAUL";
20
+ TypeOfProductGenerateSKU[TypeOfProductGenerateSKU["AUTO"] = 2] = "AUTO";
21
+ })(TypeOfProductGenerateSKU || (exports.TypeOfProductGenerateSKU = TypeOfProductGenerateSKU = {}));
@@ -0,0 +1,32 @@
1
+ /**
2
+ * StockIOTypeEnum
3
+ *
4
+ * | Type | Meaning |
5
+ * | ---- | ------------------------------ |
6
+ * | IN | Stock coming into inventory |
7
+ * | OUT | Stock going out of inventory |
8
+ * | ADJUSTMENT | Manual adjustment of stock |
9
+ */
10
+ export declare enum StockIOType {
11
+ IN = "IN",
12
+ OUT = "OUT",
13
+ ADJUSTMENT = "ADJUSTMENT"
14
+ }
15
+ /**
16
+ * StockIOStatus Enum
17
+ *
18
+ * | Status | Meaning for SME user |
19
+ * | ------- | ------------------------------------- |
20
+ * | DRAFT | Created, not yet applied |
21
+ * | PENDING | Waiting for approval / processing |
22
+ * | APPLIED | Stock updated, effective in inventory |
23
+ */
24
+ export declare enum StockIOStatus {
25
+ DRAFT = 0,// Not processed
26
+ PENDING = 1,// Waiting / in progress
27
+ APPLIED = 2
28
+ }
29
+ /**
30
+ * Human-readable labels for status
31
+ */
32
+ export declare const StockIOStatusLabels: Record<StockIOStatus, string>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StockIOStatusLabels = exports.StockIOStatus = exports.StockIOType = void 0;
4
+ /**
5
+ * StockIOTypeEnum
6
+ *
7
+ * | Type | Meaning |
8
+ * | ---- | ------------------------------ |
9
+ * | IN | Stock coming into inventory |
10
+ * | OUT | Stock going out of inventory |
11
+ * | ADJUSTMENT | Manual adjustment of stock |
12
+ */
13
+ var StockIOType;
14
+ (function (StockIOType) {
15
+ StockIOType["IN"] = "IN";
16
+ StockIOType["OUT"] = "OUT";
17
+ StockIOType["ADJUSTMENT"] = "ADJUSTMENT";
18
+ })(StockIOType || (exports.StockIOType = StockIOType = {}));
19
+ /**
20
+ * StockIOStatus Enum
21
+ *
22
+ * | Status | Meaning for SME user |
23
+ * | ------- | ------------------------------------- |
24
+ * | DRAFT | Created, not yet applied |
25
+ * | PENDING | Waiting for approval / processing |
26
+ * | APPLIED | Stock updated, effective in inventory |
27
+ */
28
+ var StockIOStatus;
29
+ (function (StockIOStatus) {
30
+ StockIOStatus[StockIOStatus["DRAFT"] = 0] = "DRAFT";
31
+ StockIOStatus[StockIOStatus["PENDING"] = 1] = "PENDING";
32
+ StockIOStatus[StockIOStatus["APPLIED"] = 2] = "APPLIED";
33
+ })(StockIOStatus || (exports.StockIOStatus = StockIOStatus = {}));
34
+ /**
35
+ * Human-readable labels for status
36
+ */
37
+ exports.StockIOStatusLabels = {
38
+ [StockIOStatus.DRAFT]: "Not Processed",
39
+ [StockIOStatus.PENDING]: "Processing",
40
+ [StockIOStatus.APPLIED]: "Stock Updated",
41
+ };
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from "class-validator";
6
6
  export * from "./transformer.helper";
7
7
  export * from './logging.helper';
8
8
  export * from './object.helper';
9
+ export * from "./enums";
package/dist/index.js CHANGED
@@ -22,3 +22,4 @@ __exportStar(require("class-validator"), exports);
22
22
  __exportStar(require("./transformer.helper"), exports);
23
23
  __exportStar(require("./logging.helper"), exports);
24
24
  __exportStar(require("./object.helper"), exports);
25
+ __exportStar(require("./enums"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-mb",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Core utility functions for the MB ecosystem in TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,6 +24,10 @@
24
24
  "type": "git",
25
25
  "url": "git+https://github.com/marcojourney/core-mb.git"
26
26
  },
27
+ "exports": {
28
+ "./enums": "./dist/enums/index.js",
29
+ ".": "./dist/index.js"
30
+ },
27
31
  "devDependencies": {
28
32
  "@types/jest": "^30.0.0",
29
33
  "@types/node": "^20.19.11",
@@ -0,0 +1,2 @@
1
+ export * from "./item"
2
+ export * from "./stock";
@@ -0,0 +1,17 @@
1
+ export enum ProductionOptionEnums {
2
+ STANDARD = 0,
3
+ VARIANT = 1,
4
+ COMPOSITE = 2,
5
+ }
6
+
7
+ export enum ProductSerialTypeEnums {
8
+ SERIAL = 0,
9
+ NON_INVENTORY = 1,
10
+ STANDARD = 2,
11
+ LICENSE = 3,
12
+ }
13
+
14
+ export enum TypeOfProductGenerateSKU {
15
+ MANAUL = 1,
16
+ AUTO = 2,
17
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * StockIOTypeEnum
3
+ *
4
+ * | Type | Meaning |
5
+ * | ---- | ------------------------------ |
6
+ * | IN | Stock coming into inventory |
7
+ * | OUT | Stock going out of inventory |
8
+ * | ADJUSTMENT | Manual adjustment of stock |
9
+ */
10
+ export enum StockIOType {
11
+ IN = "IN",
12
+ OUT = "OUT",
13
+ ADJUSTMENT = "ADJUSTMENT",
14
+ }
15
+
16
+ /**
17
+ * StockIOStatus Enum
18
+ *
19
+ * | Status | Meaning for SME user |
20
+ * | ------- | ------------------------------------- |
21
+ * | DRAFT | Created, not yet applied |
22
+ * | PENDING | Waiting for approval / processing |
23
+ * | APPLIED | Stock updated, effective in inventory |
24
+ */
25
+ export enum StockIOStatus {
26
+ DRAFT = 0, // Not processed
27
+ PENDING = 1, // Waiting / in progress
28
+ APPLIED = 2, // Stock updated
29
+ }
30
+
31
+ /**
32
+ * Human-readable labels for status
33
+ */
34
+ export const StockIOStatusLabels: Record<StockIOStatus, string> = {
35
+ [StockIOStatus.DRAFT]: "Not Processed",
36
+ [StockIOStatus.PENDING]: "Processing",
37
+ [StockIOStatus.APPLIED]: "Stock Updated",
38
+ };
package/src/index.ts CHANGED
@@ -5,4 +5,5 @@ export * from "./validation.helper"
5
5
  export * from "class-validator"
6
6
  export * from "./transformer.helper";
7
7
  export * from './logging.helper';
8
- export * from './object.helper';
8
+ export * from './object.helper';
9
+ export * from "./enums"