oneentry 1.0.77 → 1.0.78
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/README.md
CHANGED
|
@@ -674,10 +674,10 @@ Example return:
|
|
|
674
674
|
true
|
|
675
675
|
```
|
|
676
676
|
|
|
677
|
-
### AuthProvider.changePassword(marker, userIdentifier, code, newPassword, repeatPassword)
|
|
677
|
+
### AuthProvider.changePassword(marker, userIdentifier, type, code, newPassword, repeatPassword)
|
|
678
678
|
|
|
679
679
|
```js
|
|
680
|
-
const value = await AuthProvider.changePassword('email', 'example@oneentry.cloud', 'EW32RF', 654321, 654321)
|
|
680
|
+
const value = await AuthProvider.changePassword('email', 'example@oneentry.cloud', 1, 'EW32RF', 654321, 654321)
|
|
681
681
|
```
|
|
682
682
|
|
|
683
683
|
> This method changes the password of an authorized user. If successful, it will return true.
|
|
@@ -105,10 +105,11 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
105
105
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
106
106
|
* @param {string} userIdentifier - The text identifier of the user's object (user login)
|
|
107
107
|
* @param {string} code - Service code
|
|
108
|
+
* @param {string} type - Operation type (1 - for changing password, 2 - for recovery)
|
|
108
109
|
* @param {string} newPassword - New password
|
|
109
110
|
* @param {string} [repeatPassword] - Optional variable contains repeat new password for validation
|
|
110
111
|
*/
|
|
111
|
-
changePassword(marker: string, userIdentifier: string, code: string, newPassword: string, repeatPassword?: string): Promise<boolean>;
|
|
112
|
+
changePassword(marker: string, userIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean>;
|
|
112
113
|
/**
|
|
113
114
|
* Get all auth providers objects
|
|
114
115
|
* @param {string} [langCode] - Language code. Default "en_US"
|
|
@@ -161,13 +161,15 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
161
161
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
162
162
|
* @param {string} userIdentifier - The text identifier of the user's object (user login)
|
|
163
163
|
* @param {string} code - Service code
|
|
164
|
+
* @param {string} type - Operation type (1 - for changing password, 2 - for recovery)
|
|
164
165
|
* @param {string} newPassword - New password
|
|
165
166
|
* @param {string} [repeatPassword] - Optional variable contains repeat new password for validation
|
|
166
167
|
*/
|
|
167
|
-
async changePassword(marker, userIdentifier, code, newPassword, repeatPassword) {
|
|
168
|
+
async changePassword(marker, userIdentifier, type, code, newPassword, repeatPassword) {
|
|
168
169
|
const data = {
|
|
169
170
|
"userIdentifier": userIdentifier,
|
|
170
171
|
"code": code,
|
|
172
|
+
"type": type,
|
|
171
173
|
"password1": newPassword,
|
|
172
174
|
"password2": repeatPassword !== null && repeatPassword !== void 0 ? repeatPassword : newPassword
|
|
173
175
|
};
|
|
@@ -21,7 +21,7 @@ interface IAuthProvider {
|
|
|
21
21
|
auth(marker: string, data: IAuthPostBody): Promise<IAuthEntity>;
|
|
22
22
|
refresh(marker: string, token: string): Promise<IAuthEntity>;
|
|
23
23
|
logout(marker: string, token: string): Promise<boolean>;
|
|
24
|
-
changePassword(marker: string, userIdentifier: string, code: string, newPassword: string, repeatPassword?: string): Promise<boolean>;
|
|
24
|
+
changePassword(marker: string, userIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean>;
|
|
25
25
|
getAuthProviders(langCode?: string, offset?: number, limit?: number): Promise<Array<IAuthProvidersEntity>>;
|
|
26
26
|
getMarker(marker: string, langCode?: string): Promise<IAuthProvidersEntity>;
|
|
27
27
|
}
|
package/dist/pages/pagesApi.js
CHANGED
|
@@ -113,7 +113,7 @@ class PageApi extends asyncModules_1.default {
|
|
|
113
113
|
if (normalizeResponse.type === 'forSimilarProductBlock') {
|
|
114
114
|
try {
|
|
115
115
|
await Blocks.getSimilarProducts(normalizeResponse.identifier, langCode).then((result) => {
|
|
116
|
-
normalizeResponse.similarProducts = result;
|
|
116
|
+
normalizeResponse.similarProducts = this._normalizeData(result);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
catch {
|
|
@@ -123,7 +123,7 @@ class PageApi extends asyncModules_1.default {
|
|
|
123
123
|
else if (normalizeResponse.type === 'forProductBlock') {
|
|
124
124
|
try {
|
|
125
125
|
await Blocks.getProductsByBlockMarker(normalizeResponse.identifier, langCode).then((result) => {
|
|
126
|
-
normalizeResponse.products = result;
|
|
126
|
+
normalizeResponse.products = this._normalizeData(result);
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
catch {
|
|
@@ -131,7 +131,7 @@ class PageApi extends asyncModules_1.default {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
return normalizeResponse;
|
|
134
|
+
return this._normalizeData(normalizeResponse);
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* Get settings for the page.
|