@bondsports/types 2.0.87 → 2.0.88

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.
@@ -8,6 +8,7 @@ import { AddCartItemDto, CartDiscountDto, CartItemDto, CartTaxDto, UpdateCartIte
8
8
  export declare class CartDto extends OrganizationBaseEntityDto {
9
9
  createdAt: Date;
10
10
  price: number;
11
+ downpayment?: number;
11
12
  state: CartStateEnum;
12
13
  status: CartStatusEnum;
13
14
  creatorId: number;
@@ -1 +1 @@
1
- {"version":3,"file":"cart.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart.dto.ts"],"names":[],"mappings":";;;AACA,uDAAwD;AACxD,8EAAoF;AAEpF,sDAAkF;AAIlF,MAAa,OAAQ,SAAQ,4CAAyB;CAwCrD;AAxCD,0BAwCC;AAED,MAAa,aAAa;IACzB,YAAY,UAAmC;QAC9C,IAAI,CAAC,OAAO,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC;IACpC,CAAC;CAOD;AAZD,sCAYC;AAED,MAAa,aAAc,SAAQ,aAAa;CAM/C;AAND,sCAMC;AAED,MAAa,YAAY;CAIxB;AAJD,oCAIC;AAED,MAAa,eAAe;CAE3B;AAFD,0CAEC;AAED,MAAa,kBAAkB;CAE9B;AAFD,gDAEC;AAED,MAAa,qBAAsB,SAAQ,mCAAwB;CAElE;AAFD,sDAEC;AAED,MAAa,kBAAmB,SAAQ,6BAAe;CAQtD;AARD,gDAQC"}
1
+ {"version":3,"file":"cart.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart.dto.ts"],"names":[],"mappings":";;;AACA,uDAAwD;AACxD,8EAAoF;AAEpF,sDAAkF;AAIlF,MAAa,OAAQ,SAAQ,4CAAyB;CA0CrD;AA1CD,0BA0CC;AAED,MAAa,aAAa;IACzB,YAAY,UAAmC;QAC9C,IAAI,CAAC,OAAO,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC;IACpC,CAAC;CAOD;AAZD,sCAYC;AAED,MAAa,aAAc,SAAQ,aAAa;CAM/C;AAND,sCAMC;AAED,MAAa,YAAY;CAIxB;AAJD,oCAIC;AAED,MAAa,eAAe;CAE3B;AAFD,0CAEC;AAED,MAAa,kBAAkB;CAE9B;AAFD,gDAEC;AAED,MAAa,qBAAsB,SAAQ,mCAAwB;CAElE;AAFD,sDAEC;AAED,MAAa,kBAAmB,SAAQ,6BAAe;CAQtD;AARD,gDAQC"}
@@ -8,6 +8,7 @@ import { CartDiscountDto, CartTaxDto } from '../dto/cart-item.dto';
8
8
  export declare class Cart extends OrganizationConnectionBaseEntity {
9
9
  deletedAt?: Date;
10
10
  price: number;
11
+ downpayment?: number;
11
12
  state: CartStateEnum;
12
13
  status: CartStatusEnum;
13
14
  creatorId: number;
@@ -1 +1 @@
1
- {"version":3,"file":"cart.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart.entity.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAOjG,MAAa,IAAK,SAAQ,mEAAgC;CA4CzD;AA5CD,oBA4CC"}
1
+ {"version":3,"file":"cart.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart.entity.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAOjG,MAAa,IAAK,SAAQ,mEAAgC;CA8CzD;AA9CD,oBA8CC"}
@@ -26,10 +26,12 @@ export interface ICreateCartItem {
26
26
  userId?: number;
27
27
  resources?: ResourceDto[];
28
28
  children?: ICreateCartItem[];
29
+ errors?: string[];
29
30
  }
30
31
  export interface IValidateCartOptions {
31
32
  overridePrice?: boolean;
32
33
  skipValidations?: boolean;
34
+ throwError?: boolean;
33
35
  }
34
36
  export interface IValidateCartResult {
35
37
  currentPrices: IPricesOfProductsResults[];
@@ -1,11 +1,16 @@
1
1
  import { IPricesOfProductsResults } from '../../../services/interfaces.service';
2
+ import { ResourceNameTypeEnum } from '../../../services/enums.service';
3
+ import { Event } from '../../../entity/Events';
4
+ import { ProgramSeason } from '../../../programs-seasons/entities/ProgramSeason';
5
+ import { Membership } from '../../../entity/Membership';
2
6
  export type PriceValidationResult = {
3
7
  currentPrices: IPricesOfProductsResults[];
4
8
  };
5
- export type TotalSumValidationResult = PriceValidationResult & {
6
- currentPricesSum: number;
7
- downpaymentsSum: number;
8
- };
9
+ export interface CartResourcesDict {
10
+ [ResourceNameTypeEnum.EVENT]: Event[];
11
+ [ResourceNameTypeEnum.PROGRAM_SEASON]: ProgramSeason[];
12
+ [ResourceNameTypeEnum.MEMBERSHIP]: Membership[];
13
+ }
9
14
  export interface IPricingValidator<TReturn = PriceValidationResult> {
10
15
  validate(): TReturn;
11
16
  }
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const enums_service_1 = require("../../../services/enums.service");
3
4
  //# sourceMappingURL=validate-cart.interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate-cart.interfaces.js","sourceRoot":"","sources":["../../../../../src/types/cart/types/interfaces/validate-cart.interfaces.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"validate-cart.interfaces.js","sourceRoot":"","sources":["../../../../../src/types/cart/types/interfaces/validate-cart.interfaces.ts"],"names":[],"mappings":";;AACA,mEAAuE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bondsports/types",
3
- "version": "2.0.87",
3
+ "version": "2.0.88",
4
4
  "description": "backend types module for Bond-Sports",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {