@bondsports/types 2.1.67 → 2.1.68

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,3 +17,4 @@ export * from './rental.dto';
17
17
  export * from './response.dto';
18
18
  export * from './slots.dto';
19
19
  export * from './stripe.dto';
20
+ export * from './userPaymentMethod.dto';
@@ -33,4 +33,5 @@ __exportStar(require("./rental.dto"), exports);
33
33
  __exportStar(require("./response.dto"), exports);
34
34
  __exportStar(require("./slots.dto"), exports);
35
35
  __exportStar(require("./stripe.dto"), exports);
36
+ __exportStar(require("./userPaymentMethod.dto"), exports);
36
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,oDAAkC;AAClC,2DAAyC;AACzC,sDAAoC;AACpC,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,gDAA8B;AAC9B,wDAAsC;AACtC,mDAAiC;AACjC,gDAA8B;AAC9B,iDAA+B;AAC/B,yDAAuC;AACvC,qDAAmC;AACnC,+CAA6B;AAC7B,iDAA+B;AAC/B,8CAA4B;AAC5B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,oDAAkC;AAClC,2DAAyC;AACzC,sDAAoC;AACpC,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,gDAA8B;AAC9B,wDAAsC;AACtC,mDAAiC;AACjC,gDAA8B;AAC9B,iDAA+B;AAC/B,yDAAuC;AACvC,qDAAmC;AACnC,+CAA6B;AAC7B,iDAA+B;AAC/B,8CAA4B;AAC5B,+CAA6B;AAC7B,0DAAwC"}
@@ -0,0 +1,7 @@
1
+ import { SubPaymentMethodTypeEnum } from '../payment/types/enums/payment.enums';
2
+ import { OrganizationConnectionBaseEntity } from '../entity/OrganizationConnectionBaseEntity';
3
+ export declare class BasePaymentMethodFieldsDto extends OrganizationConnectionBaseEntity {
4
+ ccLast4?: string;
5
+ ccBrand?: string;
6
+ subPaymentMethodType?: SubPaymentMethodTypeEnum;
7
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BasePaymentMethodFieldsDto = void 0;
4
+ const OrganizationConnectionBaseEntity_1 = require("../entity/OrganizationConnectionBaseEntity");
5
+ class BasePaymentMethodFieldsDto extends OrganizationConnectionBaseEntity_1.OrganizationConnectionBaseEntity {
6
+ }
7
+ exports.BasePaymentMethodFieldsDto = BasePaymentMethodFieldsDto;
8
+ //# sourceMappingURL=userPaymentMethod.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userPaymentMethod.dto.js","sourceRoot":"","sources":["../../../src/types/dto/userPaymentMethod.dto.ts"],"names":[],"mappings":";;;AACA,iGAA8F;AAE9F,MAAa,0BAA2B,SAAQ,mEAAgC;CAM/E;AAND,gEAMC"}
@@ -1,11 +1,22 @@
1
1
  import { PaginationQuery } from '../../dto/general.dto';
2
2
  import { ByOrganizationIdDto } from '../../organization/dto/organization.dto';
3
3
  import { PurchaseProductDto } from '../../purchase/dto/purchase.dto';
4
- import { MonthsEnum, OrderByEnum, PaymentSettingStatusEnum, PlatformsEnum, ProductTypesEnum, ResourceNameTypeEnum } from '../../services/enums.service';
5
- import { Payment } from '../entities/Payment';
4
+ import { CurrencyEnum, MonthsEnum, OrderByEnum, PaymentSettingStatusEnum, PlatformsEnum, ProductTypesEnum, ResourceNameTypeEnum } from '../../services/enums.service';
6
5
  import { LinkedAccountStatus } from '../types/enums/linked-account.enums';
7
6
  import { FuturePaymentStatusEnum, PaymentFilterByEnum, PaymentMethodTypeEnum, PaymentStatusEnum, SubPaymentMethodTypeEnum } from '../types/enums/payment.enums';
8
7
  import { CustomerDto } from '../../dto/customer.dto';
8
+ import { BasePaymentMethodFieldsDto } from '../../dto/userPaymentMethod.dto';
9
+ import { FutureInstallment } from '../entities/FutureInstallment';
10
+ import { Reason } from '../../organization/entities/Reason';
11
+ import { User } from '../../user/entities/User';
12
+ import { Invoice } from '../../entity/Invoice';
13
+ import { InvoiceToPayment } from '../../entity/InvoiceToPayment';
14
+ import { LineItemHistory } from '../../entity/LineItemHistory';
15
+ import { LineItems } from '../../entity/LineItems';
16
+ import { PaymentFeeDto } from '../../fee/dto/payment-fee.dto';
17
+ import { PaymentFee } from '../../fee/entities/PaymentFee';
18
+ import { Discount } from '../entities/Discount';
19
+ import { PaymentNote } from '../entities/PaymentNote';
9
20
  export declare class CustomerIdDto {
10
21
  customerId: number;
11
22
  }
@@ -127,9 +138,43 @@ export declare class GetPaymentMethodsDto {
127
138
  paymentMethodTypes?: PaymentMethodTypeEnum[];
128
139
  subPaymentMethodTypes?: SubPaymentMethodTypeEnum[];
129
140
  }
130
- export declare class PaymentDto extends Payment {
141
+ export declare class PaymentDto extends BasePaymentMethodFieldsDto {
131
142
  customer?: CustomerDto;
132
143
  priceWithoutFee?: number;
144
+ price: number;
145
+ paymentProcessorId: string;
146
+ paymentStatus: PaymentStatusEnum;
147
+ bondFee?: number;
148
+ stripeFee?: number;
149
+ currency: CurrencyEnum;
150
+ payingUserId?: number;
151
+ payingUser?: User;
152
+ paymentMethodId?: number;
153
+ paymentType?: PaymentMethodTypeEnum;
154
+ status: FuturePaymentStatusEnum;
155
+ fundLeft: number;
156
+ notes?: string;
157
+ isRefunded: boolean;
158
+ lineItemHistory: LineItemHistory[];
159
+ receiptUrl?: string;
160
+ paymentProcessorTransactionId?: string;
161
+ creatingUserId?: number;
162
+ shiftId?: number;
163
+ platform?: PlatformsEnum;
164
+ paymentNotes: PaymentNote[];
165
+ parentPaymentId?: number;
166
+ reasonId?: number;
167
+ reason?: Reason;
168
+ note?: string;
169
+ discountId?: number;
170
+ installmentId?: number;
171
+ discount?: Discount;
172
+ paymentFees: PaymentFee[] | PaymentFeeDto[];
173
+ invoices: Invoice[];
174
+ installments?: FutureInstallment[];
175
+ totalFeesAmount?: number;
176
+ lineItems: LineItems[];
177
+ invoiceToPayments: InvoiceToPayment[];
133
178
  stripePaymentMethodId?: string;
134
179
  }
135
180
  export declare class PaymentSettingsDto {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
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
- const Payment_1 = require("../entities/Payment");
6
+ const userPaymentMethod_dto_1 = require("../../dto/userPaymentMethod.dto");
7
7
  class CustomerIdDto {
8
8
  }
9
9
  exports.CustomerIdDto = CustomerIdDto;
@@ -89,7 +89,7 @@ class GetPaymentMethodsDto {
89
89
  }
90
90
  exports.GetPaymentMethodsDto = GetPaymentMethodsDto;
91
91
  // TODO: change it to real dto with profile
92
- class PaymentDto extends Payment_1.Payment {
92
+ class PaymentDto extends userPaymentMethod_dto_1.BasePaymentMethodFieldsDto {
93
93
  }
94
94
  exports.PaymentDto = PaymentDto;
95
95
  class PaymentSettingsDto {
@@ -1 +1 @@
1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,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,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,kDAA0B;CA0EzD;AA1ED,gCA0EC;AAED,MAAa,kBAAkB;CAI9B;AAJD,gDAIC;AAED,MAAa,sBAAsB;CAYlC;AAZD,wDAYC"}
@@ -8,7 +8,7 @@ import { PaymentFee } from '../../fee/entities/PaymentFee';
8
8
  import { Reason } from '../../organization/entities/Reason';
9
9
  import { CurrencyEnum, PlatformsEnum } from '../../services/enums.service';
10
10
  import { User } from '../../user/entities/User';
11
- import { FuturePaymentStatusEnum, PaymentMethodTypeEnum, PaymentStatusEnum, SubPaymentMethodTypeEnum } from '../types/enums/payment.enums';
11
+ import { FuturePaymentStatusEnum, PaymentMethodTypeEnum, PaymentStatusEnum } from '../types/enums/payment.enums';
12
12
  import { Discount } from './Discount';
13
13
  import { FutureInstallment } from './FutureInstallment';
14
14
  import { PaymentNote } from './PaymentNote';
@@ -27,7 +27,6 @@ export declare class Payment extends OrganizationConnectionBaseEntity {
27
27
  paymentMethod?: UserPaymentMethod;
28
28
  token?: string;
29
29
  paymentType?: PaymentMethodTypeEnum;
30
- subPaymentMethodType?: SubPaymentMethodTypeEnum;
31
30
  status: FuturePaymentStatusEnum;
32
31
  fundLeft: number;
33
32
  notes?: string;
@@ -38,8 +37,6 @@ export declare class Payment extends OrganizationConnectionBaseEntity {
38
37
  creatingUserId?: number;
39
38
  shiftId?: number;
40
39
  platform?: PlatformsEnum;
41
- ccLast4?: string;
42
- ccBrand?: string;
43
40
  paymentNotes: PaymentNote[];
44
41
  parentPaymentId?: number;
45
42
  reasonId?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Payment.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/Payment.ts"],"names":[],"mappings":";;;AAKA,oGAAiG;AAiBjG,MAAa,OAAQ,SAAQ,mEAAgC;CA+E5D;AA/ED,0BA+EC"}
1
+ {"version":3,"file":"Payment.js","sourceRoot":"","sources":["../../../../src/types/payment/entities/Payment.ts"],"names":[],"mappings":";;;AAKA,oGAAiG;AAYjG,MAAa,OAAQ,SAAQ,mEAAgC;CAyE5D;AAzED,0BAyEC"}
@@ -3,7 +3,6 @@ import { Answer } from '../../questionnaires/entities/Answer';
3
3
  import { Customer } from '../../entity/Customer';
4
4
  import { Invoice } from '../../entity/Invoice';
5
5
  import { Product } from '../../product-pricing/entities/Product';
6
- import { Payment } from '../../payment/entities/Payment';
7
6
  import { PaymentStatusEnum } from '../../payment/types/enums/payment.enums';
8
7
  import { RefundResult } from '../../payment/types/interfaces/refund.interfaces';
9
8
  import { FinancialStepEnum, ReservationStatusEnum, ReservationTypeEnum } from '../../services/enums.service';
@@ -21,6 +20,7 @@ import { Segment } from '../entities/Segments';
21
20
  import { Series } from '../entities/Series';
22
21
  import { Slot } from '../entities/Slots';
23
22
  import * as moment from 'moment';
23
+ import { PaymentDto } from '../../payment/dto/payment.dto';
24
24
  export declare const RESOURCE_TOTAL_FIELD = "totalPrice";
25
25
  export declare const DEFAULT_ADDON_QUANTITY = 1;
26
26
  export declare const PUBLIC_NOTES_LIMIT = 500;
@@ -157,7 +157,7 @@ export interface CalendarSlotCard extends Slot {
157
157
  slotIndexInSeries?: number;
158
158
  }
159
159
  type IPartialInvoice = Pick<Invoice, 'id' | 'createdAt' | 'price' | 'paymentStatus' | 'paidAmount' | 'payingUserId'>;
160
- export type IPartialPayment = Pick<Payment, 'id' | 'createdAt' | 'price' | 'paymentStatus' | 'status' | 'paymentType' | 'ccBrand' | 'ccLast4'>;
160
+ export type IPartialPayment = Pick<PaymentDto, 'id' | 'createdAt' | 'price' | 'paymentStatus' | 'status' | 'paymentType' | 'ccBrand' | 'ccLast4'>;
161
161
  export interface IInvoice extends IPartialInvoice {
162
162
  lineItemsCount: number;
163
163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bondsports/types",
3
- "version": "2.1.67",
3
+ "version": "2.1.68",
4
4
  "description": "backend types module for Bond-Sports",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {