@bondsports/types 2.0.91 → 2.0.93
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/entity/LineItems.d.ts +3 -0
- package/dist/types/entity/LineItems.js.map +1 -1
- package/dist/types/payment/dto/discount.dto.d.ts +2 -2
- 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/interfaces/discount.interfaces.d.ts +0 -5
- package/dist/types/payment/types/interfaces/void.interfaces.d.ts +0 -2
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import { OrganizationConnectionBaseEntity } from './OrganizationConnectionBaseEn
|
|
|
12
12
|
import { Product } from '../product-pricing/entities/Product';
|
|
13
13
|
import { ProductsUsers } from './ProductsUsers';
|
|
14
14
|
import { PurchasedResource } from './PurchasedResources';
|
|
15
|
+
import { Reason } from '../organization/entities/Reason';
|
|
15
16
|
export declare class LineItems extends OrganizationConnectionBaseEntity {
|
|
16
17
|
isReverted: boolean;
|
|
17
18
|
invoiceId: number;
|
|
@@ -51,6 +52,8 @@ export declare class LineItems extends OrganizationConnectionBaseEntity {
|
|
|
51
52
|
discountPercentage?: number;
|
|
52
53
|
discountOn?: DiscountOnEnum;
|
|
53
54
|
actionId?: string;
|
|
55
|
+
reasonId?: number;
|
|
56
|
+
reason?: Reason;
|
|
54
57
|
lineItemsHistory: LineItemHistory[];
|
|
55
58
|
purchasedResources: PurchasedResource[];
|
|
56
59
|
payments: Payment[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineItems.js","sourceRoot":"","sources":["../../../src/types/entity/LineItems.ts"],"names":[],"mappings":";;;AAWA,yFAAsF;
|
|
1
|
+
{"version":3,"file":"LineItems.js","sourceRoot":"","sources":["../../../src/types/entity/LineItems.ts"],"names":[],"mappings":";;;AAWA,yFAAsF;AAMtF,MAAa,SAAU,SAAQ,mEAAgC;CAiI9D;AAjID,8BAiIC"}
|
|
@@ -105,7 +105,7 @@ export declare class SetDiscountsDto {
|
|
|
105
105
|
shiftId?: number;
|
|
106
106
|
}
|
|
107
107
|
export declare class RemoveDiscountDto {
|
|
108
|
-
|
|
108
|
+
actionId: string;
|
|
109
109
|
lineItemsIds?: number[];
|
|
110
110
|
}
|
|
111
111
|
export declare class RemoveDiscountsDto {
|
|
@@ -116,7 +116,7 @@ export declare class RemoveDiscountsDto {
|
|
|
116
116
|
export declare class ItemDiscountDto extends OrganizationBaseEntityDto {
|
|
117
117
|
invoiceId: number;
|
|
118
118
|
lineItemsIds?: number[];
|
|
119
|
-
|
|
119
|
+
actionId?: string;
|
|
120
120
|
discountId: number;
|
|
121
121
|
discount: SimpleDiscountDto;
|
|
122
122
|
reasonId: number;
|
|
@@ -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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AAM,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,QAAQ,IAAI,YAAY,CAAC,UAAU,IAAI,MAAA,YAAY,CAAC,QAAQ,0CAAE,IAAI,IAAI,kBAAkB,EAAE,CAAC;AACnH,CAAC,CAAC;AAHW,QAAA,sBAAsB,0BAGjC;AAEK,MAAM,uBAAuB,GAAG,CAAC,QAA2B,EAAE,IAA+B,EAAU,EAAE;;IAC/G,OAAO,GAAG,MAAA,MAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAyB,0CAAE,SAAS,mCAAI,EAAE,IAAI,MAAA,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC,0CAAE,EAAE,EAAE,CAAC;AACtG,CAAC,CAAC;AAFW,QAAA,uBAAuB,2BAElC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
6
5
|
import { ProgramTypesEnum } from '../../../services/enums.service';
|
|
7
6
|
import { Product } from '../../../product-pricing/entities/Product';
|
|
@@ -29,10 +28,6 @@ export interface ISetDiscounts {
|
|
|
29
28
|
isTaxIncluded?: boolean;
|
|
30
29
|
allowZeroAmount?: boolean;
|
|
31
30
|
}
|
|
32
|
-
export interface IRemoveDiscountsValidationsResult {
|
|
33
|
-
invoice: Invoice;
|
|
34
|
-
payments: Payment[];
|
|
35
|
-
}
|
|
36
31
|
export interface IDiscountRelatedProductIds {
|
|
37
32
|
included?: number[];
|
|
38
33
|
excluded?: number[];
|
|
@@ -3,7 +3,6 @@ import { LineItems } from '../../../entity/LineItems';
|
|
|
3
3
|
import { TRevertedResources } from '../../../reservations/interfaces/reservation';
|
|
4
4
|
import { ResourceNameTypeEnum } from '../../../services/enums.service';
|
|
5
5
|
import { CreateNoteDto, RevertMetaDto } from '../../dto/payment.dto';
|
|
6
|
-
import { Payment } from '../../entities/Payment';
|
|
7
6
|
import { DiscountOnEnum } from '../enums/discount.enums';
|
|
8
7
|
import { VoidTypeEnum } from '../enums/void.enums';
|
|
9
8
|
import { ISetDiscount } from './discount.interfaces';
|
|
@@ -31,7 +30,6 @@ export interface IVoid {
|
|
|
31
30
|
export interface IVoidDiscount {
|
|
32
31
|
id?: number;
|
|
33
32
|
discountOn?: DiscountOnEnum;
|
|
34
|
-
payment?: Payment;
|
|
35
33
|
}
|
|
36
34
|
export interface IVoidLineItemsDict {
|
|
37
35
|
[id: number]: IVoidLineItem;
|