oneentry 1.0.126 → 1.0.127

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 (83) hide show
  1. package/README.md +0 -2
  2. package/configure.js +25 -18
  3. package/dist/admins/adminsApi.d.ts +30 -25
  4. package/dist/admins/adminsApi.js +30 -25
  5. package/dist/admins/adminsInterfaces.d.ts +45 -54
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
  7. package/dist/attribute-sets/attributeSetsApi.js +26 -27
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
  9. package/dist/auth-provider/authProviderApi.d.ts +132 -158
  10. package/dist/auth-provider/authProviderApi.js +131 -157
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +30 -25
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -1
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +41 -49
  19. package/dist/base/syncModules.js +49 -48
  20. package/dist/base/utils.d.ts +38 -7
  21. package/dist/blocks/blocksApi.d.ts +27 -36
  22. package/dist/blocks/blocksApi.js +27 -36
  23. package/dist/blocks/blocksInterfaces.d.ts +92 -97
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +16 -33
  27. package/dist/events/eventsApi.js +32 -46
  28. package/dist/events/eventsInterfaces.d.ts +42 -37
  29. package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
  30. package/dist/file-uploading/fileUploadingApi.js +44 -47
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
  32. package/dist/forms/formsApi.d.ts +15 -14
  33. package/dist/forms/formsApi.js +15 -14
  34. package/dist/forms/formsInterfaces.d.ts +36 -40
  35. package/dist/forms-data/formsDataApi.d.ts +40 -44
  36. package/dist/forms-data/formsDataApi.js +42 -44
  37. package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
  38. package/dist/general-types/generalTypesApi.d.ts +5 -5
  39. package/dist/general-types/generalTypesApi.js +5 -5
  40. package/dist/general-types/generalTypesInterfaces.d.ts +6 -9
  41. package/dist/index.d.ts +12 -13
  42. package/dist/index.js +12 -13
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
  44. package/dist/integration-collections/integrationCollectionsApi.js +86 -102
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +14 -13
  49. package/dist/menus/menusApi.d.ts +9 -5
  50. package/dist/menus/menusApi.js +9 -5
  51. package/dist/menus/menusInterfaces.d.ts +43 -48
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +62 -70
  54. package/dist/orders/ordersApi.js +62 -71
  55. package/dist/orders/ordersInterfaces.d.ts +238 -203
  56. package/dist/pages/pagesApi.d.ts +67 -80
  57. package/dist/pages/pagesApi.js +71 -81
  58. package/dist/pages/pagesInterfaces.d.ts +164 -160
  59. package/dist/payments/paymentsApi.d.ts +24 -34
  60. package/dist/payments/paymentsApi.js +24 -38
  61. package/dist/payments/paymentsInterfaces.d.ts +82 -76
  62. package/dist/product-statuses/productStatusesApi.d.ts +13 -13
  63. package/dist/product-statuses/productStatusesApi.js +13 -13
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
  65. package/dist/products/productsApi.d.ts +246 -267
  66. package/dist/products/productsApi.js +247 -267
  67. package/dist/products/productsInterfaces.d.ts +333 -339
  68. package/dist/system/systemApi.d.ts +19 -21
  69. package/dist/system/systemApi.js +20 -21
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +13 -16
  72. package/dist/templates/templatesApi.js +13 -16
  73. package/dist/templates/templatesInterfaces.d.ts +30 -29
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
  75. package/dist/templates-preview/templatesPreviewApi.js +10 -11
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
  77. package/dist/users/usersApi.d.ts +36 -43
  78. package/dist/users/usersApi.js +36 -43
  79. package/dist/users/usersInterfaces.d.ts +92 -96
  80. package/dist/web-socket/wsApi.d.ts +5 -3
  81. package/dist/web-socket/wsApi.js +6 -3
  82. package/dist/web-socket/wsInterfaces.d.ts +7 -2
  83. package/package.json +16 -12
@@ -5,156 +5,143 @@ import type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock } from './page
5
5
  /**
6
6
  * Controllers for working with page objects, including catalog pages
7
7
  * @handle /api/content/pages
8
+ * @description Controllers for working with page objects, including catalog pages
8
9
  */
