@bondsports/types 1.50.0 → 1.52.0
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 +12 -11
- package/dist/types/cart/dto/cart-item.dto.js +4 -4
- package/dist/types/cart/dto/cart-item.dto.js.map +1 -1
- package/dist/types/cart/dto/cart.dto.d.ts +17 -0
- package/dist/types/cart/dto/cart.dto.js +13 -1
- package/dist/types/cart/dto/cart.dto.js.map +1 -1
- package/dist/types/cart/entities/cart-item.entity.d.ts +10 -3
- package/dist/types/cart/entities/cart-item.entity.js.map +1 -1
- package/dist/types/cart/entities/cart.entity.d.ts +1 -0
- package/dist/types/cart/entities/cart.entity.js.map +1 -1
- package/dist/types/cart/types/consts/cart.consts.js +1 -1
- package/dist/types/cart/types/consts/cart.consts.js.map +1 -1
- package/dist/types/cart/types/interfaces/cart.interfaces.d.ts +29 -0
- package/dist/types/cart/types/interfaces/validate-cart.interfaces.d.ts +9 -4
- package/dist/types/cart/types/interfaces/validate-cart.interfaces.js +1 -0
- package/dist/types/cart/types/interfaces/validate-cart.interfaces.js.map +1 -1
- package/dist/types/dto/general.dto.d.ts +4 -1
- package/dist/types/dto/general.dto.js +3 -8
- package/dist/types/dto/general.dto.js.map +1 -1
- package/dist/types/entity/LineItems.d.ts +4 -0
- package/dist/types/entity/LineItems.js.map +1 -1
- package/dist/types/entity/index.d.ts +0 -1
- package/dist/types/entity/index.js +0 -1
- package/dist/types/entity/index.js.map +1 -1
- package/dist/types/future-installments/dto/future-installments.dto.d.ts +12 -0
- package/dist/types/future-installments/dto/future-installments.dto.js +8 -0
- package/dist/types/future-installments/dto/future-installments.dto.js.map +1 -0
- package/dist/types/future-installments/dto/get-future-installment.dto.d.ts +9 -0
- package/dist/types/future-installments/dto/get-future-installment.dto.js +11 -0
- package/dist/types/future-installments/dto/get-future-installment.dto.js.map +1 -0
- package/dist/types/future-installments/dto/index.d.ts +2 -0
- package/dist/types/future-installments/dto/index.js +19 -0
- package/dist/types/future-installments/dto/index.js.map +1 -0
- package/dist/types/future-installments/index.d.ts +2 -0
- package/dist/types/future-installments/index.js +19 -0
- package/dist/types/future-installments/index.js.map +1 -0
- package/dist/types/future-installments/types/future-installments.types.d.ts +4 -0
- package/dist/types/future-installments/types/future-installments.types.js +3 -0
- package/dist/types/future-installments/types/future-installments.types.js.map +1 -0
- package/dist/types/future-installments/types/index.d.ts +1 -0
- package/dist/types/future-installments/types/index.js +18 -0
- package/dist/types/future-installments/types/index.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/invoice/index.d.ts +1 -0
- package/dist/types/invoice/index.js +1 -0
- package/dist/types/invoice/index.js.map +1 -1
- package/dist/types/invoice/types/consts/index.d.ts +1 -0
- package/dist/types/invoice/types/consts/index.js +18 -0
- package/dist/types/invoice/types/consts/index.js.map +1 -0
- package/dist/types/invoice/types/consts/invoice.consts.d.ts +4 -0
- package/dist/types/invoice/types/consts/invoice.consts.js +9 -0
- package/dist/types/invoice/types/consts/invoice.consts.js.map +1 -0
- package/dist/types/invoice/types/index.d.ts +1 -0
- package/dist/types/invoice/types/index.js +18 -0
- package/dist/types/invoice/types/index.js.map +1 -0
- package/dist/types/notifications/dto/notification.create.dto.d.ts +2 -1
- package/dist/types/notifications/dto/notification.create.dto.js +2 -1
- package/dist/types/notifications/dto/notification.create.dto.js.map +1 -1
- package/dist/types/notifications/dto/notification.response.dto.d.ts +1 -0
- package/dist/types/notifications/dto/notification.response.dto.js +6 -0
- package/dist/types/notifications/dto/notification.response.dto.js.map +1 -1
- package/dist/types/payment/dto/discount.dto.d.ts +27 -4
- package/dist/types/payment/dto/discount.dto.js +12 -1
- package/dist/types/payment/dto/discount.dto.js.map +1 -1
- package/dist/types/payment/dto/index.d.ts +1 -0
- package/dist/types/payment/dto/index.js +1 -0
- package/dist/types/payment/dto/index.js.map +1 -1
- package/dist/types/payment/dto/payment.dto.d.ts +19 -2
- package/dist/types/payment/dto/payment.dto.js +7 -1
- package/dist/types/payment/dto/payment.dto.js.map +1 -1
- package/dist/types/payment/dto/promo-code.dto.d.ts +35 -0
- package/dist/types/payment/dto/promo-code.dto.js +28 -0
- package/dist/types/payment/dto/promo-code.dto.js.map +1 -0
- package/dist/types/payment/entities/Discount.d.ts +5 -1
- package/dist/types/payment/entities/Discount.js.map +1 -1
- package/dist/types/payment/entities/PromoCode.d.ts +10 -0
- package/dist/types/payment/entities/PromoCode.js +8 -0
- package/dist/types/payment/entities/PromoCode.js.map +1 -0
- package/dist/types/payment/entities/index.d.ts +1 -0
- package/dist/types/payment/entities/index.js +1 -0
- package/dist/types/payment/entities/index.js.map +1 -1
- package/dist/types/payment/types/consts/payment.consts.js +1 -1
- package/dist/types/payment/types/consts/payment.consts.js.map +1 -1
- package/dist/types/payment/types/enums/discount.enums.d.ts +5 -0
- package/dist/types/payment/types/enums/discount.enums.js +7 -1
- package/dist/types/payment/types/enums/discount.enums.js.map +1 -1
- package/dist/types/payment/types/enums/payment.enums.d.ts +2 -1
- package/dist/types/payment/types/enums/payment.enums.js +1 -0
- package/dist/types/payment/types/enums/payment.enums.js.map +1 -1
- package/dist/types/payment/types/interfaces/discount.interfaces.d.ts +29 -4
- package/dist/types/payment/types/interfaces/discount.interfaces.js +1 -0
- package/dist/types/payment/types/interfaces/discount.interfaces.js.map +1 -1
- package/dist/types/payment/types/interfaces/index.d.ts +1 -0
- package/dist/types/payment/types/interfaces/index.js +1 -0
- package/dist/types/payment/types/interfaces/index.js.map +1 -1
- package/dist/types/payment/types/interfaces/promo-code.interfaces.d.ts +10 -0
- package/dist/types/payment/types/interfaces/promo-code.interfaces.js +3 -0
- package/dist/types/payment/types/interfaces/promo-code.interfaces.js.map +1 -0
- package/dist/types/payment/types/interfaces/void.interfaces.d.ts +0 -2
- package/dist/types/programs/types/consts/index.d.ts +1 -0
- package/dist/types/programs/types/consts/index.js +18 -0
- package/dist/types/programs/types/consts/index.js.map +1 -0
- package/dist/types/programs/types/consts/program.consts.d.ts +10 -0
- package/dist/types/programs/types/consts/program.consts.js +14 -0
- package/dist/types/programs/types/consts/program.consts.js.map +1 -0
- package/dist/types/programs/types/index.d.ts +1 -0
- package/dist/types/programs/types/index.js +1 -0
- package/dist/types/programs/types/index.js.map +1 -1
- package/dist/types/programs-seasons/dto/program-seasons.dto.d.ts +14 -6
- package/dist/types/programs-seasons/dto/program-seasons.dto.js +8 -2
- package/dist/types/programs-seasons/dto/program-seasons.dto.js.map +1 -1
- package/dist/types/reservations/entities/Addon.d.ts +2 -1
- package/dist/types/reservations/entities/Addon.js.map +1 -1
- package/dist/types/reservations/interfaces/reservation.d.ts +1 -0
- package/dist/types/reservations/interfaces/reservation.js.map +1 -1
- package/dist/types/services/enums.service.d.ts +25 -1
- package/dist/types/services/enums.service.js +28 -2
- package/dist/types/services/enums.service.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/entity/BookedSessions.d.ts +0 -21
- package/dist/types/entity/BookedSessions.js +0 -8
- package/dist/types/entity/BookedSessions.js.map +0 -1
|
@@ -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"}
|
|
@@ -5,7 +5,8 @@ export declare class SenderDto {
|
|
|
5
5
|
organizationId?: number;
|
|
6
6
|
facilityId?: number;
|
|
7
7
|
replyTo?: string;
|
|
8
|
-
|
|
8
|
+
fromDisplayName?: string;
|
|
9
|
+
constructor(userId: number, organizationId?: number, facilityId?: number, replyTo?: string, fromDisplayName?: string);
|
|
9
10
|
}
|
|
10
11
|
export declare class RecipientsDto {
|
|
11
12
|
to: string[];
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NotificationCreateDto = exports.ContentDto = exports.RecipientsDto = exports.SenderDto = void 0;
|
|
4
4
|
const notification_enums_1 = require("../types/enums/notification.enums");
|
|
5
5
|
class SenderDto {
|
|
6
|
-
constructor(userId, organizationId, facilityId, replyTo) {
|
|
6
|
+
constructor(userId, organizationId, facilityId, replyTo, fromDisplayName) {
|
|
7
7
|
this.userId = userId;
|
|
8
8
|
this.organizationId = organizationId;
|
|
9
9
|
this.facilityId = facilityId;
|
|
10
10
|
this.replyTo = replyTo;
|
|
11
|
+
this.fromDisplayName = fromDisplayName;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
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":";;;AAYA,0EAAgF;AAOhF,MAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"notification.create.dto.js","sourceRoot":"","sources":["../../../../src/types/notifications/dto/notification.create.dto.ts"],"names":[],"mappings":";;;AAYA,0EAAgF;AAOhF,MAAa,SAAS;IAgBrB,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;AA3BO,yBAAe,GAAG,CAAC,EAAE,CAAC;AA6B9B,M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ultDto {
|
|
|
18
18
|
static withError(error) {
|
|
19
19
|
return new SendResultDto(0, 0, 0, [error]);
|
|
20
20
|
}
|
|
21
|
+
merge(other) {
|
|
22
|
+
this.attempted += other.attempted;
|
|
23
|
+
this.succeeded += other.succeeded;
|
|
24
|
+
this.failed += other.failed;
|
|
25
|
+
this.errors = this.errors.concat(other.errors);
|
|
26
|
+
}
|
|
21
27
|
}
|
|
22
28
|
exports.SendResultDto = SendResultDto;
|
|
23
29
|
//# sourceMappingURL=notification.response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.response.dto.js","sourceRoot":"","sources":["../../../../src/types/notifications/dto/notification.response.dto.ts"],"names":[],"mappings":";;;AAUA,MAAa,YAAY;CAMxB;AAND,oCAMC;AAED,MAAa,aAAa;IASzB,YAAY,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,MAAuB;QAR7E,cAAS,GAAG,CAAC,CAAC;QAEd,cAAS,GAAG,CAAC,CAAC;QAEd,WAAM,GAAG,CAAC,CAAC;QAEX,WAAM,GAAmB,EAAE,CAAC;QAG3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,KAAmB;QACnC,OAAO,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;CACD;
|
|
1
|
+
{"version":3,"file":"notification.response.dto.js","sourceRoot":"","sources":["../../../../src/types/notifications/dto/notification.response.dto.ts"],"names":[],"mappings":";;;AAUA,MAAa,YAAY;CAMxB;AAND,oCAMC;AAED,MAAa,aAAa;IASzB,YAAY,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,MAAuB;QAR7E,cAAS,GAAG,CAAC,CAAC;QAEd,cAAS,GAAG,CAAC,CAAC;QAEd,WAAM,GAAG,CAAC,CAAC;QAEX,WAAM,GAAmB,EAAE,CAAC;QAG3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,KAAmB;QACnC,OAAO,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,KAAoB;QACzB,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;CACD;AA1BD,sCA0BC"}
|
|
@@ -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, ProgramTypeNameEnum } 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
|
+
[ProgramTypeNameEnum.CLASS]: DiscountRelatedProductIdsDto;
|
|
14
|
+
[ProgramTypeNameEnum.CLINIC]: DiscountRelatedProductIdsDto;
|
|
15
|
+
[ProgramTypeNameEnum.CAMP]: DiscountRelatedProductIdsDto;
|
|
16
|
+
[ProgramTypeNameEnum.CLUB_TEAM]: DiscountRelatedProductIdsDto;
|
|
17
|
+
[ProgramTypeNameEnum.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
|
-
|
|
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;
|
|
@@ -56,12 +75,16 @@ export declare class UpdateDiscountDto {
|
|
|
56
75
|
redeemStartDate?: Date;
|
|
57
76
|
redeemEndDate?: Date;
|
|
58
77
|
maxUses?: number;
|
|
78
|
+
maxUsesPerUser?: number;
|
|
59
79
|
platform?: PlatformsEnum;
|
|
60
80
|
gender?: GenderEnum;
|
|
61
81
|
maxAge?: number;
|
|
62
82
|
minAge?: number;
|
|
63
83
|
requiredProductsIds?: number[];
|
|
64
84
|
glIds?: number[];
|
|
85
|
+
percentageValue?: number;
|
|
86
|
+
fixValue?: number;
|
|
87
|
+
relatedProducts?: DiscountRelatedProductsDto;
|
|
65
88
|
}
|
|
66
89
|
export declare class CreateDiscountsDto {
|
|
67
90
|
discounts: CreateDiscountDto[];
|
|
@@ -82,7 +105,7 @@ export declare class SetDiscountsDto {
|
|
|
82
105
|
shiftId?: number;
|
|
83
106
|
}
|
|
84
107
|
export declare class RemoveDiscountDto {
|
|
85
|
-
|
|
108
|
+
actionId: string;
|
|
86
109
|
lineItemsIds?: number[];
|
|
87
110
|
}
|
|
88
111
|
export declare class RemoveDiscountsDto {
|
|
@@ -93,7 +116,7 @@ export declare class RemoveDiscountsDto {
|
|
|
93
116
|
export declare class ItemDiscountDto extends OrganizationBaseEntityDto {
|
|
94
117
|
invoiceId: number;
|
|
95
118
|
lineItemsIds?: number[];
|
|
96
|
-
|
|
119
|
+
actionId?: string;
|
|
97
120
|
discountId: number;
|
|
98
121
|
discount: SimpleDiscountDto;
|
|
99
122
|
reasonId: 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.ProgramTypeNameEnum.CLASS, enums_service_1.ProgramTypeNameEnum.CLINIC, enums_service_1.ProgramTypeNameEnum.CAMP, enums_service_1.ProgramTypeNameEnum.CLUB_TEAM, enums_service_1.ProgramTypeNameEnum.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;
|
|
1
|
+
{"version":3,"file":"discount.dto.js","sourceRoot":"","sources":["../../../../src/types/payment/dto/discount.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAwD;AAGxD,8EAAoF;AACpF,gEAOsC;AAStC,MAAa,4BAA4B;CAIxC;AAJD,oEAIC;AAED,MAAa,0BAA0B;CAUtC;AAVD,gEAUC;AATC,mCAAmB,CAAC,KAAK,EAEzB,mCAAmB,CAAC,MAAM,EAE1B,mCAAmB,CAAC,IAAI,EAExB,mCAAmB,CAAC,SAAS,EAE7B,mCAAmB,CAAC,MAAM;AAG5B,MAAa,0BAA0B;CAQtC;AARD,gEAQC;AAED,MAAM,iBAAiB;CAgCtB;AAED,MAAa,WAAY,SAAQ,iBAAiB;CAYjD;AAZD,kCAYC;AAED,MAAa,iBAAkB,SAAQ,4CAAyB;CAQ/D;AARD,8CAQC;AAED,MAAa,eAAgB,SAAQ,6BAAe;CAMnD;AAND,0CAMC;AAED,MAAa,iBAAkB,SAAQ,iBAAiB;CAUvD;AAVD,8CAUC;AAED,MAAa,iBAAiB;CAoC7B;AApCD,8CAoCC;AAED,MAAa,kBAAkB;CAE9B;AAFD,gDAEC;AAED,MAAa,kBAAkB;CAE9B;AAFD,gDAEC;AAED,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"}
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./discount.dto"), exports);
|
|
|
18
18
|
__exportStar(require("./payment-method.dto"), exports);
|
|
19
19
|
__exportStar(require("./payment-plan.dto"), exports);
|
|
20
20
|
__exportStar(require("./payment.dto"), exports);
|
|
21
|
+
__exportStar(require("./promo-code.dto"), exports);
|
|
21
22
|
__exportStar(require("./refund.dto"), exports);
|
|
22
23
|
__exportStar(require("./void.dto"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/payment/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,uDAAqC;AACrC,qDAAmC;AACnC,gDAA8B;AAC9B,+CAA6B;AAC7B,6CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/payment/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,uDAAqC;AACrC,qDAAmC;AACnC,gDAA8B;AAC9B,mDAAiC;AACjC,+CAA6B;AAC7B,6CAA2B"}
|
|
@@ -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 { LinkedAccountStatus, MonthsEnum, OrderByEnum, PaymentSettingStatusEnum, 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?:
|
|
67
|
+
months?: MonthsEnum[];
|
|
63
68
|
orderByProperty?: PaymentFilterByEnum[];
|
|
64
69
|
order?: OrderByEnum[];
|
|
65
70
|
}
|
|
@@ -124,3 +129,15 @@ export declare class GetPaymentMethodsDto {
|
|
|
124
129
|
export declare class PaymentDto extends Payment {
|
|
125
130
|
customer?: Customer;
|
|
126
131
|
}
|
|
132
|
+
export declare class PaymentSettingsDto {
|
|
133
|
+
paymentSettingsStatus?: PaymentSettingStatusEnum;
|
|
134
|
+
onlinePaymentEnabled?: boolean;
|
|
135
|
+
}
|
|
136
|
+
export declare class StripeAccountStatusDto {
|
|
137
|
+
id?: string;
|
|
138
|
+
status?: boolean;
|
|
139
|
+
accountStatus?: LinkedAccountStatus;
|
|
140
|
+
missingBank?: boolean;
|
|
141
|
+
missingRequirements?: boolean;
|
|
142
|
+
paymentSettings?: PaymentSettingsDto;
|
|
143
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentDto = exports.GetPaymentMethodsDto = exports.SendPaymentRequestDto = exports.RevertMetaDto = exports.RemoveResourceDto = exports.NotePrivacyDto = exports.UpdateNoteContentDto = exports.CreateNoteDto = exports.AddToInvoiceDto = exports.SendReceiptDataDto = exports.PaymentDataDto = exports.PaymentIntentDto = exports.StationsDto = exports.FindPayments = exports.ByPaymentFilter = exports.PaymentViaInvoiceHashDto = exports.GetPaymentsQueryDto = exports.GetInvoicesQueryDto = exports.InvoiceIdAndUserIdDto = exports.ByInvoiceAndCustomerDto = exports.ByInvoiceDto = exports.InvoiceIdDto = exports.GetPaymentByCustomerDeprecatedDto = exports.GetPaymentByUserDto = exports.ByPaymentDto = exports.GetPaymentDto = exports.ByPaymentAndCustomerDto = exports.PaymentIdDto = exports.CustomerIdDto = void 0;
|
|
3
|
+
exports.StripeAccountStatusDto = exports.PaymentSettingsDto = exports.PaymentDto = exports.GetPaymentMethodsDto = exports.SendPaymentRequestDto = exports.RevertMetaDto = exports.RemoveResourceDto = exports.NotePrivacyDto = exports.UpdateNoteContentDto = exports.CreateNoteDto = exports.AddToInvoiceDto = exports.SendReceiptDataDto = exports.PaymentDataDto = exports.PaymentIntentDto = exports.StationsDto = exports.FindPayments = exports.ByPaymentFilter = exports.PaymentViaInvoiceHashDto = exports.GetPaymentsQueryDto = exports.GetInvoicesQueryDto = exports.InvoiceIdAndUserIdDto = exports.ByInvoiceAndCustomerDto = exports.ByInvoiceDto = exports.InvoiceIdDto = exports.GetPaymentByCustomerDeprecatedDto = exports.GetPaymentByUserDto = exports.ByPaymentDto = exports.GetPaymentDto = exports.ByPaymentAndCustomerDto = exports.PaymentIdDto = exports.CustomerIdDto = 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 Payment_1 = require("../entities/Payment");
|
|
@@ -91,4 +91,10 @@ exports.GetPaymentMethodsDto = GetPaymentMethodsDto;
|
|
|
91
91
|
class PaymentDto extends Payment_1.Payment {
|
|
92
92
|
}
|
|
93
93
|
exports.PaymentDto = PaymentDto;
|
|
94
|
+
class PaymentSettingsDto {
|
|
95
|
+
}
|
|
96
|
+
exports.PaymentSettingsDto = PaymentSettingsDto;
|
|
97
|
+
class StripeAccountStatusDto {
|
|
98
|
+
}
|
|
99
|
+
exports.StripeAccountStatusDto = StripeAccountStatusDto;
|
|
94
100
|
//# sourceMappingURL=payment.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.dto.js","sourceRoot":"","sources":["../../../../src/types/payment/dto/payment.dto.ts"],"names":[],"mappings":";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,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;AAGD,MAAa,UAAW,SAAQ,iBAAO;CAEtC;AAFD,gCAEC;AAED,MAAa,kBAAkB;CAI9B;AAJD,gDAIC;AAED,MAAa,sBAAsB;CAYlC;AAZD,wDAYC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OrganizationBaseEntityDto } from '../../organization/dto/organization.dto';
|
|
2
|
+
import { CreateDiscountDto, DiscountDto, UpdateDiscountDto } from './discount.dto';
|
|
3
|
+
import { PaginationQuery } from '../../dto/general.dto';
|
|
4
|
+
export declare const PROMO_CODE_ALLOWED_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
5
|
+
export declare const MIN_PROMO_CODE_LENGTH = 8;
|
|
6
|
+
export declare const MAX_PROMO_CODE_LENGTH = 20;
|
|
7
|
+
export declare class PromoCodeDto extends OrganizationBaseEntityDto {
|
|
8
|
+
code: string;
|
|
9
|
+
discountId: number;
|
|
10
|
+
description?: string;
|
|
11
|
+
isFavorite: boolean;
|
|
12
|
+
discount: DiscountDto;
|
|
13
|
+
}
|
|
14
|
+
export declare class CreatePromoCodeDto {
|
|
15
|
+
code?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
isFavorite?: boolean;
|
|
18
|
+
discount: CreateDiscountDto;
|
|
19
|
+
}
|
|
20
|
+
export declare class UpdatePromoCodeDto extends OrganizationBaseEntityDto {
|
|
21
|
+
code?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
isFavorite?: boolean;
|
|
24
|
+
discount?: UpdateDiscountDto;
|
|
25
|
+
}
|
|
26
|
+
export declare class CreatePromoCodesDto {
|
|
27
|
+
promoCodes: CreatePromoCodeDto[];
|
|
28
|
+
}
|
|
29
|
+
export declare class UpdatePromoCodesDto {
|
|
30
|
+
promoCodes: UpdatePromoCodeDto[];
|
|
31
|
+
}
|
|
32
|
+
export declare class GetOrganizationPromoCodesQuery extends PaginationQuery {
|
|
33
|
+
startDate?: Date;
|
|
34
|
+
endDate?: Date;
|
|
35
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetOrganizationPromoCodesQuery = exports.UpdatePromoCodesDto = exports.CreatePromoCodesDto = exports.UpdatePromoCodeDto = exports.CreatePromoCodeDto = exports.PromoCodeDto = exports.MAX_PROMO_CODE_LENGTH = exports.MIN_PROMO_CODE_LENGTH = exports.PROMO_CODE_ALLOWED_CHARACTERS = void 0;
|
|
4
|
+
const organization_dto_1 = require("../../organization/dto/organization.dto");
|
|
5
|
+
const general_dto_1 = require("../../dto/general.dto");
|
|
6
|
+
exports.PROMO_CODE_ALLOWED_CHARACTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
7
|
+
exports.MIN_PROMO_CODE_LENGTH = 8;
|
|
8
|
+
exports.MAX_PROMO_CODE_LENGTH = 20;
|
|
9
|
+
const EXAMPLE_CODE = 'HOLIDAY25';
|
|
10
|
+
class PromoCodeDto extends organization_dto_1.OrganizationBaseEntityDto {
|
|
11
|
+
}
|
|
12
|
+
exports.PromoCodeDto = PromoCodeDto;
|
|
13
|
+
class CreatePromoCodeDto {
|
|
14
|
+
}
|
|
15
|
+
exports.CreatePromoCodeDto = CreatePromoCodeDto;
|
|
16
|
+
class UpdatePromoCodeDto extends organization_dto_1.OrganizationBaseEntityDto {
|
|
17
|
+
}
|
|
18
|
+
exports.UpdatePromoCodeDto = UpdatePromoCodeDto;
|
|
19
|
+
class CreatePromoCodesDto {
|
|
20
|
+
}
|
|
21
|
+
exports.CreatePromoCodesDto = CreatePromoCodesDto;
|
|
22
|
+
class UpdatePromoCodesDto {
|
|
23
|
+
}
|
|
24
|
+
exports.UpdatePromoCodesDto = UpdatePromoCodesDto;
|
|
25
|
+
class GetOrganizationPromoCodesQuery extends general_dto_1.PaginationQuery {
|
|
26
|
+
}
|
|
27
|
+
exports.GetOrganizationPromoCodesQuery = GetOrganizationPromoCodesQuery;
|
|
28
|
+
//# sourceMappingURL=promo-code.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promo-code.dto.js","sourceRoot":"","sources":["../../../../src/types/payment/dto/promo-code.dto.ts"],"names":[],"mappings":";;;AAAA,8EAAoF;AAEpF,uDAAwD;AAE3C,QAAA,6BAA6B,GAAG,sCAAsC,CAAC;AACvE,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAC1B,QAAA,qBAAqB,GAAG,EAAE,CAAC;AAGxC,MAAM,YAAY,GAAG,WAAW,CAAC;AAEjC,MAAa,YAAa,SAAQ,4CAAyB;CAU1D;AAVD,oCAUC;AAED,MAAa,kBAAkB;CAQ9B;AARD,gDAQC;AAED,MAAa,kBAAmB,SAAQ,4CAAyB;CAQhE;AARD,gDAQC;AAED,MAAa,mBAAmB;CAE/B;AAFD,kDAEC;AAED,MAAa,mBAAmB;CAE/B;AAFD,kDAEC;AAED,MAAa,8BAA+B,SAAQ,6BAAe;CAIlE;AAJD,wEAIC"}
|
|
@@ -2,6 +2,8 @@ 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';
|
|
6
|
+
import { PromoCode } from './PromoCode';
|
|
5
7
|
export declare class Discount extends OrganizationConnectionBaseEntity {
|
|
6
8
|
deletedAt?: Date;
|
|
7
9
|
name: string;
|
|
@@ -16,11 +18,13 @@ export declare class Discount extends OrganizationConnectionBaseEntity {
|
|
|
16
18
|
min: number;
|
|
17
19
|
max?: number;
|
|
18
20
|
maxUses?: number;
|
|
19
|
-
|
|
21
|
+
maxUsesPerUser?: number;
|
|
20
22
|
platform?: PlatformsEnum;
|
|
21
23
|
gender?: GenderEnum;
|
|
22
24
|
minAge: number;
|
|
23
25
|
maxAge?: number;
|
|
24
26
|
requiredProductsIds?: number[];
|
|
27
|
+
relatedProducts?: IDiscountRelatedProducts;
|
|
28
|
+
promoCode: PromoCode;
|
|
25
29
|
glCodes?: ResourceToGL[];
|
|
26
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Discount.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/Discount.ts"],"names":[],"mappings":";;;AACA,oGAAiG;
|
|
1
|
+
{"version":3,"file":"Discount.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/Discount.ts"],"names":[],"mappings":";;;AACA,oGAAiG;AAOjG,MAAa,QAAS,SAAQ,mEAAgC;CA4C7D;AA5CD,4BA4CC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OrganizationConnectionBaseEntity } from '../../entity/OrganizationConnectionBaseEntity';
|
|
2
|
+
import { Discount } from './Discount';
|
|
3
|
+
export declare class PromoCode extends OrganizationConnectionBaseEntity {
|
|
4
|
+
code: string;
|
|
5
|
+
discountId: number;
|
|
6
|
+
discount: Discount;
|
|
7
|
+
description?: string;
|
|
8
|
+
deletedAt?: Date;
|
|
9
|
+
isFavorite: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromoCode = void 0;
|
|
4
|
+
const OrganizationConnectionBaseEntity_1 = require("../../entity/OrganizationConnectionBaseEntity");
|
|
5
|
+
class PromoCode extends OrganizationConnectionBaseEntity_1.OrganizationConnectionBaseEntity {
|
|
6
|
+
}
|
|
7
|
+
exports.PromoCode = PromoCode;
|
|
8
|
+
//# sourceMappingURL=PromoCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromoCode.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/PromoCode.ts"],"names":[],"mappings":";;;AACA,oGAAiG;AAGjG,MAAa,SAAU,SAAQ,mEAAgC;CAY9D;AAZD,8BAYC"}
|
|
@@ -23,4 +23,5 @@ __exportStar(require("./PaymentNote"), exports);
|
|
|
23
23
|
__exportStar(require("./PaymentPlanSchedule"), exports);
|
|
24
24
|
__exportStar(require("./Payments.deprecated"), exports);
|
|
25
25
|
__exportStar(require("./ProductPaymentPlan"), exports);
|
|
26
|
+
__exportStar(require("./PromoCode"), exports);
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,sDAAoC;AACpC,4CAA0B;AAC1B,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B;AAC9B,wDAAsC;AACtC,wDAAsC;AACtC,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,sDAAoC;AACpC,4CAA0B;AAC1B,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B;AAC9B,wDAAsC;AACtC,wDAAsC;AACtC,uDAAqC;AACrC,8CAA4B"}
|
|
@@ -19,7 +19,7 @@ exports.uniqueTaxTemplate = uniqueTaxTemplate;
|
|
|
19
19
|
const uniqueDiscountTemplate = (discountItem) => {
|
|
20
20
|
var _a, _b;
|
|
21
21
|
const discountPercentage = (_a = `${discountItem.discountPercentage}`) !== null && _a !== void 0 ? _a : '';
|
|
22
|
-
return `${discountItem.
|
|
22
|
+
return `${discountItem.actionId}_${discountItem.discountId}_${(_b = discountItem.discount) === null || _b === void 0 ? void 0 : _b.type}_${discountPercentage}`;
|
|
23
23
|
};
|
|
24
24
|
exports.uniqueDiscountTemplate = uniqueDiscountTemplate;
|
|
25
25
|
const orderByResourceTemplate = (resource, type) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.consts.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/consts/payment.consts.ts"],"names":[],"mappings":";;;AAIA,0DAAiE;AAEpD,QAAA,sBAAsB,GAAG,GAAG,CAAC;AAE7B,QAAA,qBAAqB,GAA8B;IAC/D,CAAC,uCAAuB,CAAC,SAAS,CAAC,EAAE,CAAC;IACtC,CAAC,uCAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;IACpC,CAAC,uCAAuB,CAAC,MAAM,CAAC,EAAE,CAAC;IACnC,CAAC,uCAAuB,CAAC,QAAQ,CAAC,EAAE,CAAC;IACrC,CAAC,uCAAuB,CAAC,MAAM,CAAC,EAAE,CAAC;IACnC,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;CACV,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAAC,QAAmB,EAAU,EAAE;IAChE,OAAO,GAAG,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEK,MAAM,sBAAsB,GAAG,CAAC,YAA6B,EAAU,EAAE;;IAC/E,MAAM,kBAAkB,GAAW,MAAA,GAAG,YAAY,CAAC,kBAAkB,EAAE,mCAAI,EAAE,CAAC;IAC9E,OAAO,GAAG,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"payment.consts.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/consts/payment.consts.ts"],"names":[],"mappings":";;;AAIA,0DAAiE;AAEpD,QAAA,sBAAsB,GAAG,GAAG,CAAC;AAE7B,QAAA,qBAAqB,G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.DiscountTypeEnum = void 0;
|
|
3
|
+
exports.DiscountUsageTypeEnum = exports.CartDiscountOnEnum = exports.DiscountOnEnum = exports.DiscountTypeEnum = void 0;
|
|
4
4
|
var DiscountTypeEnum;
|
|
5
5
|
(function (DiscountTypeEnum) {
|
|
6
6
|
DiscountTypeEnum["MANUAL"] = "manual";
|
|
@@ -17,4 +17,10 @@ var CartDiscountOnEnum;
|
|
|
17
17
|
CartDiscountOnEnum["ALL"] = "all";
|
|
18
18
|
CartDiscountOnEnum["ITEM"] = "item";
|
|
19
19
|
})(CartDiscountOnEnum = exports.CartDiscountOnEnum || (exports.CartDiscountOnEnum = {}));
|
|
20
|
+
var DiscountUsageTypeEnum;
|
|
21
|
+
(function (DiscountUsageTypeEnum) {
|
|
22
|
+
DiscountUsageTypeEnum["BY_PRODUCT_USER"] = "by_product_user";
|
|
23
|
+
DiscountUsageTypeEnum["BY_PAYING_USER"] = "by_paying_user";
|
|
24
|
+
DiscountUsageTypeEnum["DEFAULT"] = "default";
|
|
25
|
+
})(DiscountUsageTypeEnum = exports.DiscountUsageTypeEnum || (exports.DiscountUsageTypeEnum = {}));
|
|
20
26
|
//# sourceMappingURL=discount.enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discount.enums.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/enums/discount.enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC3B,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,2DAAuC,CAAA;AACxC,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAGD,IAAY,cAGX;AAHD,WAAY,cAAc;IACzB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;AACxB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAGD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC7B,iCAAW,CAAA;IACX,mCAAa,CAAA;AACd,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B"}
|
|
1
|
+
{"version":3,"file":"discount.enums.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/enums/discount.enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC3B,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,2DAAuC,CAAA;AACxC,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAGD,IAAY,cAGX;AAHD,WAAY,cAAc;IACzB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;AACxB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAGD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC7B,iCAAW,CAAA;IACX,mCAAa,CAAA;AACd,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAED,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAChC,4DAAmC,CAAA;IACnC,0DAAiC,CAAA;IACjC,4CAAmB,CAAA;AACpB,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAIhC"}
|
|
@@ -17,7 +17,8 @@ export declare enum PaymentFilterByEnum {
|
|
|
17
17
|
}
|
|
18
18
|
export declare enum ReasonTypeEnum {
|
|
19
19
|
REFUND = "refund",
|
|
20
|
-
DISCOUNT = "discount"
|
|
20
|
+
DISCOUNT = "discount",
|
|
21
|
+
PROMO_CODE = "promo_code"
|
|
21
22
|
}
|
|
22
23
|
export declare enum PaymentStatusV1Enum {
|
|
23
24
|
SENT_TO_CLIENT = 1,
|
|
@@ -24,6 +24,7 @@ var ReasonTypeEnum;
|
|
|
24
24
|
(function (ReasonTypeEnum) {
|
|
25
25
|
ReasonTypeEnum["REFUND"] = "refund";
|
|
26
26
|
ReasonTypeEnum["DISCOUNT"] = "discount";
|
|
27
|
+
ReasonTypeEnum["PROMO_CODE"] = "promo_code";
|
|
27
28
|
})(ReasonTypeEnum = exports.ReasonTypeEnum || (exports.ReasonTypeEnum = {}));
|
|
28
29
|
var PaymentStatusV1Enum;
|
|
29
30
|
(function (PaymentStatusV1Enum) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.enums.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/enums/payment.enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IAC5B,0CAAqB,CAAA;IACrB,gDAA2B,CAAA;IAC3B,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;IACrB,kCAAa,CAAA;IACb,0CAAqB,CAAA;IACrB,wDAAmC,CAAA;IACnC,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;AACpB,CAAC,EAVW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAU5B;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC9B,uDAAgC,CAAA;IAChC,wCAAiB,CAAA;IACjB,gCAAS,CAAA;IACT,+CAAwB,CAAA;AACzB,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"payment.enums.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/enums/payment.enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IAC5B,0CAAqB,CAAA;IACrB,gDAA2B,CAAA;IAC3B,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;IACrB,kCAAa,CAAA;IACb,0CAAqB,CAAA;IACrB,wDAAmC,CAAA;IACnC,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;AACpB,CAAC,EAVW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAU5B;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC9B,uDAAgC,CAAA;IAChC,wCAAiB,CAAA;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,+CAAmB,CAAA;IACnB,+CAAmB,CAAA;AACpB,CAAC,EALW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAKnC;AAED,IAAY,uBAMX;AAND,WAAY,uBAAuB;IAClC,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;IACvB,4CAAiB,CAAA;IACjB,gDAAqB,CAAA;IACrB,8CAAmB,CAAA;AACpB,CAAC,EANW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAMlC;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC7B,2CAAqB,CAAA;IACrB,8CAAwB,CAAA;AACzB,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Invoice } from '../../../entity/Invoice';
|
|
2
2
|
import { LineItems } from '../../../entity/LineItems';
|
|
3
3
|
import { CreateNoteDto } from '../../dto/payment.dto';
|
|
4
|
-
import { Payment } from '../../entities/Payment';
|
|
5
4
|
import { DiscountOnEnum } from '../enums/discount.enums';
|
|
5
|
+
import { ProgramTypeNameEnum } from '../../../services/enums.service';
|
|
6
|
+
import { Product } from '../../../product-pricing/entities/Product';
|
|
6
7
|
export interface ISetDiscountsValidationsResult {
|
|
7
8
|
invoice: Invoice;
|
|
8
9
|
parentLineItems: LineItems[];
|
|
@@ -27,7 +28,31 @@ export interface ISetDiscounts {
|
|
|
27
28
|
isTaxIncluded?: boolean;
|
|
28
29
|
allowZeroAmount?: boolean;
|
|
29
30
|
}
|
|
30
|
-
export interface
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
export interface IDiscountRelatedProductIds {
|
|
32
|
+
included?: number[];
|
|
33
|
+
excluded?: number[];
|
|
34
|
+
}
|
|
35
|
+
export interface IDiscountRelatedPrograms {
|
|
36
|
+
[ProgramTypeNameEnum.CLASS]: IDiscountRelatedProductIds;
|
|
37
|
+
[ProgramTypeNameEnum.CLINIC]: IDiscountRelatedProductIds;
|
|
38
|
+
[ProgramTypeNameEnum.CAMP]: IDiscountRelatedProductIds;
|
|
39
|
+
[ProgramTypeNameEnum.CLUB_TEAM]: IDiscountRelatedProductIds;
|
|
40
|
+
[ProgramTypeNameEnum.LESSON]: IDiscountRelatedProductIds;
|
|
41
|
+
}
|
|
42
|
+
export interface IDiscountRelatedProducts {
|
|
43
|
+
programs?: IDiscountRelatedPrograms;
|
|
44
|
+
memberships?: IDiscountRelatedProductIds;
|
|
45
|
+
leagues?: IDiscountRelatedProductIds;
|
|
46
|
+
goods?: IDiscountRelatedProductIds;
|
|
47
|
+
}
|
|
48
|
+
export interface IUsesPerUser {
|
|
49
|
+
id: number;
|
|
50
|
+
uses: number;
|
|
51
|
+
}
|
|
52
|
+
export interface IUserItem {
|
|
53
|
+
id: number;
|
|
54
|
+
userId: number;
|
|
55
|
+
productId: number;
|
|
56
|
+
product?: Product;
|
|
57
|
+
quantity?: number;
|
|
33
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discount.interfaces.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/interfaces/discount.interfaces.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"discount.interfaces.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/interfaces/discount.interfaces.ts"],"names":[],"mappings":";;AAKA,mEAAwF"}
|