@bondsports/types 2.0.87 → 2.0.89

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.
Files changed (62) hide show
  1. package/dist/tsconfig.build.tsbuildinfo +1 -1
  2. package/dist/types/cart/dto/cart-item.dto.d.ts +10 -10
  3. package/dist/types/cart/dto/cart-item.dto.js +4 -4
  4. package/dist/types/cart/dto/cart-item.dto.js.map +1 -1
  5. package/dist/types/cart/dto/cart.dto.d.ts +17 -0
  6. package/dist/types/cart/dto/cart.dto.js +13 -1
  7. package/dist/types/cart/dto/cart.dto.js.map +1 -1
  8. package/dist/types/cart/entities/cart-item.entity.d.ts +9 -3
  9. package/dist/types/cart/entities/cart-item.entity.js.map +1 -1
  10. package/dist/types/cart/entities/cart.entity.d.ts +1 -0
  11. package/dist/types/cart/entities/cart.entity.js.map +1 -1
  12. package/dist/types/cart/types/consts/cart.consts.js +1 -1
  13. package/dist/types/cart/types/consts/cart.consts.js.map +1 -1
  14. package/dist/types/cart/types/interfaces/cart.interfaces.d.ts +29 -0
  15. package/dist/types/cart/types/interfaces/validate-cart.interfaces.d.ts +9 -4
  16. package/dist/types/cart/types/interfaces/validate-cart.interfaces.js +1 -0
  17. package/dist/types/cart/types/interfaces/validate-cart.interfaces.js.map +1 -1
  18. package/dist/types/entity/index.d.ts +0 -1
  19. package/dist/types/entity/index.js +0 -1
  20. package/dist/types/entity/index.js.map +1 -1
  21. package/dist/types/invoice/index.d.ts +1 -0
  22. package/dist/types/invoice/index.js +1 -0
  23. package/dist/types/invoice/index.js.map +1 -1
  24. package/dist/types/invoice/types/consts/index.d.ts +1 -0
  25. package/dist/types/invoice/types/consts/index.js +18 -0
  26. package/dist/types/invoice/types/consts/index.js.map +1 -0
  27. package/dist/types/invoice/types/consts/invoice.consts.d.ts +4 -0
  28. package/dist/types/invoice/types/consts/invoice.consts.js +9 -0
  29. package/dist/types/invoice/types/consts/invoice.consts.js.map +1 -0
  30. package/dist/types/invoice/types/index.d.ts +1 -0
  31. package/dist/types/invoice/types/index.js +18 -0
  32. package/dist/types/invoice/types/index.js.map +1 -0
  33. package/dist/types/notifications/dto/notification.create.dto.d.ts +2 -1
  34. package/dist/types/notifications/dto/notification.create.dto.js +2 -1
  35. package/dist/types/notifications/dto/notification.create.dto.js.map +1 -1
  36. package/dist/types/payment/dto/discount.dto.d.ts +21 -2
  37. package/dist/types/payment/dto/discount.dto.js +12 -1
  38. package/dist/types/payment/dto/discount.dto.js.map +1 -1
  39. package/dist/types/payment/dto/payment.dto.d.ts +7 -2
  40. package/dist/types/payment/dto/payment.dto.js +0 -1
  41. package/dist/types/payment/dto/payment.dto.js.map +1 -1
  42. package/dist/types/payment/entities/Discount.d.ts +3 -1
  43. package/dist/types/payment/entities/Discount.js.map +1 -1
  44. package/dist/types/payment/types/enums/discount.enums.d.ts +5 -0
  45. package/dist/types/payment/types/enums/discount.enums.js +7 -1
  46. package/dist/types/payment/types/enums/discount.enums.js.map +1 -1
  47. package/dist/types/payment/types/interfaces/discount.interfaces.d.ts +30 -0
  48. package/dist/types/payment/types/interfaces/discount.interfaces.js +1 -0
  49. package/dist/types/payment/types/interfaces/discount.interfaces.js.map +1 -1
  50. package/dist/types/programs-seasons/dto/program-seasons.dto.d.ts +1 -0
  51. package/dist/types/programs-seasons/dto/program-seasons.dto.js.map +1 -1
  52. package/dist/types/reservations/entities/Addon.d.ts +2 -1
  53. package/dist/types/reservations/entities/Addon.js.map +1 -1
  54. package/dist/types/reservations/interfaces/reservation.d.ts +1 -0
  55. package/dist/types/reservations/interfaces/reservation.js.map +1 -1
  56. package/dist/types/services/enums.service.d.ts +16 -1
  57. package/dist/types/services/enums.service.js +17 -1
  58. package/dist/types/services/enums.service.js.map +1 -1
  59. package/package.json +1 -1
  60. package/dist/types/entity/BookedSessions.d.ts +0 -21
  61. package/dist/types/entity/BookedSessions.js +0 -8
  62. package/dist/types/entity/BookedSessions.js.map +0 -1
@@ -1,10 +1,17 @@
1
1
  import { OrganizationBaseEntityDto } from '../../organization/dto/organization.dto';
2
2
  import { SimpleDiscountDto } from '../../payment/dto/discount.dto';
3
- import { CartDiscountOnEnum } from '../../payment/types/enums/discount.enums';
4
3
  import { SimpleProductDto } from '../../product-pricing/dto/product.dto';
