oneentry 1.0.0 → 1.0.7

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.
Files changed (50) hide show
  1. package/README.md +1655 -190
  2. package/dist/admins/adminsApi.d.ts +2 -2
  3. package/dist/admins/adminsInterfaces.d.ts +30 -2
  4. package/dist/attribute-set/AttributeSetApi.d.ts +3 -3
  5. package/dist/attribute-set/attributeSetInterfaces.d.ts +21 -3
  6. package/dist/base/utils.d.ts +32 -0
  7. package/dist/base/utils.js +32 -0
  8. package/dist/base/utils.js.map +1 -0
  9. package/dist/forms/formsApi.d.ts +26 -0
  10. package/dist/forms/formsApi.js +56 -0
  11. package/dist/forms/formsApi.js.map +1 -0
  12. package/dist/forms/formsInterfaces.d.ts +28 -0
  13. package/dist/forms/formsInterfaces.js +3 -0
  14. package/dist/forms/formsInterfaces.js.map +1 -0
  15. package/dist/formsData/formsDataApi.d.ts +41 -0
  16. package/dist/formsData/formsDataApi.js +71 -0
  17. package/dist/formsData/formsDataApi.js.map +1 -0
  18. package/dist/formsData/formsDataInterfaces.d.ts +25 -0
  19. package/dist/formsData/formsDataInterfaces.js +3 -0
  20. package/dist/formsData/formsDataInterfaces.js.map +1 -0
  21. package/dist/general-types/GeneralTypesApi.d.ts +2 -2
  22. package/dist/general-types/generalTypesInterfaces.d.ts +7 -2
  23. package/dist/index.d.ts +11 -7
  24. package/dist/index.js +14 -8
  25. package/dist/index.js.map +1 -1
  26. package/dist/locales/localesApi.d.ts +2 -2
  27. package/dist/locales/localesInterfaces.d.ts +13 -2
  28. package/dist/markers/markersApi.d.ts +4 -4
  29. package/dist/markers/markersApi.js +1 -1
  30. package/dist/markers/markersApi.js.map +1 -1
  31. package/dist/markers/markersInterfaces.d.ts +14 -4
  32. package/dist/menus/menusApi.d.ts +2 -2
  33. package/dist/menus/menusInterfaces.d.ts +16 -2
  34. package/dist/modules/modulesApi.d.ts +2 -2
  35. package/dist/modules/modulesInterfaces.d.ts +17 -2
  36. package/dist/pages/pagesApi.d.ts +21 -9
  37. package/dist/pages/pagesApi.js +27 -15
  38. package/dist/pages/pagesApi.js.map +1 -1
  39. package/dist/pages/pagesInterfaces.d.ts +34 -9
  40. package/dist/product-statuses/productStatusesApi.d.ts +5 -5
  41. package/dist/product-statuses/productStatusesInterfaces.d.ts +13 -5
  42. package/dist/products/productsApi.d.ts +38 -26
  43. package/dist/products/productsApi.js +35 -22
  44. package/dist/products/productsApi.js.map +1 -1
  45. package/dist/products/productsInterfaces.d.ts +38 -9
  46. package/dist/templates/templatesApi.d.ts +5 -5
  47. package/dist/templates/templatesInterfaces.d.ts +29 -5
  48. package/dist/templates-preview/templatesPreviewApi.d.ts +4 -4
  49. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +25 -4
  50. package/package.json +1 -1
@@ -1,6 +1,16 @@
1
+ import { ILocalizeInfos } from "../base/utils";
1
2
  interface IMarkersApi {
2
- getMarker(marker: string): Promise<any>;
3
- getMarkers(limit: number, offset: number): Promise<any>;
4
- getMarkersById(id: number): Promise<any>;
3
+ getMarker(marker: string): Promise<IMarkerEntity>;
4
+ getMarkers(limit: number, offset: number): Promise<Array<IMarkerEntity>>;
5
+ getMarkersById(id: number): Promise<IMarkerEntity>;
5
6
  }
