@bondsports/types 2.5.24 → 2.5.25-squad-b-1
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-public.dto.d.ts +2 -0
- package/dist/types/cart/dto/cart-item-public.dto.js.map +1 -1
- package/dist/types/cart/dto/cart-item.dto.d.ts +1 -0
- package/dist/types/cart/dto/cart-item.dto.js.map +1 -1
- package/dist/types/cart/types/interfaces/cart.interfaces.d.ts +50 -1
- package/dist/types/future-installments/entities/future-installment.entity.d.ts +3 -0
- package/dist/types/future-installments/entities/future-installment.entity.js.map +1 -1
- package/dist/types/programs-seasons/types/interfaces/program-session.interfaces.d.ts +1 -0
- package/dist/types/purchase/dto/purchase.dto.d.ts +6 -0
- package/dist/types/purchase/dto/purchase.dto.js +4 -1
- package/dist/types/purchase/dto/purchase.dto.js.map +1 -1
- package/dist/types/purchase/types/interfaces/purchase.interfaces.d.ts +21 -2
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PaymentPlanDto } from '../../payment/dto/payment-plan.dto';
|
|
1
2
|
import { BasePurchaseResourceDto } from '../../purchase/dto/purchase.dto';
|
|
2
3
|
import { TimeSlotDto } from '../../reservations/dto/slot.dto';
|
|
3
4
|
import { BaseAddCartItemDto, BaseCartItemDto, CartItemDto } from './cart-item.dto';
|
|
@@ -11,6 +12,7 @@ export declare class PublicCartItemDto extends CartItemDto {
|
|
|
11
12
|
children?: PublicCartItemDto[];
|
|
12
13
|
slots?: TimeSlotDto[];
|
|
13
14
|
downpayment?: number;
|
|
15
|
+
paymentPlan?: PaymentPlanDto | null;
|
|
14
16
|
requiredProductIds?: number[];
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-item-public.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item-public.dto.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"cart-item-public.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item-public.dto.ts"],"names":[],"mappings":";;;AAEA,kEAA0E;AAQ1E,mDAAmF;AAEnF;;;GAGG;AACH,MAAa,yBAA0B,SAAQ,sCAAuB;CAAG;AAAzE,8DAAyE;AAEzE,MAAa,iBAAkB,SAAQ,2BAAW;CAUjD;AAVD,8CAUC;AAED;;;;;;GAMG;AACH,MAAa,oBAAqB,SAAQ,kCAAkB;CAI3D;AAJD,oDAIC;AAED;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,+BAAe;CAI3D;AAJD,0DAIC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-item.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item.dto.ts"],"names":[],"mappings":";;;AAEA,8EAAoF;AAgBpF,MAAa,UAAW,SAAQ,4CAAyB;CAYxD;AAZD,gCAYC;AAED,MAAa,eAAgB,SAAQ,4CAAyB;CAsB7D;AAtBD,0CAsBC;AAED,MAAa,iBAAiB;CAM7B;AAND,8CAMC;AAED,MAAa,mBAAmB;CAM/B;AAND,kDAMC;AAED,MAAa,iBAAkB,SAAQ,4CAAyB;CAI/D;AAJD,8CAIC;AAED,MAAa,WAAY,SAAQ,iBAAiB;
|
|
1
|
+
{"version":3,"file":"cart-item.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item.dto.ts"],"names":[],"mappings":";;;AAEA,8EAAoF;AAgBpF,MAAa,UAAW,SAAQ,4CAAyB;CAYxD;AAZD,gCAYC;AAED,MAAa,eAAgB,SAAQ,4CAAyB;CAsB7D;AAtBD,0CAsBC;AAED,MAAa,iBAAiB;CAM7B;AAND,8CAMC;AAED,MAAa,mBAAmB;CAM/B;AAND,kDAMC;AAED,MAAa,iBAAkB,SAAQ,4CAAyB;CAI/D;AAJD,8CAIC;AAED,MAAa,WAAY,SAAQ,iBAAiB;CAgDjD;AAhDD,kCAgDC;AAED;;;;;GAKG;AACH,MAAa,eAAe;CAO3B;AAPD,0CAOC;AAED,MAAa,iBAAkB,SAAQ,eAAe;CAGrD;AAHD,8CAGC;AAED;;;;;GAKG;AACH,MAAa,kBAAmB,SAAQ,eAAe;CAMtD;AAND,gDAMC;AAED,MAAa,cAAe,SAAQ,kBAAkB;CAQrD;AARD,wCAQC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ActivityTimes } from '../../../activity-times/entities/activity-times.entity';
|
|
2
2
|
import { UserAnswersDto } from '../../../applications/dto/application.dto';
|
|
3
3
|
import { Invoice } from '../../../invoice/entities/invoice.entity';
|
|
4
|
+
import { ScheduledPaymentDto } from '../../../payment/dto/payment-plan.dto';
|
|
5
|
+
import { ProductPaymentPlan } from '../../../product-pricing/entities/product-payment-plan.entity';
|
|
4
6
|
import { Product } from '../../../product-pricing/entities/product.entity';
|
|
5
7
|
import { IPricesOfProductsResults } from '../../../product-pricing/types/interfaces/product-pricing.interfaces';
|
|
6
8
|
import { IResource } from '../../../product-resources/types/interfaces/product-resource.interfaces';
|
|
7
|
-
import {
|
|
9
|
+
import { BasicPurchaseDto } from '../../../purchase/dto/purchase.dto';
|
|
10
|
+
import { IPurchasePayment, IPurchaseResult } from '../../../purchase/types/interfaces/purchase.interfaces';
|
|
8
11
|
import { Reservation } from '../../../reservations/entities/reservation.entity';
|
|
9
12
|
import { CurrencyEnum } from '../../../types/enums/currency.enums';
|
|
10
13
|
import { PlatformsEnum } from '../../../types/enums/platform.enums';
|
|
@@ -157,6 +160,52 @@ export interface IRecalculateCartOptions {
|
|
|
157
160
|
recalculateDiscounts?: boolean;
|
|
158
161
|
skipSave?: boolean;
|
|
159
162
|
}
|
|
163
|
+
export interface IPurchaseCartParams {
|
|
164
|
+
organizationId: number;
|
|
165
|
+
amountToPay: number;
|
|
166
|
+
cart: Cart;
|
|
167
|
+
installments?: ScheduledPaymentDto[];
|
|
168
|
+
onBeforeCharge?: (invoice: Invoice) => Promise<void>;
|
|
169
|
+
paymentInfo: IPurchasePayment;
|
|
170
|
+
}
|
|
171
|
+
export interface IRegistrationSchedulesParams {
|
|
172
|
+
organizationId: number;
|
|
173
|
+
cart: Cart;
|
|
174
|
+
purchaseData: BasicPurchaseDto;
|
|
175
|
+
}
|
|
176
|
+
export interface ISchedulesForPurchaseParams extends IRegistrationSchedulesParams {
|
|
177
|
+
paymentInfo: IPurchasePayment;
|
|
178
|
+
}
|
|
179
|
+
export interface IEnsureChargeableMethodParams {
|
|
180
|
+
organizationId: number;
|
|
181
|
+
installments: ScheduledPaymentDto[];
|
|
182
|
+
paymentInfo: IPurchasePayment;
|
|
183
|
+
purchaseData: BasicPurchaseDto;
|
|
184
|
+
}
|
|
185
|
+
export interface IAssertPaymentPlanAmountsParams {
|
|
186
|
+
todayByCartItemId: Map<number, number>;
|
|
187
|
+
amountToPay: number;
|
|
188
|
+
nonPlanDue: number;
|
|
189
|
+
plannedItems: CartItem[];
|
|
190
|
+
}
|
|
191
|
+
export interface IScheduleForRegistrationParams {
|
|
192
|
+
organizationId: number;
|
|
193
|
+
cartItem: CartItem;
|
|
194
|
+
requestedInstallmentCount?: number;
|
|
195
|
+
today: number;
|
|
196
|
+
}
|
|
197
|
+
export interface IRollingInstallmentCountParams {
|
|
198
|
+
cartItemId: number;
|
|
199
|
+
plan: ProductPaymentPlan;
|
|
200
|
+
requestedInstallmentCount?: number;
|
|
201
|
+
}
|
|
202
|
+
export interface IPaymentPlanCalculationParams {
|
|
203
|
+
organizationId: number;
|
|
204
|
+
amountToSplit: number;
|
|
205
|
+
months?: number;
|
|
206
|
+
plan: ProductPaymentPlan;
|
|
207
|
+
today: number;
|
|
208
|
+
}
|
|
160
209
|
export interface ISendCartConfirmationEmailsParams {
|
|
161
210
|
amountToPay: number;
|
|
162
211
|
cart?: Cart;
|
|
@@ -2,6 +2,7 @@ import { CustomerMerge } from '../../customers-merge/entities/customer-merge.ent
|
|
|
2
2
|
import { OrganizationConnectionBaseEntity } from '../../entity/organization-connection-base-entity';
|
|
3
3
|
import { Fee } from '../../fee/entities/fee.entity';
|
|
4
4
|
import { Invoice } from '../../invoice/entities/invoice.entity';
|
|
5
|
+
import { ProductsUsers } from '../../invoice/entities/products-users.entity';
|
|
5
6
|
import { UserPaymentMethod } from '../../payment-methods/entities/user-payment-method.entity';
|
|
6
7
|
import { PaymentFailure } from '../../payment/entities/payment-failure.entity';
|
|
7
8
|
import { Payment } from '../../payment/entities/payment.entity';
|
|
@@ -10,6 +11,8 @@ export declare class FutureInstallment extends OrganizationConnectionBaseEntity
|
|
|
10
11
|
userId: number;
|
|
11
12
|
invoiceId: number;
|
|
12
13
|
invoice: Invoice;
|
|
14
|
+
productUserId?: number;
|
|
15
|
+
productUser?: ProductsUsers;
|
|
13
16
|
paymentMethodId?: number;
|
|
14
17
|
paymentMethod: UserPaymentMethod;
|
|
15
18
|
token?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-installment.entity.js","sourceRoot":"","sources":["../../../../src/types/future-installments/entities/future-installment.entity.ts"],"names":[],"mappings":";;;AAGA,0GAAoG;
|
|
1
|
+
{"version":3,"file":"future-installment.entity.js","sourceRoot":"","sources":["../../../../src/types/future-installments/entities/future-installment.entity.ts"],"names":[],"mappings":";;;AAGA,0GAAoG;AASpG,MAAa,iBAAkB,SAAQ,sEAAgC;CAsDtE;AAtDD,8CAsDC"}
|
|
@@ -113,9 +113,15 @@ export declare class PurchaseResultDto {
|
|
|
113
113
|
customer?: Customer;
|
|
114
114
|
productUsers?: ProductsUsers[];
|
|
115
115
|
}
|
|
116
|
+
export declare class RollingInstallmentCountDto {
|
|
117
|
+
cartItemId: number;
|
|
118
|
+
installmentCount?: number;
|
|
119
|
+
amountToPay?: number;
|
|
120
|
+
}
|
|
116
121
|
export declare class BasicPurchaseDto {
|
|
117
122
|
paymentMethodId?: number;
|
|
118
123
|
amountToPay?: number;
|
|
124
|
+
installmentCounts?: RollingInstallmentCountDto[];
|
|
119
125
|
}
|
|
120
126
|
export declare class PurchaseCartDto extends InvoiceCartDto implements IPurchaseCart {
|
|
121
127
|
paymentInfo?: PurchasePaymentDto;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PurchaseCartDto = exports.BasicPurchaseDto = exports.PurchaseResultDto = exports.ValidateParticipantDto = exports.PartialPaymentAsUserDto = exports.AddCartItemsToInvoiceDto = exports.PartialPaymentRequestDto = exports.ScheduledPaymentRequestBodyDto = exports.ScheduledPaymentRequestDto = exports.ScheduledPaymentConsumerRequestDto = exports.PurchaseProductDto = exports.PurchaseResourceDto = exports.BasePurchaseResourceDto = exports.PurchasePaymentDto = void 0;
|
|
3
|
+
exports.PurchaseCartDto = exports.BasicPurchaseDto = exports.RollingInstallmentCountDto = exports.PurchaseResultDto = exports.ValidateParticipantDto = exports.PartialPaymentAsUserDto = exports.AddCartItemsToInvoiceDto = exports.PartialPaymentRequestDto = exports.ScheduledPaymentRequestBodyDto = exports.ScheduledPaymentRequestDto = exports.ScheduledPaymentConsumerRequestDto = exports.PurchaseProductDto = exports.PurchaseResourceDto = exports.BasePurchaseResourceDto = exports.PurchasePaymentDto = void 0;
|
|
4
4
|
const invoice_cart_dto_1 = require("../../invoice/dto/invoice-cart.dto");
|
|
5
5
|
const organization_dto_1 = require("../../organization/dto/organization.dto");
|
|
6
6
|
class PurchasePaymentDto {
|
|
@@ -43,6 +43,9 @@ exports.ValidateParticipantDto = ValidateParticipantDto;
|
|
|
43
43
|
class PurchaseResultDto {
|
|
44
44
|
}
|
|
45
45
|
exports.PurchaseResultDto = PurchaseResultDto;
|
|
46
|
+
class RollingInstallmentCountDto {
|
|
47
|
+
}
|
|
48
|
+
exports.RollingInstallmentCountDto = RollingInstallmentCountDto;
|
|
46
49
|
class BasicPurchaseDto {
|
|
47
50
|
}
|
|
48
51
|
exports.BasicPurchaseDto = BasicPurchaseDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purchase.dto.js","sourceRoot":"","sources":["../../../../src/types/purchase/dto/purchase.dto.ts"],"names":[],"mappings":";;;AAMA,yEAAoE;AAGpE,8EAA8E;AAiB9E,MAAa,kBAAkB;CAY9B;AAZD,gDAYC;AAED;;;GAGG;AACH,MAAa,uBAAuB;CAsBnC;AAtBD,0DAsBC;AAED,MAAa,mBAAoB,SAAQ,uBAAuB;CAE/D;AAFD,kDAEC;AAED,MAAa,kBAAkB;CAqC9B;AArCD,gDAqCC;AAED,MAAa,kCAAkC;CAM9C;AAND,gFAMC;AAED,MAAa,0BAA2B,SAAQ,sCAAmB;CAIlE;AAJD,gEAIC;AAED,MAAa,8BAA8B;CAU1C;AAVD,wEAUC;AAED,MAAa,wBAAwB;CAkBpC;AAlBD,4DAkBC;AAED,MAAa,wBAAwB;CAUpC;AAVD,4DAUC;AAED,MAAa,uBAAuB;CAUnC;AAVD,0DAUC;AAED,MAAa,sBAAsB;CAElC;AAFD,wDAEC;AAED,MAAa,iBAAiB;CAU7B;AAVD,8CAUC;AAED,MAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"purchase.dto.js","sourceRoot":"","sources":["../../../../src/types/purchase/dto/purchase.dto.ts"],"names":[],"mappings":";;;AAMA,yEAAoE;AAGpE,8EAA8E;AAiB9E,MAAa,kBAAkB;CAY9B;AAZD,gDAYC;AAED;;;GAGG;AACH,MAAa,uBAAuB;CAsBnC;AAtBD,0DAsBC;AAED,MAAa,mBAAoB,SAAQ,uBAAuB;CAE/D;AAFD,kDAEC;AAED,MAAa,kBAAkB;CAqC9B;AArCD,gDAqCC;AAED,MAAa,kCAAkC;CAM9C;AAND,gFAMC;AAED,MAAa,0BAA2B,SAAQ,sCAAmB;CAIlE;AAJD,gEAIC;AAED,MAAa,8BAA8B;CAU1C;AAVD,wEAUC;AAED,MAAa,wBAAwB;CAkBpC;AAlBD,4DAkBC;AAED,MAAa,wBAAwB;CAUpC;AAVD,4DAUC;AAED,MAAa,uBAAuB;CAUnC;AAVD,0DAUC;AAED,MAAa,sBAAsB;CAElC;AAFD,wDAEC;AAED,MAAa,iBAAiB;CAU7B;AAVD,8CAUC;AAED,MAAa,0BAA0B;CAMtC;AAND,gEAMC;AAED,MAAa,gBAAgB;CAM5B;AAND,4CAMC;AAED,MAAa,eAAgB,SAAQ,iCAAc;CAkBlD;AAlBD,0CAkBC"}
|
|
@@ -4,6 +4,7 @@ import type { Cart } from '../../../cart/entities/cart.entity';
|
|
|
4
4
|
import { IUpdateCartPrices, IValidateCartOptions } from '../../../cart/types/interfaces/cart.interfaces';
|
|
5
5
|
import { Customer } from '../../../customers/entities/customer.entity';
|
|
6
6
|
import { Invoice } from '../../../invoice/entities/invoice.entity';
|
|
7
|
+
import { LineItems } from '../../../invoice/entities/line-items.entity';
|
|
7
8
|
import { ProductsUsers } from '../../../invoice/entities/products-users.entity';
|
|
8
9
|
import { LineItemsStatusEnum } from '../../../invoice/types/enums/invoice.enums';
|
|
9
10
|
import { IInvoiceCart } from '../../../invoice/types/interfaces/invoice.interfaces';
|
|
@@ -72,10 +73,15 @@ export interface IPastDueNotificationGroup {
|
|
|
72
73
|
facilitiesIds: number[];
|
|
73
74
|
mailsData: Record<string, unknown>[];
|
|
74
75
|
}
|
|
76
|
+
/** A scheduled payment with server-resolved registration linkage. Not a request DTO. */
|
|
77
|
+
export interface IServerBuiltInstallment extends ScheduledPaymentDto {
|
|
78
|
+
cartItemId?: number;
|
|
79
|
+
productUserId?: number;
|
|
80
|
+
}
|
|
75
81
|
export interface IChargeInvoice extends ISaveInvoicePayment {
|
|
76
82
|
parentPurchasedId?: number;
|
|
77
83
|
amountToPay?: number;
|
|
78
|
-
installments?:
|
|
84
|
+
installments?: IServerBuiltInstallment[];
|
|
79
85
|
parentPurchasedType?: ResourceNameTypeEnum;
|
|
80
86
|
resources?: PurchaseResourceDto[];
|
|
81
87
|
}
|
|
@@ -93,8 +99,21 @@ export interface IPurchaseOptions extends IValidateCartOptions {
|
|
|
93
99
|
isImport?: boolean;
|
|
94
100
|
/** Re-checks external validation discounts even when `overridePrice` keeps the reservation lines' prices. */
|
|
95
101
|
recheckExternalValidations?: boolean;
|
|
102
|
+
/** Never set from request data: it enables stamping every dateless installment as a deposit. */
|
|
103
|
+
serverBuiltInstallments?: boolean;
|
|
96
104
|
skipMail?: boolean;
|
|
97
105
|
}
|
|
106
|
+
export interface ISaveScheduledPaymentsFromPurchaseParams {
|
|
107
|
+
organizationId: number;
|
|
108
|
+
chargeInvoice: IChargeInvoice;
|
|
109
|
+
invoice: Invoice;
|
|
110
|
+
options?: IPurchaseOptions;
|
|
111
|
+
}
|
|
112
|
+
export interface ISplitInvoiceByRegistrationTargetsParams {
|
|
113
|
+
amountToSplit: number;
|
|
114
|
+
invoice: Invoice;
|
|
115
|
+
relevantLineItems: LineItems[];
|
|
116
|
+
}
|
|
98
117
|
export interface IPurchasePayment {
|
|
99
118
|
applyForFuture?: boolean;
|
|
100
119
|
cardSaveTerminalData?: ISaveCardTerminalInput;
|
|
@@ -111,7 +130,7 @@ export interface IPurchaseCart extends IInvoiceCart {
|
|
|
111
130
|
parentPurchasedId?: number;
|
|
112
131
|
purchasingUserId?: number;
|
|
113
132
|
amountToPay?: number;
|
|
114
|
-
installments?:
|
|
133
|
+
installments?: IServerBuiltInstallment[];
|
|
115
134
|
parentPurchasedType?: ResourceNameTypeEnum;
|
|
116
135
|
paymentInfo?: PurchasePaymentDto;
|
|
117
136
|
tipAmount?: number;
|