@bondsports/types 2.2.187 → 2.2.188

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.
@@ -1,10 +1,14 @@
1
- import { CartItem } from '../../../cart/entities/cart-item.entity';
2
1
  import { InvoiceDiscountOnEnum } from '../../../payment/types/enums/discount.enums';
3
2
  export declare const discountOnMapper: {
4
3
  [key: string]: InvoiceDiscountOnEnum;
5
4
  };
5
+ type HasIdOrUnique = {
6
+ id?: number | string;
7
+ unique?: string;
8
+ };
6
9
  /**
7
10
  * Generates a unique key for a given cart item.
8
11
  *
9
12
  */
10
- export declare const getUniqueKey: (cartItem: CartItem) => string;
13
+ export declare const getUniqueKey: (entity: HasIdOrUnique) => string;
14
+ export {};
@@ -10,9 +10,9 @@ exports.discountOnMapper = {
10
10
  * Generates a unique key for a given cart item.
11
11
  *
12
12
  */
13
- const getUniqueKey = (cartItem) => {
13
+ const getUniqueKey = (entity) => {
14
14
  var _a, _b;
15
- return (_b = (_a = cartItem.id) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : cartItem.unique;
15
+ return (_b = (_a = entity.id) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : entity.unique;
16
16
  };
17
17
  exports.getUniqueKey = getUniqueKey;
18
18
  //# sourceMappingURL=invoice.consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"invoice.consts.js","sourceRoot":"","sources":["../../../../../src/types/invoice/types/consts/invoice.consts.ts"],"names":[],"mappings":";;;AACA,gFAAoG;AAEvF,QAAA,gBAAgB,GAA6C;IACzE,CAAC,+BAAc,CAAC,IAAI,CAAC,EAAE,sCAAqB,CAAC,SAAS;IACtD,CAAC,+BAAc,CAAC,GAAG,CAAC,EAAE,sCAAqB,CAAC,OAAO;CACnD,CAAC;AAEF;;;GAGG;AACI,MAAM,YAAY,GAAmC,CAAC,QAAkB,EAAU,EAAE;;IAC1F,OAAO,MAAA,MAAA,QAAQ,CAAC,EAAE,0CAAE,QAAQ,EAAE,mCAAI,QAAQ,CAAC,MAAM,CAAC;AACnD,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
1
+ {"version":3,"file":"invoice.consts.js","sourceRoot":"","sources":["../../../../../src/types/invoice/types/consts/invoice.consts.ts"],"names":[],"mappings":";;;AAAA,gFAAoG;AAEvF,QAAA,gBAAgB,GAA6C;IACzE,CAAC,+BAAc,CAAC,IAAI,CAAC,EAAE,sCAAqB,CAAC,SAAS;IACtD,CAAC,+BAAc,CAAC,GAAG,CAAC,EAAE,sCAAqB,CAAC,OAAO;CACnD,CAAC;AAOF;;;GAGG;AACI,MAAM,YAAY,GAAsC,CAAC,MAAqB,EAAU,EAAE;;IAChG,OAAO,MAAA,MAAA,MAAM,CAAC,EAAE,0CAAE,QAAQ,EAAE,mCAAI,MAAM,CAAC,MAAM,CAAC;AAC/C,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bondsports/types",
3
- "version": "2.2.187",
3
+ "version": "2.2.188",
4
4
  "description": "backend types module for Bond-Sports",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {