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