6
- export { IMarkersApi };
7
+ interface IMarkerEntity {
8
+ id: number;
9
+ updatedDate: string;
10
+ version: number;
11
+ identifier: string;
12
+ name: string;
13
+ marker: string;
14
+ localizeInfos: ILocalizeInfos;
15
+ }
16
+ export { IMarkersApi, IMarkerEntity };
@@ -1,5 +1,5 @@
1
1
  import OneEntry from "../base/oneEntry";
2
- import { IMenus } from "./menusInterfaces";
2
+ import { IMenus, IMenusEntity } from "./menusInterfaces";
3
3
  /**
4
4
  * Controllers for working with menu objects
5
5
  */
@@ -12,5 +12,5 @@ export default class MenusApi extends OneEntry implements IMenus {
12
12
  *
13
13
  * @returns Returns a single menu object as a ContentMenuDto object with included pages
14
14
  */
15
- getMenusByMarker(marker: string): Promise<any>;
15
+ getMenusByMarker(marker: string): Promise<IMenusEntity>;
16
16
  }
@@ -1,4 +1,18 @@
1
+ import { ILocalizeInfos } from "../base/utils";
1
2
  interface IMenus {
2
- getMenusByMarker(marker: string): Promise<any>;
3
+ getMenusByMarker(marker: string): Promise<IMenusEntity>;
3
4
  }
4
- export { IMenus };
5
+ interface IMenusPages {
6
+ id: number;
7
+ pageUrl: string;
8
+ localizeInfos: ILocalizeInfos;
9
+ position: number;
10
+ parentId: number | null;
11
+ }
12
+ interface IMenusEntity {
13
+ id: number;
14
+ identifier: string;
15
+ localizeInfos: ILocalizeInfos;
16
+ pages: Array<IMenusPages>;
17
+ }
18
+ export { IMenus, IMenusEntity };
@@ -1,5 +1,5 @@
1
1
  import OneEntry from "../base/oneEntry";
2
- import { IModules } from "./modulesInterfaces";
2
+ import { IModules, IModulesEntity } from "./modulesInterfaces";
3
3
  /**
4
4
  * Controllers for working with application modules
5
5
  */
@@ -10,5 +10,5 @@ export default class ModulesApi extends OneEntry implements IModules {
10
10
  *
11
11
  * @returns Returns BaseModuleDto objects or an empty array [] if there is no data
12
12
  */
13
- getAllModules(): Promise<any>;
13
+ getAllModules(): Promise<Array<IModulesEntity>>;
14
14
  }
@@ -1,4 +1,19 @@
1
+ import { ILocalizeInfos } from "../base/utils";
1
2
  interface IModules {
2
- getAllModules(): Promise<any>;
3
+ getAllModules(): Promise<Array<IModulesEntity>>;
3
4
  }
4
- export { IModules };
5
+ interface IModulesEntity {
6
+ identifier: string;
7
+ isVisible: boolean;
8
+ type: string | null;
9
+ localizeInfos: ILocalizeInfos;
10
+ icon: string;
11
+ generalTypes: {
12
+ id: number;
13
+ type: string;
14
+ }[];
15
+ attributeSetTypes: [];
16
+ position: number | string;
17
+ positionId: number;
18
+ }
19
+ export { IModules, IModulesEntity };
@@ -1,5 +1,5 @@
1
1
  import OneEntry from "../base/oneEntry";
2
- import { IPageApi, IPageConfig } from "./pagesInterfaces";
2
+ import { IPageApi, IPageConfig, IPagesEntity } from "./pagesInterfaces";
3
3
  /**
4
4
  * Controllers for working with page objects, including catalog pages
5
5
  */
