oneentry 1.0.124 → 1.0.125

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +24 -22
  2. package/dist/admins/adminsApi.d.ts +17 -4
  3. package/dist/admins/adminsApi.js +16 -3
  4. package/dist/admins/adminsInterfaces.d.ts +47 -26
  5. package/dist/attribute-sets/attributeSetsApi.d.ts +10 -18
  6. package/dist/attribute-sets/attributeSetsApi.js +9 -17
  7. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +92 -44
  8. package/dist/auth-provider/authProviderApi.d.ts +146 -36
  9. package/dist/auth-provider/authProviderApi.js +163 -37
  10. package/dist/auth-provider/authProvidersInterfaces.d.ts +189 -40
  11. package/dist/base/asyncModules.d.ts +7 -1
  12. package/dist/base/asyncModules.js +127 -21
  13. package/dist/base/result.js +23 -0
  14. package/dist/base/syncModules.d.ts +4 -0
  15. package/dist/base/syncModules.js +19 -1
  16. package/dist/base/utils.d.ts +1 -1
  17. package/dist/blocks/blocksApi.d.ts +7 -17
  18. package/dist/blocks/blocksApi.js +7 -17
  19. package/dist/blocks/blocksInterfaces.d.ts +77 -32
  20. package/dist/events/eventsApi.d.ts +7 -8
  21. package/dist/events/eventsApi.js +12 -7
  22. package/dist/events/eventsInterfaces.d.ts +16 -11
  23. package/dist/file-uploading/fileUploadingApi.d.ts +22 -14
  24. package/dist/file-uploading/fileUploadingApi.js +20 -12
  25. package/dist/file-uploading/fileUploadingInterfaces.d.ts +42 -18
  26. package/dist/forms/formsApi.d.ts +3 -7
  27. package/dist/forms/formsApi.js +2 -6
  28. package/dist/forms/formsInterfaces.d.ts +44 -28
  29. package/dist/formsData/formsDataApi.d.ts +21 -9
  30. package/dist/formsData/formsDataApi.js +21 -9
  31. package/dist/formsData/formsDataInterfaces.d.ts +128 -45
  32. package/dist/general-types/generalTypesApi.d.ts +1 -3
  33. package/dist/general-types/generalTypesApi.js +0 -2
  34. package/dist/general-types/generalTypesInterfaces.d.ts +2 -4
  35. package/dist/index.d.ts +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/integration-collections/integrationCollectionsApi.d.ts +74 -47
  38. package/dist/integration-collections/integrationCollectionsApi.js +64 -45
  39. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +144 -63
  40. package/dist/locales/localesApi.d.ts +1 -2
  41. package/dist/locales/localesApi.js +1 -2
  42. package/dist/locales/localesInterfaces.d.ts +2 -4
  43. package/dist/menus/menusApi.d.ts +1 -3
  44. package/dist/menus/menusApi.js +1 -3
  45. package/dist/menus/menusInterfaces.d.ts +39 -13
  46. package/dist/orders/ordersApi.d.ts +36 -18
  47. package/dist/orders/ordersApi.js +40 -22
  48. package/dist/orders/ordersInterfaces.d.ts +163 -81
  49. package/dist/pages/pagesApi.d.ts +48 -48
  50. package/dist/pages/pagesApi.js +40 -45
  51. package/dist/pages/pagesInterfaces.d.ts +147 -98
  52. package/dist/payments/paymentsApi.d.ts +25 -45
  53. package/dist/payments/paymentsApi.js +27 -46
  54. package/dist/payments/paymentsInterfaces.d.ts +42 -60
  55. package/dist/product-statuses/productStatusesApi.d.ts +6 -12
  56. package/dist/product-statuses/productStatusesApi.js +5 -11
  57. package/dist/product-statuses/productStatusesInterfaces.d.ts +16 -15
  58. package/dist/products/productsApi.d.ts +256 -104
  59. package/dist/products/productsApi.js +263 -97
  60. package/dist/products/productsInterfaces.d.ts +343 -160
  61. package/dist/system/systemApi.d.ts +21 -10
  62. package/dist/system/systemApi.js +22 -8
  63. package/dist/system/systemInterfaces.d.ts +0 -1
  64. package/dist/templates/templatesApi.d.ts +6 -12
  65. package/dist/templates/templatesApi.js +4 -10
  66. package/dist/templates/templatesInterfaces.d.ts +20 -20
  67. package/dist/templates-preview/templatesPreviewApi.d.ts +2 -6
  68. package/dist/templates-preview/templatesPreviewApi.js +1 -5
  69. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +50 -25
  70. package/dist/users/usersApi.d.ts +33 -13
  71. package/dist/users/usersApi.js +38 -15
  72. package/dist/users/usersInterfaces.d.ts +78 -27
  73. package/dist/web-socket/wsApi.d.ts +1 -5
  74. package/dist/web-socket/wsApi.js +1 -5
  75. package/dist/web-socket/wsInterfaces.d.ts +0 -1
  76. package/package.json +18 -16
