oneentry 1.0.159 → 1.0.161

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 (222) hide show
  1. package/README.md +2 -0
  2. package/changelog.md +56 -1
  3. package/dist/admins/adminsApi.d.ts +15 -1
  4. package/dist/admins/adminsApi.js +29 -0
  5. package/dist/admins/adminsInterfaces.d.ts +37 -1
  6. package/dist/base/lazySchema.d.ts +15 -0
  7. package/dist/base/lazySchema.js +20 -0
  8. package/dist/discounts/discountsApi.d.ts +14 -1
  9. package/dist/discounts/discountsApi.js +21 -0
  10. package/dist/discounts/discountsInterfaces.d.ts +27 -1
  11. package/dist/filters/filtersInterfaces.d.ts +2 -2
  12. package/dist/filters/filtersSchemas.d.ts +1 -1
  13. package/dist/filters/filtersSchemas.js +4 -1
  14. package/dist/forms-data/formsDataApi.d.ts +14 -1
  15. package/dist/forms-data/formsDataApi.js +21 -0
  16. package/dist/forms-data/formsDataInterfaces.d.ts +74 -1
  17. package/dist/index.d.ts +4 -0
  18. package/dist/index.js +3 -0
  19. package/dist/orders/ordersApi.d.ts +15 -1
  20. package/dist/orders/ordersApi.js +22 -0
  21. package/dist/orders/ordersInterfaces.d.ts +27 -1
  22. package/dist/pages/pagesApi.d.ts +14 -1
  23. package/dist/pages/pagesApi.js +21 -0
  24. package/dist/pages/pagesInterfaces.d.ts +38 -1
  25. package/dist/payments/paymentsInterfaces.d.ts +2 -2
  26. package/dist/products/productsInterfaces.d.ts +1 -1
  27. package/dist/search/searchApi.d.ts +35 -0
  28. package/dist/search/searchApi.js +86 -0
  29. package/dist/search/searchInterfaces.d.ts +94 -0
  30. package/dist/search/searchInterfaces.js +2 -0
  31. package/dist/search/searchSchemas.d.ts +73 -0
  32. package/dist/search/searchSchemas.js +44 -0
  33. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +0 -2
  34. package/dist/templates-preview/templatesPreviewSchemas.d.ts +0 -2
  35. package/dist/templates-preview/templatesPreviewSchemas.js +0 -1
  36. package/dist/types.d.ts +35 -0
  37. package/dist/types.js +2 -0
  38. package/dist/users/usersApi.d.ts +15 -1
  39. package/dist/users/usersApi.js +22 -0
  40. package/dist/users/usersInterfaces.d.ts +39 -1
  41. package/dist/web-socket/lazySocket.d.ts +18 -0
  42. package/dist/web-socket/lazySocket.js +70 -0
  43. package/esm/admins/adminsApi.d.ts +66 -0
  44. package/esm/admins/adminsApi.js +90 -0
  45. package/esm/admins/adminsInterfaces.d.ts +137 -0
  46. package/esm/admins/adminsInterfaces.js +1 -0
  47. package/esm/admins/adminsSchemas.d.ts +48 -0
  48. package/esm/admins/adminsSchemas.js +31 -0
  49. package/esm/attribute-sets/attributeSetsApi.d.ts +67 -0
  50. package/esm/attribute-sets/attributeSetsApi.js +97 -0
  51. package/esm/attribute-sets/attributeSetsInterfaces.d.ts +285 -0
  52. package/esm/attribute-sets/attributeSetsInterfaces.js +1 -0
  53. package/esm/attribute-sets/attributeSetsSchemas.d.ts +84 -0
  54. package/esm/attribute-sets/attributeSetsSchemas.js +66 -0
  55. package/esm/auth-provider/authProviderApi.d.ts +262 -0
  56. package/esm/auth-provider/authProviderApi.js +362 -0
  57. package/esm/auth-provider/authProviderSchemas.d.ts +124 -0
  58. package/esm/auth-provider/authProviderSchemas.js +92 -0
  59. package/esm/auth-provider/authProvidersInterfaces.d.ts +430 -0
  60. package/esm/auth-provider/authProvidersInterfaces.js +1 -0
  61. package/esm/base/asyncModules.d.ts +123 -0
  62. package/esm/base/asyncModules.js +382 -0
  63. package/esm/base/lazySchema.d.ts +15 -0
  64. package/esm/base/lazySchema.js +17 -0
  65. package/esm/base/stateModule.d.ts +35 -0
  66. package/esm/base/stateModule.js +51 -0
  67. package/esm/base/syncModules.d.ts +245 -0
  68. package/esm/base/syncModules.js +555 -0
  69. package/esm/base/timeIntervals.d.ts +95 -0
  70. package/esm/base/timeIntervals.js +317 -0
  71. package/esm/base/utils.d.ts +354 -0
  72. package/esm/base/utils.js +1 -0
  73. package/esm/base/validation.d.ts +98 -0
  74. package/esm/base/validation.js +118 -0
  75. package/esm/blocks/blocksApi.d.ts +252 -0
  76. package/esm/blocks/blocksApi.js +394 -0
  77. package/esm/blocks/blocksInterfaces.d.ts +361 -0
  78. package/esm/blocks/blocksInterfaces.js +1 -0
  79. package/esm/blocks/blocksSchemas.d.ts +213 -0
  80. package/esm/blocks/blocksSchemas.js +40 -0
  81. package/esm/discounts/discountsApi.d.ts +94 -0
  82. package/esm/discounts/discountsApi.js +136 -0
  83. package/esm/discounts/discountsInterfaces.d.ts +293 -0
  84. package/esm/discounts/discountsInterfaces.js +1 -0
  85. package/esm/events/eventsApi.d.ts +108 -0
  86. package/esm/events/eventsApi.js +141 -0
  87. package/esm/events/eventsInterfaces.d.ts +176 -0
  88. package/esm/events/eventsInterfaces.js +1 -0
  89. package/esm/file-uploading/fileUploadingApi.d.ts +91 -0
  90. package/esm/file-uploading/fileUploadingApi.js +127 -0
  91. package/esm/file-uploading/fileUploadingInterfaces.d.ts +116 -0
  92. package/esm/file-uploading/fileUploadingInterfaces.js +1 -0
  93. package/esm/file-uploading/fileUploadingSchemas.d.ts +24 -0
  94. package/esm/file-uploading/fileUploadingSchemas.js +19 -0
  95. package/esm/filters/filtersApi.d.ts +32 -0
  96. package/esm/filters/filtersApi.js +36 -0
  97. package/esm/filters/filtersInterfaces.d.ts +56 -0
  98. package/esm/filters/filtersInterfaces.js +1 -0
  99. package/esm/filters/filtersSchemas.d.ts +32 -0
  100. package/esm/filters/filtersSchemas.js +29 -0
  101. package/esm/forms/formsApi.d.ts +44 -0
  102. package/esm/forms/formsApi.js +54 -0
  103. package/esm/forms/formsInterfaces.d.ts +237 -0
  104. package/esm/forms/formsInterfaces.js +1 -0
  105. package/esm/forms/formsSchemas.d.ts +56 -0
  106. package/esm/forms/formsSchemas.js +32 -0
  107. package/esm/forms-data/formsDataApi.d.ts +124 -0
  108. package/esm/forms-data/formsDataApi.js +210 -0
  109. package/esm/forms-data/formsDataInterfaces.d.ts +670 -0
  110. package/esm/forms-data/formsDataInterfaces.js +1 -0
  111. package/esm/forms-data/formsDataSchemas.d.ts +107 -0
  112. package/esm/forms-data/formsDataSchemas.js +83 -0
  113. package/esm/general-types/generalTypesApi.d.ts +29 -0
  114. package/esm/general-types/generalTypesApi.js +34 -0
  115. package/esm/general-types/generalTypesInterfaces.d.ts +29 -0
  116. package/esm/general-types/generalTypesInterfaces.js +1 -0
  117. package/esm/general-types/generalTypesSchemas.d.ts +68 -0
  118. package/esm/general-types/generalTypesSchemas.js +42 -0
  119. package/esm/index.d.ts +143 -0
  120. package/esm/index.js +124 -0
  121. package/esm/integration-collections/integrationCollectionsApi.d.ts +172 -0
  122. package/esm/integration-collections/integrationCollectionsApi.js +224 -0
  123. package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +317 -0
  124. package/esm/integration-collections/integrationCollectionsInterfaces.js +1 -0
  125. package/esm/integration-collections/integrationCollectionsSchemas.d.ts +84 -0
  126. package/esm/integration-collections/integrationCollectionsSchemas.js +60 -0
  127. package/esm/locales/localesApi.d.ts +28 -0
  128. package/esm/locales/localesApi.js +33 -0
  129. package/esm/locales/localesInterfaces.d.ts +40 -0
  130. package/esm/locales/localesInterfaces.js +1 -0
  131. package/esm/locales/localesSchemas.d.ts +32 -0
  132. package/esm/locales/localesSchemas.js +23 -0
  133. package/esm/menus/menusApi.d.ts +30 -0
  134. package/esm/menus/menusApi.js +35 -0
  135. package/esm/menus/menusInterfaces.d.ts +87 -0
  136. package/esm/menus/menusInterfaces.js +2 -0
  137. package/esm/menus/menusSchemas.d.ts +16 -0
  138. package/esm/menus/menusSchemas.js +25 -0
  139. package/esm/orders/ordersApi.d.ts +213 -0
  140. package/esm/orders/ordersApi.js +288 -0
  141. package/esm/orders/ordersInterfaces.d.ts +763 -0
  142. package/esm/orders/ordersInterfaces.js +1 -0
  143. package/esm/orders/ordersSchemas.d.ts +312 -0
  144. package/esm/orders/ordersSchemas.js +171 -0
  145. package/esm/package.json +4 -0
  146. package/esm/pages/pagesApi.d.ts +173 -0
  147. package/esm/pages/pagesApi.js +414 -0
  148. package/esm/pages/pagesInterfaces.d.ts +344 -0
  149. package/esm/pages/pagesInterfaces.js +1 -0
  150. package/esm/pages/pagesSchemas.d.ts +121 -0
  151. package/esm/pages/pagesSchemas.js +60 -0
  152. package/esm/payments/paymentsApi.d.ts +88 -0
  153. package/esm/payments/paymentsApi.js +122 -0
  154. package/esm/payments/paymentsInterfaces.d.ts +189 -0
  155. package/esm/payments/paymentsInterfaces.js +1 -0
  156. package/esm/payments/paymentsSchemas.d.ts +94 -0
  157. package/esm/payments/paymentsSchemas.js +53 -0
  158. package/esm/product-statuses/productStatusesApi.d.ts +50 -0
  159. package/esm/product-statuses/productStatusesApi.js +68 -0
  160. package/esm/product-statuses/productStatusesInterfaces.d.ts +62 -0
  161. package/esm/product-statuses/productStatusesInterfaces.js +1 -0
  162. package/esm/product-statuses/productStatusesSchemas.d.ts +34 -0
  163. package/esm/product-statuses/productStatusesSchemas.js +27 -0
  164. package/esm/products/productsApi.d.ts +366 -0
  165. package/esm/products/productsApi.js +468 -0
  166. package/esm/products/productsInterfaces.d.ts +723 -0
  167. package/esm/products/productsInterfaces.js +1 -0
  168. package/esm/products/productsSchemas.d.ts +234 -0
  169. package/esm/products/productsSchemas.js +121 -0
  170. package/esm/search/searchApi.d.ts +35 -0
  171. package/esm/search/searchApi.js +47 -0
  172. package/esm/search/searchInterfaces.d.ts +94 -0
  173. package/esm/search/searchInterfaces.js +1 -0
  174. package/esm/search/searchSchemas.d.ts +73 -0
  175. package/esm/search/searchSchemas.js +41 -0
  176. package/esm/sitemap/sitemapApi.d.ts +37 -0
  177. package/esm/sitemap/sitemapApi.js +41 -0
  178. package/esm/sitemap/sitemapInterfaces.d.ts +51 -0
  179. package/esm/sitemap/sitemapInterfaces.js +1 -0
  180. package/esm/subscriptions/subscriptionsApi.d.ts +74 -0
  181. package/esm/subscriptions/subscriptionsApi.js +90 -0
  182. package/esm/subscriptions/subscriptionsInterfaces.d.ts +111 -0
  183. package/esm/subscriptions/subscriptionsInterfaces.js +1 -0
  184. package/esm/subscriptions/subscriptionsSchemas.d.ts +46 -0
  185. package/esm/subscriptions/subscriptionsSchemas.js +38 -0
  186. package/esm/system/systemApi.d.ts +46 -0
  187. package/esm/system/systemApi.js +53 -0
  188. package/esm/system/systemInterfaces.d.ts +29 -0
  189. package/esm/system/systemInterfaces.js +1 -0
  190. package/esm/templates/templatesApi.d.ts +53 -0
  191. package/esm/templates/templatesApi.js +78 -0
  192. package/esm/templates/templatesInterfaces.d.ts +68 -0
  193. package/esm/templates/templatesInterfaces.js +1 -0
  194. package/esm/templates/templatesSchemas.d.ts +48 -0
  195. package/esm/templates/templatesSchemas.js +28 -0
  196. package/esm/templates-preview/templatesPreviewApi.d.ts +40 -0
  197. package/esm/templates-preview/templatesPreviewApi.js +50 -0
  198. package/esm/templates-preview/templatesPreviewInterfaces.d.ts +129 -0
  199. package/esm/templates-preview/templatesPreviewInterfaces.js +1 -0
  200. package/esm/templates-preview/templatesPreviewSchemas.d.ts +79 -0
  201. package/esm/templates-preview/templatesPreviewSchemas.js +43 -0
  202. package/esm/types.d.ts +35 -0
  203. package/esm/types.js +1 -0
  204. package/esm/user-activity/userActivityApi.d.ts +31 -0
  205. package/esm/user-activity/userActivityApi.js +37 -0
  206. package/esm/user-activity/userActivityInterfaces.d.ts +42 -0
  207. package/esm/user-activity/userActivityInterfaces.js +1 -0
  208. package/esm/users/usersApi.d.ts +249 -0
  209. package/esm/users/usersApi.js +312 -0
  210. package/esm/users/usersInterfaces.d.ts +419 -0
  211. package/esm/users/usersInterfaces.js +1 -0
  212. package/esm/users/usersSchemas.d.ts +72 -0
  213. package/esm/users/usersSchemas.js +55 -0
  214. package/esm/web-socket/lazySocket.d.ts +18 -0
  215. package/esm/web-socket/lazySocket.js +67 -0
  216. package/esm/web-socket/wsApi.d.ts +27 -0
  217. package/esm/web-socket/wsApi.js +43 -0
  218. package/esm/web-socket/wsInterfaces.d.ts +16 -0
  219. package/esm/web-socket/wsInterfaces.js +1 -0
  220. package/package.json +47 -2
  221. package/types.d.ts +1 -0
  222. package/types.js +1 -0
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Validation schemas for ProductStatuses module
3
+ * @description Zod schemas for validating product statuses-related API responses
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Product status entity schema
8
+ * Includes all fields returned by the API
9
+ */
10
+ export declare const ProductStatusEntitySchema: z.ZodObject<{
11
+ id: z.ZodNumber;
12
+ identifier: z.ZodString;
13
+ localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
14
+ isDefault: z.ZodBoolean;
15
+ version: z.ZodNumber;
16
+ position: z.ZodNumber;
17
+ }, z.core.$strip>;
18
+ /**
19
+ * Product statuses response schema (array of product statuses)
20
+ */
21
+ export declare const ProductStatusesResponseSchema: z.ZodArray<z.ZodObject<{
22
+ id: z.ZodNumber;
23
+ identifier: z.ZodString;
24
+ localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
25
+ isDefault: z.ZodBoolean;
26
+ version: z.ZodNumber;
27
+ position: z.ZodNumber;
28
+ }, z.core.$strip>>;
29
+ /**
30
+ * Validate marker response schema (object with valid property)
31
+ */
32
+ export declare const ValidateMarkerResponseSchema: z.ZodObject<{
33
+ valid: z.ZodBoolean;
34
+ }, z.core.$strip>;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Validation schemas for ProductStatuses module
3
+ * @description Zod schemas for validating product statuses-related API responses
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Product status entity schema
8
+ * Includes all fields returned by the API
9
+ */
10
+ export const ProductStatusEntitySchema = z.object({
11
+ id: z.number(),
12
+ identifier: z.string(),
13
+ localizeInfos: z.record(z.string(), z.any()),
14
+ isDefault: z.boolean(),
15
+ version: z.number(),
16
+ position: z.number(),
17
+ });
18
+ /**
19
+ * Product statuses response schema (array of product statuses)
20
+ */
21
+ export const ProductStatusesResponseSchema = z.array(ProductStatusEntitySchema);
22
+ /**
23
+ * Validate marker response schema (object with valid property)
24
+ */
25
+ export const ValidateMarkerResponseSchema = z.object({
26
+ valid: z.boolean(),
27
+ });
@@ -0,0 +1,366 @@
1
+ import AsyncModules from '../base/asyncModules.js';
2
+ import type StateModule from '../base/stateModule.js';
3
+ import type { IError } from '../base/utils.js';
4
+ import type { IAggregatedProductGroup, IFilterParams, IProductBlock, IProductsApi, IProductsByIdsQuery, IProductsCount, IProductSearchResult, IProductsEntity, IProductsInfo, IProductsPriceQuery, IProductsQueryBase, IProductsRelatedQuery, IProductsResponse, IVectorSearchProducts } from './productsInterfaces.js';
5
+ /**
6
+ * Controllers for working with product pages
7
+ * @handle /api/content/products
8
+ * @description Controllers for working with product pages
9
+ */
10
+ export default class ProductsApi extends AsyncModules implements IProductsApi {
11
+ protected state: StateModule;
12
+ protected _url: string;
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - StateModule instance
16
+ * @description Constructor initializes the ProductsApi with a given state.
17
+ */
18
+ constructor(state: StateModule);
19
+ /**
20
+ * Search for all products with pagination and filter.
21
+ * @handleName getProducts
22
+ * @param {IFilterParams[]} [body] - Request body. Default: [].
23
+ * @example
24
+ [
25
+ {
26
+ "attributeMarker": "price",
27
+ "conditionMarker": "mth",
28
+ "statusMarker": "waiting",
29
+ "conditionValue": 1,
30
+ "pageUrls": [
31
+ "23-laminat-floorwood-maxima"
32
+ ],
33
+ "isNested": false,
34
+ "title": ""
35
+ },
36
+ {
37
+ "attributeMarker": "price",
38
+ "conditionMarker": "lth",
39
+ "conditionValue": 3,
40
+ "pageUrls": [
41
+ "23-laminat-floorwood-maxima"
42
+ ],
43
+ "isNested": false,
44
+ "title": ""
45
+ }
46
+ ]
47
+ * @param {string} [langCode] - Language code. Default: "en_US".
48
+ * @param {IProductsQueryBase} [userQuery] - Optional set query parameters.
49
+ * @example
50
+ {
51
+ "limit": 30,
52
+ "offset": 0,
53
+ "sortOrder": "DESC",
54
+ "sortKey": "id",
55
+ "signPrice": "orders"
56
+ }
57
+ * @param {string} [userQuery.signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time. Example: "orders_storage".
58
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/#Fixing-the-price-signPrice Fixing the price} documentation.
59
+ * @param {string} [userQuery.sortOrder] - Sorting order parameter.
60
+ * @returns {Promise<IProductsResponse | IError>} Products response, or IError when isShell=true
61
+ * @throws {IError} When isShell=false and an error occurs during the fetch
62
+ * @description Fetch products with optional filters and pagination.
63
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProducts getProducts} documentation.
64
+ */
65
+ getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQueryBase): Promise<IProductsResponse | IError>;
66
+ /**
67
+ * Search for all product page objects with pagination (and aggregation) that do not have a category.
68
+ * @handleName getProductsEmptyPage
69
+ * @param {object} [body] - Request body. Default: {}.
70
+ * @param {string} [langCode] - Language code. Default: "en_US".
71
+ * @param {IProductsQueryBase} [userQuery] - Optional set query parameters.
72
+ * @example
73
+ {
74
+ "limit": 30,
75
+ "offset": 0,
76
+ "sortOrder": "DESC",
77
+ "sortKey": "id",
78
+ "signPrice": "orders"
79
+ }
80
+ * @returns {Promise<IAggregatedProductGroup[] | IError>} Array with AggregatedProductGroup objects.
81
+ * @throws {IError} When isShell=false and an error occurs during the fetch
82
+ * @description Search for all product page objects with pagination (and aggregation) that do not have a category.
83
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsEmptyPage getProductsEmptyPage} documentation.
84
+ */
85
+ getProductsEmptyPage(body?: object, langCode?: string, userQuery?: IProductsQueryBase): Promise<IAggregatedProductGroup[] | IError>;
86
+ /**
87
+ * Search for all products with pagination for the selected category.
88
+ * @handleName getProductsByPageId
89
+ * @param {number} id - Page id. Example: 2492.
90
+ * @param {IFilterParams[]} [body] - Request body. Default: [].
91
+ * @example
92
+ [
93
+ {
94
+ "attributeMarker": "price",
95
+ "conditionMarker": "mth",
96
+ "statusMarker": "waiting",
97
+ "conditionValue": 1,
98
+ "pageUrls": [
99
+ "23-laminat-floorwood-maxima"
100
+ ],
101
+ "isNested": false,
102
+ "title": ""
103
+ },
104
+ {
105
+ "attributeMarker": "price",
106
+ "conditionMarker": "lth",
107
+ "conditionValue": 3,
108
+ "pageUrls": [
109
+ "23-laminat-floorwood-maxima"
110
+ ],
111
+ "isNested": false,
112
+ "title": ""
113
+ }
114
+ ]
115
+ * @param {string} [langCode] - Language code. Default: "en_US".
116
+ * @param {IProductsQueryBase} [userQuery] - Optional set query parameters.
117
+ * @example
118
+ {
119
+ "limit": 30,
120
+ "offset": 0,
121
+ "sortOrder": "DESC",
122
+ "sortKey": "id",
123
+ "signPrice": "orders"
124
+ }
125
+ * @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects
126
+ * @throws {IError} When isShell=false and an error occurs during the fetch
127
+ * @description Fetch products by page ID with optional filters and pagination.
128
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByPageId getProductsByPageId} documentation.
129
+ */
130
+ getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQueryBase): Promise<IProductsResponse | IError>;
131
+ /**
132
+ * Search for information about products and prices for the selected category.
133
+ * @handleName getProductsPriceByPageUrl
134
+ * @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
135
+ * @param {string} [langCode] - Language code. Default: "en_US".
136
+ * @param {IProductsPriceQuery} [userQuery] - Optional set query parameters.
137
+ * @example
138
+ {
139
+ "limit": 30,
140
+ "offset": 0,
141
+ "sortOrder": "DESC",
142
+ "signPrice": "orders",
143
+ "statusMarker": "in_stock"
144
+ }
145
+ * @returns {Promise<IProductsInfo | IError>} Array with ProductInformation objects.
146
+ * @throws {IError} When isShell=false and an error occurs during the fetch
147
+ * @description Search for information about products and prices for the selected category.
148
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsPriceByPageUrl getProductsPriceByPageUrl} documentation.
149
+ */
150
+ getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?: IProductsPriceQuery): Promise<IProductsInfo | IError>;
151
+ /**
152
+ * Search for all products with pagination for the selected category.
153
+ * @handleName getProductsByPageUrl
154
+ * @param {string} url - Page url. Example: "catalog".
155
+ * @param {IFilterParams[]} [body] - Request body. Default: [].
156
+ * @example
157
+ [
158
+ {
159
+ "attributeMarker": "price",
160
+ "conditionMarker": "mth",
161
+ "statusMarker": "waiting",
162
+ "conditionValue": 1,
163
+ "pageUrls": [
164
+ "23-laminat-floorwood-maxima"
165
+ ],
166
+ "isNested": false,
167
+ "title": ""
168
+ },
169
+ {
170
+ "attributeMarker": "price",
171
+ "conditionMarker": "lth",
172
+ "conditionValue": 3,
173
+ "pageUrls": [
174
+ "23-laminat-floorwood-maxima"
175
+ ],
176
+ "isNested": false,
177
+ "title": ""
178
+ }
179
+ ]
180
+ * @param {string} [langCode] - Language code. Default: "en_US".
181
+ * @param {IProductsQueryBase} [userQuery] - Optional set query parameters.
182
+ * @example
183
+ {
184
+ "limit": 30,
185
+ "offset": 0,
186
+ "sortOrder": "DESC",
187
+ "sortKey": "id",
188
+ "signPrice": "orders"
189
+ }
190
+ * @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects.
191
+ * @throws {IError} When isShell=false and an error occurs during the fetch
192
+ * @description Search for all products with pagination for the selected category.
193
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByPageUrl getProductsByPageUrl} documentation.
194
+ */
195
+ getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQueryBase): Promise<IProductsResponse | IError>;
196
+ /**
197
+ * Find all related product page objects.
198
+ * @handleName getRelatedProductsById
199
+ * @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
200
+ * @param {string} [langCode] - Language code. Default: "en_US".
201
+ * @param {IProductsRelatedQuery} [userQuery] - Optional set query parameters.
202
+ * @example
203
+ {
204
+ "limit": 30,
205
+ "offset": 0,
206
+ "sortOrder": "DESC",
207
+ "sortKey": "id",
208
+ "signPrice": "orders",
209
+ "statusMarker": "in_stock",
210
+ "templateMarker": "template_12345"
211
+ }
212
+ * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
213
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
214
+ * @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
215
+ * @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
216
+ * @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects
217
+ * @throws {IError} When isShell=false and an error occurs during the fetch
218
+ * @description Find all related product page objects.
219
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getRelatedProductsById getRelatedProductsById} documentation.
220
+ */
221
+ getRelatedProductsById(id: number, langCode?: string, userQuery?: IProductsRelatedQuery): Promise<IProductsResponse | IError>;
222
+ /**
223
+ * Find products by its ids.
224
+ * @handleName getProductsByIds
225
+ * @param {string} ids - Product page identifiers for which to find relationships. Example: "12345,67890".
226
+ * @param {string} [langCode] - Language code. Default "en_US".
227
+ * @param {IProductsByIdsQuery} [userQuery] - Optional set query parameters.
228
+ * @example
229
+ {
230
+ "limit": 30,
231
+ "offset": 0,
232
+ "signPrice": "orders"
233
+ }
234
+ * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
235
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
236
+ * @param {string} [userQuery.signPrice] - Order storage marker for price fixing.
237
+ * @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
238
+ * @throws {IError} When isShell=false and an error occurs during the fetch
239
+ * @description Find products by its ids.
240
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByIds getProductsByIds} documentation.
241
+ */
242
+ getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsByIdsQuery): Promise<IProductsEntity[] | IError>;
243
+ /**
244
+ * Retrieve one product object.
245
+ * @handleName getProductById
246
+ * @param {number} id - Product id. Example: 12345.
247
+ * @param {string} [langCode] - Language code. Default: "en_US".
248
+ * @param {boolean} [isNormalized] - If true, the product object will be normalized.
249
+ * @returns {Promise<IProductsEntity | IError>} ProductEntity object.
250
+ * @throws {IError} When isShell=false and an error occurs during the fetch
251
+ * @description Retrieve one product object.
252
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductById getProductById} documentation.
253
+ */
254
+ getProductById(id: number, langCode?: string, isNormalized?: boolean): Promise<IProductsEntity | IError>;
255
+ /**
256
+ * Getting a product block object by product id.
257
+ * @handleName getProductBlockById
258
+ * @param {number} id - Product id. Example: 12345.
259
+ * @returns {Promise<IProductBlock | IError>} - Product block object.
260
+ * @throws {IError} When isShell=false and an error occurs during the fetch
261
+ * @description Getting a product block object by product id.
262
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductBlockById getProductBlockById} documentation.
263
+ */
264
+ getProductBlockById(id: number): Promise<IProductBlock[] | IError>;
265
+ /**
266
+ * Quick search for product page objects with limited output.
267
+ * @handleName searchProduct
268
+ * @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".
269
+ * @param {string} [langCode] - Language code. Default: "en_US".
270
+ * @returns {Promise<IProductsEntity[] | IProductSearchResult[] | IError>} Array with ProductEntity objects, or an array with short ProductSearchResult cards when the traficLimit config option is enabled
271
+ * @throws {IError} When isShell=false and an error occurs during the fetch
272
+ * @description Quick search for product page objects with limited output. The quick search endpoint returns short cards ({ id, title, pageId }); with traficLimit enabled they are returned as is, otherwise full product entities are fetched for the found ids.
273
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/searchProduct searchProduct} documentation.
274
+ */
275
+ searchProduct(name: string, langCode?: string): Promise<IProductsEntity[] | IProductSearchResult[] | IError>;
276
+ /**
277
+ * Getting the number of products for the entire catalog.
278
+ * @handleName getProductsCount
279
+ * @param {any[]} body - Body parameters for filter. Deault: [].
280
+ * @example
281
+ [
282
+ {
283
+ "attributeMarker": "price",
284
+ "conditionMarker": "in",
285
+ "statusMarker": "status_1",
286
+ "conditionValue": {},
287
+ "pageUrls": [
288
+ "23-laminat-floorwood-maxima"
289
+ ],
290
+ "title": "Iphone 17 Pro"
291
+ }
292
+ ]
293
+ * @returns {Promise<IProductsCount | IError>} Object with product items count.
294
+ * @throws {IError} When isShell=false and an error occurs during the fetch
295
+ * @description This method calculates and returns the total number of products present across the entire catalog, optionally applying specified filters.
296
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsCount getProductsCount} documentation.
297
+ */
298
+ getProductsCount(body?: any[]): Promise<IProductsCount | IError>;
299
+ /**
300
+ * Getting the number of products on a catalog page by page ID.
301
+ * @handleName getProductsCountByPageId
302
+ * @param {string} id - Page ID.
303
+ * @param {any[]} body - Body parameters for filter. Deault: [].
304
+ * @example
305
+ [
306
+ {
307
+ "attributeMarker": "price",
308
+ "conditionMarker": "in",
309
+ "statusMarker": "status_1",
310
+ "conditionValue": {},
311
+ "pageUrls": [
312
+ "23-laminat-floorwood-maxima"
313
+ ],
314
+ "title": "Iphone 17 Pro"
315
+ }
316
+ ]
317
+ * @returns {Promise<IProductsCount | IError>} Object with product items count.
318
+ * @throws {IError} When isShell=false and an error occurs during the fetch
319
+ * @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
320
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsCountByPageId getProductsCountByPageId} documentation.
321
+ */
322
+ getProductsCountByPageId(id: string, body?: any[]): Promise<IProductsCount | IError>;
323
+ /**
324
+ * Getting the number of products for the catalog page by page url.
325
+ * @handleName getProductsCountByPageUrl
326
+ * @param {string} url - Page url.
327
+ * @param {any[]} body - Body parameters for filter. Deault: [].
328
+ * @example
329
+ [
330
+ {
331
+ "attributeMarker": "price",
332
+ "conditionMarker": "in",
333
+ "statusMarker": "status_1",
334
+ "conditionValue": {},
335
+ "pageUrls": [
336
+ "23-laminat-floorwood-maxima"
337
+ ],
338
+ "title": "Iphone 17 Pro"
339
+ }
340
+ ]
341
+ * @returns {Promise<IProductsCount | IError>} Object with product items count.
342
+ * @throws {IError} When isShell=false and an error occurs during the fetch
343
+ * @description This method calculates and returns the number of products available on a given catalog page, identified by its URL, with optional filtering.
344
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsCountByPageUrl getProductsCountByPageUrl} documentation.
345
+ */
346
+ /**
347
+ * Semantic (vector) search for products.
348
+ * @handleName getProductsByVectorSearch
349
+ * @param {IVectorSearchProducts} body - Vector search body. Example: `{ queryText: "red running shoes" }`.
350
+ * @param {string} [langCode] - Language code. Default: "en_US".
351
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
352
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
353
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of found products and total count.
354
+ * @throws {IError} When isShell=false and an error occurs during the fetch
355
+ * @description This method performs a semantic (vector) search for products.
356
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByVectorSearch getProductsByVectorSearch} documentation.
357
+ */
358
+ getProductsByVectorSearch(body: IVectorSearchProducts, langCode?: string, offset?: number, limit?: number): Promise<IProductsResponse | IError>;
359
+ /**
360
+ * Get products by page url.
361
+ * @param {string} url - Page url.
362
+ * @param {any[]} body - Request body.
363
+ * @returns {IProductsEntity[] | IError} Returns an array of products or an error object.
364
+ */
365
+ getProductsCountByPageUrl(url: string, body?: any[]): Promise<IProductsCount | IError>;
366
+ }