nextemos 4.5.17 → 4.6.0
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.
|
@@ -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
|
+
}
|
|
@@ -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
|
}
|
package/dist/services/urls.d.ts
CHANGED
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: {
|