oneentry 1.0.152 → 1.0.153

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 (64) hide show
  1. package/changelog.md +12 -0
  2. package/dist/admins/adminsApi.d.ts +2 -1
  3. package/dist/admins/adminsApi.js +2 -1
  4. package/dist/admins/adminsInterfaces.d.ts +1 -1
  5. package/dist/attribute-sets/attributeSetsApi.d.ts +4 -0
  6. package/dist/attribute-sets/attributeSetsApi.js +4 -0
  7. package/dist/auth-provider/authProviderApi.d.ts +14 -1
  8. package/dist/auth-provider/authProviderApi.js +14 -1
  9. package/dist/base/asyncModules.d.ts +11 -0
  10. package/dist/base/asyncModules.js +19 -0
  11. package/dist/blocks/blocksApi.d.ts +34 -1
  12. package/dist/blocks/blocksApi.js +69 -62
  13. package/dist/discounts/discountsApi.d.ts +5 -0
  14. package/dist/discounts/discountsApi.js +5 -0
  15. package/dist/events/eventsApi.d.ts +7 -0
  16. package/dist/events/eventsApi.js +11 -28
  17. package/dist/file-uploading/fileUploadingApi.d.ts +4 -1
  18. package/dist/file-uploading/fileUploadingApi.js +4 -1
  19. package/dist/file-uploading/fileUploadingInterfaces.d.ts +1 -1
  20. package/dist/filters/filtersApi.d.ts +1 -0
  21. package/dist/filters/filtersApi.js +1 -0
  22. package/dist/forms/formsApi.d.ts +2 -0
  23. package/dist/forms/formsApi.js +2 -0
  24. package/dist/forms-data/formsDataApi.d.ts +5 -0
  25. package/dist/forms-data/formsDataApi.js +5 -0
  26. package/dist/general-types/generalTypesApi.d.ts +1 -0
  27. package/dist/general-types/generalTypesApi.js +1 -0
  28. package/dist/integration-collections/integrationCollectionsApi.d.ts +10 -1
  29. package/dist/integration-collections/integrationCollectionsApi.js +10 -1
  30. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +1 -1
  31. package/dist/locales/localesApi.d.ts +1 -0
  32. package/dist/locales/localesApi.js +1 -0
  33. package/dist/menus/menusApi.d.ts +1 -0
  34. package/dist/menus/menusApi.js +1 -0
  35. package/dist/orders/ordersApi.d.ts +25 -1
  36. package/dist/orders/ordersApi.js +36 -12
  37. package/dist/orders/ordersInterfaces.d.ts +4 -2
  38. package/dist/pages/pagesApi.d.ts +9 -0
  39. package/dist/pages/pagesApi.js +33 -38
  40. package/dist/pages/pagesInterfaces.d.ts +5 -0
  41. package/dist/payments/paymentsApi.d.ts +6 -0
  42. package/dist/payments/paymentsApi.js +6 -0
  43. package/dist/product-statuses/productStatusesApi.d.ts +3 -0
  44. package/dist/product-statuses/productStatusesApi.js +3 -0
  45. package/dist/products/productsApi.d.ts +14 -0
  46. package/dist/products/productsApi.js +14 -0
  47. package/dist/products/productsInterfaces.d.ts +2 -2
  48. package/dist/sitemap/sitemapApi.d.ts +2 -0
  49. package/dist/sitemap/sitemapApi.js +2 -0
  50. package/dist/subscriptions/subscriptionsApi.d.ts +5 -0
  51. package/dist/subscriptions/subscriptionsApi.js +7 -14
  52. package/dist/system/systemApi.d.ts +3 -0
  53. package/dist/system/systemApi.js +3 -0
  54. package/dist/templates/templatesApi.d.ts +3 -0
  55. package/dist/templates/templatesApi.js +3 -0
  56. package/dist/templates-preview/templatesPreviewApi.d.ts +2 -0
  57. package/dist/templates-preview/templatesPreviewApi.js +2 -0
  58. package/dist/user-activity/userActivityApi.d.ts +1 -0
  59. package/dist/user-activity/userActivityApi.js +1 -0
  60. package/dist/users/usersApi.d.ts +14 -0
  61. package/dist/users/usersApi.js +14 -0
  62. package/dist/web-socket/wsApi.d.ts +1 -1
  63. package/dist/web-socket/wsApi.js +1 -1
  64. package/package.json +1 -1
@@ -23,6 +23,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
23
23
  * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
24
24
  * @throws {IError} When isShell=false and an error occurs during the fetch
25
25
  * @description Get all top-level page objects.
26
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getRootPages getRootPages} documentation.
26
27
  */
27
28
  getRootPages(langCode?: string): Promise<IPagesEntity[] | IError>;
28
29
  /**
@@ -32,6 +33,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
32
33
  * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
33
34
  * @throws {IError} When isShell=false and an error occurs during the fetch
34
35
  * @description Get all page objects with product information as an array.
36
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getPages getPages} documentation.
35
37
  */
36
38
  getPages(langCode?: string): Promise<IPagesEntity[] | IError>;
37
39
  /**
@@ -42,6 +44,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
42
44
  * @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
43
45
  * @throws {IError} When isShell=false and an error occurs during the fetch
44
46
  * @description Get page object with information about forms, blocks, menus, linked to the page.
47
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getPageById getPageById} documentation.
45
48
  */
46
49
  getPageById(id: number, langCode?: string): Promise<IPagesEntity | IError>;
47
50
  /**
@@ -52,6 +55,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
52
55
  * @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
53
56
  * @throws {IError} When isShell=false and an error occurs during the fetch
54
57
  * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
58
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getPageByUrl getPageByUrl} documentation.
55
59
  */
56
60
  getPageByUrl(url: string, langCode?: string): Promise<IPagesEntity | IError>;
57
61
  /**
@@ -62,6 +66,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
62
66
  * @returns {Promise<IPagesEntity | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
63
67
  * @throws {IError} When isShell=false and an error occurs during the fetch
64
68
  * @description Get child pages object with information as an array.
69
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getChildPagesByParentUrl getChildPagesByParentUrl} documentation.
65
70
  */
66
71
  getChildPagesByParentUrl(url: string, langCode?: string): Promise<IPagesEntity[] | IError>;
67
72
  /**
@@ -72,6 +77,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
72
77
  * @returns {Promise<IPositionBlock[] | IError>} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
73
78
  * @throws {IError} When isShell=false and an error occurs during the fetch
74
79
  * @description Get all blocks by page url.
80
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getBlocksByPageUrl getBlocksByPageUrl} documentation.
75
81
  */
76
82
  getBlocksByPageUrl(url: string, langCode?: string): Promise<IPositionBlock[] | IError>;
77
83
  /**
@@ -81,6 +87,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
81
87
  * @returns {Promise<IPageConfig | IError>} Returns a ConfigPage object with page display settings
82
88
  * @throws {IError} When isShell=false and an error occurs during the fetch
83
89
  * @description Get settings for the page.
90
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getConfigPageByUrl getConfigPageByUrl} documentation.
84
91
  */
85
92
  getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
86
93
  /**
@@ -92,6 +99,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
92
99
  * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
93
100
  * @throws {IError} When isShell=false and an error occurs during the fetch
94
101
  * @description Quick search for page objects with limited output.
102
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/searchPage searchPage} documentation.
95
103
  */
96
104
  searchPage(name: string, url?: string, langCode?: string): Promise<IPagesEntity[] | IError>;
97
105
  /**
@@ -146,6 +154,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
146
154
  * @returns {Promise<any | IError>} An array of page objects with template data added
147
155
  * @throws {IError} When isShell=false and an error occurs during the fetch
148
156
  * @description Add template data to page by page templateIdentifier
157
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/addTemplateToPage addTemplateToPage} documentation.
149
158
  */
150
159
  protected addTemplateToPage(data: IPagesEntity): Promise<any | IError>;
151
160
  }
@@ -30,6 +30,7 @@ class PagesApi extends asyncModules_1.default {
30
30
  * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
31
31
  * @throws {IError} When isShell=false and an error occurs during the fetch
32
32
  * @description Get all top-level page objects.
33
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getRootPages getRootPages} documentation.
33
34
  */
