nextemos 6.4.2 → 6.4.3
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
|
}
|
|
@@ -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;
|
|
@@ -27,6 +27,11 @@ export interface IGetCartItemCountRequest {
|
|
|
27
27
|
tags?: string[];
|
|
28
28
|
language?: string;
|
|
29
29
|
}
|
|
30
|
+
export interface IGetCartOffersRequest {
|
|
31
|
+
requestInfo?: IRequestInfo;
|
|
32
|
+
tags?: string[];
|
|
33
|
+
language?: string;
|
|
34
|
+
}
|
|
30
35
|
export interface IGetCartRequest {
|
|
31
36
|
requestInfo?: IRequestInfo;
|
|
32
37
|
flags?: string | number | string[];
|
|
@@ -139,6 +144,7 @@ export interface IGetAvailableStoresForCartRequest extends Omit<IGetCartRequest,
|
|
|
139
144
|
export interface IShoppingCartService extends IService {
|
|
140
145
|
AddToCart: (data: IAddToCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
141
146
|
GetCartItemCount: (data: IGetCartItemCountRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartItemCountResponse>>;
|
|
147
|
+
GetCartOffers: (data: IGetCartOffersRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartOffersResponse>>;
|
|
142
148
|
GetCart: (data: IGetCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
143
149
|
RemoveFromCart: (data: IRemoveFromCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
144
150
|
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",
|