oneentry 1.0.67 → 1.0.69
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/attribute-sets/attributeSetsInterfaces.d.ts +8 -6
- package/dist/auth-provider/authProviderApi.d.ts +14 -7
- package/dist/auth-provider/authProviderApi.js +31 -8
- package/dist/auth-provider/authProvidersInterfaces.d.ts +4 -1
- package/dist/base/asyncModules.js +8 -5
- package/dist/base/stateModule.d.ts +3 -1
- package/dist/base/stateModule.js +6 -4
- package/dist/base/utils.d.ts +28 -24
- package/dist/base/utils.js +0 -23
- package/dist/orders/ordersApi.d.ts +11 -10
- package/dist/orders/ordersApi.js +12 -11
- package/dist/orders/ordersInterfaces.d.ts +32 -38
- package/dist/products/productsApi.d.ts +4 -4
- package/dist/products/productsApi.js +9 -9
- package/dist/products/productsInterfaces.d.ts +3 -3
- package/dist/users/usersApi.d.ts +1 -1
- package/dist/users/usersApi.js +2 -2
- package/package.json +1 -1
- package/README.md +0 -5791
|
@@ -22,7 +22,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Search for all products with pagination and filter.
|
|
25
|
-
* @param {Array<IFilterParams>} body - Request body.
|
|
25
|
+
* @param {Array<IFilterParams>} body - Request body. Default [].
|
|
26
26
|
* @param {string} [langCode] - Language code parameter. Default "en_US"
|
|
27
27
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
28
28
|
* @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
|
|
@@ -64,9 +64,9 @@ class ProductApi extends asyncModules_1.default {
|
|
|
64
64
|
*
|
|
65
65
|
* @returns Array with ProductEntity objects
|
|
66
66
|
*/
|
|
67
|
-
async getProducts(body, langCode = this.state.lang, userQuery) {
|
|
68
|
-
const query = { ...this._defaultQuery, ...userQuery };
|
|
69
|
-
const result = await this._fetchPost(`/all
|
|
67
|
+
async getProducts(body = [], langCode = this.state.lang, userQuery) {
|
|
68
|
+
const query = { ...this._defaultQuery, ...userQuery, langCode };
|
|
69
|
+
const result = await this._fetchPost(`/all?langCode=${langCode}&` + this._queryParamsToString(query), body);
|
|
70
70
|
return this._dataPostProcess(result.items, langCode);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -142,9 +142,9 @@ class ProductApi extends asyncModules_1.default {
|
|
|
142
142
|
*
|
|
143
143
|
* @returns Array with ProductEntity objects
|
|
144
144
|
*/
|
|
145
|
-
async getProductsByPageId(id, body, langCode = this.state.lang, userQuery) {
|
|
145
|
+
async getProductsByPageId(id, body = [], langCode = this.state.lang, userQuery) {
|
|
146
146
|
const query = { ...this._defaultQuery, ...userQuery };
|
|
147
|
-
const result = await this._fetchPost(`/page/${id}
|
|
147
|
+
const result = await this._fetchPost(`/page/${id}?langCode=${langCode}&` + this._queryParamsToString(query), body);
|
|
148
148
|
return this._dataPostProcess(result.items, langCode);
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
@@ -219,9 +219,9 @@ class ProductApi extends asyncModules_1.default {
|
|
|
219
219
|
*
|
|
220
220
|
* @returns Array with ProductEntity objects
|
|
221
221
|
*/
|
|
222
|
-
async getProductsByPageUrl(url, body, langCode = this.state.lang, userQuery) {
|
|
222
|
+
async getProductsByPageUrl(url, body = [], langCode = this.state.lang, userQuery) {
|
|
223
223
|
const query = { ...this._defaultQuery, ...userQuery };
|
|
224
|
-
const result = await this._fetchPost(`/page/url/${url}
|
|
224
|
+
const result = await this._fetchPost(`/page/url/${url}?langCode=${langCode}&` + this._queryParamsToString(query), body);
|
|
225
225
|
return this._dataPostProcess(result.items, langCode);
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
@@ -279,7 +279,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
279
279
|
* @returns Array with ProductEntity objects
|
|
280
280
|
*/
|
|
281
281
|
async searchProduct(name, langCode = this.state.lang) {
|
|
282
|
-
const searchProducts = await this._fetchGet(`/quick/search?
|
|
282
|
+
const searchProducts = await this._fetchGet(`/quick/search?langCode=${langCode}&name=${name}`);
|
|
283
283
|
if (this.state.multipleResponse) {
|
|
284
284
|
const productsList = [];
|
|
285
285
|
await Promise.all(searchProducts.map(async (product) => {
|
|
@@ -22,11 +22,11 @@ import { IBlocksResponse } from "../blocks/blocksInterfaces";
|
|
|
22
22
|
* @property {function} searchProduct - Quick search for product page objects with limited output.
|
|
23
23
|
*/
|
|
24
24
|
interface IProductApi {
|
|
25
|
-
getProducts(body
|
|
25
|
+
getProducts(body?: Array<IFilterParams>, langCode?: string, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
|
|
26
26
|
getProductsEmptyPage(langCode?: LangType, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
|
|
27
|
-
getProductsByPageId(id: number, body
|
|
27
|
+
getProductsByPageId(id: number, body?: Array<IFilterParams>, langCode?: string, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
|
|
28
28
|
getProductsPriceByPageUrl(url: string, userQuery?: IProductsQuery): Promise<Array<IProductInfo>>;
|
|
29
|
-
getProductsByPageUrl(url: string, body
|
|
29
|
+
getProductsByPageUrl(url: string, body?: Array<IFilterParams>, langCode?: string, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
|
|
30
30
|
getRelatedProductsById(id: number, langCode?: LangType, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
|
|
31
31
|
getProductById(id: number, langCode: LangType): Promise<IProductsEntity>;
|
|
32
32
|
getProductBlockById(id: number): Promise<Array<IBlocksResponse>>;
|
package/dist/users/usersApi.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
33
33
|
* "value": "Username"
|
|
34
34
|
* },
|
|
35
35
|
* "notificationData": {
|
|
36
|
-
* "email": "
|
|
36
|
+
* "email": "example@oneentry.cloud",
|
|
37
37
|
* "phonePush": "",
|
|
38
38
|
* "phoneSMS": "+99999999999"
|
|
39
39
|
* }
|
package/dist/users/usersApi.js
CHANGED
|
@@ -15,7 +15,7 @@ class UsersApi extends asyncModules_1.default {
|
|
|
15
15
|
*/
|
|
16
16
|
async getUser(langCode = this.state.lang) {
|
|
17
17
|
const result = await this._fetchGet(`/me?langCode=${langCode}`);
|
|
18
|
-
return result;
|
|
18
|
+
return this._normalizeData(result);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Updating a single user object.
|
|
@@ -37,7 +37,7 @@ class UsersApi extends asyncModules_1.default {
|
|
|
37
37
|
* "value": "Username"
|
|
38
38
|
* },
|
|
39
39
|
* "notificationData": {
|
|
40
|
-
* "email": "
|
|
40
|
+
* "email": "example@oneentry.cloud",
|
|
41
41
|
* "phonePush": "",
|
|
42
42
|
* "phoneSMS": "+99999999999"
|
|
43
43
|
* }
|