34
35
  async getRootPages(langCode = this.state.lang) {
35
36
  // Fetch data from the server using a GET request to retrieve root pages for the specified language code
@@ -48,6 +49,7 @@ class PagesApi extends asyncModules_1.default {
48
49
  * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
49
50
  * @throws {IError} When isShell=false and an error occurs during the fetch
50
51
  * @description Get all page objects with product information as an array.
52
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getPages getPages} documentation.
51
53
  */
52
54
  async getPages(langCode = this.state.lang) {
53
55
  // Fetch data from the server using a GET request to retrieve all pages for the specified language code
@@ -67,6 +69,7 @@ class PagesApi extends asyncModules_1.default {
67
69
  * @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
68
70
  * @throws {IError} When isShell=false and an error occurs during the fetch
69
71
  * @description Get page object with information about forms, blocks, menus, linked to the page.
72
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getPageById getPageById} documentation.
70
73
  */
71
74
  async getPageById(id, langCode = this.state.lang) {
72
75
  // Fetch data from the server using a GET request to retrieve page details by ID and language code
@@ -86,6 +89,7 @@ class PagesApi extends asyncModules_1.default {
86
89
  * @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
87
90
  * @throws {IError} When isShell=false and an error occurs during the fetch
88
91
  * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
92
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getPageByUrl getPageByUrl} documentation.
89
93
  */
90
94
  async getPageByUrl(url, langCode = this.state.lang) {
91
95
  // Fetch data from the server using a GET request with the specified URL and language code
@@ -105,6 +109,7 @@ class PagesApi extends asyncModules_1.default {
105
109
  * @returns {Promise<IPagesEntity | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
106
110
  * @throws {IError} When isShell=false and an error occurs during the fetch
107
111
  * @description Get child pages object with information as an array.
112
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getChildPagesByParentUrl getChildPagesByParentUrl} documentation.
108
113
  */
109
114
  async getChildPagesByParentUrl(url, langCode = this.state.lang) {
110
115
  // Fetch data from the server using a GET request to retrieve child pages for the specified parent URL and language code
@@ -124,66 +129,54 @@ class PagesApi extends asyncModules_1.default {
124
129
  * @returns {Promise<IPositionBlock[] | IError>} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
125
130
  * @throws {IError} When isShell=false and an error occurs during the fetch
126
131
  * @description Get all blocks by page url.
132
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getBlocksByPageUrl getBlocksByPageUrl} documentation.
127
133
  */
128
134
  async getBlocksByPageUrl(url, langCode = this.state.lang) {
129
135
  const response = await this._fetchGet(`/${url}/blocks?langCode=${langCode}`);
130
136
  // Normalize the fetched response data
131
137
  const normalizeResponse = this._normalizeData(response);
132
- // Iterate over each item in the normalized response
133
- normalizeResponse.map((item) => {
138
+ if (!Array.isArray(normalizeResponse)) {
139
+ return normalizeResponse;
140
+ }
141
+ // Helper module wrapping the block product endpoints (similar / products).
142
+ const staffModule = new StaffModule(this.state);
143
+ // Enrich every block in parallel: product / similar blocks
144
+ await Promise.all(normalizeResponse.map(async (item) => {
134
145
  const customSettings = item.customSettings;
135
- // Check if customSettings contains 'productConfig' property
146
+ // Lift product display settings (stored as strings) to numeric top-level fields.
136
147
  if (customSettings &&
137
148
  Object.prototype.hasOwnProperty.call(customSettings, 'productConfig')) {
138
- // If 'countElementsPerRow' exists, set it on the item
139
149
  if (customSettings.productConfig.countElementsPerRow)
140
150
  item.countElementsPerRow =
141
151
  +customSettings.productConfig.countElementsPerRow;
142
- // If 'quantity' exists, set it on the item
143
152
  if (customSettings.productConfig.quantity)
144
153
  item.quantity = +customSettings.productConfig.quantity;
145
154
  }
146
- // Remove unnecessary properties from the item
155
+ // Remove internal-only properties from the result.
147
156
  delete item.customSettings;
148
157
  delete item.attributesSetIdentifier;
149
- // Return the modified item
150
- return item;
151
- });
152
- // Check if traffic limit is not set
153
- if (!this.state.traficLimit) {
154
- // Create an instance of 'StaffModule' with the current state
155
- const staffModule = new StaffModule(this.state);
156
- // If the block type is 'similar_products_block', fetch similar products
157
- if (normalizeResponse.type === 'similar_products_block') {
158
+ // In traffic-saving mode skip the extra product requests.
159
+ if (this.state.traficLimit)
160
+ return;
161
+ // Attach related products by block type. StaffModule already normalizes its results.
162
+ if (item.type === 'similar_products_block') {
158
163
  try {
159
- await staffModule
160
- .getSimilarProducts(normalizeResponse.identifier, langCode)
161
- .then((result) => {
162
- normalizeResponse.similarProducts = this._normalizeData(result);
163
- });
164
+ item.similarProducts = await staffModule.getSimilarProducts(item.identifier, langCode);
164
165
  }
165
166
  catch {
166
- // Handle errors by setting an empty array
167
- normalizeResponse.similarProducts = [];
167
+ item.similarProducts = [];
168
168
  }
169
- // If the block type is 'product_block', fetch products
170
169
  }
171
- else if (normalizeResponse.type === 'product_block') {
170
+ else if (item.type === 'product_block') {
172
171
  try {
173
- await staffModule
174
- .getProductsByBlockMarker(normalizeResponse.identifier, langCode)
175
- .then((result) => {
176
- normalizeResponse.products = this._normalizeData(result);
177
- });
172
+ item.products = await staffModule.getProductsByBlockMarker(item.identifier, langCode);
178
173
  }
179
174
  catch {
180
- // Handle errors by setting an empty array
181
- normalizeResponse.products = [];
175
+ item.products = [];
182
176
  }
183
177
  }
184
- }
185
- // Return the final normalized response
186
- return this._normalizeData(normalizeResponse);
178
+ }));
179
+ return normalizeResponse;
187
180
  }
188
181
  /**
189
182
  * Get settings for the page.
@@ -192,6 +185,7 @@ class PagesApi extends asyncModules_1.default {
192
185
  * @returns {Promise<IPageConfig | IError>} Returns a ConfigPage object with page display settings
193
186
  * @throws {IError} When isShell=false and an error occurs during the fetch
194
187
  * @description Get settings for the page.
188
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getConfigPageByUrl getConfigPageByUrl} documentation.
195
189
  */
196
190
  async getConfigPageByUrl(url) {
197
191
  // Fetch data from the server using a GET request to retrieve forms for the specified page URL and language code
@@ -210,6 +204,7 @@ class PagesApi extends asyncModules_1.default {
210
204
  * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
211
205
  * @throws {IError} When isShell=false and an error occurs during the fetch
212
206
  * @description Quick search for page objects with limited output.
207
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/searchPage searchPage} documentation.
213
208
  */
214
209
  async searchPage(name, url, langCode = this.state.lang) {
215
210
  // Fetch data from the server using a GET request to perform a quick search by page name and language code
@@ -332,6 +327,7 @@ class PagesApi extends asyncModules_1.default {
332
327
  * @returns {Promise<any | IError>} An array of page objects with template data added
333
328
  * @throws {IError} When isShell=false and an error occurs during the fetch
334
329
  * @description Add template data to page by page templateIdentifier
330
+ * @see {@link https://js-sdk.oneentry.cloud/docs/pages/addTemplateToPage addTemplateToPage} documentation.
335
331
  */
336
332
  async addTemplateToPage(data) {
337
333
  // Check if 'templateIdentifier' exists in 'data' and is not null or an empty string
@@ -352,10 +348,8 @@ class PagesApi extends asyncModules_1.default {
352
348
  };
353
349
  }
354
350
  catch (error) {
355
- // Log any errors that occur during the template fetching process
356
351
  // eslint-disable-next-line no-undef, no-console
357
352
  console.error('Template fetch error: ', error);
358
- // Return the original data object unchanged if an error occurs
359
353
  return data;
360
354
  }
361
355
  }
@@ -375,11 +369,12 @@ class StaffModule extends asyncModules_1.default {
375
369
  super(state); // Call parent constructor
376
370
  this._url = state.url + '/api/content/blocks'; // Set URL for content blocks
377
371
  }
378
- // Method to fetch similar products by marker
372
+ // Method to fetch similar products by marker. Returns the full response
373
+ // ({ total, items }) to match BlocksApi's similarProducts contract.
379
374
  async getSimilarProducts(marker, langCode = this.state.lang, offset = 0, limit = 30) {
380
375
  // Fetch similar products from the server
381
376
  const result = await this._fetchGet(`/${marker}/similar-products?langCode=${langCode}&offset=${offset}&limit=${limit}`);
382
- return this._normalizeData(result.items);
377
+ return this._normalizeData(result);
383
378
  }
384
379
  // Method to fetch products by block marker
385
380
  async getProductsByBlockMarker(marker, langCode = this.state.lang, offset = 0, limit = 30) {
@@ -1,6 +1,7 @@
1
1
  import type { IAttributes, IAttributeValues, IError, ILocalizeInfo, IRating, LangType } from '../base/utils';
2
2
  import type { BlockType, IBlockEntity } from '../blocks/blocksInterfaces';
3
3
  import type { IFormConfig } from '../forms/formsInterfaces';
4
+ import type { IProductsEntity, IProductsResponse } from '../products/productsInterfaces';
4
5
  import type { ITemplateEntity } from '../templates/templatesInterfaces';
5
6
  /**
6
7
  * @interface IPagesApi
@@ -185,6 +186,8 @@ interface IPositionForm {
185
186
  }
186
187
  * @property {number} [countElementsPerRow] - Number of elements displayed per row in the block, if applicable. Example: 3.
187
188
  * @property {number} [quantity] - Quantity pages in block. Example: 1.
189
+ * @property {IProductsResponse} [similarProducts] - Similar products response (total + items). Present only for "similar_products_block" blocks and only when traffic-saving mode is off.
190
+ * @property {IProductsEntity[]} [products] - Array of products associated with the block. Present only for "product_block" blocks and only when traffic-saving mode is off.
188
191
  * @description This interface defines the structure of a position block entity, including its identifiers, attributes, and visibility.
189
192
  */
190
193
  interface IPositionBlock {
@@ -201,6 +204,8 @@ interface IPositionBlock {
201
204
  attributeValues: IAttributeValues;
202
205
  countElementsPerRow?: number;
203
206
  quantity?: number;
207
+ similarProducts?: IProductsResponse;
208
+ products?: IProductsEntity[];
204
209
  }
205
210
  /**
206
211
  * PageType
@@ -25,6 +25,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
25
25
  * @throws {IError} When isShell=false and an error occurs during the fetch
26
26
  * @description This method gets list of payment sessions. This method requires user authorization.
27
27
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
28
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessions getSessions} documentation.
28
29
  */
29
30
  getSessions(offset?: number, limit?: number): Promise<ISessionsEntity | IError>;
30
31
  /**
@@ -35,6 +36,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
35
36
  * @throws {IError} When isShell=false and an error occurs during the fetch
36
37
  * @description This method gets a single payment session object by its identifier. This method requires user authorization.
37
38
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
39
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessionById getSessionById} documentation.
38
40
  */
39
41
  getSessionById(id: number): Promise<ISessionEntity | IError>;
40
42
  /**
@@ -45,6 +47,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
45
47
  * @throws {IError} When isShell=false and an error occurs during the fetch
46
48
  * @description This method gets one payment session object by order identifier. This method requires user authorization.
47
49
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
50
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessionByOrderId getSessionByOrderId} documentation.
48
51
  */
49
52
  getSessionByOrderId(id: number): Promise<ISessionEntity | ISessionEntity[] | IError>;
50
53
  /**
@@ -57,6 +60,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
57
60
  * @throws {IError} When isShell=false and an error occurs during the fetch
58
61
  * @description This method creates a payment session. This method requires user authorization.
59
62
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
63
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/createSession createSession} documentation.
60
64
  */
61
65
  createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ISessionEntity | IError>;
62
66
  /**
@@ -66,6 +70,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
66
70
  * @throws {IError} When isShell=false and an error occurs during the fetch
67
71
  * @description This method gets all payment accounts as an array. This method requires user authorization.
68
72
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
73
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getAccounts getAccounts} documentation.
69
74
  */
70
75
  getAccounts(): Promise<IAccountsEntity[] | IError>;
71
76
  /**
@@ -77,6 +82,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
77
82
  * @description Get a single payment account object by its identifier.
78
83
  * @description This method requires user authorization.
79
84
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
85
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getAccountById getAccountById} documentation.
80
86
  */
81
87
  getAccountById(id: number): Promise<IAccountsEntity | IError>;
82
88
  }
@@ -29,6 +29,7 @@ class PaymentsApi extends asyncModules_1.default {
29
29
  * @throws {IError} When isShell=false and an error occurs during the fetch
30
30
  * @description This method gets list of payment sessions. This method requires user authorization.
31
31
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
32
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessions getSessions} documentation.
32
33
  */
33
34
  async getSessions(offset = 0, limit = 30) {
34
35
  const query = {
@@ -48,6 +49,7 @@ class PaymentsApi extends asyncModules_1.default {
48
49
  * @throws {IError} When isShell=false and an error occurs during the fetch
49
50
  * @description This method gets a single payment session object by its identifier. This method requires user authorization.
50
51
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
52
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessionById getSessionById} documentation.
51
53
  */
52
54
  async getSessionById(id) {
53
55
  const result = await this._fetchGet(`/sessions/${id}`);
@@ -61,6 +63,7 @@ class PaymentsApi extends asyncModules_1.default {
61
63
  * @throws {IError} When isShell=false and an error occurs during the fetch
62
64
  * @description This method gets one payment session object by order identifier. This method requires user authorization.
63
65
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
66
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessionByOrderId getSessionByOrderId} documentation.
64
67
  */
65
68
  async getSessionByOrderId(id) {
66
69
  const result = await this._fetchGet(`/sessions/order/${id}`);
@@ -78,6 +81,7 @@ class PaymentsApi extends asyncModules_1.default {
78
81
  * @throws {IError} When isShell=false and an error occurs during the fetch
79
82
  * @description This method creates a payment session. This method requires user authorization.
80
83
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
84
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/createSession createSession} documentation.
81
85
  */
82
86
  async createSession(orderId, type, automaticTaxEnabled = false) {
83
87
  const result = await this._fetchPost('/sessions', {
@@ -96,6 +100,7 @@ class PaymentsApi extends asyncModules_1.default {
96
100
  * @throws {IError} When isShell=false and an error occurs during the fetch
97
101
  * @description This method gets all payment accounts as an array. This method requires user authorization.
98
102
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
103
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getAccounts getAccounts} documentation.
99
104
  */
100
105
  async getAccounts() {
101
106
  const result = await this._fetchGet('/accounts');
@@ -112,6 +117,7 @@ class PaymentsApi extends asyncModules_1.default {
112
117
  * @description Get a single payment account object by its identifier.
113
118
  * @description This method requires user authorization.
114
119
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
120
+ * @see {@link https://js-sdk.oneentry.cloud/docs/payments/getAccountById getAccountById} documentation.
115
121
  */
116
122
  async getAccountById(id) {
117
123
  const result = await this._fetchGet(`/accounts/${id}`);
@@ -23,6 +23,7 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
23
23
  * @returns {Promise<IProductStatusEntity[] | IError>} Returns an array of product status objects.
24
24
  * @throws {IError} When isShell=false and an error occurs during the fetch
25
25
  * @description Search for all product status objects.
26
+ * @see {@link https://js-sdk.oneentry.cloud/docs/product-statuses/getProductStatuses getProductStatuses} documentation.
26
27
  */
27
28
  getProductStatuses(langCode?: string): Promise<IProductStatusEntity[] | IError>;
28
29
  /**
@@ -33,6 +34,7 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
33
34
  * @returns {Promise<IProductStatusEntity | IError>} Returns a product status object.
34
35
  * @throws {IError} When isShell=false and an error occurs during the fetch
35
36
  * @description Search for a product status object by its textual identifier (marker).
37
+ * @see {@link https://js-sdk.oneentry.cloud/docs/product-statuses/getProductsByStatusMarker getProductsByStatusMarker} documentation.
36
38
  */
37
39
  getProductsByStatusMarker(marker: string, langCode?: string): Promise<IProductStatusEntity | IError>;
38
40
  /**
@@ -42,6 +44,7 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
42
44
  * @returns {Promise<boolean | IError>} Returns true if the textual identifier (marker) exists or false if it doesn't.
43
45
  * @throws {IError} When isShell=false and an error occurs during the fetch
44
46
  * @description Check the existence of a textual identifier.
47
+ * @see {@link https://js-sdk.oneentry.cloud/docs/product-statuses/validateMarker validateMarker} documentation.
45
48
  */
46
49
  validateMarker(marker: string): Promise<boolean | IError>;
47
50
  }
@@ -27,6 +27,7 @@ class ProductStatusesApi extends asyncModules_1.default {
27
27
  * @returns {Promise<IProductStatusEntity[] | IError>} Returns an array of product status objects.
28
28
  * @throws {IError} When isShell=false and an error occurs during the fetch
29
29
  * @description Search for all product status objects.
30
+ * @see {@link https://js-sdk.oneentry.cloud/docs/product-statuses/getProductStatuses getProductStatuses} documentation.
30
31
  */
31
32
  async getProductStatuses(langCode = this.state.lang) {
32
33
  const result = await this._fetchGet('');
@@ -42,6 +43,7 @@ class ProductStatusesApi extends asyncModules_1.default {
42
43
  * @returns {Promise<IProductStatusEntity | IError>} Returns a product status object.
43
44
  * @throws {IError} When isShell=false and an error occurs during the fetch
44
45
  * @description Search for a product status object by its textual identifier (marker).
46
+ * @see {@link https://js-sdk.oneentry.cloud/docs/product-statuses/getProductsByStatusMarker getProductsByStatusMarker} documentation.
45
47
  */
46
48
  async getProductsByStatusMarker(marker, langCode = this.state.lang) {
47
49
  const result = await this._fetchGet(`/marker/${marker}`);
@@ -56,6 +58,7 @@ class ProductStatusesApi extends asyncModules_1.default {
56
58
  * @returns {Promise<boolean | IError>} Returns true if the textual identifier (marker) exists or false if it doesn't.
57
59
  * @throws {IError} When isShell=false and an error occurs during the fetch
58
60
  * @description Check the existence of a textual identifier.
61
+ * @see {@link https://js-sdk.oneentry.cloud/docs/product-statuses/validateMarker validateMarker} documentation.
59
62
  */
60
63
  async validateMarker(marker) {
61
64
  const result = await this._fetchGet(`/marker-validation/${marker}`);
@@ -64,6 +64,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
64
64
  * @returns {Promise<IProductsResponse | IError>} Products response, or IError when isShell=true
65
65
  * @throws {IError} When isShell=false and an error occurs during the fetch
66
66
  * @description Fetch products with optional filters and pagination.
67
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProducts getProducts} documentation.
67
68
  */
68
69
  getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
69
70
  /**
@@ -88,6 +89,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
88
89
  * @returns {Promise<IAggregatedProductGroup[] | IError>} Array with AggregatedProductGroup objects.
89
90
  * @throws {IError} When isShell=false and an error occurs during the fetch
90
91
  * @description Search for all product page objects with pagination (and aggregation) that do not have a category.
92
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsEmptyPage getProductsEmptyPage} documentation.
91
93
  */
92
94
  getProductsEmptyPage(body?: object, langCode?: string, userQuery?: IProductsQuery): Promise<IAggregatedProductGroup[] | IError>;
93
95
  /**
@@ -137,6 +139,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
137
139
  * @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects
138
140
  * @throws {IError} When isShell=false and an error occurs during the fetch
139
141
  * @description Fetch products by page ID with optional filters and pagination.
142
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByPageId getProductsByPageId} documentation.
140
143
  */
141
144
  getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
142
145
  /**
@@ -161,6 +164,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
161
164
  * @returns {Promise<IProductsInfo | IError>} Array with ProductInformation objects.
162
165
  * @throws {IError} When isShell=false and an error occurs during the fetch
163
166
  * @description Search for information about products and prices for the selected category.
167
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsPriceByPageUrl getProductsPriceByPageUrl} documentation.
164
168
  */
165
169
  getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsInfo | IError>;
166
170
  /**
@@ -210,6 +214,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
210
214
  * @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects.
211
215
  * @throws {IError} When isShell=false and an error occurs during the fetch
212
216
  * @description Search for all products with pagination for the selected category.
217
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByPageUrl getProductsByPageUrl} documentation.
213
218
  */
214
219
  getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
215
220
  /**
@@ -238,6 +243,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
238
243
  * @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects
239
244
  * @throws {IError} When isShell=false and an error occurs during the fetch
240
245
  * @description Find all related product page objects.
246
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getRelatedProductsById getRelatedProductsById} documentation.
241
247
  */
242
248
  getRelatedProductsById(id: number, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
243
249
  /**
@@ -270,6 +276,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
270
276
  * @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
271
277
  * @throws {IError} When isShell=false and an error occurs during the fetch
272
278
  * @description Find products by its ids.
279
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByIds getProductsByIds} documentation.
273
280
  */
274
281
  getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsEntity[] | IError>;
275
282
  /**
@@ -281,6 +288,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
281
288
  * @returns {Promise<IProductsEntity | IError>} ProductEntity object.
282
289
  * @throws {IError} When isShell=false and an error occurs during the fetch
283
290
  * @description Retrieve one product object.
291
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductById getProductById} documentation.
284
292
  */
285
293
  getProductById(id: number, langCode?: string, isNormalized?: boolean): Promise<IProductsEntity | IError>;
286
294
  /**
@@ -290,6 +298,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
290
298
  * @returns {Promise<IProductBlock | IError>} - Product block object.
291
299
  * @throws {IError} When isShell=false and an error occurs during the fetch
292
300
  * @description Getting a product block object by product id.
301
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductBlockById getProductBlockById} documentation.
293
302
  */
294
303
  getProductBlockById(id: number): Promise<IProductBlock[] | IError>;
295
304
  /**
@@ -300,6 +309,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
300
309
  * @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
301
310
  * @throws {IError} When isShell=false and an error occurs during the fetch
302
311
  * @description Quick search for product page objects with limited output.
312
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/searchProduct searchProduct} documentation.
303
313
  */
304
314
  searchProduct(name: string, langCode?: string): Promise<IProductsEntity[] | IError>;
305
315
  /**
@@ -322,6 +332,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
322
332
  * @returns {Promise<IProductsCount | IError>} Object with product items count.
323
333
  * @throws {IError} When isShell=false and an error occurs during the fetch
324
334
  * @description This method calculates and returns the total number of products present across the entire catalog, optionally applying specified filters.
335
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsCount getProductsCount} documentation.
325
336
  */
326
337
  getProductsCount(body?: any[]): Promise<IProductsCount | IError>;
327
338
  /**
@@ -345,6 +356,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
345
356
  * @returns {Promise<IProductsCount | IError>} Object with product items count.
346
357
  * @throws {IError} When isShell=false and an error occurs during the fetch
347
358
  * @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
359
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsCountByPageId getProductsCountByPageId} documentation.
348
360
  */
349
361
  getProductsCountByPageId(id: string, body?: any[]): Promise<IProductsCount | IError>;
350
362
  /**
@@ -368,6 +380,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
368
380
  * @returns {Promise<IProductsCount | IError>} Object with product items count.
369
381
  * @throws {IError} When isShell=false and an error occurs during the fetch
370
382
  * @description This method calculates and returns the number of products available on a given catalog page, identified by its URL, with optional filtering.
383
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsCountByPageUrl getProductsCountByPageUrl} documentation.
371
384
  */
372
385
  /**
373
386
  * Semantic (vector) search for products.
@@ -379,6 +392,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
379
392
  * @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects.
380
393
  * @throws {IError} When isShell=false and an error occurs during the fetch
381
394
  * @description This method performs a semantic (vector) search for products.
395
+ * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByVectorSearch getProductsByVectorSearch} documentation.
382
396
  */
383
397
  getProductsByVectorSearch(body: IVectorSearchProducts, langCode?: string, offset?: number, limit?: number): Promise<IProductsEntity[] | IError>;
384
398
  /**