oneentry 1.0.77 → 1.0.79

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.
@@ -29,6 +29,7 @@ type AttributeType = 'string' | 'text' | 'textWithHeader' | 'integer' | 'real' |
29
29
  * @property {Record<string, any>} validators - Set of validators for validation.
30
30
  * @property {Record<string, any>} localizeInfos - The name of the template, taking into account localization.
31
31
  * @property {Array<Record<string, any>>} listTitles - Array of values (with extended data) for list and radioButton attributes.
32
+ * @property {Array<Record<string, any>>} settings - Additional attribute settings (optional).
32
33
  *
33
34
  */
34
35
  interface IAttributesSetsEntity {
@@ -45,5 +46,6 @@ interface IAttributesSetsEntity {
45
46
  };
46
47
  localizeInfos: Record<string, any>;
47
48
  listTitles: Array<IListTitle> | Record<string, any>;
49
+ settings?: Record<string, any>;
48
50
  }
49
51
  export { IAttributesSets, IAttributesSetsEntity, IListTitle, AttributeType };
@@ -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 {number} 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 {number} 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
  }
@@ -40,12 +40,15 @@ interface IAttributes {
40
40
  title: string;
41
41
  value: number | string | null;
42
42
  position: number;
43
- extendedValue: number | string | null;
44
- extendedValueType: number | string | null;
43
+ extended: {
44
+ value: string | number | null;
45
+ type: string | number | null;
46
+ };
45
47
  }>;
46
48
  localizeInfos: ILocalizeInfo;
47
49
  marker: string;
48
50
  position: number;
51
+ isVisible: boolean;
49
52
  type: string;
50
53
  validators: Record<string, any>;
51
54
  }
@@ -70,7 +70,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
70
70
  * "productId": 1,
71
71
  * "quantity": 2
72
72
  * }
73
- * ],
73
+ * ],Сочи
74
74
  * "currency": "USD"
75
75
  * }
76
76
  */
@@ -80,7 +80,7 @@ class OrdersApi extends asyncModules_1.default {
80
80
  * "productId": 1,
81
81
  * "quantity": 2
82
82
  * }
83
- * ],
83
+ * ],Сочи
84
84
  * "currency": "USD"
85
85
  * }
86
86
  */
@@ -59,9 +59,11 @@ interface IOrderProductData {
59
59
  * @interface
60
60
  * @property {string} statusIdentifier - Text identifier of the order status.
61
61
  * @property {string} formIdentifier - Text identifier of the form status.
62
+ * @property {string} statusIdentifier - Text identifier of order status object (if not set, default status will be assigned).
62
63
  * @property {string} paymentAccountIdentifier - Text identifier of the order payment.
63
64
  * @property {Array<IOrdersFormData>} formData - Data submitted by the form linked to the order store.
64
65
  * @property {Array<IOrderProducts>} products - Array of products added to order.
66
+ * @property {string} createdDate - Order creation date.
65
67
  * @property {string} totalSum - Total order amount.
66
68
  * @property {string} currency - Currency used to pay for the order.
67
69
  * @property {string} createdDate - Date when the order was created.
@@ -69,8 +71,10 @@ interface IOrderProductData {
69
71
  interface IBaseOrdersEntity {
70
72
  formIdentifier: string;
71
73
  paymentAccountIdentifier: string;
74
+ statusIdentifier: string;
72
75
  formData: Array<IOrdersFormData>;
73
76
  products: Array<IOrderProductData>;
77
+ createdDate: string;
74
78
  totalSum: string;
75
79
  currency: string;
76
80
  id: number;
@@ -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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.77",
3
+ "version": "1.0.79",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",