oneentry 1.0.124 → 1.0.125

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 (76) hide show
  1. package/README.md +24 -22
  2. package/dist/admins/adminsApi.d.ts +17 -4
  3. package/dist/admins/adminsApi.js +16 -3
  4. package/dist/admins/adminsInterfaces.d.ts +47 -26
  5. package/dist/attribute-sets/attributeSetsApi.d.ts +10 -18
  6. package/dist/attribute-sets/attributeSetsApi.js +9 -17
  7. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +92 -44
  8. package/dist/auth-provider/authProviderApi.d.ts +146 -36
  9. package/dist/auth-provider/authProviderApi.js +163 -37
  10. package/dist/auth-provider/authProvidersInterfaces.d.ts +189 -40
  11. package/dist/base/asyncModules.d.ts +7 -1
  12. package/dist/base/asyncModules.js +127 -21
  13. package/dist/base/result.js +23 -0
  14. package/dist/base/syncModules.d.ts +4 -0
  15. package/dist/base/syncModules.js +19 -1
  16. package/dist/base/utils.d.ts +1 -1
  17. package/dist/blocks/blocksApi.d.ts +7 -17
  18. package/dist/blocks/blocksApi.js +7 -17
  19. package/dist/blocks/blocksInterfaces.d.ts +77 -32
  20. package/dist/events/eventsApi.d.ts +7 -8
  21. package/dist/events/eventsApi.js +12 -7
  22. package/dist/events/eventsInterfaces.d.ts +16 -11
  23. package/dist/file-uploading/fileUploadingApi.d.ts +22 -14
  24. package/dist/file-uploading/fileUploadingApi.js +20 -12
  25. package/dist/file-uploading/fileUploadingInterfaces.d.ts +42 -18
  26. package/dist/forms/formsApi.d.ts +3 -7
  27. package/dist/forms/formsApi.js +2 -6
  28. package/dist/forms/formsInterfaces.d.ts +44 -28
  29. package/dist/formsData/formsDataApi.d.ts +21 -9
  30. package/dist/formsData/formsDataApi.js +21 -9
  31. package/dist/formsData/formsDataInterfaces.d.ts +128 -45
  32. package/dist/general-types/generalTypesApi.d.ts +1 -3
  33. package/dist/general-types/generalTypesApi.js +0 -2
  34. package/dist/general-types/generalTypesInterfaces.d.ts +2 -4
  35. package/dist/index.d.ts +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/integration-collections/integrationCollectionsApi.d.ts +74 -47
  38. package/dist/integration-collections/integrationCollectionsApi.js +64 -45
  39. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +144 -63
  40. package/dist/locales/localesApi.d.ts +1 -2
  41. package/dist/locales/localesApi.js +1 -2
  42. package/dist/locales/localesInterfaces.d.ts +2 -4
  43. package/dist/menus/menusApi.d.ts +1 -3
  44. package/dist/menus/menusApi.js +1 -3
  45. package/dist/menus/menusInterfaces.d.ts +39 -13
  46. package/dist/orders/ordersApi.d.ts +36 -18
  47. package/dist/orders/ordersApi.js +40 -22
  48. package/dist/orders/ordersInterfaces.d.ts +163 -81
  49. package/dist/pages/pagesApi.d.ts +48 -48
  50. package/dist/pages/pagesApi.js +40 -45
  51. package/dist/pages/pagesInterfaces.d.ts +147 -98
  52. package/dist/payments/paymentsApi.d.ts +25 -45
  53. package/dist/payments/paymentsApi.js +27 -46
  54. package/dist/payments/paymentsInterfaces.d.ts +42 -60
  55. package/dist/product-statuses/productStatusesApi.d.ts +6 -12
  56. package/dist/product-statuses/productStatusesApi.js +5 -11
  57. package/dist/product-statuses/productStatusesInterfaces.d.ts +16 -15
  58. package/dist/products/productsApi.d.ts +256 -104
  59. package/dist/products/productsApi.js +263 -97
  60. package/dist/products/productsInterfaces.d.ts +343 -160
  61. package/dist/system/systemApi.d.ts +21 -10
  62. package/dist/system/systemApi.js +22 -8
  63. package/dist/system/systemInterfaces.d.ts +0 -1
  64. package/dist/templates/templatesApi.d.ts +6 -12
  65. package/dist/templates/templatesApi.js +4 -10
  66. package/dist/templates/templatesInterfaces.d.ts +20 -20
  67. package/dist/templates-preview/templatesPreviewApi.d.ts +2 -6
  68. package/dist/templates-preview/templatesPreviewApi.js +1 -5
  69. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +50 -25
  70. package/dist/users/usersApi.d.ts +33 -13
  71. package/dist/users/usersApi.js +38 -15
  72. package/dist/users/usersInterfaces.d.ts +78 -27
  73. package/dist/web-socket/wsApi.d.ts +1 -5
  74. package/dist/web-socket/wsApi.js +1 -5
  75. package/dist/web-socket/wsInterfaces.d.ts +0 -1
  76. package/package.json +18 -16
