@molopos/shared 2.0.76 → 2.0.77

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/enum/index.d.ts CHANGED
@@ -43,6 +43,7 @@ export declare enum QueryTypeEnum {
43
43
  Brand = "BRAND",
44
44
  Order = "ORDER",
45
45
  Quote = "QUOTE",
46
+ Wallet = "WALLET",
46
47
  Section = "SECTION",
47
48
  Message = "MESSAGE",
48
49
  Catalog = "CATALOG",
@@ -63,6 +64,7 @@ export declare enum QueryTypeEnum {
63
64
  Warehouse = "WAREHOUSE",
64
65
  OrderItem = "ORDERITEM",
65
66
  QuoteItem = "QUOTEITEM",
67
+ Transaction = "TRANSACTION",
66
68
  QuoteOption = "QUOTEOPTION",
67
69
  UserAddress = "USERADDRESS",
68
70
  Subcategory = "SUBCATEGORY",
@@ -160,7 +162,13 @@ export declare enum ActivityModelEnum {
160
162
  PaymentTypeDelete = "PAYMENT_TYPE_DELETE",
161
163
  InventoryAdjustmentCreate = "INVENTORY_ADJUSTMENT_CREATE",
162
164
  InventoryAdjustmentUpdate = "INVENTORY_ADJUSTMENT_UPDATE",
163
- InventoryAdjustmentDelete = "INVENTORY_ADJUSTMENT_DELETE"
165
+ InventoryAdjustmentDelete = "INVENTORY_ADJUSTMENT_DELETE",
166
+ WalletCreate = "WALLET_CREATE",
167
+ WalletUpdate = "WALLET_UPDATE",
168
+ WalletDelete = "WALLET_DELETE",
169
+ TransactionCreate = "TRANSACTION_CREATE",
170
+ TransactionUpdate = "TRANSACTION_UPDATE",
171
+ TransactionDelete = "TRANSACTION_DELETE"
164
172
  }
165
173
  /**
166
174
  * Transaction direction enum
package/enum/index.js CHANGED
@@ -51,6 +51,7 @@ var QueryTypeEnum;
51
51
  QueryTypeEnum["Brand"] = "BRAND";
52
52
  QueryTypeEnum["Order"] = "ORDER";
53
53
  QueryTypeEnum["Quote"] = "QUOTE";
54
+ QueryTypeEnum["Wallet"] = "WALLET";
54
55
  QueryTypeEnum["Section"] = "SECTION";
55
56
  QueryTypeEnum["Message"] = "MESSAGE";
56
57
  QueryTypeEnum["Catalog"] = "CATALOG";
@@ -71,6 +72,7 @@ var QueryTypeEnum;
71
72
  QueryTypeEnum["Warehouse"] = "WAREHOUSE";
72
73
  QueryTypeEnum["OrderItem"] = "ORDERITEM";
73
74
  QueryTypeEnum["QuoteItem"] = "QUOTEITEM";
75
+ QueryTypeEnum["Transaction"] = "TRANSACTION";
74
76
  QueryTypeEnum["QuoteOption"] = "QUOTEOPTION";
75
77
  QueryTypeEnum["UserAddress"] = "USERADDRESS";
76
78
  QueryTypeEnum["Subcategory"] = "SUBCATEGORY";
@@ -170,6 +172,12 @@ var ActivityModelEnum;
170
172
  ActivityModelEnum["InventoryAdjustmentCreate"] = "INVENTORY_ADJUSTMENT_CREATE";
171
173
  ActivityModelEnum["InventoryAdjustmentUpdate"] = "INVENTORY_ADJUSTMENT_UPDATE";
172
174
  ActivityModelEnum["InventoryAdjustmentDelete"] = "INVENTORY_ADJUSTMENT_DELETE";
175
+ ActivityModelEnum["WalletCreate"] = "WALLET_CREATE";
176
+ ActivityModelEnum["WalletUpdate"] = "WALLET_UPDATE";
177
+ ActivityModelEnum["WalletDelete"] = "WALLET_DELETE";
178
+ ActivityModelEnum["TransactionCreate"] = "TRANSACTION_CREATE";
179
+ ActivityModelEnum["TransactionUpdate"] = "TRANSACTION_UPDATE";
180
+ ActivityModelEnum["TransactionDelete"] = "TRANSACTION_DELETE";
173
181
  })(ActivityModelEnum || (exports.ActivityModelEnum = ActivityModelEnum = {}));
174
182
  /**
175
183
  * Transaction direction enum
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@molopos/shared","publishConfig":{"access":"public"},"version":"2.0.76","description":"Shared between backend and frontend repos","license":"ISC","repository":{"type":"git","url":"https://github.com/unicubate/molopos-shared.git"},"dependencies":{"class-transformer":"^0.5.1","date-fns":"^4.4.0","luxon":"^3.7.2"}}
1
+ {"name":"@molopos/shared","publishConfig":{"access":"public"},"version":"2.0.77","description":"Shared between backend and frontend repos","license":"ISC","repository":{"type":"git","url":"https://github.com/unicubate/molopos-shared.git"},"dependencies":{"class-transformer":"^0.5.1","date-fns":"^4.4.0","luxon":"^3.7.2"}}
@@ -24,3 +24,14 @@ export declare function TransformBooleanString(): PropertyDecorator;
24
24
  * }
25
25
  */
26
26
  export declare function TransformToNullIfFalsy(): PropertyDecorator;
27
+ /**
28
+ * Transforme les chaînes séparées par des virgules en un tableau de chaînes.
29
+ *
30
+ * @example
31
+ * class MyDto {
32
+ * @IsArray()
33
+ * @TransformArrayString()
34
+ * tags?: string[];
35
+ * }
36
+ */
37
+ export declare function TransformArrayString(): PropertyDecorator;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TransformBooleanString = TransformBooleanString;
4
4
  exports.TransformToNullIfFalsy = TransformToNullIfFalsy;
5
+ exports.TransformArrayString = TransformArrayString;
5
6
  const class_transformer_1 = require("class-transformer");
6
7
  /**
7
8
  * Transforme les chaînes 'true'/'false' en booléens, tout en conservant
@@ -39,3 +40,16 @@ function TransformBooleanString() {
39
40
  function TransformToNullIfFalsy() {
40
41
  return (0, class_transformer_1.Transform)(({ value }) => (value ? value : null));
41
42
  }
43
+ /**
44
+ * Transforme les chaînes séparées par des virgules en un tableau de chaînes.
45
+ *
46
+ * @example
47
+ * class MyDto {
48
+ * @IsArray()
49
+ * @TransformArrayString()
50
+ * tags?: string[];
51
+ * }
52
+ */
53
+ function TransformArrayString() {
54
+ return (0, class_transformer_1.Transform)(({ value }) => value ? value === null || value === void 0 ? void 0 : value.split(",").map((item) => item.trim()) : null);
55
+ }