9
10
  export default class PageApi extends AsyncModules implements IPageApi {
10
11
  protected state: StateModule;
11
12
  protected _url: string;
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - The state module.
16
+ * @description Constructor initializes the PageApi with a given state.
17
+ */
12
18
  constructor(state: StateModule);
13
19
  /**
14
20
  * Get all top-level page objects.
15
- *
16
21
  * @handleName getRootPages
17
- *
18
- * @param {string} [langCode] - Language code. Default: "en_US".
19
- * @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
22
+ * @param {string} [langCode] - Language code. Default: "en_US".
23
+ * @returns {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
20
24
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
21
25
  * @description Get all top-level page objects.
22
26
  */
23
27
  getRootPages(langCode?: string): Promise<IPagesEntity[] | IError>;
24
28
  /**
25
29
  * Get all page objects with product information as an array.
26
- *
27
30
  * @handleName getPages
28
- *
29
- * @param {string} [langCode] - Language code. Default: "en_US".
30
- * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
31
+ * @param {string} [langCode] - Language code. Default: "en_US".
32
+ * @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
31
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
32
34
  * @description Get all page objects with product information as an array.
33
35
  */
34
36
  getPages(langCode?: string): Promise<IPagesEntity[] | IError>;
35
37
  /**
36
38
  * Get page object with information about forms, blocks, menus, linked to the page.
37
- *
38
39
  * @handleName getPageById
39
- *
40
- * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
41
- * @param {string} [langCode] - Language code. Default: "en_US".
42
- * @return {IPagesEntity} Returns PageEntity object
40
+ * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
41
+ * @param {string} [langCode] - Language code. Default: "en_US".
42
+ * @returns {IPagesEntity} Returns PageEntity object
43
43
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
44
44
  * @description Get page object with information about forms, blocks, menus, linked to the page.
45
45
  */
46
46
  getPageById(id: number, langCode?: string): Promise<IPagesEntity | IError>;
47
47
  /**
48
48
  * Get page object with information about forms, blocks, menus, linked to the page by URL.
49
- *
50
49
  * @handleName getPageByUrl
51
- *
52
- * @param {string} url - Page URL. Example: "about".
53
- * @param {string} [langCode] - Language code. Default: "en_US".
54
- * @return {IPagesEntity} Returns PageEntity object
50
+ * @param {string} url - Page URL. Example: "about".
51
+ * @param {string} [langCode] - Language code. Default: "en_US".
52
+ * @returns {IPagesEntity} Returns PageEntity object
55
53
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
56
54
  * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
57
55
  */
58
56
  getPageByUrl(url: string, langCode?: string): Promise<IPagesEntity | IError>;
59
57
  /**
60
58
  * Get child pages object with information as an array.
61
- *
62
59
  * @handleName getChildPagesByParentUrl
63
- *
64
- * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
65
- * @param {string} [langCode] - Language code. Default: "en_US".
66
- * @return {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
60
+ * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
61
+ * @param {string} [langCode] - Language code. Default: "en_US".
62
+ * @returns {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
67
63
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
68
64
  * @description Get child pages object with information as an array.
69
65
  */
70
66
  getChildPagesByParentUrl(url: string, langCode?: string): Promise<IPagesEntity[] | IError>;
71
67
  /**
72
68
  * Get all blocks by page url.
73
- *
74
69
  * @handleName getBlocksByPageUrl
75
- *
76
- * @param {string} url - Page URL. Example: "about".
77
- * @param {string} [langCode] - Language code. Default: "en_US".
78
- * @return {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
70
+ * @param {string} url - Page URL. Example: "about".
71
+ * @param {string} [langCode] - Language code. Default: "en_US".
72
+ * @returns {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
79
73
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
80
74
  * @description Get all blocks by page url.
81
75
  */
82
76
  getBlocksByPageUrl(url: string, langCode?: string): Promise<IPositionBlock[] | IError>;
83
77
  /**
84
78
  * Get settings for the page.
85
- *
86
79
  * @handleName getConfigPageByUrl
87
- *
88
- * @param {string} url - Page URL. Example: "about".
89
- * @return {IPageConfig} Returns a ConfigPage object with page display settings
80
+ * @param {string} url - Page URL. Example: "about".
81
+ * @returns {IPageConfig} Returns a ConfigPage object with page display settings
90
82
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
91
83
  * @description Get settings for the page.
92
84
  */
93
85
  getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
94
86
  /**
95
87
  * Quick search for page objects with limited output.
96
- *
97
88
  * @handleName searchPage
98
- *
99
- * @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
100
- * @param {string} [langCode] - Language code. Default: "en_US".
101
- * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
89
+ * @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
90
+ * @param {string} [url] - Page URL. Example: "catalog".
91
+ * @param {string} [langCode] - Language code. Default: "en_US".
92
+ * @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
102
93
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
103
94
  * @description Quick search for page objects with limited output.
104
95
  */
105
- searchPage(name: string, langCode?: string): Promise<IPagesEntity[] | IError>;
96
+ searchPage(name: string, url?: string, langCode?: string): Promise<IPagesEntity[] | IError>;
106
97
  /**
107
98
  * Add template data to pages
108
- *
109
99
  * @handleName addTemplateToPages
110
- *
111
- * @param {IPagesEntity[]} data - An array of page objects (IPagesEntity[]) to which template data will be added. Example:
112
- [
113
- {
114
- id: 8,
115
- parentId: null,
116
- moduleFormConfigs: [],
117
- pageUrl: 'blog',
118
- depth: 0,
119
- localizeInfos: {
120
- title: 'Blog',
121
- menuTitle: 'Blog',
122
- htmlContent: '',
123
- plainContent: '',
124
- },
125
- isVisible: true,
126
- forms: [],
127
- blocks: [],
128
- type: 'common_page',
129
- templateIdentifier: 'template',
130
- attributeSetIdentifier: 'page',
131
- attributeValues: {},
132
- isSync: true,
133
- template: {
134
- id: 4,
135
- attributeSetIdentifier: null,
136
- title: 'Template',
137
- generalTypeId: 4,
138
- identifier: 'template',
139
- version: 0,
140
- generalTypeName: 'catalog_page',
141
- attributeValues: {},
142
- position: 1,
143
- },
144
- }
145
- ]
146
- * @return {any} An array of page objects with template data added
100
+ * @param {IPagesEntity[]} data - An array of page objects (IPagesEntity[]) to which template data will be added. Example:
101
+ [
102
+ {
103
+ id: 8,
104
+ parentId: null,
105
+ moduleFormConfigs: [],
106
+ pageUrl: 'blog',
107
+ depth: 0,
108
+ localizeInfos: {
109
+ title: 'Blog',
110
+ menuTitle: 'Blog',
111
+ htmlContent: '',
112
+ plainContent: '',
113
+ },
114
+ isVisible: true,
115
+ forms: [],
116
+ blocks: [],
117
+ type: 'common_page',
118
+ templateIdentifier: 'template',
119
+ attributeSetIdentifier: 'page',
120
+ attributeValues: {},
121
+ isSync: true,
122
+ template: {
123
+ id: 4,
124
+ attributeSetIdentifier: null,
125
+ title: 'Template',
126
+ generalTypeId: 4,
127
+ identifier: 'template',
128
+ version: 0,
129
+ generalTypeName: 'catalog_page',
130
+ attributeValues: {},
131
+ position: 1,
132
+ },
133
+ }
134
+ ]
135
+ * @returns {any} An array of page objects with template data added
147
136
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
148
137
  * @description Add template data to pages
149
138
  */
150
139
  protected addTemplateToPages(data: IPagesEntity[]): Promise<any | IError>;
151
140
  /**
152
141
  * Add template data to page by page templateIdentifier
153
- *
154
142
  * @handleName addTemplateToPage
155
- *
156
- * @param {IPagesEntity} data - Page object (IPagesEntity) to which template data will be added.
157
- * @return {any} An array of page objects with template data added
143
+ * @param {IPagesEntity} data - Page object (IPagesEntity) to which template data will be added.
144
+ * @returns {any} An array of page objects with template data added
158
145
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
159
146
  * @description Add template data to page by page templateIdentifier
160
147
  */
@@ -3,25 +3,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* eslint-disable jsdoc/reject-any-type */
6
7
  /* eslint-disable @typescript-eslint/no-explicit-any */
7
8
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
8
9
  const templatesApi_1 = __importDefault(require("../templates/templatesApi"));
9
10
  /**
10
11
  * Controllers for working with page objects, including catalog pages
11
12
  * @handle /api/content/pages
13
+ * @description Controllers for working with page objects, including catalog pages
12
14
  */
13
15
  class PageApi extends asyncModules_1.default {
16
+ /**
17
+ * Constructor
18
+ * @param {StateModule} state - The state module.
19
+ * @description Constructor initializes the PageApi with a given state.
20
+ */
14
21
  constructor(state) {
15
22
  super(state);
16
23
  this._url = state.url + '/api/content/pages';
17
24
  }
18
25
  /**
19
26
  * Get all top-level page objects.
20
- *
21
27
  * @handleName getRootPages
22
- *
23
- * @param {string} [langCode] - Language code. Default: "en_US".
24
- * @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
28
+ * @param {string} [langCode] - Language code. Default: "en_US".
29
+ * @returns {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
25
30
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
26
31
  * @description Get all top-level page objects.
27
32
  */
@@ -35,11 +40,9 @@ class PageApi extends asyncModules_1.default {
35
40
  }
36
41
  /**
37
42
  * Get all page objects with product information as an array.
38
- *
39
43
  * @handleName getPages
40
- *
41
- * @param {string} [langCode] - Language code. Default: "en_US".
42
- * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
44
+ * @param {string} [langCode] - Language code. Default: "en_US".
45
+ * @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
43
46
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
44
47
  * @description Get all page objects with product information as an array.
45
48
  */
@@ -53,12 +56,10 @@ class PageApi extends asyncModules_1.default {
53
56
  }
54
57
  /**
55
58
  * Get page object with information about forms, blocks, menus, linked to the page.
56
- *
57
59
  * @handleName getPageById
58
- *
59
- * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
60
- * @param {string} [langCode] - Language code. Default: "en_US".
61
- * @return {IPagesEntity} Returns PageEntity object
60
+ * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
61
+ * @param {string} [langCode] - Language code. Default: "en_US".
62
+ * @returns {IPagesEntity} Returns PageEntity object
62
63
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
63
64
  * @description Get page object with information about forms, blocks, menus, linked to the page.
64
65
  */
@@ -72,12 +73,10 @@ class PageApi extends asyncModules_1.default {
72
73
  }
73
74
  /**
74
75
  * Get page object with information about forms, blocks, menus, linked to the page by URL.
75
- *
76
76
  * @handleName getPageByUrl
77
- *
78
- * @param {string} url - Page URL. Example: "about".
79
- * @param {string} [langCode] - Language code. Default: "en_US".
80
- * @return {IPagesEntity} Returns PageEntity object
77
+ * @param {string} url - Page URL. Example: "about".
78
+ * @param {string} [langCode] - Language code. Default: "en_US".
79
+ * @returns {IPagesEntity} Returns PageEntity object
81
80
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
82
81
  * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
83
82
  */
@@ -91,12 +90,10 @@ class PageApi extends asyncModules_1.default {
91
90
  }
92
91
  /**
93
92
  * Get child pages object with information as an array.
94
- *
95
93
  * @handleName getChildPagesByParentUrl
96
- *
97
- * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
98
- * @param {string} [langCode] - Language code. Default: "en_US".
99
- * @return {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
94
+ * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
95
+ * @param {string} [langCode] - Language code. Default: "en_US".
96
+ * @returns {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
100
97
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
101
98
  * @description Get child pages object with information as an array.
102
99
  */
@@ -110,12 +107,10 @@ class PageApi extends asyncModules_1.default {
110
107
  }
111
108
  /**
112
109
  * Get all blocks by page url.
113
- *
114
110
  * @handleName getBlocksByPageUrl
115
- *
116
- * @param {string} url - Page URL. Example: "about".
117
- * @param {string} [langCode] - Language code. Default: "en_US".
118
- * @return {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
111
+ * @param {string} url - Page URL. Example: "about".
112
+ * @param {string} [langCode] - Language code. Default: "en_US".
113
+ * @returns {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
119
114
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
120
115
  * @description Get all blocks by page url.
121
116
  */
@@ -200,11 +195,9 @@ class PageApi extends asyncModules_1.default {
200
195
  }
201
196
  /**
202
197
  * Get settings for the page.
203
- *
204
198
  * @handleName getConfigPageByUrl
205
- *
206
- * @param {string} url - Page URL. Example: "about".
207
- * @return {IPageConfig} Returns a ConfigPage object with page display settings
199
+ * @param {string} url - Page URL. Example: "about".
200
+ * @returns {IPageConfig} Returns a ConfigPage object with page display settings
208
201
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
209
202
  * @description Get settings for the page.
210
203
  */
@@ -216,18 +209,18 @@ class PageApi extends asyncModules_1.default {
216
209
  }
217
210
  /**
218
211
  * Quick search for page objects with limited output.
219
- *
220
212
  * @handleName searchPage
221
- *
222
- * @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
223
- * @param {string} [langCode] - Language code. Default: "en_US".
224
- * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
213
+ * @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
214
+ * @param {string} [url] - Page URL. Example: "catalog".
215
+ * @param {string} [langCode] - Language code. Default: "en_US".
216
+ * @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
225
217
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
226
218
  * @description Quick search for page objects with limited output.
227
219
  */
228
- async searchPage(name, langCode = this.state.lang) {
220
+ async searchPage(name, url, langCode = this.state.lang) {
229
221
  // Fetch data from the server using a GET request to perform a quick search by page name and language code
230
- const data = await this._fetchGet(`/quick/search?lang=${langCode}&name=${name}`);
222
+ const data = await this._fetchGet(`/quick/search?${url && 'url=' + url}&lang=${langCode}&name=${name}`);
223
+ // /quick/search?url=catalog&langCode=en_US&name=cat
231
224
  // Check if there is no traffic limit set in the state
232
225
  if (!this.state.traficLimit) {
233
226
  // Initialize an empty array to store detailed page information
@@ -251,45 +244,43 @@ class PageApi extends asyncModules_1.default {
251
244
  }
252
245
  /**
253
246
  * Add template data to pages
254
- *
255
247
  * @handleName addTemplateToPages
256
- *
257
- * @param {IPagesEntity[]} data - An array of page objects (IPagesEntity[]) to which template data will be added. Example:
258
- [
259
- {
260
- id: 8,
261
- parentId: null,
262
- moduleFormConfigs: [],
263
- pageUrl: 'blog',
264
- depth: 0,
265
- localizeInfos: {
266
- title: 'Blog',
267
- menuTitle: 'Blog',
268
- htmlContent: '',
269
- plainContent: '',
270
- },
271
- isVisible: true,
272
- forms: [],
273
- blocks: [],
274
- type: 'common_page',
275
- templateIdentifier: 'template',
276
- attributeSetIdentifier: 'page',
277
- attributeValues: {},
278
- isSync: true,
279
- template: {
280
- id: 4,
281
- attributeSetIdentifier: null,
282
- title: 'Template',
283
- generalTypeId: 4,
284
- identifier: 'template',
285
- version: 0,
286
- generalTypeName: 'catalog_page',
287
- attributeValues: {},
288
- position: 1,
289
- },
290
- }
291
- ]
292
- * @return {any} An array of page objects with template data added
248
+ * @param {IPagesEntity[]} data - An array of page objects (IPagesEntity[]) to which template data will be added. Example:
249
+ [
250
+ {
251
+ id: 8,
252
+ parentId: null,
253
+ moduleFormConfigs: [],
254
+ pageUrl: 'blog',
255
+ depth: 0,
256
+ localizeInfos: {
257
+ title: 'Blog',
258
+ menuTitle: 'Blog',
259
+ htmlContent: '',
260
+ plainContent: '',
261
+ },
262
+ isVisible: true,
263
+ forms: [],
264
+ blocks: [],
265
+ type: 'common_page',
266
+ templateIdentifier: 'template',
267
+ attributeSetIdentifier: 'page',
268
+ attributeValues: {},
269
+ isSync: true,
270
+ template: {
271
+ id: 4,
272
+ attributeSetIdentifier: null,
273
+ title: 'Template',
274
+ generalTypeId: 4,
275
+ identifier: 'template',
276
+ version: 0,
277
+ generalTypeName: 'catalog_page',
278
+ attributeValues: {},
279
+ position: 1,
280
+ },
281
+ }
282
+ ]
283
+ * @returns {any} An array of page objects with template data added
293
284
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
294
285
  * @description Add template data to pages
295
286
  */
@@ -304,11 +295,9 @@ class PageApi extends asyncModules_1.default {
304
295
  }
305
296
  /**
306
297
  * Add template data to page by page templateIdentifier
307
- *
308
298
  * @handleName addTemplateToPage
309
- *
310
- * @param {IPagesEntity} data - Page object (IPagesEntity) to which template data will be added.
311
- * @return {any} An array of page objects with template data added
299
+ * @param {IPagesEntity} data - Page object (IPagesEntity) to which template data will be added.
300
+ * @returns {any} An array of page objects with template data added
312
301
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
313
302
  * @description Add template data to page by page templateIdentifier
314
303
  */
@@ -332,6 +321,7 @@ class PageApi extends asyncModules_1.default {
332
321
  }
333
322
  catch (error) {
334
323
  // Log any errors that occur during the template fetching process
324
+ // eslint-disable-next-line no-undef, no-console
335
325
  console.error('Template fetch error: ', error);
336
326
  // Return the original data object unchanged if an error occurs
337
327
  return data;