@@ -1,4 +1,4 @@
1
- import type { IError } from '../base/utils';
1
+ import type { IError, ILocalizeInfo } from '../base/utils';
2
2
  /**
3
3
  * @interface IProductStatuses
4
4
  *
@@ -6,7 +6,6 @@ import type { IError } from '../base/utils';
6
6
  * @property {function} getProductStatusesById - Search for a product status object by identifier.
7
7
  * @property {function} getProductsByStatusMarker - Search for a product status object by its textual identifier (marker).
8
8
  * @property {function} validateMarker - Check the existence of a textual identifier.
9
- *
10
9
  * @description This interface defines methods for retrieving and managing product statuses in the system.
11
10
  */
12
11
  interface IProductStatuses {
@@ -14,17 +13,15 @@ interface IProductStatuses {
14
13
  * Search for all product status objects.
15
14
  *
16
15
  * @param {string} [langCode] - Language code. Default: "en_US".
17
- *
18
16
  * @return {IProductStatusEntity[]} Returns an array of product status objects.
19
17
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
20
18
  */
21
- getProductStatuses(langCode: string): Promise<Array<IProductStatusEntity> | IError>;
19
+ getProductStatuses(langCode: string): Promise<IProductStatusEntity[] | IError>;
22
20
  /**
23
21
  * Search for a product status object by its textual identifier (marker).
24
22
  *
25
- * @param {string} marker - Product marker. Example: 'in_stock'.
23
+ * @param {string} marker - Product marker. Example: "in_stock".
26
24
  * @param {string} [langCode] - Language code. Default: "en_US".
27
- *
28
25
  * @return {IProductStatusEntity} Returns a product status object.
29
26
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
30
27
  */
@@ -32,8 +29,7 @@ interface IProductStatuses {
32
29
  /**
33
30
  * Check the existence of a textual identifier.
34
31
  *
35
- * @param {string} marker - Product marker. Example: 'in_stock'.
36
- *
32
+ * @param {string} marker - Product marker. Example: "in_stock".
37
33
  * @return {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
38
34
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
39
35
  */
@@ -43,20 +39,25 @@ interface IProductStatuses {
43
39
  * @interface IProductStatusEntity
44
40
  *
45
41
  * @property {number} id - The unique identifier of the position. Example: 12345.
42
+ * @property {string} identifier - The textual identifier for the record field. Example: "in_stock".
43
+ * @property {ILocalizeInfo} localizeInfos - The name of the products statuses, taking into account localization. Example:
44
+ * @property {boolean} isDefault - Default status flag. Example: true.
46
45
  * @property {number} version - The version number of the object. Example: 1.
47
- * @property {string} identifier - The textual identifier for the record field. Example: 'in_stock'.
48
46
  * @property {number} position - Position number. Example: 1.
49
- * @property {Record<string, any>} localizeInfos - The name of the products statuses, taking into account localization. Example: .
50
- * @property {boolean} isDefault - Default status flag. Example: true.
51
- *
47
+ {
48
+ "title": "Catalog",
49
+ "plainContent": "Content for catalog",
50
+ "htmlContent": "<b>Content for catalog</b>",
51
+ "menuTitle": "Catalog"
52
+ }
52
53
  * @description This interface defines the structure of a product status entity, including its identifiers, localization information, position, and default status flag.
53
54
  */
54
55
  interface IProductStatusEntity {
55
56
  id: number;
56
- position: number;
57
- version: number;
58
57
  identifier: string;
59
- localizeInfos: Record<string, any>;
58
+ localizeInfos: ILocalizeInfo;
60
59
  isDefault: boolean;
60
+ version: number;
61
+ position: number;
61
62
  }
62
63
  export type { IProductStatusEntity, IProductStatuses };
@@ -1,7 +1,7 @@
1
1
  import AsyncModules from '../base/asyncModules';
2
2
  import type StateModule from '../base/stateModule';
3
3
  import type { IError } from '../base/utils';
4
- import type { IFilterParams, IProductApi, IProductBlock, IProductEntity, IProductsEntity, IProductsInfo, IProductsQuery, IProductsResponse } from './productsInterfaces';
4
+ import type { IFilterParams, IProductApi, IProductBlock, IProductsCount, IProductsEntity, IProductsInfo, IProductsQuery, IProductsResponse } from './productsInterfaces';
5
5
  /**
6
6
  * Controllers for working with product pages
7
7
  * @handle /api/content/products
@@ -16,48 +16,69 @@ export default class ProductApi extends AsyncModules implements IProductApi {
16
16
  *
17
17
  * @handleName getProducts
18
18
  *
19
- * @param {Array<IFilterParams>} [body] - Request body. Default: []. Example: [ { "attributeMarker": "price", "conditionMarker": "mth", "statusMarker": "waiting", "conditionValue": 1, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" }, { "attributeMarker": "price", "conditionMarker": "lth", "conditionValue": 3, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" } ].
19
+ * @param {IFilterParams[]} [body] - Request body. Default: []. Example:
20
+ [
21
+ {
22
+ "attributeMarker": "price",
23
+ "conditionMarker": "mth",
24
+ "statusMarker": "waiting",
25
+ "conditionValue": 1,
26
+ "pageUrls": [
27
+ "23-laminat-floorwood-maxima"
28
+ ],
29
+ "isNested": false,
30
+ "title": ""
31
+ },
32
+ {
33
+ "attributeMarker": "price",
34
+ "conditionMarker": "lth",
35
+ "conditionValue": 3,
36
+ "pageUrls": [
37
+ "23-laminat-floorwood-maxima"
38
+ ],
39
+ "isNested": false,
40
+ "title": ""
41
+ }
42
+ ]
20
43
  * @param {string} [langCode] - Language code. Default: "en_US".
21
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
22
- *
23
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
24
- * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
25
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
26
- * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
27
- * @param {number} [userQuery.statusId] - Optional parameter - search by status id. Example: 123.
28
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
29
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
30
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
31
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
32
- *
44
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
45
+ {
46
+ "limit": 30,
47
+ "offset": 0,
48
+ "sortOrder": "DESC",
49
+ "sortKey": "id",
50
+ "statusId": 123,
51
+ "statusMarker": "in_stock",
52
+ "conditionValue": "new",
53
+ "conditionMarker": "equals",
54
+ "attributeMarker": "color"
55
+ }
33
56
  * @return {IProductsResponse} Array with ProductEntity objects
34
57
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
35
- *
36
58
  * @description Fetch products with optional filters and pagination.
37
- *
38
59
  */
39
- getProducts(body?: Array<IFilterParams>, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
60
+ getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
40
61
  /**
41
62
  * Search for all product page objects with pagination that do not have a category.
42
63
  *
43
64
  * @handleName getProductsEmptyPage
44
65
  *
45
66
  * @param {string} [langCode] - Language code. Default: "en_US".
46
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
47
- *
48
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 0.
49
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 30.
50
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
51
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
52
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
53
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
54
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
55
- * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
56
- *
67
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
68
+ {
69
+ "limit": 30,
70
+ "offset": 0,
71
+ "sortOrder": "DESC",
72
+ "sortKey": "id",
73
+ "statusId": 123,
74
+ "statusMarker": "in_stock",
75
+ "conditionValue": "new",
76
+ "conditionMarker": "equals",
77
+ "attributeMarker": "color"
78
+ }
57
79
  * @return {IProductsResponse} Array with ProductEntity objects.
58
80
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
59
- *
60
- * @description Fetch products with optional filters and pagination.
81
+ * @description Search for all product page objects with pagination that do not have a category.
61
82
  */
62
83
  getProductsEmptyPage(langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
63
84
  /**
@@ -65,49 +86,71 @@ export default class ProductApi extends AsyncModules implements IProductApi {
65
86
  *
66
87
  * @handleName getProductsByPageId
67
88
  *
68
- * @param {number} id - Page id.
69
- * @param {Array<IFilterParams>} [body] - Request body. Default: []. Example: [ { "attributeMarker": "price", "conditionMarker": "mth", "statusMarker": "waiting", "conditionValue": 1, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" }, { "attributeMarker": "price", "conditionMarker": "lth", "conditionValue": 3, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" } ].
89
+ * @param {number} id - Page id. Example: 2492.
90
+ * @param {IFilterParams[]} [body] - Request body. Default: []. Example:
91
+ [
92
+ {
93
+ "attributeMarker": "price",
94
+ "conditionMarker": "mth",
95
+ "statusMarker": "waiting",
96
+ "conditionValue": 1,
97
+ "pageUrls": [
98
+ "23-laminat-floorwood-maxima"
99
+ ],
100
+ "isNested": false,
101
+ "title": ""
102
+ },
103
+ {
104
+ "attributeMarker": "price",
105
+ "conditionMarker": "lth",
106
+ "conditionValue": 3,
107
+ "pageUrls": [
108
+ "23-laminat-floorwood-maxima"
109
+ ],
110
+ "isNested": false,
111
+ "title": ""
112
+ }
113
+ ]
70
114
  * @param {string} [langCode] - Language code. Default: "en_US".
71
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
72
- *
73
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default is 0.
74
- * @param {number} [userQuery.limit] - Optional parameter for pagination. Default is 30.
75
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
76
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
77
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
78
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
79
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
80
- * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
81
- *
115
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
116
+ {
117
+ "limit": 30,
118
+ "offset": 0,
119
+ "sortOrder": "DESC",
120
+ "sortKey": "id",
121
+ "statusId": 123,
122
+ "statusMarker": "in_stock",
123
+ "conditionValue": "new",
124
+ "conditionMarker": "equals",
125
+ "attributeMarker": "color"
126
+ }
82
127
  * @return {IProductsResponse} Array with ProductEntity objects
83
128
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
84
- *
85
129
  * @description Fetch products by page ID with optional filters and pagination.
86
- *
87
130
  */
88
- getProductsByPageId(id: number, body?: Array<IFilterParams>, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
131
+ getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
89
132
  /**
90
133
  * Search for information about products and prices for the selected category.
91
134
  *
92
135
  * @handleName getProductsPriceByPageUrl
93
136
  *
94
- * @param {string} [url] - Page url. Example: '23-laminat-floorwood-maxima'.
137
+ * @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
95
138
  * @param {string} [langCode] - Language code. Default: "en_US".
96
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
97
- *
98
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
99
- * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
100
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
101
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
102
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
103
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
104
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
105
- * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
106
- *
139
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
140
+ {
141
+ "limit": 30,
142
+ "offset": 0,
143
+ "sortOrder": "DESC",
144
+ "sortKey": "id",
145
+ "statusId": 123,
146
+ "statusMarker": "in_stock",
147
+ "conditionValue": "new",
148
+ "conditionMarker": "equals",
149
+ "attributeMarker": "color"
150
+ }
107
151
  * @return {IProductsInfo} Array with ProductInformation objects.
108
152
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
109
- *
110
- * @description
153
+ * @description Search for information about products and prices for the selected category.
111
154
  */
112
155
  getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsInfo | IError>;
113
156
  /**
@@ -115,27 +158,49 @@ export default class ProductApi extends AsyncModules implements IProductApi {
115
158
  *
116
159
  * @handleName getProductsByPageUrl
117
160
  *
118
- * @param {string} url - Page url.
119
- * @param {Array<IFilterParams>} [body] - Request body. Default: []. Example: [ { "attributeMarker": "price", "conditionMarker": "mth", "statusMarker": "waiting", "conditionValue": 1, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" }, { "attributeMarker": "price", "conditionMarker": "lth", "conditionValue": 3, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" } ].
161
+ * @param {string} url - Page url. Example: "catalog".
162
+ * @param {IFilterParams[]} [body] - Request body. Default: []. Example:
163
+ [
164
+ {
165
+ "attributeMarker": "price",
166
+ "conditionMarker": "mth",
167
+ "statusMarker": "waiting",
168
+ "conditionValue": 1,
169
+ "pageUrls": [
170
+ "23-laminat-floorwood-maxima"
171
+ ],
172
+ "isNested": false,
173
+ "title": ""
174
+ },
175
+ {
176
+ "attributeMarker": "price",
177
+ "conditionMarker": "lth",
178
+ "conditionValue": 3,
179
+ "pageUrls": [
180
+ "23-laminat-floorwood-maxima"
181
+ ],
182
+ "isNested": false,
183
+ "title": ""
184
+ }
185
+ ]
120
186
  * @param {string} [langCode] - Language code. Default: "en_US".
121
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
122
- *
123
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
124
- * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
125
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
126
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
127
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
128
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
129
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
130
- * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
131
- *
187
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
188
+ {
189
+ "limit": 30,
190
+ "offset": 0,
191
+ "sortOrder": "DESC",
192
+ "sortKey": "id",
193
+ "statusId": 123,
194
+ "statusMarker": "in_stock",
195
+ "conditionValue": "new",
196
+ "conditionMarker": "equals",
197
+ "attributeMarker": "color"
198
+ }
132
199
  * @return {IProductsResponse} Array with ProductEntity objects.
133
200
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
134
- *
135
201
  * @description Search for all products with pagination for the selected category.
136
- *
137
202
  */
138
- getProductsByPageUrl(url: string, body?: Array<IFilterParams>, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
203
+ getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
139
204
  /**
140
205
  * Find all related product page objects.
141
206
  *
@@ -143,16 +208,25 @@ export default class ProductApi extends AsyncModules implements IProductApi {
143
208
  *
144
209
  * @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
145
210
  * @param {string} [langCode] - Language code. Default: "en_US".
146
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example: { offset: 0, limit: 30, sortOrder: 'DESC', sortKey: 'id' }.
147
- *
148
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
211
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
212
+ {
213
+ "limit": 30,
214
+ "offset": 0,
215
+ "sortOrder": "DESC",
216
+ "sortKey": "id",
217
+ "statusId": 123,
218
+ "statusMarker": "in_stock",
219
+ "conditionValue": "new",
220
+ "conditionMarker": "equals",
221
+ "attributeMarker": "color"
222
+ }
149
223
  * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
150
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
151
- * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
224
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
225
+ * @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
226
+ * @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
152
227
  *
153
228
  * @return {IProductsResponse} Array with ProductEntity objects
154
229
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
155
- *
156
230
  * @description Find all related product page objects.
157
231
  */
158
232
  getRelatedProductsById(id: number, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
@@ -161,21 +235,34 @@ export default class ProductApi extends AsyncModules implements IProductApi {
161
235
  *
162
236
  * @handleName getProductsByIds
163
237
  *
164
- * @param {string} [ids] - Product page identifiers for which to find relationships. Example: '12345,67890'.
238
+ * @param {string} [ids] - Product page identifiers for which to find relationships. Example: "12345,67890".
165
239
  * @param {string} [langCode] - Language code. Default "en_US".
166
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example: { offset: 0, limit: 30, sortOrder: 'DESC', sortKey: 'id' }.
167
- *
168
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
240
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
241
+ {
242
+ "limit": 30,
243
+ "offset": 0,
244
+ "sortOrder": "DESC",
245
+ "sortKey": "id",
246
+ "statusId": 123,
247
+ "statusMarker": "in_stock",
248
+ "conditionValue": "new",
249
+ "conditionMarker": "equals",
250
+ "attributeMarker": "color"
251
+ }
169
252
  * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
170
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
171
- * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
172
- *
173
- * @return {IProductEntity[]} Array with ProductEntity objects
253
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
254
+ * @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
255
+ * @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
256
+ * @param {number} [userQuery.statusId] - Optional parameter - search by status id. Example: 123.
257
+ * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: "in_stock".
258
+ * @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: "new".
259
+ * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: "equals".
260
+ * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: "color".
261
+ * @return {IProductsEntity[]} Array with ProductEntity objects
174
262
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
175
- *
176
263
  * @description Find products by its ids.
177
264
  */
178
- getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsQuery): Promise<Array<IProductEntity> | IError>;
265
+ getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsEntity[] | IError>;
179
266
  /**
180
267
  * Retrieve one product object.
181
268
  *
@@ -183,38 +270,103 @@ export default class ProductApi extends AsyncModules implements IProductApi {
183
270
  *
184
271
  * @param {number} [id] - Product id. Example: 12345.
185
272
  * @param {string} [langCode] - Language code. Default: "en_US".
186
- *
187
- * @return {IProductEntity} ProductEntity object.
273
+ * @return {IProductsEntity} ProductEntity object.
188
274
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
189
- *
190
275
  * @description Retrieve one product object.
191
276
  */
192
- getProductById(id: number, langCode?: string): Promise<IProductEntity | IError>;
277
+ getProductById(id: number, langCode?: string): Promise<IProductsEntity | IError>;
193
278
  /**
194
279
  * Getting a product block object by product id.
195
280
  *
196
281
  * @handleName getProductBlockById
197
282
  *
198
283
  * @param {number} id - Product id. Example: 12345.
199
- *
200
- * @return {IProductBlock}
284
+ * @return {IProductBlock} - Product block object.
201
285
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
202
- *
203
286
  * @description Getting a product block object by product id.
204
287
  */
205
- getProductBlockById(id: number): Promise<Array<IProductBlock> | IError>;
288
+ getProductBlockById(id: number): Promise<IProductBlock[] | IError>;
206
289
  /**
207
290
  * Quick search for product page objects with limited output.
208
291
  *
209
292
  * @handleName searchProduct
210
293
  *
211
- * @param {string} name - Text to search product page objects (search is based on the title field of the localizeInfos object with language consideration). Example: 'laminat'.
294
+ * @param {string} name - Text to search product page objects (search is based on the title field of the localizeInfos object with language consideration). Example: "laminat".
212
295
  * @param {string} [langCode] - Language code. Default: "en_US".
213
- *
214
296
  * @return {IProductsEntity[]} Array with ProductEntity objects
215
297
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
216
- *
217
298
  * @description Quick search for product page objects with limited output.
218
299
  */
219
- searchProduct(name: string, langCode?: string): Promise<Array<IProductsEntity> | IError>;
300
+ searchProduct(name: string, langCode?: string): Promise<IProductsEntity[] | IError>;
301
+ /**
302
+ * Getting the number of products for the entire catalog.
303
+ *
304
+ * @handleName getProductsCount
305
+ *
306
+ * @param {any[]} body - Body parameters for filter. Deault: []. Example:
307
+ [
308
+ {
309
+ "attributeMarker": "price",
310
+ "conditionMarker": "in",
311
+ "statusMarker": "status_1",
312
+ "conditionValue": {},
313
+ "pageUrls": [
314
+ "23-laminat-floorwood-maxima"
315
+ ],
316
+ "title": "Iphone 17 Pro"
317
+ }
318
+ ]
319
+ * @return {IProductsCount} Object with product items count.
320
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
321
+ * @description This method calculates and returns the total number of products present across the entire catalog, optionally applying specified filters.
322
+ */
323
+ getProductsCount(body?: any[]): Promise<IProductsCount | IError>;
324
+ /**
325
+ * Getting the number of products on a catalog page by page ID.
326
+ *
327
+ * @handleName getProductsCountByPageId
328
+ *
329
+ * @param {string} id
330
+ * @param {any[]} body - Body parameters for filter. Deault: []. Example:
331
+ [
332
+ {
333
+ "attributeMarker": "price",
334
+ "conditionMarker": "in",
335
+ "statusMarker": "status_1",
336
+ "conditionValue": {},
337
+ "pageUrls": [
338
+ "23-laminat-floorwood-maxima"
339
+ ],
340
+ "title": "Iphone 17 Pro"
341
+ }
342
+ ]
343
+ * @return {IProductsCount} Object with product items count.
344
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
345
+ * @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
346
+ */
347
+ getProductsCountByPageId(id: string, body?: any[]): Promise<IProductsCount | IError>;
348
+ /**
349
+ * Getting the number of products for the catalog page by page url.
350
+ *
351
+ * @handleName getProductsCountByPageUrl
352
+ *
353
+ * @param {string} url -
354
+ * @param {any[]} body - Body parameters for filter. Deault: []. Example:
355
+ [
356
+ {
357
+ "attributeMarker": "price",
358
+ "conditionMarker": "in",
359
+ "statusMarker": "status_1",
360
+ "conditionValue": {},
361
+ "pageUrls": [
362
+ "23-laminat-floorwood-maxima"
363
+ ],
364
+ "title": "Iphone 17 Pro"
365
+ }
366
+ ]
367
+ * @return {IProductsCount} Object with product items count.
368
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
369
+ * @description This method calculates and returns the number of products available on a given catalog page, identified by its URL, with optional filtering.
370
+ */
371
+ getProductsCountByPageUrl(url: string, body?: any[]): Promise<IProductsCount | IError>;
220
372
  }