@bondsports/types 2.0.71 → 2.0.72
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/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/cart/dto/cart-item.dto.d.ts +0 -4
- package/dist/types/cart/dto/cart-item.dto.js.map +1 -1
- package/dist/types/cart/entities/cart-item.entity.d.ts +5 -0
- package/dist/types/cart/entities/cart-item.entity.js.map +1 -1
- package/dist/types/cart/entities/cart.entity.d.ts +7 -0
- package/dist/types/cart/entities/cart.entity.js.map +1 -1
- package/dist/types/cart/types/consts/cart.consts.d.ts +4 -0
- package/dist/types/cart/types/consts/cart.consts.js +14 -0
- package/dist/types/cart/types/consts/cart.consts.js.map +1 -0
- package/dist/types/cart/types/consts/index.d.ts +1 -0
- package/dist/types/cart/types/consts/index.js +18 -0
- package/dist/types/cart/types/consts/index.js.map +1 -0
- package/dist/types/cart/types/index.d.ts +1 -0
- package/dist/types/cart/types/index.js +1 -0
- package/dist/types/cart/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -39,10 +39,6 @@ export declare class CartItemDto extends OrganizationBaseEntityDto {
|
|
|
39
39
|
status: CartStatusEnum;
|
|
40
40
|
errors?: string[];
|
|
41
41
|
ordinal?: number;
|
|
42
|
-
percentage?: number;
|
|
43
|
-
isTaxInclusive?: boolean;
|
|
44
|
-
entitlementGroupId?: number;
|
|
45
|
-
parentId?: number;
|
|
46
42
|
taxItem?: CartTaxDto;
|
|
47
43
|
discounts?: CartDiscountDto[];
|
|
48
44
|
children?: CartItemDto[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-item.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item.dto.ts"],"names":[],"mappings":";;;AACA,8EAAoF;AAOpF,MAAa,eAAgB,SAAQ,4CAAyB;CAwB7D;AAxBD,0CAwBC;AAED,MAAa,UAAW,SAAQ,4CAAyB;CAUxD;AAVD,gCAUC;AAED,MAAa,WAAY,SAAQ,4CAAyB;
|
|
1
|
+
{"version":3,"file":"cart-item.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item.dto.ts"],"names":[],"mappings":";;;AACA,8EAAoF;AAOpF,MAAa,eAAgB,SAAQ,4CAAyB;CAwB7D;AAxBD,0CAwBC;AAED,MAAa,UAAW,SAAQ,4CAAyB;CAUxD;AAVD,gCAUC;AAED,MAAa,WAAY,SAAQ,4CAAyB;CAgCzD;AAhCD,kCAgCC;AAED,MAAa,eAAe;IAC3B,YAAY,YAAuC;QAClD,IAAI,CAAC,QAAQ,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC;IAC1C,CAAC;CAOD;AAZD,0CAYC;AAED,MAAa,iBAAkB,SAAQ,eAAe;IACrD,YAAY,cAA2C;QACtD,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,IAAI,CAAC,EAAE,GAAG,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,EAAE,CAAC;IAC9B,CAAC;CAGD;AAPD,8CAOC;AAED,MAAa,cAAe,SAAQ,eAAe;CAIlD;AAJD,wCAIC"}
|
|
@@ -6,15 +6,19 @@ import { ProductTypesEnum } from '../../services/enums.service';
|
|
|
6
6
|
import { ResourceDto } from '../../spaces/dto/resource.dto';
|
|
7
7
|
import { CartStatusEnum } from '../types/enums/cart.enums';
|
|
8
8
|
import { Cart } from './cart.entity';
|
|
9
|
+
import { CartDiscountDto } from '../dto/cart-item.dto';
|
|
10
|
+
import { User } from '../../user/entities/User';
|
|
9
11
|
export declare class CartItem extends OrganizationConnectionBaseEntity {
|
|
10
12
|
deletedAt?: Date;
|
|
11
13
|
cartId: number;
|
|
12
14
|
cart: Cart;
|
|
13
15
|
userId: number;
|
|
16
|
+
user: User;
|
|
14
17
|
productId: number;
|
|
15
18
|
product: Product;
|
|
16
19
|
productType: ProductTypesEnum;
|
|
17
20
|
price: number;
|
|
21
|
+
totalPrice?: number;
|
|
18
22
|
unitPrice?: number;
|
|
19
23
|
quantity?: number;
|
|
20
24
|
status: CartStatusEnum;
|
|
@@ -27,6 +31,7 @@ export declare class CartItem extends OrganizationConnectionBaseEntity {
|
|
|
27
31
|
parentId?: number;
|
|
28
32
|
parent?: CartItem;
|
|
29
33
|
children?: CartItem[];
|
|
34
|
+
discounts?: CartDiscountDto[];
|
|
30
35
|
taxItem?: CartItem;
|
|
31
36
|
discountId?: number;
|
|
32
37
|
discount?: Discount;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-item.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart-item.entity.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;
|
|
1
|
+
{"version":3,"file":"cart-item.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart-item.entity.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAWjG,MAAa,QAAS,SAAQ,mEAAgC;CAsD7D;AAtDD,4BAsDC"}
|
|
@@ -4,6 +4,7 @@ import { CurrencyEnum, PlatformsEnum } from '../../services/enums.service';
|
|
|
4
4
|
import { User } from '../../user/entities/User';
|
|
5
5
|
import { CartStateEnum, CartStatusEnum } from '../types/enums/cart.enums';
|
|
6
6
|
import { CartItem } from './cart-item.entity';
|
|
7
|
+
import { CartDiscountDto, CartTaxDto } from '../dto/cart-item.dto';
|
|
7
8
|
export declare class Cart extends OrganizationConnectionBaseEntity {
|
|
8
9
|
deletedAt?: Date;
|
|
9
10
|
price: number;
|
|
@@ -20,4 +21,10 @@ export declare class Cart extends OrganizationConnectionBaseEntity {
|
|
|
20
21
|
lastActiveTime: Date;
|
|
21
22
|
lastFetchedTime: Date;
|
|
22
23
|
cartItems: CartItem[];
|
|
24
|
+
taxes?: CartTaxDto[];
|
|
25
|
+
taxAmount?: number;
|
|
26
|
+
discounts?: CartDiscountDto[];
|
|
27
|
+
discountAmount?: number;
|
|
28
|
+
discountSubtotal?: number;
|
|
29
|
+
subtotal?: number;
|
|
23
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart.entity.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;
|
|
1
|
+
{"version":3,"file":"cart.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart.entity.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAQjG,MAAa,IAAK,SAAQ,mEAAgC;CA0CzD;AA1CD,oBA0CC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CartDiscountDto } from '../../dto/cart-item.dto';
|
|
2
|
+
import { CartItem } from '../../entities/cart-item.entity';
|
|
3
|
+
export declare const uniqueCartTaxTemplate: (lineItem: CartItem) => string;
|
|
4
|
+
export declare const uniqueCartDiscountTemplate: (discountItem: CartDiscountDto) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uniqueCartDiscountTemplate = exports.uniqueCartTaxTemplate = void 0;
|
|
4
|
+
const uniqueCartTaxTemplate = (lineItem) => {
|
|
5
|
+
return `${lineItem.percentage}_${lineItem.isTaxInclusive}`;
|
|
6
|
+
};
|
|
7
|
+
exports.uniqueCartTaxTemplate = uniqueCartTaxTemplate;
|
|
8
|
+
const uniqueCartDiscountTemplate = (discountItem) => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const discountPercentage = (_a = `${discountItem.percentage}`) !== null && _a !== void 0 ? _a : '';
|
|
11
|
+
return `${discountItem.discountId}_${(_b = discountItem.discount) === null || _b === void 0 ? void 0 : _b.type}_${discountPercentage}`;
|
|
12
|
+
};
|
|
13
|
+
exports.uniqueCartDiscountTemplate = uniqueCartDiscountTemplate;
|
|
14
|
+
//# sourceMappingURL=cart.consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart.consts.js","sourceRoot":"","sources":["../../../../../src/types/cart/types/consts/cart.consts.ts"],"names":[],"mappings":";;;AAGO,MAAM,qBAAqB,GAAG,CAAC,QAAkB,EAAU,EAAE;IACnE,OAAO,GAAG,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,qBAAqB,yBAEhC;AAEK,MAAM,0BAA0B,GAAG,CAAC,YAA6B,EAAU,EAAE;;IACnF,MAAM,kBAAkB,GAAW,MAAA,GAAG,YAAY,CAAC,UAAU,EAAE,mCAAI,EAAE,CAAC;IACtE,OAAO,GAAG,YAAY,CAAC,UAAU,IAAI,MAAA,YAAY,CAAC,QAAQ,0CAAE,IAAI,IAAI,kBAAkB,EAAE,CAAC;AAC1F,CAAC,CAAC;AAHW,QAAA,0BAA0B,8BAGrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cart.consts';
|
|
@@ -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("./cart.consts"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/cart/types/consts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./consts"), exports);
|
|
17
18
|
__exportStar(require("./enums"), exports);
|
|
18
19
|
__exportStar(require("./interfaces"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/cart/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/cart/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B"}
|