@@ -8,49 +8,61 @@ export default class PageApi extends OneEntry implements IPageApi {
8
8
  /**
9
9
  * Get all top-level page objects.
10
10
  *
11
+ * @param {string} [langCode] Required parameter lang code
12
+ *
11
13
  * @returns Returns all created pages without parents as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
12
14
  */
13
- getRootPages(): Promise<any>;
15
+ getRootPages(langCode: string): Promise<Array<IPagesEntity>>;
14
16
  /**
15
17
  * Get all page objects with product information as an array.
16
18
  *
19
+ * @param {string} [langCode] Required parameter lang code
20
+ *
17
21
  * @param {number} [limit] - Optional parameter for pagination, default is 30
18
22
  *
19
23
  * @param {number} [offset] - Optional parameter for pagination, default is 0
20
24
  *
21
25
  * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
22
26
  */
23
- getCatalogPages(limit?: number, offset?: number): Promise<any>;
27
+ getCatalogPages(langCode: string, limit?: number, offset?: number): Promise<Array<IPagesEntity>>;
24
28
  /**
25
29
  * Get all page objects with product information as an array.
26
30
  *
31
+ * @param {string} [langCode] Required parameter lang code
32
+ *
27
33
  * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
28
34
  */
29
- getPages(): Promise<any>;
35
+ getPages(langCode: string): Promise<Array<IPagesEntity>>;
30
36
  /**
31
37
  * Get page object with information about forms, blocks, menus, linked to the page.
32
38
  *
39
+ * @param {string} [langCode] Required parameter lang code
40
+ *
33
41
  * @param {number} [id] - Page object identifier
34
42
  *
35
43
  * @returns Returns page object (DTO depends on the type of page being returned)
36
44
  */
37
- getPageById(id: number): Promise<any>;
45
+ getPageById(id: number, langCode: string): Promise<IPagesEntity>;
38
46
  /**
39
47
  * Get page object with information about forms, blocks, menus, linked to the page by URL.
40
48
  *
49
+ * @param {string} [langCode] Required parameter lang code
50
+ *
41
51
  * @param {string} [url] - Page URL
42
52
  *
43
53
  * @returns Returns page object (DTO depends on the type of page being returned)
44
54
  */
45
- getPageByUrl(url: string): Promise<any>;
55
+ getPageByUrl(url: string, langCode: string): Promise<IPagesEntity>;
46
56
  /**
47
57
  * Get child pages object with information as an array.
48
58
  *
59
+ * @param {string} [langCode] Required parameter lang code
60
+ *
49
61
  * @param {string} [url] - Page URL
50
62
  *
51
63
  * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data) for the selected parent
52
64
  */
53
- getChildPagesByParentUrl(url: string): Promise<any>;
65
+ getChildPagesByParentUrl(url: string, langCode: string): Promise<IPagesEntity>;
54
66
  /**
55
67
  * Get settings for the page.
56
68
  *
@@ -64,9 +76,9 @@ export default class PageApi extends OneEntry implements IPageApi {
64
76
  *
65
77
  * @param {string} [name] - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account)
66
78
  *
67
- * @param {string} [lang] - Language code. Example : en_US
79
+ * @param {string} [langCode] Required parameter lang code
68
80
  *
69
81
  * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
70
82
  */
71
- searchPage(name: string, lang?: string): Promise<any>;
83
+ searchPage(name: string, langCode: string): Promise<IPagesEntity>;
72
84
  }