5
4
  import { PurchaseResourceDto } from '../../purchase/dto/purchase.dto';
6
5
  import { SimpleUserDto } from '../../user/dto/user.dto';
7
6
  import { CartStatusEnum } from '../types/enums/cart.enums';
7
+ import { CartDiscountOnEnum } from '../../payment/types/enums/discount.enums';
8
+ export declare class CartTaxDto extends OrganizationBaseEntityDto {
9
+ cartId: number;
10
+ productId: number;
11
+ price: number;
12
+ percentage?: number;
13
+ isTaxInclusive?: boolean;
14
+ }
8
15
  export declare class CartDiscountDto extends OrganizationBaseEntityDto {
9
16
  cartId: number;
10
17
  cartItemsIds?: number[];
@@ -16,15 +23,9 @@ export declare class CartDiscountDto extends OrganizationBaseEntityDto {
16
23
  discountOn: CartDiscountOnEnum;
17
24
  quantity?: number;
18
25
  discountAmount: number;
19
- price: number;
20
26
  unitPrice: number;
21
- }
22
- export declare class CartTaxDto extends OrganizationBaseEntityDto {
23
- cartId: number;
24
- productId: number;
25
- price: number;
26
- percentage?: number;
27
- isTaxInclusive?: boolean;
27
+ actionId?: string;
28
+ parentId?: number;
28
29
  }
29
30
  export declare class CartItemDto extends OrganizationBaseEntityDto {
30
31
  cartId: number;
@@ -33,7 +34,6 @@ export declare class CartItemDto extends OrganizationBaseEntityDto {
33
34
  productId: number;
34
35
  product?: SimpleProductDto;
35
36
  price: number;
36
- totalPrice: number;
37
37
  unitPrice?: number;
38
38
  quantity?: number;
39
39
  status: CartStatusEnum;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddCartItemDto = exports.UpdateCartItemDto = exports.BaseCartItemDto = exports.CartItemDto = exports.CartTaxDto = exports.CartDiscountDto = void 0;
3
+ exports.AddCartItemDto = exports.UpdateCartItemDto = exports.BaseCartItemDto = exports.CartItemDto = exports.CartDiscountDto = exports.CartTaxDto = void 0;
4
4
  const organization_dto_1 = require("../../organization/dto/organization.dto");
5
- class CartDiscountDto extends organization_dto_1.OrganizationBaseEntityDto {
6
- }
7
- exports.CartDiscountDto = CartDiscountDto;
8
5
  class CartTaxDto extends organization_dto_1.OrganizationBaseEntityDto {
9
6
  }
10
7
  exports.CartTaxDto = CartTaxDto;
8
+ class CartDiscountDto extends organization_dto_1.OrganizationBaseEntityDto {
9
+ }
10
+ exports.CartDiscountDto = CartDiscountDto;
11
11
  class CartItemDto extends organization_dto_1.OrganizationBaseEntityDto {
12
12
  }
13
13
  exports.CartItemDto = CartItemDto;
@@ -1 +1 @@
1
- {"version":3,"file":"cart-item.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item.dto.ts"],"names":[],"mappings":";;;AAAA,8EAAoF;AAQpF,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;CAMlD;AAND,wCAMC"}
1
+ {"version":3,"file":"cart-item.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item.dto.ts"],"names":[],"mappings":";;;AAAA,8EAAoF;AAQpF,MAAa,UAAW,SAAQ,4CAAyB;CAUxD;AAVD,gCAUC;AAED,MAAa,eAAgB,SAAQ,4CAAyB;CA0B7D;AA1BD,0CA0BC;AAED,MAAa,WAAY,SAAQ,4CAAyB;CA8BzD;AA9BD,kCA8BC;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;CAMlD;AAND,wCAMC"}
@@ -5,9 +5,11 @@ import { CurrencyEnum, PlatformsEnum } from '../../services/enums.service';
5
5
  import { ByOrganizationAndUserDto, SimpleUserDto } from '../../user/dto/user.dto';
6
6
  import { CartStateEnum, CartStatusEnum } from '../types/enums/cart.enums';
7
7
  import { AddCartItemDto, CartDiscountDto, CartItemDto, CartTaxDto, UpdateCartItemDto } from './cart-item.dto';
8
+ import { ISetCartDiscount, ISetCartDiscounts } from '../types/interfaces/cart.interfaces';
8
9
  export declare class CartDto extends OrganizationBaseEntityDto {
9
10
  createdAt: Date;
10
11
  price: number;
12
+ downpayment?: number;
11
13
  state: CartStateEnum;
12
14
  status: CartStatusEnum;
13
15
  creatorId: number;
@@ -57,3 +59,18 @@ export declare class GetCartsFiltersDto extends PaginationQuery {
57
59
  ownersIds?: number[];
58
60
  shiftId?: number;
59
61
  }
62
+ export declare class SetCartDiscountDto implements ISetCartDiscount {
63
+ discountId: number;
64
+ cartItemIds?: number[];
65
+ amount?: number;
66
+ percentage?: number;
67
+ }
68
+ export declare class SetCartDiscountsDto implements ISetCartDiscounts {
69
+ discounts: SetCartDiscountDto[];
70
+ }
71
+ export declare class RemoveCartDiscountQueryDto {
72
+ actionIds: string[];
73
+ }
74
+ export declare class UsePromoCodesOnCartDto {
75
+ codes: string[];
76
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetCartsFiltersDto = exports.ByOrganizationCartDto = exports.UpdateCartItemsDto = exports.AddCartItemsDto = exports.ClearCartDto = exports.CreateCartDto = exports.UpdateCartDto = exports.CartDto = void 0;
3
+ exports.UsePromoCodesOnCartDto = exports.RemoveCartDiscountQueryDto = exports.SetCartDiscountsDto = exports.SetCartDiscountDto = exports.GetCartsFiltersDto = exports.ByOrganizationCartDto = exports.UpdateCartItemsDto = exports.AddCartItemsDto = exports.ClearCartDto = exports.CreateCartDto = exports.UpdateCartDto = exports.CartDto = void 0;
4
4
  const general_dto_1 = require("../../dto/general.dto");
5
5
  const organization_dto_1 = require("../../organization/dto/organization.dto");
6
6
  const user_dto_1 = require("../../user/dto/user.dto");
@@ -33,4 +33,16 @@ exports.ByOrganizationCartDto = ByOrganizationCartDto;
33
33
  class GetCartsFiltersDto extends general_dto_1.PaginationQuery {
34
34
  }
35
35
  exports.GetCartsFiltersDto = GetCartsFiltersDto;
36
+ class SetCartDiscountDto {
37
+ }
38
+ exports.SetCartDiscountDto = SetCartDiscountDto;
39
+ class SetCartDiscountsDto {
40
+ }
41
+ exports.SetCartDiscountsDto = SetCartDiscountsDto;
42
+ class RemoveCartDiscountQueryDto {
43
+ }
44
+ exports.RemoveCartDiscountQueryDto = RemoveCartDiscountQueryDto;
45
+ class UsePromoCodesOnCartDto {
46
+ }
47
+ exports.UsePromoCodesOnCartDto = UsePromoCodesOnCartDto;
36
48
  //# sourceMappingURL=cart.dto.js.map
@@ -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;AAKlF,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;AAED,MAAa,kBAAkB;CAQ9B;AARD,gDAQC;AAED,MAAa,mBAAmB;CAE/B;AAFD,kDAEC;AAED,MAAa,0BAA0B;CAEtC;AAFD,gEAEC;AAED,MAAa,sBAAsB;CAElC;AAFD,wDAEC"}
@@ -5,9 +5,9 @@ import { Product } from '../../product-pricing/entities/Product';
5
5
  import { PurchaseResourceDto } from '../../purchase/dto/purchase.dto';
6
6
  import { ProductTypesEnum } from '../../services/enums.service';
7
7
  import { User } from '../../user/entities/User';
8
- import { CartDiscountDto } from '../dto/cart-item.dto';
9
8
  import { CartStatusEnum } from '../types/enums/cart.enums';
10
9
  import { Cart } from './cart.entity';
10
+ import { CartDiscountOnEnum } from '../../payment/types/enums/discount.enums';
11
11
  export declare class CartItem extends OrganizationConnectionBaseEntity {
12
12
  deletedAt?: Date;
13
13
  cartId: number;
@@ -18,7 +18,6 @@ export declare class CartItem extends OrganizationConnectionBaseEntity {
18
18
  product: Product;
19
19
  productType: ProductTypesEnum;
20
20
  price: number;
21
- totalPrice?: number;
22
21
  unitPrice?: number;
23
22
  quantity?: number;
24
23
  status: CartStatusEnum;
@@ -32,9 +31,16 @@ export declare class CartItem extends OrganizationConnectionBaseEntity {
32
31
  parentId?: number;
33
32
  parent?: CartItem;
34
33
  children?: CartItem[];
35
- discounts?: CartDiscountDto[];
34
+ discounts?: CartItem[];
36
35
  taxItem?: CartItem;
37
36
  discountId?: number;
38
37
  discount?: Discount;
39
38
  resources?: PurchaseResourceDto[];
39
+ actionId?: string;
40
+ discountOn?: CartDiscountOnEnum;
41
+ reasonId?: number;
42
+ reason?: string;
43
+ discountAmount?: number;
44
+ totalPrice?: number;
45
+ totalUnitPrice: number;
40
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cart-item.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart-item.entity.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAUjG,MAAa,QAAS,SAAQ,mEAAgC;CAwD7D;AAxDD,4BAwDC"}
1
+ {"version":3,"file":"cart-item.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart-item.entity.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAUjG,MAAa,QAAS,SAAQ,mEAAgC;CAoE7D;AApED,4BAoEC"}
@@ -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"}
@@ -8,7 +8,7 @@ exports.uniqueCartTaxTemplate = uniqueCartTaxTemplate;
8
8
  const uniqueCartDiscountTemplate = (discountItem) => {
9
9
  var _a, _b;
10
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}`;
11
+ return `${discountItem.discountId}_${(_b = discountItem.discount) === null || _b === void 0 ? void 0 : _b.type}_${discountPercentage}_${discountItem.actionId}`;
12
12
  };
13
13
  exports.uniqueCartDiscountTemplate = uniqueCartDiscountTemplate;
14
14
  //# sourceMappingURL=cart.consts.js.map
@@ -1 +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"}
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,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;AACnH,CAAC,CAAC;AAHW,QAAA,0BAA0B,8BAGrC"}
@@ -4,6 +4,8 @@ import { CurrencyEnum, PlatformsEnum } from '../../../services/enums.service';
4
4
  import { IPricesOfProductsResults } from '../../../services/interfaces.service';
5
5
  import { ResourceDto } from '../../../spaces/dto/resource.dto';
6
6
  import { Cart } from '../../entities/cart.entity';
7
+ import { CartDiscountOnEnum } from '../../../payment/types/enums/discount.enums';
8
+ import { SimpleDiscountDto } from '../../../payment/dto/discount.dto';
7
9
  export interface ICreateCart {
8
10
  platform: PlatformsEnum;
9
11
  ownerId?: number;
@@ -26,10 +28,12 @@ export interface ICreateCartItem {
26
28
  userId?: number;
27
29
  resources?: ResourceDto[];
28
30
  children?: ICreateCartItem[];
31
+ errors?: string[];
29
32
  }
30
33
  export interface IValidateCartOptions {
31
34
  overridePrice?: boolean;
32
35
  skipValidations?: boolean;
36
+ throwError?: boolean;
33
37
  }
34
38
  export interface IValidateCartResult {
35
39
  currentPrices: IPricesOfProductsResults[];
@@ -43,3 +47,28 @@ export interface IUpdateCartOptions {
43
47
  updateActiveTime?: boolean;
44
48
  updateFetchedTime?: boolean;
45
49
  }
50
+ export interface IDiscountItem {
51
+ id: number;
52
+ amount: number;
53
+ percentage?: number;
54
+ }
55
+ export interface DiscountCartItems {
56
+ discount: SimpleDiscountDto;
57
+ cartItemIds: number[];
58
+ discountOn: CartDiscountOnEnum;
59
+ amount?: number;
60
+ percentage?: number;
61
+ }
62
+ export interface ISetCartDiscounts {
63
+ discounts: ISetCartDiscount[];
64
+ }
65
+ export interface ISetCartDiscount {
66
+ discountOn?: CartDiscountOnEnum;
67
+ discountId: number;
68
+ cartItemIds?: number[];
69
+ amount?: number;
70
+ percentage?: number;
71
+ allowZeroAmount?: boolean;
72
+ isTaxIncluded?: boolean;
73
+ reasonId?: number;
74
+ }
@@ -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"}
@@ -3,7 +3,6 @@ export * from './ActivityTimes';
3
3
  export * from './Address';
4
4
  export * from './BlockedDate';
5
5
  export * from './BondBaseEntity';
6
- export * from './BookedSessions';
7
6
  export * from './BookingTypeSetting';
8
7
  export * from './ColorCode';
9
8
  export * from './Configuration';
@@ -19,7 +19,6 @@ __exportStar(require("./ActivityTimes"), exports);
19
19
  __exportStar(require("./Address"), exports);
20
20
  __exportStar(require("./BlockedDate"), exports);
21
21
  __exportStar(require("./BondBaseEntity"), exports);
22
- __exportStar(require("./BookedSessions"), exports);
23
22
  __exportStar(require("./BookingTypeSetting"), exports);
24
23
  __exportStar(require("./ColorCode"), exports);
25
24
  __exportStar(require("./Configuration"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/entity/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,kDAAgC;AAChC,4CAA0B;AAC1B,gDAA8B;AAC9B,mDAAiC;AACjC,mDAAiC;AACjC,uDAAqC;AACrC,8CAA4B;AAC5B,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,6CAA2B;AAC3B,8DAA4C;AAC5C,kDAAgC;AAChC,6CAA2B;AAC3B,qDAAmC;AACnC,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC;AACjC,2CAAyB;AACzB,6CAA2B;AAC3B,uDAAqC;AACrC,kDAAgC;AAChC,0CAAwB;AACxB,sDAAoC;AACpC,sDAAoC;AACpC,4CAA0B;AAC1B,iDAA+B;AAC/B,gDAA8B;AAC9B,qDAAmC;AACnC,2CAAyB;AACzB,iDAA+B;AAC/B,oDAAkC;AAClC,8CAA4B;AAC5B,mDAAiC;AACjC,0CAAwB;AACxB,+CAA6B;AAC7B,qDAAmC;AACnC,8DAA4C;AAC5C,gDAA8B;AAC9B,qEAAmD;AACnD,8CAA4B;AAC5B,kDAAgC;AAChC,mDAAiC;AACjC,oDAAkC;AAClC,2DAAyC;AACzC,sDAAoC;AACpC,iEAA+C;AAC/C,kDAAgC;AAChC,uDAAqC;AACrC,2DAAyC;AACzC,iDAA+B;AAC/B,kDAAgC;AAChC,2CAAyB;AACzB,oDAAkC;AAClC,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,yDAAuC;AACvC,gDAA8B;AAC9B,yCAAuB;AACvB,+CAA6B;AAC7B,+CAA6B;AAC7B,qDAAmC;AACnC,uDAAqC;AACrC,wDAAsC;AACtC,uDAAqC;AACrC,iDAA+B;AAC/B,kDAAgC;AAChC,6CAA2B;AAC3B,qEAAmD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/entity/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,kDAAgC;AAChC,4CAA0B;AAC1B,gDAA8B;AAC9B,mDAAiC;AACjC,uDAAqC;AACrC,8CAA4B;AAC5B,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,6CAA2B;AAC3B,8DAA4C;AAC5C,kDAAgC;AAChC,6CAA2B;AAC3B,qDAAmC;AACnC,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC;AACjC,2CAAyB;AACzB,6CAA2B;AAC3B,uDAAqC;AACrC,kDAAgC;AAChC,0CAAwB;AACxB,sDAAoC;AACpC,sDAAoC;AACpC,4CAA0B;AAC1B,iDAA+B;AAC/B,gDAA8B;AAC9B,qDAAmC;AACnC,2CAAyB;AACzB,iDAA+B;AAC/B,oDAAkC;AAClC,8CAA4B;AAC5B,mDAAiC;AACjC,0CAAwB;AACxB,+CAA6B;AAC7B,qDAAmC;AACnC,8DAA4C;AAC5C,gDAA8B;AAC9B,qEAAmD;AACnD,8CAA4B;AAC5B,kDAAgC;AAChC,mDAAiC;AACjC,oDAAkC;AAClC,2DAAyC;AACzC,sDAAoC;AACpC,iEAA+C;AAC/C,kDAAgC;AAChC,uDAAqC;AACrC,2DAAyC;AACzC,iDAA+B;AAC/B,kDAAgC;AAChC,2CAAyB;AACzB,oDAAkC;AAClC,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,yDAAuC;AACvC,gDAA8B;AAC9B,yCAAuB;AACvB,+CAA6B;AAC7B,+CAA6B;AAC7B,qDAAmC;AACnC,uDAAqC;AACrC,wDAAsC;AACtC,uDAAqC;AACrC,iDAA+B;AAC/B,kDAAgC;AAChC,6CAA2B;AAC3B,qEAAmD"}
@@ -1 +1,2 @@
1
1
  export * from './dto';
2
+ export * from './types';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./dto"), exports);
18
+ __exportStar(require("./types"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/invoice/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/invoice/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB"}
@@ -0,0 +1 @@
1
+ export * from './invoice.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("./invoice.consts"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/invoice/types/consts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
@@ -0,0 +1,4 @@
1
+ import { DiscountOnEnum } from '../../../payment/types/enums/discount.enums';
2
+ export declare const discountOnMapper: {
3
+ [key: string]: DiscountOnEnum;
4
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.discountOnMapper = void 0;
4
+ const discount_enums_1 = require("../../../payment/types/enums/discount.enums");
5
+ exports.discountOnMapper = {
6
+ [discount_enums_1.CartDiscountOnEnum.ITEM]: discount_enums_1.DiscountOnEnum.LINE_ITEM,
7
+ [discount_enums_1.CartDiscountOnEnum.ALL]: discount_enums_1.DiscountOnEnum.INVOICE,
8
+ };
9
+ //# sourceMappingURL=invoice.consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoice.consts.js","sourceRoot":"","sources":["../../../../../src/types/invoice/types/consts/invoice.consts.ts"],"names":[],"mappings":";;;AAAA,gFAAiG;AAEpF,QAAA,gBAAgB,GAAsC;IAClE,CAAC,mCAAkB,CAAC,IAAI,CAAC,EAAE,+BAAc,CAAC,SAAS;IACnD,CAAC,mCAAkB,CAAC,GAAG,CAAC,EAAE,+BAAc,CAAC,OAAO;CAChD,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './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("./consts"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/invoice/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
@@ -16,7 +16,8 @@ export declare class SenderDto {
16
16
  organizationId?: number;
17
17
  facilityId?: number;
18
18
  replyTo?: string;
19
- constructor(userId: number, organizationId?: number, facilityId?: number, replyTo?: string);
19
+ fromDisplayName?: string;
20
+ constructor(userId: number, organizationId?: number, facilityId?: number, replyTo?: string, fromDisplayName?: string);
20
21
  }
21
22
  export declare class RecipientsDto {
22
23
  to: string[];
@@ -19,11 +19,12 @@ const notification_enums_1 = require("../types/enums/notification.enums");
19
19
  class SenderDto {
20
20
  // Added for convenience.
21
21
  // Not part of NotificationsService object definitions.
22
- constructor(userId, organizationId, facilityId, replyTo) {
22
+ constructor(userId, organizationId, facilityId, replyTo, fromDisplayName) {
23
23
  this.userId = userId;
24
24
  this.organizationId = organizationId;
25
25
  this.facilityId = facilityId;
26
26
  this.replyTo = replyTo;
27
+ this.fromDisplayName = fromDisplayName;
27
28
  }
28
29
  }
29
30
  exports.SenderDto = SenderDto;
@@ -1 +1 @@
1
- {"version":3,"file":"notification.create.dto.js","sourceRoot":"","sources":["../../../../src/types/notifications/dto/notification.create.dto.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,0EAAgF;AAEhF,0EAA0E;AAE1E,2CAA2C;AAC3C,6CAA6C;AAE7C,MAAa,SAAS;IAYrB,yBAAyB;IACzB,uDAAuD;IACvD,YAAY,MAAc,EAAE,cAAuB,EAAE,UAAmB,EAAE,OAAgB;QACzF,IAAI,CA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ACjD,IAAI,CAAC,MAAM,GAAG,IAAI,SAAS,CAAC,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;QACrF,IAAI,CAAC,UAAU,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;QACrD,iGAAiG;QACjG,IAAI,CAAC,eAAe,GAAG;YACtB,wGAAwG;YACxG,mBAAmB,EAAE,mBAAmB;SACxC,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AArCD,sDAqCC"}
1
+ {"version":3,"file":"notification.create.dto.js","sourceRoot":"","sources":["../../../../src/types/notifications/dto/notification.create.dto.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,0EAAgF;AAEhF,0EAA0E;AAE1E,2CAA2C;AAC3C,6CAA6C;AAE7C,MAAa,SAAS;IAcrB,yBAAyB;IACzB,uDAAuD;IACvD,YACC,MAAc,EACd,cAAuB,EACvB,UAAmB,EACnB,OAAgB,EAChB,eAAwB;QAExB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACxC,CAAC;;AA5BF,8BA6BC;AA5BA,0GAA0G;AACnG,yBAAe,GAAG,CAAC,EAAE,CAAC;AA6B9B,MAAa,aAAa;IAUzB,yBAAyB;IACzB,uDAAuD;IACvD,MAAM,CAAC,EAAE,CAAC,EAAW;QACpB,MAAM,CAAC,GAAG,IAAI,aAAa,EAAE,CAAC;QAC9B,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,YAAY,EAAa,EAAE,EAAa,EAAE,GAAc;QACvD,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QACnB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IAChB,CAAC;CACD;AAvBD,sCAuBC;AAED,MAAa,UAAU;IAOtB,yBAAyB;IACzB,uDAAuD;IACvD,YAAY,OAAgB,EAAE,QAAiB,EAAE,QAAiB;QACjE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;CACD;AAdD,gCAcC;AAED,MAAa,qBAAqB;IAiBjC,yBAAyB;IACzB,uDAAuD;IACvD,MAAM,CAAC,gBAAgB,CACtB,cAAsB,EACtB,mBAAwB,EACxB,aAAqB,EACrB,qBAA8B,EAC9B,iBAA0B;QAE1B,MAAM,IAAI,GAAG,IAAI,qBAAqB,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,gDAA2B,CAAC,KAAK,CAAC;QACjD,IAAI,CAAC,MAAM,GAAG,IAAI,SAAS,CAAC,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;QACrF,IAAI,CAAC,UAAU,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;QACrD,iGAAiG;QACjG,IAAI,CAAC,eAAe,GAAG;YACtB,wGAAwG;YACxG,mBAAmB,EAAE,mBAAmB;SACxC,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AArCD,sDAqCC"}
@@ -1,9 +1,27 @@
1
1
  import { PaginationQuery } from '../../dto/general.dto';
2
2
  import { ResourceGlDto } from '../../gl-codes/dto/resource-to-gl.dto';
3
3
  import { OrganizationBaseEntityDto } from '../../organization/dto/organization.dto';
4
- import { ActivityEnum, CurrencyEnum, GenderEnum, PlatformsEnum } from '../../services/enums.service';
4
+ import { ActivityEnum, CurrencyEnum, GenderEnum, PlatformsEnum, ProgramTypesEnum } from '../../services/enums.service';
5
5
  import { DiscountOnEnum, DiscountTypeEnum } from '../types/enums/discount.enums';
6
6
  import { CreateNoteDto } from './payment.dto';
7
+ import { IDiscountRelatedProducts, IDiscountRelatedPrograms, IDiscountRelatedProductIds } from '../types/interfaces/discount.interfaces';
8
+ export declare class DiscountRelatedProductIdsDto implements IDiscountRelatedProductIds {
9
+ included?: number[];
10
+ excluded?: number[];
11
+ }
12
+ export declare class DiscountRelatedProgramsDto implements IDiscountRelatedPrograms {
13
+ [ProgramTypesEnum.CLASS]: DiscountRelatedProductIdsDto;
14
+ [ProgramTypesEnum.CLINIC]: DiscountRelatedProductIdsDto;
15
+ [ProgramTypesEnum.CAMP]: DiscountRelatedProductIdsDto;
16
+ [ProgramTypesEnum.CLUB_TEAM]: DiscountRelatedProductIdsDto;
17
+ [ProgramTypesEnum.LESSON]: DiscountRelatedProductIdsDto;
18
+ }
19
+ export declare class DiscountRelatedProductsDto implements IDiscountRelatedProducts {
20
+ programs?: DiscountRelatedProgramsDto;
21
+ memberships?: DiscountRelatedProductIdsDto;
22
+ leagues?: DiscountRelatedProductIdsDto;
23
+ goods?: DiscountRelatedProductIdsDto;
24
+ }
7
25
  declare class DiscountFieldsDto {
8
26
  name: string;
9
27
  type: DiscountTypeEnum;
@@ -15,11 +33,12 @@ declare class DiscountFieldsDto {
15
33
  redeemEndDate?: Date;
16
34
  max?: number;
17
35
  maxUses?: number;
18
- relatedProductsIds?: number[];
36
+ maxUsesPerUser?: number;
19
37
  platform?: PlatformsEnum;
20
38
  gender?: GenderEnum;
21
39
  maxAge?: number;
22
40
  requiredProductsIds?: number[];
41
+ relatedProducts?: DiscountRelatedProductsDto;
23
42
  }
24
43
  export declare class DiscountDto extends DiscountFieldsDto {
25
44
  id: number;
@@ -1,8 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ItemDiscountDto = exports.RemoveDiscountsDto = exports.RemoveDiscountDto = exports.SetDiscountsDto = exports.SetDiscountDto = exports.UpdateDiscountsDto = exports.CreateDiscountsDto = exports.UpdateDiscountDto = exports.CreateDiscountDto = exports.GetDiscountsDto = exports.SimpleDiscountDto = exports.DiscountDto = void 0;
3
+ exports.ItemDiscountDto = exports.RemoveDiscountsDto = exports.RemoveDiscountDto = exports.SetDiscountsDto = exports.SetDiscountDto = exports.UpdateDiscountsDto = exports.CreateDiscountsDto = exports.UpdateDiscountDto = exports.CreateDiscountDto = exports.GetDiscountsDto = exports.SimpleDiscountDto = exports.DiscountDto = exports.DiscountRelatedProductsDto = exports.DiscountRelatedProgramsDto = exports.DiscountRelatedProductIdsDto = void 0;
4
4
  const general_dto_1 = require("../../dto/general.dto");
5
5
  const organization_dto_1 = require("../../organization/dto/organization.dto");
6
+ const enums_service_1 = require("../../services/enums.service");
7
+ class DiscountRelatedProductIdsDto {
8
+ }
9
+ exports.DiscountRelatedProductIdsDto = DiscountRelatedProductIdsDto;
10
+ class DiscountRelatedProgramsDto {
11
+ }
12
+ exports.DiscountRelatedProgramsDto = DiscountRelatedProgramsDto;
13
+ enums_service_1.ProgramTypesEnum.CLASS, enums_service_1.ProgramTypesEnum.CLINIC, enums_service_1.ProgramTypesEnum.CAMP, enums_service_1.ProgramTypesEnum.CLUB_TEAM, enums_service_1.ProgramTypesEnum.LESSON;
14
+ class DiscountRelatedProductsDto {
15
+ }
16
+ exports.DiscountRelatedProductsDto = DiscountRelatedProductsDto;
6
17
  class DiscountFieldsDto {
7
18
  }
8
19
  class DiscountDto extends DiscountFieldsDto {
@@ -1 +1 @@
1
- {"version":3,"file":"discount.dto.js","sourceRoot":"","sources":["../../../../src/types/payment/dto/discount.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAwD;AAGxD,8EAAoF;AAKpF,MAAM,iBAAiB;CA8BtB;AAED,MAAa,WAAY,SAAQ,iBAAiB;CAYjD;AAZD,kCAYC;AAED,MAAa,iBAAkB,S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AED,MAAa,cAAc;CAQ1B;AARD,wCAQC;AAED,MAAa,eAAe;CAQ3B;AARD,0CAQC;AAED,MAAa,iBAAiB;CAI7B;AAJD,8CAIC;AAED,MAAa,kBAAkB;CAM9B;AAND,gDAMC;AAED,MAAa,eAAgB,SAAQ,4CAAyB;CA4B7D;AA5BD,0CA4BC"}
@@ -2,7 +2,7 @@ import { PaginationQuery } from '../../dto/general.dto';
2
2
  import { Customer } from '../../entity/Customer';
3
3
  import { ByOrganizationIdDto } from '../../organization/dto/organization.dto';
4
4
  import { PurchaseProductDto } from '../../purchase/dto/purchase.dto';
5
- import { OrderByEnum, PlatformsEnum, ResourceNameTypeEnum } from '../../services/enums.service';
5
+ import { MonthsEnum, OrderByEnum, PlatformsEnum, ProductTypesEnum, ResourceNameTypeEnum } from '../../services/enums.service';
6
6
  import { Payment } from '../entities/Payment';
7
7
  import { FuturePaymentStatusEnum, PaymentFilterByEnum, PaymentMethodTypeEnum, PaymentStatusEnum, SubPaymentMethodTypeEnum } from '../types/enums/payment.enums';
8
8
  export declare class CustomerIdDto {
@@ -55,11 +55,16 @@ export declare class ByPaymentFilter extends PaginationQuery {
55
55
  paymentTypes?: PaymentMethodTypeEnum[];
56
56
  paymentStatuses?: PaymentStatusEnum[];
57
57
  statuses?: FuturePaymentStatusEnum[];
58
+ startDate?: Date;
59
+ endDate?: Date;
60
+ productTypes?: ProductTypesEnum[];
61
+ searchParam?: string;
58
62
  alerts?: boolean;
63
+ isScheduled?: boolean;
59
64
  }
60
65
  export declare class FindPayments extends ByPaymentFilter {
61
66
  id?: number;
62
- months?: string[];
67
+ months?: MonthsEnum[];
63
68
  orderByProperty?: PaymentFilterByEnum[];
64
69
  order?: OrderByEnum[];
65
70
  }
@@ -52,7 +52,6 @@ exports.ByPaymentFilter = ByPaymentFilter;
52
52
  class FindPayments extends ByPaymentFilter {
53
53
  }
54
54
  exports.FindPayments = FindPayments;
55
- // { organizationId: number; facilityId: number; stationId?: number }
56
55
  class StationsDto {
57
56
  }
58
57
  exports.StationsDto = StationsDto;
@@ -1 +1 @@
1
- {"version":3,"file":"payment.dto.js","sourceRoot":"","sources":["../../../../src/types/payment/dto/payment.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAwD;AAExD,8EAA8E;AAG9E,iDAA8C;AAS9C,MAAa,aAAa;CAEzB;AAFD,sCAEC;AAED,MAAa,YAAY;CAExB;AAFD,oCAEC;AAED,MAAa,uBAAwB,SAAQ,YAAY;CAExD;AAFD,0DAEC;AAED,MAAa,aAAc,SAAQ,YAAY;CAE9C;AAFD,sCAEC;AAED,MAAa,YAAa,SAAQ,sCAAmB;CAEpD;AAFD,oCAEC;AAED,MAAa,mBAAoB,SAAQ,YAAY;CAEpD;AAFD,kDAEC;AAED,MAAa,iCAAkC,SAAQ,YAAY;CAElE;AAFD,8EAEC;AAED,MAAa,YAAY;CAExB;AAFD,oCAEC;AAED,MAAa,YAAa,SAAQ,sCAAmB;CAEpD;AAFD,oCAEC;AAED,MAAa,uBAAwB,SAAQ,YAAY;CAExD;AAFD,0DAEC;AAED,MAAa,qBAAsB,SAAQ,YAAY;CAEtD;AAFD,sDAEC;AAED,MAAa,mBAAmB;CAI/B;AAJD,kDAIC;AAED,MAAa,mBAAmB;CAM/B;AAND,kDAMC;AAED,MAAa,wBAAwB;CAIpC;AAJD,4DAIC;AAED,MAAa,eAAgB,SAAQ,6BAAe;CAQnD;AARD,0CAQC;AAED,MAAa,YAAa,SAAQ,eAAe;CAQhD;AARD,oCAQC;AAED,qEAAqE;AACrE,MAAa,WAAW;CAIvB;AAJD,kCAIC;AAED,MAAa,gBAAgB;CAkB5B;AAlBD,4CAkBC;AAED,MAAa,cAAc;CAI1B;AAJD,wCAIC;AAED,MAAa,kBAAkB;CAI9B;AAJD,gDAIC;AAED,MAAa,eAAgB,SAAQ,YAAY;CAMhD;AAND,0CAMC;AAED,MAAa,aAAa;CAIzB;AAJD,sCAIC;AAED,MAAa,oBAAqB,SAAQ,aAAa;CAEtD;AAFD,o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BD,4CAkBC;AAED,MAAa,cAAc;CAI1B;AAJD,wCAIC;AAED,MAAa,kBAAkB;CAI9B;AAJD,gDAIC;AAED,MAAa,eAAgB,SAAQ,YAAY;CAMhD;AAND,0CAMC;AAED,MAAa,aAAa;CAIzB;AAJD,sCAIC;AAED,MAAa,oBAAqB,SAAQ,aAAa;CAEtD;AAFD,oDAEC;AAED,MAAa,cAAc;CAE1B;AAFD,wCAEC;AAED,MAAa,iBAAiB;CAM7B;AAND,8CAMC;AAED,MAAa,aAAa;CAEzB;AAFD,sCAEC;AAED,MAAa,qBAAsB,SAAQ,YAAY;CAMtD;AAND,sDAMC;AAED,MAAa,oBAAoB;CAMhC;AAND,oDAMC;AAED,2CAA2C;AAC3C,MAAa,UAAW,SAAQ,iBAAO;CAEtC;AAFD,gCAEC"}
@@ -2,6 +2,7 @@ import { OrganizationConnectionBaseEntity } from '../../entity/OrganizationConne
2
2
  import { ResourceToGL } from '../../gl-codes/entities/resource-to-gl';
3
3
  import { ActivityEnum, GenderEnum, PlatformsEnum } from '../../services/enums.service';
4
4
  import { DiscountTypeEnum } from '../types/enums/discount.enums';
5
+ import { IDiscountRelatedProducts } from '../types/interfaces/discount.interfaces';
5
6
  export declare class Discount extends OrganizationConnectionBaseEntity {
6
7
  deletedAt?: Date;
7
8
  name: string;
@@ -16,11 +17,12 @@ export declare class Discount extends OrganizationConnectionBaseEntity {
16
17
  min: number;
17
18
  max?: number;
18
19
  maxUses?: number;
19
- relatedProductsIds?: number[];
20
20
  platform?: PlatformsEnum;
21
21
  gender?: GenderEnum;
22
22
  minAge: number;
23
23
  maxAge?: number;
24
24
  requiredProductsIds?: number[];
25
25
  glCodes?: ResourceToGL[];
26
+ maxUsesPerUser?: number;
27
+ relatedProducts?: IDiscountRelatedProducts;
26
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Discount.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/Discount.ts"],"names":[],"mappings":";;;AACA,oGAAiG;AAKjG,MAAa,QAAS,SAAQ,mEAAgC;CAwC7D;AAxCD,4BAwCC"}
1
+ {"version":3,"file":"Discount.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/Discount.ts"],"names":[],"mappings":";;;AACA,oGAAiG;AAMjG,MAAa,QAAS,SAAQ,mEAAgC;CA0C7D;AA1CD,4BA0CC"}
@@ -11,3 +11,8 @@ export declare enum CartDiscountOnEnum {
11
11
  ALL = "all",
12
12
  ITEM = "item"
13
13
  }
14
+ export declare enum DiscountUsageTypeEnum {
15
+ BY_PRODUCT_USER = "by_product_user",
16
+ BY_PAYING_USER = "by_paying_user",
17
+ DEFAULT = "default"
18
+ }