@@ -21,11 +21,9 @@ class PageApi extends asyncModules_1.default {
21
21
  * @handleName getRootPages
22
22
  *
23
23
  * @param {string} [langCode] - Language code. Default: "en_US".
24
- *
25
24
  * @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
26
25
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
27
- *
28
- * @description
26
+ * @description Get all top-level page objects.
29
27
  */
30
28
  async getRootPages(langCode = this.state.lang) {
31
29
  // Fetch data from the server using a GET request to retrieve root pages for the specified language code
@@ -41,10 +39,8 @@ class PageApi extends asyncModules_1.default {
41
39
  * @handleName getPages
42
40
  *
43
41
  * @param {string} [langCode] - Language code. Default: "en_US".
44
- *
45
42
  * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
46
43
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
47
- *
48
44
  * @description Get all page objects with product information as an array.
49
45
  */
50
46
  async getPages(langCode = this.state.lang) {
@@ -62,10 +58,8 @@ class PageApi extends asyncModules_1.default {
62
58
  *
63
59
  * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
64
60
  * @param {string} [langCode] - Language code. Default: "en_US".
65
- *
66
61
  * @return {IPagesEntity} Returns PageEntity object
67
62
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
68
- *
69
63
  * @description Get page object with information about forms, blocks, menus, linked to the page.
70
64
  */
71
65
  async getPageById(id, langCode = this.state.lang) {
@@ -83,10 +77,8 @@ class PageApi extends asyncModules_1.default {
83
77
  *
84
78
  * @param {string} url - Page URL. Example: "about".
85
79
  * @param {string} [langCode] - Language code. Default: "en_US".
86
- *
87
80
  * @return {IPagesEntity} Returns PageEntity object
88
81
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
89
- *
90
82
  * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
91
83
  */
92
84
  async getPageByUrl(url, langCode = this.state.lang) {
@@ -104,10 +96,8 @@ class PageApi extends asyncModules_1.default {
104
96
  *
105
97
  * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
106
98
  * @param {string} [langCode] - Language code. Default: "en_US".
107
- *
108
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
109
100
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
110
- *
111
101
  * @description Get child pages object with information as an array.
112
102
  */
113
103
  async getChildPagesByParentUrl(url, langCode = this.state.lang) {
@@ -125,10 +115,8 @@ class PageApi extends asyncModules_1.default {
125
115
  *
126
116
  * @param {string} url - Page URL. Example: "about".
127
117
  * @param {string} [langCode] - Language code. Default: "en_US".
128
- *
129
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
130
119
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
131
- *
132
120
  * @description Get all blocks by page url.
133
121
  */
134
122
  async getBlocksByPageUrl(url, langCode = this.state.lang) {
@@ -210,35 +198,14 @@ class PageApi extends asyncModules_1.default {
210
198
  // Return the final normalized response
211
199
  return this._normalizeData(normalizeResponse);
212
200
  }
213
- /**
214
- * Get all forms by page url.
215
- *
216
- * @handleName getFormsByPageUrl
217
- *
218
- * @param {string} url - The URL of the page for which forms are to be fetched. Example: "about".
219
- * @param {string} [langCode] - Language code. Default: "en_US".
220
- *
221
- * @return {IPositionForm[]} Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
222
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
223
- *
224
- * @description Get all forms by page url.
225
- */
226
- async getFormsByPageUrl(url, langCode = this.state.lang) {
227
- // Fetch data from the server using a GET request to retrieve forms for the specified page URL and language code
228
- const withTemplate = await this._fetchGet(`/${url}/forms?langCode=${langCode}`);
229
- // Normalize the fetched result data and return it; ensures consistent structure or handles errors
230
- return this._normalizeData(withTemplate, langCode);
231
- }
232
201
  /**
233
202
  * Get settings for the page.
234
203
  *
235
204
  * @handleName getConfigPageByUrl
236
205
  *
237
206
  * @param {string} url - Page URL. Example: "about".
238
- *
239
207
  * @return {IPageConfig} Returns a ConfigPage object with page display settings
240
208
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
241
- *
242
209
  * @description Get settings for the page.
243
210
  */
244
211
  async getConfigPageByUrl(url) {
@@ -254,10 +221,8 @@ class PageApi extends asyncModules_1.default {
254
221
  *
255
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".
256
223
  * @param {string} [langCode] - Language code. Default: "en_US".
257
- *
258
224
  * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
259
225
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
260
- *
261
226
  * @description Quick search for page objects with limited output.
262
227
  */
263
228
  async searchPage(name, langCode = this.state.lang) {
@@ -289,11 +254,43 @@ class PageApi extends asyncModules_1.default {
289
254
  *
290
255
  * @handleName addTemplateToPages
291
256
  *
292
- * @param data - An array of page objects (IPagesEntity[]) to which template data will be added. Example: .
293
- *
294
- * @return - An array of page objects with template data added
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
295
293
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
296
- *
297
294
  * @description Add template data to pages
298
295
  */
299
296
  async addTemplateToPages(data) {
@@ -310,12 +307,10 @@ class PageApi extends asyncModules_1.default {
310
307
  *
311
308
  * @handleName addTemplateToPage
312
309
  *
313
- * @param data - An array of page objects (IPagesEntity[]) to which template data will be added. Example: .
314
- *
315
- * @return - An array of page objects with template data added
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
316
312
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
317
- *
318
- * @description
313
+ * @description Add template data to page by page templateIdentifier
319
314
  */
320
315
  async addTemplateToPage(data) {
321
316
  // Check if 'templateIdentifier' exists in 'data' and is not null or an empty string
@@ -1,4 +1,5 @@
1
- import type { AttributeType, IAttributes, IError, LangType, Types } from '../base/utils';
1
+ import type { IFormConfig } from 'forms/formsInterfaces';
2
+ import type { AttributeType, IAttributes, IError, ILocalizeInfo, LangType, Types } from '../base/utils';
2
3
  /**
3
4
  * @interface IPageApi
4
5
  *
@@ -8,10 +9,8 @@ import type { AttributeType, IAttributes, IError, LangType, Types } from '../bas
8
9
  * @property {function} getPageById - Get page object with information about forms, blocks, menus, linked to the page.
9
10
  * @property {function} getPageByUrl - Get page object with information about forms, blocks, menus, linked to the page by URL.
10
11
  * @property {function} getChildPagesByParentUrl - Get child pages object with information as an array.
11
- * @property {function} getFormsByPageUrl - Get all forms by page url.
12
12
  * @property {function} getConfigPageByUrl - Get settings for the page.
13
13
  * @property {function} searchPage - Quick search for page objects with limited output.
14
- *
15
14
  * @description This interface defines methods for retrieving and managing pages in the system.
16
15
  */
17
16
  interface IPageApi {
@@ -19,26 +18,23 @@ interface IPageApi {
19
18
  * Get all top-level page objects.
20
19
  *
21
20
  * @param {string} [langCode] - Language code. Default: "en_US".
22
- *
23
21
  * @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
24
22
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
25
23
  */
26
- getRootPages(langCode?: LangType): Promise<Array<IPagesEntity> | IError>;
24
+ getRootPages(langCode?: LangType): Promise<IPagesEntity[] | IError>;
27
25
  /**
28
26
  * Get all page objects with product information as an array.
29
27
  *
30
28
  * @param {string} [langCode] - Language code. Default: "en_US".
31
- *
32
29
  * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
33
30
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
31
  */
35
- getPages(langCode?: LangType): Promise<Array<IPagesEntity> | IError>;
32
+ getPages(langCode?: LangType): Promise<IPagesEntity[] | IError>;
36
33
  /**
37
34
  * Get page object with information about forms, blocks, menus, linked to the page.
38
35
  *
39
36
  * @param {number} id - The unique identifier of the page to be fetched. Example: 123.
40
37
  * @param {string} [langCode] - Language code. Default: "en_US".
41
- *
42
38
  * @return {IPagesEntity} Returns PageEntity object
43
39
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
44
40
  */
@@ -48,7 +44,6 @@ interface IPageApi {
48
44
  *
49
45
  * @param {string} url - Page URL. Example: "about".
50
46
  * @param {string} [langCode] - Language code. Default: "en_US".
51
- *
52
47
  * @return {IPagesEntity} Returns PageEntity object
53
48
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
54
49
  */
@@ -58,40 +53,23 @@ interface IPageApi {
58
53
  *
59
54
  * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about".
60
55
  * @param {string} [langCode] - Language code. Default: "en_US".
61
- *
62
56
  * @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
63
57
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
64
58
  */
65
- getChildPagesByParentUrl(url: string, langCode?: LangType): Promise<Array<IPagesEntity> | IError>;
59
+ getChildPagesByParentUrl(url: string, langCode?: LangType): Promise<IPagesEntity[] | IError>;
66
60
  /**
67
61
  * Get all blocks by page url.
68
62
  *
69
63
  * @param {string} url - Page URL. Example: "about".
70
64
  * @param {string} [langCode] - Language code. Default: "en_US".
71
- *
72
65
  * @return {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
73
66
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
74
67
  */
75
- getBlocksByPageUrl(url: string, langCode?: LangType): Promise<Array<IPositionBlock> | IError>;
76
- /**
77
- * Get all forms by page url.
78
- *
79
- * @handleName getFormsByPageUrl
80
- *
81
- * @param {string} url - The URL of the page for which forms are to be fetched. Example: "about".
82
- * @param {string} [langCode] - Language code. Default: "en_US".
83
- *
84
- * @return {IPositionForm[]} Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
85
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
86
- *
87
- * @description Get all forms by page url.
88
- */
89
- getFormsByPageUrl(url: string, langCode?: LangType): Promise<Array<IPositionForm> | IError>;
68
+ getBlocksByPageUrl(url: string, langCode?: LangType): Promise<IPositionBlock[] | IError>;
90
69
  /**
91
70
  * Get settings for the page.
92
71
  *
93
72
  * @param {string} url - Page URL. Example: "about".
94
- *
95
73
  * @return {IPageConfig} Returns a ConfigPage object with page display settings
96
74
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
97
75
  */
@@ -101,18 +79,16 @@ interface IPageApi {
101
79
  *
102
80
  * @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".
103
81
  * @param {string} [langCode] - Language code. Default: "en_US".
104
- *
105
82
  * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
106
83
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
107
84
  */
108
- searchPage(name: string, langCode?: LangType): Promise<Array<IPagesEntity> | IError>;
85
+ searchPage(name: string, langCode?: LangType): Promise<IPagesEntity[] | IError>;
109
86
  }
110
87
  /**
111
88
  * @interface IPageConfig
112
89
  *
113
- * @property {number} rowsPerPage - Number of lines per page.
114
- * @property {number} rowsPerPage - Number of products per page.
115
- *
90
+ * @property {number | null} rowsPerPage - Number of lines per page. Example: 1.
91
+ * @property {number | null} productsPerRow - Number of products per page. Example: 1.
116
92
  * @description This interface defines the configuration for pagination in pages, including the number of rows and products displayed per page.
117
93
  */
118
94
  interface IPageConfig {
@@ -122,105 +98,178 @@ interface IPageConfig {
122
98
  /**
123
99
  * @interface IPositionForm
124
100
  *
125
- * @property {number} id - The identifier of the object.
126
- * @property {number} version - The version number of the object.
127
- * @property {string} identifier - The textual identifier for the record field.
128
- * @property {Array<IAttributes>} attributes - Array of attribute values from the used attribute set for displaying the form (taking into account the specified language).
129
- * @property {number} attributeSetId - The identifier of the attribute set being used.
130
- * @property {string} processingType - Type of form processing.
131
- * @property {Record<string, any>} localizeInfos - The name of the page, taking into account localization.
132
- * @property {object} processingData - Form data.
133
- * @property {number} position - The position of the object.
134
- *
101
+ * @property {number} id - The identifier of the object. Example: 1764.
102
+ * @property {number} version - The version number of the object. Example: 10.
103
+ * @property {string} identifier - The textual identifier for the record field. Example: "catalog".
104
+ * @property {number} attributeSetId - The identifier of the attribute set being used. Example: 0.
105
+ * @property {string} processingType - Type of form processing. Example: "email".
106
+ * @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization. Example:
107
+ * @property {object} processingData - Form data. Example: {}.
108
+ * @property {number} position - The position of the object. Example: 0.
109
+ * @property {IAttributes[]} attributes - Array of attribute values from the used attribute set for displaying the form (taking into account the specified language). Example:
110
+ [
111
+ {
112
+ "type": "list",
113
+ "marker": "list_marker",
114
+ "position": 2,
115
+ "listTitles": [
116
+ {
117
+ "title": "red",
118
+ "value": 1,
119
+ "position": 1,
120
+ "extendedValue": null,
121
+ "extendedValueType": null
122
+ },
123
+ {
124
+ "title": "yellow",
125
+ "value": 2,
126
+ "position": 2,
127
+ "extendedValue": null,
128
+ "extendedValueType": null
129
+ }
130
+ ],
131
+ "validators": {},
132
+ "localizeInfos": {
133
+ "title": "l1"
134
+ }
135
+ }
136
+ ]
137
+ {
138
+ "title": "My form",
139
+ "titleForSite": "",
140
+ "successMessage": "",
141
+ "unsuccessMessage": "",
142
+ "urlAddress": "",
143
+ "database": "0",
144
+ "script": "0"
145
+ }
135
146
  * @description This interface defines the structure of a position form entity, including its identifiers, attributes, and processing data.
136
147
  */
137
148
  interface IPositionForm {
138
149
  id: number;
139
150
  version: number;
140
151
  identifier: string;
141
- attributes: Array<IAttributes> | IAttributes;
142
152
  attributeSetId: number;
143
153
  processingType: string;
144
- localizeInfos: Record<string, any>;
154
+ localizeInfos: ILocalizeInfo;
145
155
  processingData: Record<string, any>;
146
156
  position: number;
157
+ attributes: IAttributes[] | IAttributes;
147
158
  }
148
159
  /**
149
160
  * @interface IPositionBlock
150
161
  *
151
- * @property {number} id - The identifier of the object.
152
- * @property {number} [quantity] - Quantity pages in block.
153
- * @property {number} version - The version number of the object.
154
- * @property {string} identifier - The textual identifier for the record field.
155
- * @property {Record<string, any>} localizeInfos - The name of the page, taking into account localization.
156
- * @property {number} position - The position of the object.
157
- * @property {boolean} isSync - Indication of page indexing.
158
- * @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value).
159
- * @property {string} attributeSetIdentifier - Set of attributes id.
160
- * @property {boolean} isVisible - A sign of page visibility.
161
- * @property {Types} type - Page type.
162
- * @property {string | null} templateIdentifier - User id of the linked template.
163
- * @property {number} [countElementsPerRow] - Number of elements displayed per row in the block, if applicable.
164
- *
162
+ * @property {number} id - The identifier of the object. Example: 1.
163
+ * @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "block".
164
+ * @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization. Example:
165
+ * @property {number} version - The version number of the object. Example: 0.
166
+ * @property {number} position - The position of the object. Example: 1.
167
+ * @property {string} identifier - The textual identifier for the record field. Example: "product_block".
168
+ * @property {Types} type - Page type. Example: "product".
169
+ * @property {string | null} templateIdentifier - User id of the linked template. Example: null.
170
+ * @property {boolean} isVisible - A sign of page visibility. Example: true.
171
+ * @property {boolean} isSync - Indication of page indexing. Example: false.
172
+ * @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value). Example:
173
+ {
174
+ "block-text": {
175
+ "type": "string",
176
+ "value": "some text",
177
+ "position": 0,
178
+ "additionalFields": []
179
+ }
180
+ }
181
+ * @property {number} [countElementsPerRow] - Number of elements displayed per row in the block, if applicable. Example: 3.
182
+ * @property {number} [quantity] - Quantity pages in block. Example: 1.
183
+ {
184
+ "title": "Product Block"
185
+ }
165
186
  * @description This interface defines the structure of a position block entity, including its identifiers, attributes, and visibility.
166
187
  */
167
188
  interface IPositionBlock {
168
189
  id: number;
169
- quantity?: number;
190
+ attributeSetIdentifier: string | null;
191
+ localizeInfos: ILocalizeInfo;
170
192
  version: number;
171
- identifier: string;
172
- localizeInfos: Record<string, any>;
173
193
  position: number;
174
- isSync: boolean;
175
- isVisible: boolean;
176
- attributeValues: AttributeType;
177
- attributeSetIdentifier: string | null;
194
+ identifier: string;
178
195
  type: string;
179
196
  templateIdentifier: string | null;
197
+ isVisible: boolean;
198
+ isSync: boolean;
199
+ attributeValues: AttributeType;
180
200
  countElementsPerRow?: number;
201
+ quantity?: number;
181
202
  }
182
203
  /**
183
204
  * @interface IPagesEntity
184
205
  *
185
- * @property {string} attributeSetIdentifier - Set of attributes id.
186
- * @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value).
187
- * @property {number} [childrenCount] - Children count.
188
- * @property {Record<string, number>} [config] - Output settings for catalog pages.
189
- * @property {number} depth - Page nesting depth relative to parentId.
190
- * @property {number} id - The identifier of the object.
191
- * @property {boolean} isSync - Indication of page indexing.
192
- * @property {boolean} isVisible - A sign of page visibility.
193
- * @property {Record<string, any>} [forms] -
194
- * @property {Record<string, any>} [blocks] -
195
- * @property {Record<string, any>} localizeInfos - The name of the page, taking into account localization.
196
- * @property {string} pageUrl - Unique page Url.
197
- * @property {number} parentId - The id of the parent page, if it contains null, then it is the top-level page.
198
- * @property {number} [position] - Item number (for sorting).
199
- * @property {number} [products] - The number of products linked to the page.
200
- * @property {string} templateIdentifier - User id of the linked template.
201
- * @property {Types} type - Page type.
202
- * @property {any} [template] - Template object.
203
- *
206
+ * @property {number} id - The identifier of the object. Example: 8.
207
+ * @property {number | null} parentId - The id of the parent page, if it contains null, then it is the top-level page. Example: 10.
208
+ * @property {string} pageUrl - Unique page Url. Example: "blog".
209
+ * @property {number} depth - Page nesting depth relative to parentId. Example: 10.
210
+ * @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization. Example:
211
+ {
212
+ "title": "Blog",
213
+ "menuTitle": "Blog",
214
+ "htmlContent": "",
215
+ "plainContent": ""
216
+ }
217
+ * @property {boolean} isVisible - A sign of page visibility. Example: true.
218
+ * @property {Types} type - Page type. Example: "common_page".
219
+ * @property {string | null} templateIdentifier - User id of the linked template. Example: "template".
220
+ * @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "page".
221
+ * @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value). Example:
222
+ {
223
+ "text": {
224
+ "type": "string",
225
+ "value": "some text",
226
+ "position": 0,
227
+ "additionalFields": []
228
+ }
229
+ }
230
+ * @property {boolean} isSync - Indication of page indexing. Example: true.
231
+ * @property {any} [template] - Template object. Example:
232
+ * @property {number} [position] - Item number (for sorting). Example: 2.
233
+ * @property {any} [config] - Output settings for catalog pages. Example:
234
+ {
235
+ "rowsPerPage": 1,
236
+ "productsPerRow": 1
237
+ }
238
+ * @property {number} [products] - The number of products linked to the page. Example: 0.
239
+ * @property {number} [childrenCount] - Children count. Example: 1.
240
+ * @property {any} [forms]
241
+ * @property {any} [blocks]
242
+ {
243
+ "id": 4,
244
+ "attributeSetIdentifier": null,
245
+ "title": "Template",
246
+ "generalTypeId": 4,
247
+ "identifier": "template",
248
+ "version": 0,
249
+ "generalTypeName": "catalog_page",
250
+ "attributeValues": {},
251
+ "position": 1
252
+ }
204
253
  * @description This interface defines the structure of a page entity, including its identifiers, attributes, and hierarchical relationships.
205
254
  */
206
255
  interface IPagesEntity {
256
+ id: number;
257
+ parentId: number | null;
258
+ pageUrl: string;
259
+ depth: number;
260
+ localizeInfos: ILocalizeInfo;
261
+ isVisible: boolean;
262
+ type: Types;
263
+ templateIdentifier: string | null;
207
264
  attributeSetIdentifier: string | null;
208
265
  attributeValues: AttributeType;
209
- childrenCount?: number;
210
- config?: Record<string, number>;
211
- depth: number;
212
- id: number;
213
266
  isSync: boolean;
214
- isVisible: boolean;
215
- forms?: Record<string, any>;
216
- blocks?: Record<string, any>;
217
- localizeInfos: Record<string, any>;
218
- pageUrl: string;
219
- parentId: number | null;
267
+ template?: any;
220
268
  position?: number;
269
+ config?: Record<string, number>;
221
270
  products?: number;
222
- templateIdentifier: string | null;
223
- type: Types;
224
- template?: any;
271
+ childrenCount?: number;
272
+ blocks?: Record<string, any>;
273
+ moduleFormConfigs?: Array<IFormConfig>;
225
274
  }
226
275
  export type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock, IPositionForm, };