@molopos/shared 2.0.75 → 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",
@@ -153,12 +155,20 @@ export declare enum ActivityModelEnum {
153
155
  CustomerCreate = "CUSTOMER_CREATE",
154
156
  CustomerUpdate = "CUSTOMER_UPDATE",
155
157
  CustomerDelete = "CUSTOMER_DELETE",
158
+ CustomerWalletRecharge = "CUSTOMER_WALLET_RECHARGE",
159
+ CustomerWalletWithdraw = "CUSTOMER_WALLET_WITHDRAW",
156
160
  PaymentTypeCreate = "PAYMENT_TYPE_CREATE",
157
161
  PaymentTypeUpdate = "PAYMENT_TYPE_UPDATE",
158
162
  PaymentTypeDelete = "PAYMENT_TYPE_DELETE",
159
163
  InventoryAdjustmentCreate = "INVENTORY_ADJUSTMENT_CREATE",
160
164
  InventoryAdjustmentUpdate = "INVENTORY_ADJUSTMENT_UPDATE",
161
- 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"
162
172
  }
163
173
  /**
164
174
  * Transaction direction enum
@@ -172,8 +182,9 @@ export declare enum TransactionDirectionEnum {
172
182
  * Transaction model enum
173
183
  */
174
184
  export declare enum TransactionModelEnum {
175
- Withdraw = "WITHDRAW",
176
185
  Product = "PRODUCT",
186
+ Customer = "CUSTOMER",
187
+ Withdraw = "WITHDRAW",
177
188
  StoreShop = "STORESHOP",
178
189
  Subscription = "SUBSCRIPTION"
179
190
  }
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";
@@ -162,12 +164,20 @@ var ActivityModelEnum;
162
164
  ActivityModelEnum["CustomerCreate"] = "CUSTOMER_CREATE";
163
165
  ActivityModelEnum["CustomerUpdate"] = "CUSTOMER_UPDATE";
164
166
  ActivityModelEnum["CustomerDelete"] = "CUSTOMER_DELETE";
167
+ ActivityModelEnum["CustomerWalletRecharge"] = "CUSTOMER_WALLET_RECHARGE";
168
+ ActivityModelEnum["CustomerWalletWithdraw"] = "CUSTOMER_WALLET_WITHDRAW";
165
169
  ActivityModelEnum["PaymentTypeCreate"] = "PAYMENT_TYPE_CREATE";
166
170
  ActivityModelEnum["PaymentTypeUpdate"] = "PAYMENT_TYPE_UPDATE";
167
171
  ActivityModelEnum["PaymentTypeDelete"] = "PAYMENT_TYPE_DELETE";
168
172
  ActivityModelEnum["InventoryAdjustmentCreate"] = "INVENTORY_ADJUSTMENT_CREATE";
169
173
  ActivityModelEnum["InventoryAdjustmentUpdate"] = "INVENTORY_ADJUSTMENT_UPDATE";
170
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";
171
181
  })(ActivityModelEnum || (exports.ActivityModelEnum = ActivityModelEnum = {}));
172
182
  /**
173
183
  * Transaction direction enum
@@ -183,8 +193,9 @@ var TransactionDirectionEnum;
183
193
  */
184
194
  var TransactionModelEnum;
185
195
  (function (TransactionModelEnum) {
186
- TransactionModelEnum["Withdraw"] = "WITHDRAW";
187
196
  TransactionModelEnum["Product"] = "PRODUCT";
197
+ TransactionModelEnum["Customer"] = "CUSTOMER";
198
+ TransactionModelEnum["Withdraw"] = "WITHDRAW";
188
199
  TransactionModelEnum["StoreShop"] = "STORESHOP";
189
200
  TransactionModelEnum["Subscription"] = "SUBSCRIPTION";
190
201
  })(TransactionModelEnum || (exports.TransactionModelEnum = TransactionModelEnum = {}));
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@molopos/shared","publishConfig":{"access":"public"},"version":"2.0.75","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
+ }