nextemos 6.4.2 → 6.4.4
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.
|
@@ -18,6 +18,19 @@ export interface IGetCartResponse extends IResponse {
|
|
|
18
18
|
export interface IGetCartItemCountResponse extends IResponse {
|
|
19
19
|
count: number;
|
|
20
20
|
}
|
|
21
|
+
export interface ICartOfferItem {
|
|
22
|
+
productId: number;
|
|
23
|
+
cartOfferId: number;
|
|
24
|
+
cartOfferName: string;
|
|
25
|
+
discountRate: number;
|
|
26
|
+
normalPrice: number;
|
|
27
|
+
discountedPrice: number;
|
|
28
|
+
discountAmount: number;
|
|
29
|
+
currencyId: number;
|
|
30
|
+
}
|
|
31
|
+
export interface IGetCartOffersResponse extends IResponse {
|
|
32
|
+
items: ICartOfferItem[];
|
|
33
|
+
}
|
|
21
34
|
export interface IGetAvailableStoresForCartResponse extends IResponse {
|
|
22
35
|
data: IWarehouse[];
|
|
23
36
|
}
|
|
@@ -134,6 +147,11 @@ export interface ICartItem {
|
|
|
134
147
|
scopeTypeId: number;
|
|
135
148
|
criterias: number[];
|
|
136
149
|
tags: string[];
|
|
150
|
+
cartOfferInfo: {
|
|
151
|
+
cartOfferId: number;
|
|
152
|
+
cartOfferName: string;
|
|
153
|
+
discountRate: number;
|
|
154
|
+
};
|
|
137
155
|
}
|
|
138
156
|
export interface ITotal {
|
|
139
157
|
customType: string;
|
|
@@ -58,6 +58,9 @@ exports.ShoppingCartService = {
|
|
|
58
58
|
GetCartItemCount: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
59
|
return (0, __1.fetchRequest)().post(exports.ShoppingCartService.Url(urls_1.default.ShoppingCart.GetCartItemCount, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
60
60
|
}),
|
|
61
|
+
GetCartOffers: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
62
|
+
return (0, __1.fetchRequest)().post(exports.ShoppingCartService.Url(urls_1.default.ShoppingCart.GetCartOffers, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
63
|
+
}),
|
|
61
64
|
GetCart: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
62
65
|
return (0, __1.fetchRequest)().post(exports.ShoppingCartService.Url(urls_1.default.ShoppingCart.GetCart, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
63
66
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiResponse, IRequestInit, IService, IGiftCardInfo, IRequestInfo, IGetCartItemCountResponse, IGetCartResponse, IGetInstallmentOptionsResponse, IDoTransferTransactionResponse, IDoCreditCardTransactionResponse, IDoIyzicoCreditCardTransactionResponse, IDoIyzicoTransactionResponse, ICreditCard, IGetSalesAggreementFormResponse, IGetPreInfoFormResponse, IDoFreeOfChargeTransactionResponse, IDoGarantipayTransactionResponse, IGetAvailableStoresForCartResponse, IDoHepsipayTransactionResponse, IDoBkmExpressTransactionResponse, IDoPayAtDoorTransactionResponse, IDoParamTransactionResponse, IDoOtherPaymentTransactionResponse, IDoPaytenTransactionResponse } from "../..";
|
|
1
|
+
import { IApiResponse, IRequestInit, IService, IGiftCardInfo, IRequestInfo, IGetCartItemCountResponse, IGetCartOffersResponse, IGetCartResponse, IGetInstallmentOptionsResponse, IDoTransferTransactionResponse, IDoCreditCardTransactionResponse, IDoIyzicoCreditCardTransactionResponse, IDoIyzicoTransactionResponse, ICreditCard, IGetSalesAggreementFormResponse, IGetPreInfoFormResponse, IDoFreeOfChargeTransactionResponse, IDoGarantipayTransactionResponse, IGetAvailableStoresForCartResponse, IDoHepsipayTransactionResponse, IDoBkmExpressTransactionResponse, IDoPayAtDoorTransactionResponse, IDoParamTransactionResponse, IDoOtherPaymentTransactionResponse, IDoPaytenTransactionResponse } from "../..";
|
|
2
2
|
export interface IAddToCartRequest {
|
|
3
3
|
flags?: string | number | string[];
|
|
4
4
|
productId: number;
|
|
@@ -13,6 +13,7 @@ export interface IAddToCartRequest {
|
|
|
13
13
|
requestInfo?: IRequestInfo;
|
|
14
14
|
language?: string;
|
|
15
15
|
tags?: string[];
|
|
16
|
+
cartOfferId?: number;
|
|
16
17
|
}
|
|
17
18
|
export interface IProductChild {
|
|
18
19
|
productId: number;
|
|
@@ -27,6 +28,11 @@ export interface IGetCartItemCountRequest {
|
|
|
27
28
|
tags?: string[];
|
|
28
29
|
language?: string;
|
|
29
30
|
}
|
|
31
|
+
export interface IGetCartOffersRequest {
|
|
32
|
+
requestInfo?: IRequestInfo;
|
|
33
|
+
tags?: string[];
|
|
34
|
+
language?: string;
|
|
35
|
+
}
|
|
30
36
|
export interface IGetCartRequest {
|
|
31
37
|
requestInfo?: IRequestInfo;
|
|
32
38
|
flags?: string | number | string[];
|
|
@@ -139,6 +145,7 @@ export interface IGetAvailableStoresForCartRequest extends Omit<IGetCartRequest,
|
|
|
139
145
|
export interface IShoppingCartService extends IService {
|
|
140
146
|
AddToCart: (data: IAddToCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
141
147
|
GetCartItemCount: (data: IGetCartItemCountRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartItemCountResponse>>;
|
|
148
|
+
GetCartOffers: (data: IGetCartOffersRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartOffersResponse>>;
|
|
142
149
|
GetCart: (data: IGetCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
143
150
|
RemoveFromCart: (data: IRemoveFromCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
144
151
|
ChangeQuantity: (data: IChangeQuantityRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
package/dist/services/urls.d.ts
CHANGED
package/dist/services/urls.js
CHANGED
|
@@ -167,6 +167,7 @@ exports.default = {
|
|
|
167
167
|
ShoppingCart: {
|
|
168
168
|
AddToCart: "/{language}/ShoppingCartGateway/{version}/AddToCart",
|
|
169
169
|
GetCartItemCount: "/{language}/ShoppingCartGateway/{version}/GetCartItemCount",
|
|
170
|
+
GetCartOffers: "/{language}/ShoppingCartGateway/{version}/GetCartOffers",
|
|
170
171
|
GetCart: "/{language}/ShoppingCartGateway/{version}/GetCart",
|
|
171
172
|
RemoveFromCart: "/{language}/ShoppingCartGateway/{version}/RemoveFromCart",
|
|
172
173
|
ChangeQuantity: "/{language}/ShoppingCartGateway/{version}/ChangeQuantity",
|