nextemos 4.5.17 → 4.6.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/interfaces/product.d.ts +8 -0
- package/dist/interfaces/shoppingcart.d.ts +99 -62
- package/dist/services/member/index.js +31 -0
- package/dist/services/member/member.types.d.ts +21 -1
- package/dist/services/shoppingcart/index.js +11 -0
- package/dist/services/shoppingcart/shoppingcart.types.d.ts +9 -2
- package/dist/services/urls.d.ts +4 -0
- package/dist/services/urls.js +4 -0
- package/package.json +1 -1
|
@@ -301,3 +301,11 @@ export interface IProductType {
|
|
|
301
301
|
isAggregated: boolean;
|
|
302
302
|
extensionData: any;
|
|
303
303
|
}
|
|
304
|
+
export interface IProductFavoritesByMemberIdResponse extends IResponse {
|
|
305
|
+
data: IProductFavorite[];
|
|
306
|
+
}
|
|
307
|
+
export interface IProductFavorite {
|
|
308
|
+
productId: number;
|
|
309
|
+
savedPrice: number;
|
|
310
|
+
currencyId: number;
|
|
311
|
+
}
|
|
@@ -1,28 +1,58 @@
|
|
|
1
|
+
import { IAddress } from "./address";
|
|
1
2
|
import { IResponse } from "./response";
|
|
2
|
-
export interface
|
|
3
|
+
export interface IGetCartResponse extends IResponse {
|
|
3
4
|
cart: ICart;
|
|
4
5
|
isUpdated: boolean;
|
|
5
6
|
isTotalsChanged: boolean;
|
|
7
|
+
isFreeOfChargeAvailable: boolean;
|
|
8
|
+
paymentTypes: IPaymentType[];
|
|
9
|
+
coupons: ICoupon[];
|
|
10
|
+
shipmentOptions: IShipmentOption[];
|
|
11
|
+
addresses: IAddress[];
|
|
6
12
|
}
|
|
7
13
|
export interface IGetCartItemCountResponse extends IResponse {
|
|
8
14
|
count: number;
|
|
9
15
|
}
|
|
10
|
-
export interface
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
export interface ICart {
|
|
17
|
+
documentId: string;
|
|
18
|
+
docNo: string;
|
|
19
|
+
docDate: string;
|
|
20
|
+
deliveredPerson: string;
|
|
21
|
+
isTaxIncluded: boolean;
|
|
22
|
+
isGuestOrder: boolean;
|
|
23
|
+
priceTypeId: number;
|
|
24
|
+
currencyId: number;
|
|
25
|
+
currencyRate: number;
|
|
26
|
+
shipperId: number;
|
|
27
|
+
channelId: number;
|
|
28
|
+
deliveryDate: string;
|
|
29
|
+
wareHouseId: number;
|
|
30
|
+
isGiftBoxRequested: boolean;
|
|
31
|
+
isGiftBoxEnabled: boolean;
|
|
32
|
+
shippingAddressId: number;
|
|
33
|
+
invoiceAddressId: number;
|
|
34
|
+
platformId: number;
|
|
35
|
+
clientIp: string;
|
|
36
|
+
referrerUrl: string;
|
|
37
|
+
referrerName: string;
|
|
38
|
+
userAgent: string;
|
|
39
|
+
orderNote: string;
|
|
40
|
+
memberNote: string;
|
|
41
|
+
giftBoxNote: string;
|
|
42
|
+
couponCode: string;
|
|
43
|
+
bankPoint: number;
|
|
44
|
+
sitePoint: number;
|
|
45
|
+
gainPoint: number;
|
|
46
|
+
paymentTypeId: number;
|
|
47
|
+
cardBin: string;
|
|
48
|
+
isSecurePaymentRequired: boolean;
|
|
49
|
+
memberId: number;
|
|
50
|
+
installmentNumber: number;
|
|
51
|
+
bankId: number;
|
|
52
|
+
extraMemberPoint: number;
|
|
53
|
+
totals: ITotal[];
|
|
54
|
+
items: ICartItem[];
|
|
55
|
+
cartInfo: ICartInfo[];
|
|
26
56
|
}
|
|
27
57
|
export interface ICartItem {
|
|
28
58
|
id: number;
|
|
@@ -41,9 +71,9 @@ export interface ICartItem {
|
|
|
41
71
|
stockBarcodeId: number;
|
|
42
72
|
availableStock: number;
|
|
43
73
|
flags: string;
|
|
44
|
-
totals:
|
|
74
|
+
totals: ITotal[];
|
|
45
75
|
itemDate: string;
|
|
46
|
-
cartItemInfo:
|
|
76
|
+
cartItemInfo: ICartItemInfo[];
|
|
47
77
|
isGiftBoxRequested: boolean;
|
|
48
78
|
giftBoxNote: string;
|
|
49
79
|
platformId: number;
|
|
@@ -51,10 +81,10 @@ export interface ICartItem {
|
|
|
51
81
|
referrerUrl: string;
|
|
52
82
|
referrerName: string;
|
|
53
83
|
userAgent: string;
|
|
54
|
-
giftCardInfo
|
|
84
|
+
giftCardInfo: IGiftCardInfo;
|
|
55
85
|
isGiftCard: boolean;
|
|
56
86
|
subscriptionOptionId: number;
|
|
57
|
-
subscriptionInfo
|
|
87
|
+
subscriptionInfo: ISubscriptionInfo;
|
|
58
88
|
commissionRate: number;
|
|
59
89
|
gainPoint: number;
|
|
60
90
|
taxTypeId: number;
|
|
@@ -63,7 +93,7 @@ export interface ICartItem {
|
|
|
63
93
|
criterias: number[];
|
|
64
94
|
tags: string[];
|
|
65
95
|
}
|
|
66
|
-
export interface
|
|
96
|
+
export interface ITotal {
|
|
67
97
|
customType: string;
|
|
68
98
|
customTypeName: string;
|
|
69
99
|
typeId: number;
|
|
@@ -81,44 +111,51 @@ export interface ICartTotal {
|
|
|
81
111
|
orderNo: number;
|
|
82
112
|
memberSubscriptionItemId: number;
|
|
83
113
|
}
|
|
84
|
-
export interface
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
export interface ICartItemInfo {
|
|
115
|
+
status: string;
|
|
116
|
+
message: string;
|
|
117
|
+
}
|
|
118
|
+
export interface IGiftCardInfo {
|
|
119
|
+
fromName: string;
|
|
120
|
+
toName: string;
|
|
121
|
+
toEmail: string;
|
|
122
|
+
note: string;
|
|
123
|
+
deliveryTime: string;
|
|
124
|
+
}
|
|
125
|
+
export interface ISubscriptionInfo {
|
|
126
|
+
duration: number;
|
|
127
|
+
durationType: number;
|
|
128
|
+
period: number;
|
|
129
|
+
periodType: number;
|
|
130
|
+
}
|
|
131
|
+
export interface ICartInfo {
|
|
132
|
+
status: string;
|
|
133
|
+
message: string;
|
|
134
|
+
}
|
|
135
|
+
export interface IPaymentType {
|
|
136
|
+
id: number;
|
|
137
|
+
name: string;
|
|
138
|
+
explanation: string;
|
|
139
|
+
isDefault: boolean;
|
|
140
|
+
paymentMethod: number;
|
|
141
|
+
paymentMethodProviderType: string;
|
|
142
|
+
order: number;
|
|
143
|
+
}
|
|
144
|
+
export interface ICoupon {
|
|
145
|
+
id: number;
|
|
146
|
+
code: string;
|
|
147
|
+
couponType: string;
|
|
148
|
+
userNote: string;
|
|
149
|
+
}
|
|
150
|
+
export interface IShipmentOption {
|
|
151
|
+
id: number;
|
|
152
|
+
productId: number;
|
|
153
|
+
name: string;
|
|
154
|
+
priceWithTax: number;
|
|
155
|
+
priceWithoutTax: number;
|
|
156
|
+
isDefault: boolean;
|
|
157
|
+
payAtDoorEnable: boolean;
|
|
158
|
+
cash: boolean;
|
|
159
|
+
creditCard: boolean;
|
|
160
|
+
note: string;
|
|
124
161
|
}
|
|
@@ -181,4 +181,35 @@ exports.MemberService = {
|
|
|
181
181
|
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
182
182
|
});
|
|
183
183
|
},
|
|
184
|
+
// Products
|
|
185
|
+
GetFavorites: function () {
|
|
186
|
+
return __awaiter(this, arguments, void 0, function* (data = {}, options) {
|
|
187
|
+
return yield (0, __1.fetchRequest)().get((0, urls_1.getUrl)({
|
|
188
|
+
serviceUrl: this.ServiceUrl(),
|
|
189
|
+
prefix: this.Prefix,
|
|
190
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
191
|
+
methodName: urls_1.default.Member.Product.ProductFavoritesByMemberId,
|
|
192
|
+
}), Object.assign(Object.assign({}, options), { params: data }));
|
|
193
|
+
});
|
|
194
|
+
},
|
|
195
|
+
AddFavorites: function (data, options) {
|
|
196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
198
|
+
serviceUrl: this.ServiceUrl(),
|
|
199
|
+
prefix: this.Prefix,
|
|
200
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
201
|
+
methodName: urls_1.default.Member.Product.ProductFavoritesByMemberId,
|
|
202
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
RemoveFavorites: function (data, options) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
+
return yield (0, __1.fetchRequest)().delete((0, urls_1.getUrl)({
|
|
208
|
+
serviceUrl: this.ServiceUrl(),
|
|
209
|
+
prefix: this.Prefix,
|
|
210
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
211
|
+
methodName: urls_1.default.Member.Product.ProductFavoritesByMemberId,
|
|
212
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
213
|
+
});
|
|
214
|
+
},
|
|
184
215
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiResponse, IRequestInit, IService, ICreateMemberResponse, IMessageSubjectResponse, ISendMessageResponse, ILoginRequestResponse, IResponse, IActiveMemberResponse, IMemberAddressesResponse, IMemberAddressResponse, AddressPart, IPasswordRenewalMessageResponse } from '../..';
|
|
1
|
+
import { IApiResponse, IRequestInit, IService, ICreateMemberResponse, IMessageSubjectResponse, ISendMessageResponse, ILoginRequestResponse, IResponse, IActiveMemberResponse, IMemberAddressesResponse, IMemberAddressResponse, AddressPart, IPasswordRenewalMessageResponse, IProductFavoritesByMemberIdResponse, IProductFavorite } from '../..';
|
|
2
2
|
export interface IMessageSubjectRequest {
|
|
3
3
|
language?: string;
|
|
4
4
|
tags?: string[];
|
|
@@ -121,6 +121,23 @@ export interface IChangePasswordRequest {
|
|
|
121
121
|
language?: string;
|
|
122
122
|
tags?: string[];
|
|
123
123
|
}
|
|
124
|
+
export interface IGetFavoritesRequest {
|
|
125
|
+
id?: number;
|
|
126
|
+
language?: string;
|
|
127
|
+
tags?: string[];
|
|
128
|
+
}
|
|
129
|
+
export interface IAddFavoritesRequest {
|
|
130
|
+
memberId?: number;
|
|
131
|
+
productFavorites: IProductFavorite[];
|
|
132
|
+
language?: string;
|
|
133
|
+
tags?: string[];
|
|
134
|
+
}
|
|
135
|
+
export interface IRemoveFavoritesRequest {
|
|
136
|
+
memberId?: number;
|
|
137
|
+
productIds: number[];
|
|
138
|
+
language?: string;
|
|
139
|
+
tags?: string[];
|
|
140
|
+
}
|
|
124
141
|
export interface IMemberService extends IService {
|
|
125
142
|
SubjectsAll: (data?: IMessageSubjectRequest, options?: IRequestInit) => Promise<IApiResponse<IMessageSubjectResponse>>;
|
|
126
143
|
SendMessage: (data: ISendMessageRequest, options?: IRequestInit) => Promise<IApiResponse<ISendMessageResponse>>;
|
|
@@ -135,4 +152,7 @@ export interface IMemberService extends IService {
|
|
|
135
152
|
RemoveAddress: (data?: IRemoveAddressRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
136
153
|
PasswordRenewalMessage: (data?: IPasswordRenewalMessageRequest, options?: IRequestInit) => Promise<IApiResponse<IPasswordRenewalMessageResponse>>;
|
|
137
154
|
ChangePasswordRequest: (data?: IChangePasswordRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
155
|
+
GetFavorites: (data?: IGetFavoritesRequest, options?: IRequestInit) => Promise<IApiResponse<IProductFavoritesByMemberIdResponse>>;
|
|
156
|
+
AddFavorites: (data?: IAddFavoritesRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
157
|
+
RemoveFavorites: (data?: IRemoveFavoritesRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
138
158
|
}
|
|
@@ -63,4 +63,15 @@ exports.ShoppingCartService = {
|
|
|
63
63
|
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
64
64
|
});
|
|
65
65
|
},
|
|
66
|
+
GetCart: function (data, options) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
69
|
+
serviceUrl: this.ServiceUrl(),
|
|
70
|
+
prefix: this.Prefix,
|
|
71
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
72
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
73
|
+
methodName: urls_1.default.ShoppingCart.GetCart,
|
|
74
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
75
|
+
});
|
|
76
|
+
},
|
|
66
77
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IApiResponse, IRequestInit, IService, IGiftCardInfo, IRequestInfo, IGetCartItemCountResponse, IGetCartResponse } from '../..';
|
|
2
2
|
export interface IAddToCartRequest {
|
|
3
3
|
flags?: string;
|
|
4
4
|
productId: number;
|
|
@@ -27,7 +27,14 @@ export interface IGetCartItemCountRequest {
|
|
|
27
27
|
tags?: string[];
|
|
28
28
|
language?: string;
|
|
29
29
|
}
|
|
30
|
+
export interface IGetCartRequest {
|
|
31
|
+
requestInfo?: IRequestInfo;
|
|
32
|
+
flags?: string | string[] | number[];
|
|
33
|
+
tags?: string[];
|
|
34
|
+
language?: string;
|
|
35
|
+
}
|
|
30
36
|
export interface IShoppingCartService extends IService {
|
|
31
|
-
AddToCart: (data: IAddToCartRequest, options?: IRequestInit) => Promise<IApiResponse<
|
|
37
|
+
AddToCart: (data: IAddToCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
32
38
|
GetCartItemCount: (data: IGetCartItemCountRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartItemCountResponse>>;
|
|
39
|
+
GetCart: (data: IGetCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
33
40
|
}
|
package/dist/services/urls.d.ts
CHANGED
|
@@ -62,6 +62,9 @@ declare const _default: {
|
|
|
62
62
|
AddressesByMemberId: string;
|
|
63
63
|
Addresses: string;
|
|
64
64
|
};
|
|
65
|
+
Product: {
|
|
66
|
+
ProductFavoritesByMemberId: string;
|
|
67
|
+
};
|
|
65
68
|
};
|
|
66
69
|
Address: {
|
|
67
70
|
AddressSourceData: {
|
|
@@ -89,6 +92,7 @@ declare const _default: {
|
|
|
89
92
|
ShoppingCart: {
|
|
90
93
|
AddToCart: string;
|
|
91
94
|
GetCartItemCount: string;
|
|
95
|
+
GetCart: string;
|
|
92
96
|
};
|
|
93
97
|
};
|
|
94
98
|
export default _default;
|
package/dist/services/urls.js
CHANGED
|
@@ -67,6 +67,9 @@ exports.default = {
|
|
|
67
67
|
Address: {
|
|
68
68
|
AddressesByMemberId: '/{language}/Members/v1/AddressesByMemberId',
|
|
69
69
|
Addresses: '/{language}/Members/v1/Addresses',
|
|
70
|
+
},
|
|
71
|
+
Product: {
|
|
72
|
+
ProductFavoritesByMemberId: '/{language}/Members/v1/ProductFavoritesByMemberId',
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
75
|
Address: {
|
|
@@ -95,6 +98,7 @@ exports.default = {
|
|
|
95
98
|
ShoppingCart: {
|
|
96
99
|
AddToCart: '/{language}/ShoppingCartGateway/v1/AddToCart',
|
|
97
100
|
GetCartItemCount: '/{language}/ShoppingCartGateway/v1/GetCartItemCount',
|
|
101
|
+
GetCart: '/{language}/ShoppingCartGateway/v1/GetCart',
|
|
98
102
|
},
|
|
99
103
|
};
|
|
100
104
|
const getUrl = ({ isClient = false, language = process.env.DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = '' }) => {
|