@@ -21,77 +21,89 @@ class PageApi extends oneEntry_1.default {
21
21
  /**
22
22
  * Get all top-level page objects.
23
23
  *
24
+ * @param {string} [langCode] Required parameter lang code
25
+ *
24
26
  * @returns Returns all created pages without parents as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
25
27
  */
26
- getRootPages() {
28
+ getRootPages(langCode) {
27
29
  return __awaiter(this, void 0, void 0, function* () {
28
- const result = yield this._fetchGet('/root');
30
+ const result = yield this._fetchGet(`/root?langCode=${langCode}`);
29
31
  return result;
30
32
  });
31
33
  }
32
34
  /**
33
35
  * Get all page objects with product information as an array.
34
36
  *
37
+ * @param {string} [langCode] Required parameter lang code
38
+ *
35
39
  * @param {number} [limit] - Optional parameter for pagination, default is 30
36
40
  *
37
41
  * @param {number} [offset] - Optional parameter for pagination, default is 0
38
42
  *
39
43
  * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
40
44
  */
41
- getCatalogPages(limit = 30, offset = 0) {
45
+ getCatalogPages(langCode, limit = 30, offset = 0) {
42
46
  return __awaiter(this, void 0, void 0, function* () {
43
47
  //TODO Query parameters
44
- const result = yield this._fetchGet('/catalog');
48
+ const result = yield this._fetchGet(`/catalog?langCode=${langCode}`);
45
49
  return result;
46
50
  });
47
51
  }
48
52
  /**
49
53
  * Get all page objects with product information as an array.
50
54
  *
55
+ * @param {string} [langCode] Required parameter lang code
56
+ *
51
57
  * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
52
58
  */
53
- getPages() {
59
+ getPages(langCode) {
54
60
  return __awaiter(this, void 0, void 0, function* () {
55
- const result = yield this._fetchGet('');
61
+ const result = yield this._fetchGet(`?langCode=${langCode}`);
56
62
  return result;
57
63
  });
58
64
  }
59
65
  /**
60
66
  * Get page object with information about forms, blocks, menus, linked to the page.
61
67
  *
68
+ * @param {string} [langCode] Required parameter lang code
69
+ *
62
70
  * @param {number} [id] - Page object identifier
63
71
  *
64
72
  * @returns Returns page object (DTO depends on the type of page being returned)
65
73
  */
66
- getPageById(id) {
74
+ getPageById(id, langCode) {
67
75
  return __awaiter(this, void 0, void 0, function* () {
68
- const result = yield this._fetchGet(`/${id}`);
76
+ const result = yield this._fetchGet(`/${id}?langCode=${langCode}`);
69
77
  return result;
70
78
  });
71
79
  }
72
80
  /**
73
81
  * Get page object with information about forms, blocks, menus, linked to the page by URL.
74
82
  *
83
+ * @param {string} [langCode] Required parameter lang code
84
+ *
75
85
  * @param {string} [url] - Page URL
76
86
  *
77
87
  * @returns Returns page object (DTO depends on the type of page being returned)
78
88
  */
79
- getPageByUrl(url) {
89
+ getPageByUrl(url, langCode) {
80
90
  return __awaiter(this, void 0, void 0, function* () {
81
- const result = yield this._fetchGet(`/url/${url}`);
91
+ const result = yield this._fetchGet(`/url/${url}?langCode=${langCode}`);
82
92
  return result;
83
93
  });
84
94
  }
85
95
  /**
86
96
  * Get child pages object with information as an array.
87
97
  *
98
+ * @param {string} [langCode] Required parameter lang code
99
+ *
88
100
  * @param {string} [url] - Page URL
89
101
  *
90
102
  * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data) for the selected parent
91
103
  */
92
- getChildPagesByParentUrl(url) {
104
+ getChildPagesByParentUrl(url, langCode) {
93
105
  return __awaiter(this, void 0, void 0, function* () {
94
- const result = yield this._fetchGet(`/${url}/children`);
106
+ const result = yield this._fetchGet(`/${url}/children?langCode=${langCode}`);
95
107
  return result;
96
108
  });
97
109
  }
@@ -113,13 +125,13 @@ class PageApi extends oneEntry_1.default {
113
125
  *
114
126
  * @param {string} [name] - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account)
115
127
  *
116
- * @param {string} [lang] - Language code. Example : en_US
128
+ * @param {string} [langCode] Required parameter lang code
117
129
  *
118
130
  * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
119
131
  */
120
- searchPage(name, lang = 'en_US') {
132
+ searchPage(name, langCode) {
121
133
  return __awaiter(this, void 0, void 0, function* () {
122
- const result = yield this._fetchGet(`/quick/search?lang=${lang}&name=${name}`);
134
+ const result = yield this._fetchGet(`/quick/search?langCode=${langCode}&name=${name}`);
123
135
  return result;
124
136
  });
125
137
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pagesApi.js","sourceRoot":"","sources":["../../src/pages/pagesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,OAAQ,SAAQ,kBAAQ;IACzC,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,oBAAoB,CAAA;IACrC,CAAC;IAED;;;;OAIG;IACU,YAAY;;YACrB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAA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EAAE,CAAC,CAAA;YACvE,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;OAQG;IACU,wBAAwB,CAAC,GAAU,EAAE,QAAe;;YAC7D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,sBAAsB,QAAQ,EAAE,CAAC,CAAA;YAC5E,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,kBAAkB,CAAC,GAAU;;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAA;YACrD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;OAQG;IACU,UAAU,CAAC,IAAW,EAAE,QAAe;;YAChD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,0BAA0B,QAAQ,SAAS,IAAI,EAAE,CAAC,CAAA;YACtF,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ;AAnHD,0BAmHC"}
@@ -1,15 +1,40 @@
1
+ import { ILocalizeInfos, Types } from "../base/utils";
1
2
  interface IPageApi {
2
- getRootPages(): Promise<any>;
3
- getCatalogPages(limit: number, offset: number): Promise<any>;
4
- getPages(): Promise<any>;
5
- getPageById(id: number): Promise<any>;
6
- getPageByUrl(url: string): Promise<any>;
7
- getChildPagesByParentUrl(url: string): Promise<any>;
8
- getConfigPageByUrl(url: string): Promise<any>;
9
- searchPage(name: string, lang: string): Promise<any>;
3
+ getRootPages(langCode: string): Promise<Array<IPagesEntity>>;
4
+ getCatalogPages(langCode: string, limit: number, offset: number): Promise<Array<IPagesEntity>>;
5
+ getPages(langCode: string): Promise<Array<IPagesEntity>>;
6
+ getPageById(id: number, langCode: string): Promise<IPagesEntity>;
7
+ getPageByUrl(url: string, langCode: string): Promise<IPagesEntity>;
8
+ getChildPagesByParentUrl(url: string, langCode: string): Promise<IPagesEntity>;
9
+ getConfigPageByUrl(url: string): Promise<IPageConfig>;
10
+ searchPage(name: string, langCode: string): Promise<IPagesEntity>;
10
11
  }
11
12
  interface IPageConfig {
12
13
  rowsPerPage: number;
13
14
  productsPerRow: number;
14
15
  }
15
- export { IPageApi, IPageConfig };
16
+ interface IPagesEntity {
17
+ id: number;
18
+ parentId: number;
19
+ config: Record<string, number>;
20
+ pageUrl: string;
21
+ depth: number;
22
+ localizeInfos: ILocalizeInfos;
23
+ isVisible: boolean;
24
+ isEditorDisabled: boolean;
25
+ products: number;
26
+ attributeSetId: number;
27
+ templateIdentifier: string;
28
+ /**
29
+ * Language-specific attribute values.
30
+ * @example attributeValues['en_US']
31
+ *
32
+ * @property {langCode.<object>}
33
+ */
34
+ attributeValues: {
35
+ [langCode: string]: object;
36
+ };
37
+ position: string;
38
+ type: Types;
39
+ }
40
+ export { IPageApi, IPageConfig, IPagesEntity };
@@ -1,5 +1,5 @@
1
1
  import OneEntry from '../base/oneEntry';
2
- import { IProductStatuses } from "./productStatusesInterfaces";
2
+ import { IProductStatusEntity, IProductStatuses } from "./productStatusesInterfaces";
3
3
  /**
4
4
  * Controllers for working with product statuses
5
5
  */
@@ -10,7 +10,7 @@ export default class ProductStatusesApi extends OneEntry implements IProductStat
10
10
  *
11
11
  * @returns Returns an array of product status objects
12
12
  */
13
- getProductStatuses(): Promise<any>;
13
+ getProductStatuses(): Promise<Array<IProductStatusEntity>>;
14
14
  /**
15
15
  * Search for a product status object by identifier.
16
16
  *
@@ -18,7 +18,7 @@ export default class ProductStatusesApi extends OneEntry implements IProductStat
18
18
  *
19
19
  * @returns Returns a product status object
20
20
  */
21
- getProductStatusesById(id: number): Promise<any>;
21
+ getProductStatusesById(id: number): Promise<IProductStatusEntity>;
22
22
  /**
23
23
  * Search for a product status object by its textual identifier (marker).
24
24
  *
@@ -26,7 +26,7 @@ export default class ProductStatusesApi extends OneEntry implements IProductStat
26
26
  *
27
27
  * @returns Returns a product status object
28
28
  */
29
- getProductsByStatusMarker(marker: string): Promise<any>;
29
+ getProductsByStatusMarker(marker: string): Promise<IProductStatusEntity>;
30
30
  /**
31
31
  * Check the existence of a textual identifier.
32
32
  *
@@ -34,5 +34,5 @@ export default class ProductStatusesApi extends OneEntry implements IProductStat
34
34
  *
35
35
  * @returns Returns true if the textual identifier (marker) exists or false if it doesn't
36
36
  */
37
- validateMarker(marker: string): Promise<any>;
37
+ validateMarker(marker: string): Promise<boolean>;
38
38
  }
@@ -1,7 +1,15 @@
1
+ import { ILocalizeInfos } from "../base/utils";
1
2
  interface IProductStatuses {
2
- getProductStatuses(): Promise<any>;
3
- getProductStatusesById(id: number): Promise<any>;
4
- getProductsByStatusMarker(marker: string): Promise<any>;
5
- validateMarker(marker: string): Promise<any>;
3
+ getProductStatuses(): Promise<Array<IProductStatusEntity>>;
4
+ getProductStatusesById(id: number): Promise<IProductStatusEntity>;
5
+ getProductsByStatusMarker(marker: string): Promise<IProductStatusEntity>;
6
+ validateMarker(marker: string): Promise<boolean>;
6
7
  }
7
- export { IProductStatuses };
8
+ interface IProductStatusEntity {
9
+ id: number;
10
+ updatedDate: string;
11
+ version: number;
12
+ identifier: string;
13
+ localizeInfos: ILocalizeInfos;
14
+ }
15
+ export { IProductStatuses, IProductStatusEntity };
@@ -1,4 +1,4 @@
1
- import { IProductsQuery, IFilterParams, IProduct, IProductApi } from './productsInterfaces';
1
+ import { IProductsQuery, IFilterParams, IProductApi, IProductsEntity } from './productsInterfaces';
2
2
  import OneEntry from '../base/oneEntry';
3
3
  /**
4
4
  * Controllers for working with product pages
@@ -22,13 +22,15 @@ export default class ProductApi extends OneEntry implements IProductApi {
22
22
  *
23
23
  * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
24
24
  *
25
+ * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
26
+ *
25
27
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
26
28
  *
27
29
  * @param {string} [userQuery.sortKey] - Optional field to sort by
28
30
  *
29
31
  * @returns {Promise<IProduct[]>} - List of products.
30
32
  */
31
- getProducts(userQuery?: IProductsQuery): Promise<IProduct[]>;
33
+ getProducts(userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
32
34
  /**
33
35
  * Search for all product page objects with pagination that do not have a category.
34
36
  *
@@ -45,13 +47,15 @@ export default class ProductApi extends OneEntry implements IProductApi {
45
47
  *
46
48
  * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
47
49
  *
50
+ * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
51
+ *
48
52
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
49
53
  *
50
54
  * @param {string} [userQuery.sortKey] - Optional field to sort by
51
55
  *
52
56
  * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
53
57
  */
54
- getProductsEmptyPage(userQuery?: IProductsQuery): Promise<any>;
58
+ getProductsEmptyPage(userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
55
59
  /**
56
60
  * Search for all product page objects with pagination for the selected category.
57
61
  *
@@ -70,13 +74,15 @@ export default class ProductApi extends OneEntry implements IProductApi {
70
74
  *
71
75
  * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
72
76
  *
77
+ * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
78
+ *
73
79
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
74
80
  *
75
81
  * @param {string} [userQuery.sortKey] - Optional field to sort by
76
82
  *
77
83
  * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
78
84
  */
79
- getProductsPageById(id: number, userQuery?: IProductsQuery): Promise<any>;
85
+ getProductsPageById(id: number, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
80
86
  /**
81
87
  * Search for all product page objects with pagination for the selected category (by its URL).
82
88
  *
@@ -97,11 +103,13 @@ export default class ProductApi extends OneEntry implements IProductApi {
97
103
  *
98
104
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
99
105
  *
106
+ * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
107
+ *
100
108
  * @param {string} [userQuery.sortKey] - Optional field to sort by
101
109
  *
102
110
  * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
103
111
  */
104
- getProductsPageByUrl(url: string, userQuery?: IProductsQuery): Promise<IProduct[]>;
112
+ getProductsPageByUrl(url: string, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
105
113
  /**
106
114
  * Find all related product page objects.
107
115
  *
@@ -114,62 +122,66 @@ export default class ProductApi extends OneEntry implements IProductApi {
114
122
  *
115
123
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
116
124
  *
125
+ * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
126
+ *
117
127
  * @param {string} [userQuery.sortKey] - Optional field to sort by
118
128
  *
119
129
  * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
120
130
  */
121
- getRelatedProductsById(id: number, userQuery?: IProductsQuery): Promise<any>;
131
+ getRelatedProductsById(id: number, userQuery?: IProductsQuery): Promise<IProductsEntity>;
122
132
  /**
123
133
  * Retrieve one product object.
124
134
  *
125
135
  * @param {number} [id] - Product id.
126
136
  *
127
- * @returns {Promise<IProduct[]>} - Returns ContentIndexedProductDto object for the product.
137
+ * @param {string} [langCode] Language code parameter. Default "en_US"
138
+ *
139
+ * @returns {Promise<IProductsEntity>} - Returns ContentIndexedProductDto object for the product.
128
140
  */
129
- getProductById(id: number): Promise<IProduct>;
141
+ getProductById(id: number, langCode?: string): Promise<IProductsEntity>;
130
142
  /**
131
143
  * Find all product page objects with pagination and multiple filtering.
132
144
  *
133
145
  * @param {array} [data] - Request body.
134
- * Example Value:
135
- * [
146
+ * @example
147
+ * const objects = [
136
148
  * {
137
- * "attributeMarker": "price",
138
- * "conditionMarker": "mth",
139
- * "conditionValue": 1,
140
- * "pageId": 0
141
- * },
149
+ * attributeMarker: "price",
150
+ * conditionMarker: "mth",
151
+ * conditionValue: 1,
152
+ * pageId: 0,
153
+ * }, null, 2},
142
154
  * {
143
- * "attributeMarker": "price",
144
- * "conditionMarker": "lth",
145
- * "conditionValue": 3,
146
- * "pageId": 0
147
- * }
148
- * ]
149
- *
150
- *
155
+ * attributeMarker: "price",
156
+ * conditionMarker: "lth",
157
+ * conditionValue: 3,
158
+ * pageId: 0,
159
+ * }, null, 2},
160
+ * ];
151
161
  * @param {IProductsQuery} [userQuery] - Optional set query parameters.
152
162
  * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
153
163
  *
154
164
  * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
155
165
  *
166
+ * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
167
+ *
156
168
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
157
169
  *
158
170
  * @param {string} [userQuery.sortKey] - Optional field to sort by
159
171
  *
160
172
  * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
161
173
  */
162
- filterProduct(data: Array<IFilterParams>, userQuery?: IProductsQuery): Promise<any>;
174
+ filterProduct(data: Array<IFilterParams>, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
163
175
  /**
164
176
  * Quick search for product page objects with limited output.
165
177
  *
166
178
  * @param {string} [name] - Text to search product page objects (search is based on the title field of the localizeInfos object with language consideration)
167
179
  *
168
- * @param {string} [lang] - Language code
180
+ * @param {string} [langCode] - Language code
169
181
  *
170
182
  * @returns {Promise<IProduct[]>} - Returns array of ContentIndexedProductDto object for the product.
171
183
  */
172
- searchProduct(name: string, lang?: string): Promise<any>;
184
+ searchProduct(name: string, langCode?: string): Promise<Array<IProductsEntity>>;
173
185
  /**
174
186
  * Get all attributes of one Product.
175
187
  *