nextemos 4.5.13 → 4.5.15
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/member.d.ts +5 -0
- package/dist/interfaces/response.d.ts +7 -1
- package/dist/interfaces/shoppingcart.d.ts +3 -0
- package/dist/services/member/index.js +20 -0
- package/dist/services/member/member.types.d.ts +16 -1
- package/dist/services/shoppingcart/index.js +11 -0
- package/dist/services/shoppingcart/shoppingcart.types.d.ts +8 -7
- package/dist/services/urls.d.ts +3 -0
- package/dist/services/urls.js +3 -0
- package/package.json +1 -1
|
@@ -96,3 +96,8 @@ export interface IMemberAddressesResponse extends IResponse {
|
|
|
96
96
|
export interface IMemberAddressResponse extends IResponse {
|
|
97
97
|
data?: IAddress;
|
|
98
98
|
}
|
|
99
|
+
export interface IPasswordRenewalMessageResponse extends IResponse {
|
|
100
|
+
data?: {
|
|
101
|
+
token: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTTPMethod as httpMethods } from '../';
|
|
1
|
+
import { DeviceType, HTTPMethod as httpMethods } from '../';
|
|
2
2
|
type HTTPMethod = httpMethods;
|
|
3
3
|
export interface IRequestOptions extends RequestInit {
|
|
4
4
|
url: string;
|
|
@@ -41,4 +41,10 @@ export interface IOutputCacheConfiguration {
|
|
|
41
41
|
value: string;
|
|
42
42
|
positionId: number;
|
|
43
43
|
}
|
|
44
|
+
export interface IRequestInfo {
|
|
45
|
+
platformId?: number | DeviceType;
|
|
46
|
+
referrerUrl?: string;
|
|
47
|
+
referrerName?: string;
|
|
48
|
+
userAgent?: string;
|
|
49
|
+
}
|
|
44
50
|
export {};
|
|
@@ -4,6 +4,9 @@ export interface IShoppingCartResponse extends IResponse {
|
|
|
4
4
|
isUpdated: boolean;
|
|
5
5
|
isTotalsChanged: boolean;
|
|
6
6
|
}
|
|
7
|
+
export interface IGetCartItemCountResponse extends IResponse {
|
|
8
|
+
count: number;
|
|
9
|
+
}
|
|
7
10
|
export interface ISubscriptionInfo {
|
|
8
11
|
duration: number;
|
|
9
12
|
durationType: number;
|
|
@@ -102,6 +102,26 @@ exports.MemberService = {
|
|
|
102
102
|
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
103
103
|
});
|
|
104
104
|
},
|
|
105
|
+
PasswordRenewalMessage: function (data, options) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
108
|
+
serviceUrl: this.ServiceUrl(),
|
|
109
|
+
prefix: this.Prefix,
|
|
110
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
111
|
+
methodName: urls_1.default.Member.Members.PasswordRenewalMessage,
|
|
112
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
ChangePasswordRequest: function (data, options) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
118
|
+
serviceUrl: this.ServiceUrl(),
|
|
119
|
+
prefix: this.Prefix,
|
|
120
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
121
|
+
methodName: urls_1.default.Member.Members.ChangePasswordRequest,
|
|
122
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
123
|
+
});
|
|
124
|
+
},
|
|
105
125
|
// MemberMessage
|
|
106
126
|
SubjectsAll: function () {
|
|
107
127
|
return __awaiter(this, arguments, void 0, function* (data = {}, options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiResponse, IRequestInit, IService, ICreateMemberResponse, IMessageSubjectResponse, ISendMessageResponse, ILoginRequestResponse, IResponse, IActiveMemberResponse, IMemberAddressesResponse, IMemberAddressResponse, AddressPart } from '../..';
|
|
1
|
+
import { IApiResponse, IRequestInit, IService, ICreateMemberResponse, IMessageSubjectResponse, ISendMessageResponse, ILoginRequestResponse, IResponse, IActiveMemberResponse, IMemberAddressesResponse, IMemberAddressResponse, AddressPart, IPasswordRenewalMessageResponse } from '../..';
|
|
2
2
|
export interface IMessageSubjectRequest {
|
|
3
3
|
language?: string;
|
|
4
4
|
tags?: string[];
|
|
@@ -108,6 +108,19 @@ export interface IRemoveAddressRequest {
|
|
|
108
108
|
}
|
|
109
109
|
export interface IUpdateMemberRequest extends Omit<ICreateMemberRequest, 'password'> {
|
|
110
110
|
}
|
|
111
|
+
export interface IPasswordRenewalMessageRequest {
|
|
112
|
+
email?: string;
|
|
113
|
+
mobilePhone?: string;
|
|
114
|
+
language?: string;
|
|
115
|
+
tags?: string[];
|
|
116
|
+
}
|
|
117
|
+
export interface IChangePasswordRequest {
|
|
118
|
+
token: string;
|
|
119
|
+
password: string;
|
|
120
|
+
key: string;
|
|
121
|
+
language?: string;
|
|
122
|
+
tags?: string[];
|
|
123
|
+
}
|
|
111
124
|
export interface IMemberService extends IService {
|
|
112
125
|
SubjectsAll: (data?: IMessageSubjectRequest, options?: IRequestInit) => Promise<IApiResponse<IMessageSubjectResponse>>;
|
|
113
126
|
SendMessage: (data: ISendMessageRequest, options?: IRequestInit) => Promise<IApiResponse<ISendMessageResponse>>;
|
|
@@ -120,4 +133,6 @@ export interface IMemberService extends IService {
|
|
|
120
133
|
Addresses: (data?: IMemberAddressesRequest, options?: IRequestInit) => Promise<IApiResponse<IMemberAddressesResponse>>;
|
|
121
134
|
NewAddress: (data?: IMemberAddressRequest, options?: IRequestInit) => Promise<IApiResponse<IMemberAddressResponse>>;
|
|
122
135
|
RemoveAddress: (data?: IRemoveAddressRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
136
|
+
PasswordRenewalMessage: (data?: IPasswordRenewalMessageRequest, options?: IRequestInit) => Promise<IApiResponse<IPasswordRenewalMessageResponse>>;
|
|
137
|
+
ChangePasswordRequest: (data?: IChangePasswordRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
123
138
|
}
|
|
@@ -52,4 +52,15 @@ exports.ShoppingCartService = {
|
|
|
52
52
|
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
53
53
|
});
|
|
54
54
|
},
|
|
55
|
+
GetCartItemCount: function (data, options) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
58
|
+
serviceUrl: this.ServiceUrl(),
|
|
59
|
+
prefix: this.Prefix,
|
|
60
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
61
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
62
|
+
methodName: urls_1.default.ShoppingCart.GetCartItemCount,
|
|
63
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
64
|
+
});
|
|
65
|
+
},
|
|
55
66
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IShoppingCartResponse, IApiResponse, IRequestInit, IService, IGiftCardInfo,
|
|
1
|
+
import { IShoppingCartResponse, IApiResponse, IRequestInit, IService, IGiftCardInfo, IRequestInfo, IGetCartItemCountResponse } from '../..';
|
|
2
2
|
export interface IAddToCartRequest {
|
|
3
3
|
flags?: string;
|
|
4
4
|
productId: number;
|
|
@@ -10,12 +10,7 @@ export interface IAddToCartRequest {
|
|
|
10
10
|
subscriptionOptionId?: number;
|
|
11
11
|
children?: IProductChild[];
|
|
12
12
|
giftCardInfo?: IGiftCardInfo;
|
|
13
|
-
requestInfo?:
|
|
14
|
-
platformId?: number | DeviceType;
|
|
15
|
-
referrerUrl?: string;
|
|
16
|
-
referrerName?: string;
|
|
17
|
-
userAgent?: string;
|
|
18
|
-
};
|
|
13
|
+
requestInfo?: IRequestInfo;
|
|
19
14
|
language?: string;
|
|
20
15
|
tags?: string[];
|
|
21
16
|
}
|
|
@@ -27,6 +22,12 @@ export interface IProductChild {
|
|
|
27
22
|
lineInfo?: string;
|
|
28
23
|
tags?: string[];
|
|
29
24
|
}
|
|
25
|
+
export interface IGetCartItemCountRequest {
|
|
26
|
+
requestInfo?: IRequestInfo;
|
|
27
|
+
tags?: string[];
|
|
28
|
+
language?: string;
|
|
29
|
+
}
|
|
30
30
|
export interface IShoppingCartService extends IService {
|
|
31
31
|
AddToCart: (data: IAddToCartRequest, options?: IRequestInit) => Promise<IApiResponse<IShoppingCartResponse>>;
|
|
32
|
+
GetCartItemCount: (data: IGetCartItemCountRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartItemCountResponse>>;
|
|
32
33
|
}
|
package/dist/services/urls.d.ts
CHANGED
|
@@ -51,6 +51,8 @@ declare const _default: {
|
|
|
51
51
|
ActiveMember: string;
|
|
52
52
|
ContactApprovalMessage: string;
|
|
53
53
|
ApproveValidationTokenRequest: string;
|
|
54
|
+
PasswordRenewalMessage: string;
|
|
55
|
+
ChangePasswordRequest: string;
|
|
54
56
|
};
|
|
55
57
|
MemberMessages: {
|
|
56
58
|
SubjectsAll: string;
|
|
@@ -86,6 +88,7 @@ declare const _default: {
|
|
|
86
88
|
};
|
|
87
89
|
ShoppingCart: {
|
|
88
90
|
AddToCart: string;
|
|
91
|
+
GetCartItemCount: string;
|
|
89
92
|
};
|
|
90
93
|
};
|
|
91
94
|
export default _default;
|
package/dist/services/urls.js
CHANGED
|
@@ -57,6 +57,8 @@ exports.default = {
|
|
|
57
57
|
ActiveMember: "/{language}/Members/v1/ActiveMember",
|
|
58
58
|
ContactApprovalMessage: "/{language}/Members/v1/ContactApprovalMessage",
|
|
59
59
|
ApproveValidationTokenRequest: "/{language}/Members/v1/ApproveValidationTokenRequest",
|
|
60
|
+
PasswordRenewalMessage: "/{language}/Members/v1/PasswordRenewalMessage",
|
|
61
|
+
ChangePasswordRequest: "/{language}/Members/v1/ChangePasswordRequest",
|
|
60
62
|
},
|
|
61
63
|
MemberMessages: {
|
|
62
64
|
SubjectsAll: '/{language}/MemberMessages/v1/Subjects/All',
|
|
@@ -92,6 +94,7 @@ exports.default = {
|
|
|
92
94
|
},
|
|
93
95
|
ShoppingCart: {
|
|
94
96
|
AddToCart: '/{language}/ShoppingCartGateway/v1/AddToCart',
|
|
97
|
+
GetCartItemCount: '/{language}/ShoppingCartGateway/v1/GetCartItemCount',
|
|
95
98
|
},
|
|
96
99
|
};
|
|
97
100
|
const getUrl = ({ isClient = false, language = process.env.DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = '' }) => {
|