nextemos 4.6.2 → 4.6.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.
- package/dist/services/member/index.js +10 -0
- package/dist/services/member/member.types.d.ts +10 -0
- package/dist/services/shoppingcart/index.js +22 -0
- package/dist/services/shoppingcart/shoppingcart.types.d.ts +9 -0
- package/dist/services/urls.d.ts +3 -0
- package/dist/services/urls.js +3 -0
- package/package.json +1 -1
|
@@ -122,6 +122,16 @@ exports.MemberService = {
|
|
|
122
122
|
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
123
123
|
});
|
|
124
124
|
},
|
|
125
|
+
ChangePasswordByTokenRequest: function (data, options) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
128
|
+
serviceUrl: this.ServiceUrl(),
|
|
129
|
+
prefix: this.Prefix,
|
|
130
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
131
|
+
methodName: urls_1.default.Member.Members.ChangePasswordByTokenRequest,
|
|
132
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
133
|
+
});
|
|
134
|
+
},
|
|
125
135
|
// MemberMessage
|
|
126
136
|
SubjectsAll: function () {
|
|
127
137
|
return __awaiter(this, arguments, void 0, function* (data = {}, options) {
|
|
@@ -115,6 +115,15 @@ export interface IPasswordRenewalMessageRequest {
|
|
|
115
115
|
tags?: string[];
|
|
116
116
|
}
|
|
117
117
|
export interface IChangePasswordRequest {
|
|
118
|
+
memberId?: number;
|
|
119
|
+
oldPassword: string;
|
|
120
|
+
newPassword: string;
|
|
121
|
+
informByMail?: boolean;
|
|
122
|
+
informBySMS?: boolean;
|
|
123
|
+
language?: string;
|
|
124
|
+
tags?: string[];
|
|
125
|
+
}
|
|
126
|
+
export interface IChangePasswordByTokenRequest {
|
|
118
127
|
token: string;
|
|
119
128
|
password: string;
|
|
120
129
|
key: string;
|
|
@@ -152,6 +161,7 @@ export interface IMemberService extends IService {
|
|
|
152
161
|
RemoveAddress: (data?: IRemoveAddressRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
153
162
|
PasswordRenewalMessage: (data?: IPasswordRenewalMessageRequest, options?: IRequestInit) => Promise<IApiResponse<IPasswordRenewalMessageResponse>>;
|
|
154
163
|
ChangePasswordRequest: (data?: IChangePasswordRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
164
|
+
ChangePasswordByTokenRequest: (data?: IChangePasswordByTokenRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
155
165
|
GetFavorites: (data?: IGetFavoritesRequest, options?: IRequestInit) => Promise<IApiResponse<IProductFavoritesByMemberIdResponse>>;
|
|
156
166
|
AddFavorites: (data?: IAddFavoritesRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
157
167
|
RemoveFavorites: (data?: IRemoveFavoritesRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
@@ -74,4 +74,26 @@ exports.ShoppingCartService = {
|
|
|
74
74
|
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
75
75
|
});
|
|
76
76
|
},
|
|
77
|
+
RemoveFromCart: function (data, options) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
80
|
+
serviceUrl: this.ServiceUrl(),
|
|
81
|
+
prefix: this.Prefix,
|
|
82
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
83
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
84
|
+
methodName: urls_1.default.ShoppingCart.RemoveFromCart,
|
|
85
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
ChangeQuantity: function (data, options) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
91
|
+
serviceUrl: this.ServiceUrl(),
|
|
92
|
+
prefix: this.Prefix,
|
|
93
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
94
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
95
|
+
methodName: urls_1.default.ShoppingCart.ChangeQuantity,
|
|
96
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
97
|
+
});
|
|
98
|
+
},
|
|
77
99
|
};
|
|
@@ -33,8 +33,17 @@ export interface IGetCartRequest {
|
|
|
33
33
|
tags?: string[];
|
|
34
34
|
language?: string;
|
|
35
35
|
}
|
|
36
|
+
export interface IRemoveFromCartRequest extends IGetCartRequest {
|
|
37
|
+
itemId: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IChangeQuantityRequest extends IGetCartRequest {
|
|
40
|
+
itemId: string;
|
|
41
|
+
quantity: number;
|
|
42
|
+
}
|
|
36
43
|
export interface IShoppingCartService extends IService {
|
|
37
44
|
AddToCart: (data: IAddToCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
38
45
|
GetCartItemCount: (data: IGetCartItemCountRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartItemCountResponse>>;
|
|
39
46
|
GetCart: (data: IGetCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
47
|
+
RemoveFromCart: (data: IRemoveFromCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
48
|
+
ChangeQuantity: (data: IChangeQuantityRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
|
|
40
49
|
}
|
package/dist/services/urls.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ declare const _default: {
|
|
|
53
53
|
ApproveValidationTokenRequest: string;
|
|
54
54
|
PasswordRenewalMessage: string;
|
|
55
55
|
ChangePasswordRequest: string;
|
|
56
|
+
ChangePasswordByTokenRequest: string;
|
|
56
57
|
};
|
|
57
58
|
MemberMessages: {
|
|
58
59
|
SubjectsAll: string;
|
|
@@ -93,6 +94,8 @@ declare const _default: {
|
|
|
93
94
|
AddToCart: string;
|
|
94
95
|
GetCartItemCount: string;
|
|
95
96
|
GetCart: string;
|
|
97
|
+
RemoveFromCart: string;
|
|
98
|
+
ChangeQuantity: string;
|
|
96
99
|
};
|
|
97
100
|
};
|
|
98
101
|
export default _default;
|
package/dist/services/urls.js
CHANGED
|
@@ -59,6 +59,7 @@ exports.default = {
|
|
|
59
59
|
ApproveValidationTokenRequest: "/{language}/Members/v1/ApproveValidationTokenRequest",
|
|
60
60
|
PasswordRenewalMessage: "/{language}/Members/v1/PasswordRenewalMessage",
|
|
61
61
|
ChangePasswordRequest: "/{language}/Members/v1/ChangePasswordRequest",
|
|
62
|
+
ChangePasswordByTokenRequest: "/{language}/Members/v1/ChangePasswordByTokenRequest",
|
|
62
63
|
},
|
|
63
64
|
MemberMessages: {
|
|
64
65
|
SubjectsAll: '/{language}/MemberMessages/v1/Subjects/All',
|
|
@@ -99,6 +100,8 @@ exports.default = {
|
|
|
99
100
|
AddToCart: '/{language}/ShoppingCartGateway/v1/AddToCart',
|
|
100
101
|
GetCartItemCount: '/{language}/ShoppingCartGateway/v1/GetCartItemCount',
|
|
101
102
|
GetCart: '/{language}/ShoppingCartGateway/v1/GetCart',
|
|
103
|
+
RemoveFromCart: '/{language}/ShoppingCartGateway/v1/RemoveFromCart',
|
|
104
|
+
ChangeQuantity: '/{language}/ShoppingCartGateway/v1/ChangeQuantity',
|
|
102
105
|
},
|
|
103
106
|
};
|
|
104
107
|
const getUrl = ({ isClient = false, language = process.env.DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = '' }) => {
|