oneentry 1.0.123 → 1.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -22
- package/dist/admins/adminsApi.d.ts +30 -9
- package/dist/admins/adminsApi.js +30 -9
- package/dist/admins/adminsInterfaces.d.ts +77 -32
- package/dist/attribute-sets/attributeSetsApi.d.ts +36 -22
- package/dist/attribute-sets/attributeSetsApi.js +41 -25
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +133 -39
- package/dist/auth-provider/authProviderApi.d.ts +209 -88
- package/dist/auth-provider/authProviderApi.js +226 -87
- package/dist/auth-provider/authProvidersInterfaces.d.ts +345 -18
- package/dist/base/asyncModules.d.ts +38 -28
- package/dist/base/asyncModules.js +178 -47
- package/dist/base/result.js +23 -0
- package/dist/base/syncModules.d.ts +48 -44
- package/dist/base/syncModules.js +84 -64
- package/dist/base/utils.d.ts +1 -1
- package/dist/blocks/blocksApi.d.ts +48 -27
- package/dist/blocks/blocksApi.js +48 -27
- package/dist/blocks/blocksInterfaces.d.ts +126 -32
- package/dist/events/eventsApi.d.ts +45 -12
- package/dist/events/eventsApi.js +47 -12
- package/dist/events/eventsInterfaces.d.ts +50 -3
- package/dist/file-uploading/fileUploadingApi.d.ts +57 -29
- package/dist/file-uploading/fileUploadingApi.js +57 -30
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +90 -17
- package/dist/forms/formsApi.d.ts +20 -9
- package/dist/forms/formsApi.js +19 -8
- package/dist/forms/formsInterfaces.d.ts +86 -23
- package/dist/formsData/formsDataApi.d.ts +33 -21
- package/dist/formsData/formsDataApi.js +33 -21
- package/dist/formsData/formsDataInterfaces.d.ts +212 -41
- package/dist/general-types/generalTypesApi.d.ts +11 -2
- package/dist/general-types/generalTypesApi.js +10 -1
- package/dist/general-types/generalTypesInterfaces.d.ts +17 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/integration-collections/integrationCollectionsApi.d.ts +134 -81
- package/dist/integration-collections/integrationCollectionsApi.js +135 -83
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +246 -43
- package/dist/locales/localesApi.d.ts +5 -1
- package/dist/locales/localesApi.js +5 -1
- package/dist/locales/localesInterfaces.d.ts +19 -12
- package/dist/menus/menusApi.d.ts +6 -3
- package/dist/menus/menusApi.js +6 -3
- package/dist/menus/menusInterfaces.d.ts +60 -21
- package/dist/orders/ordersApi.d.ts +84 -66
- package/dist/orders/ordersApi.js +91 -71
- package/dist/orders/ordersInterfaces.d.ts +282 -86
- package/dist/pages/pagesApi.d.ts +101 -42
- package/dist/pages/pagesApi.js +93 -39
- package/dist/pages/pagesInterfaces.d.ts +218 -75
- package/dist/payments/paymentsApi.d.ts +53 -39
- package/dist/payments/paymentsApi.js +55 -40
- package/dist/payments/paymentsInterfaces.d.ts +121 -56
- package/dist/product-statuses/productStatusesApi.d.ts +17 -17
- package/dist/product-statuses/productStatusesApi.js +16 -19
- package/dist/product-statuses/productStatusesInterfaces.d.ts +43 -14
- package/dist/products/productsApi.d.ts +309 -177
- package/dist/products/productsApi.js +313 -167
- package/dist/products/productsInterfaces.d.ts +447 -81
- package/dist/system/systemApi.d.ts +42 -12
- package/dist/system/systemApi.js +43 -10
- package/dist/system/systemInterfaces.d.ts +7 -0
- package/dist/templates/templatesApi.d.ts +24 -20
- package/dist/templates/templatesApi.js +22 -21
- package/dist/templates/templatesInterfaces.d.ts +48 -22
- package/dist/templates-preview/templatesPreviewApi.d.ts +17 -17
- package/dist/templates-preview/templatesPreviewApi.js +16 -19
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +85 -32
- package/dist/users/usersApi.d.ts +59 -35
- package/dist/users/usersApi.js +62 -35
- package/dist/users/usersInterfaces.d.ts +136 -14
- package/dist/web-socket/wsApi.d.ts +4 -5
- package/dist/web-socket/wsApi.js +4 -5
- package/dist/web-socket/wsInterfaces.d.ts +2 -1
- package/package.json +20 -18
package/dist/pages/pagesApi.js
CHANGED
|
@@ -18,9 +18,12 @@ class PageApi extends asyncModules_1.default {
|
|
|
18
18
|
/**
|
|
19
19
|
* Get all top-level page objects.
|
|
20
20
|
*
|
|
21
|
-
* @
|
|
21
|
+
* @handleName getRootPages
|
|
22
22
|
*
|
|
23
|
-
* @
|
|
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)
|
|
25
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
26
|
+
* @description Get all top-level page objects.
|
|
24
27
|
*/
|
|
25
28
|
async getRootPages(langCode = this.state.lang) {
|
|
26
29
|
// Fetch data from the server using a GET request to retrieve root pages for the specified language code
|
|
@@ -33,9 +36,12 @@ class PageApi extends asyncModules_1.default {
|
|
|
33
36
|
/**
|
|
34
37
|
* Get all page objects with product information as an array.
|
|
35
38
|
*
|
|
36
|
-
* @
|
|
39
|
+
* @handleName getPages
|
|
37
40
|
*
|
|
38
|
-
* @
|
|
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).
|
|
43
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
44
|
+
* @description Get all page objects with product information as an array.
|
|
39
45
|
*/
|
|
40
46
|
async getPages(langCode = this.state.lang) {
|
|
41
47
|
// Fetch data from the server using a GET request to retrieve all pages for the specified language code
|
|
@@ -48,10 +54,13 @@ class PageApi extends asyncModules_1.default {
|
|
|
48
54
|
/**
|
|
49
55
|
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
50
56
|
*
|
|
51
|
-
* @
|
|
52
|
-
* @param {string} [langCode] - Default language code, using the current state if not provided
|
|
57
|
+
* @handleName getPageById
|
|
53
58
|
*
|
|
54
|
-
* @
|
|
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
|
|
62
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
63
|
+
* @description Get page object with information about forms, blocks, menus, linked to the page.
|
|
55
64
|
*/
|
|
56
65
|
async getPageById(id, langCode = this.state.lang) {
|
|
57
66
|
// Fetch data from the server using a GET request to retrieve page details by ID and language code
|
|
@@ -64,10 +73,13 @@ class PageApi extends asyncModules_1.default {
|
|
|
64
73
|
/**
|
|
65
74
|
* Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
66
75
|
*
|
|
67
|
-
* @
|
|
68
|
-
* @param {string} [langCode] - lang code
|
|
76
|
+
* @handleName getPageByUrl
|
|
69
77
|
*
|
|
70
|
-
* @
|
|
78
|
+
* @param {string} url - Page URL. Example: "about".
|
|
79
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
80
|
+
* @return {IPagesEntity} Returns PageEntity object
|
|
81
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
82
|
+
* @description Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
71
83
|
*/
|
|
72
84
|
async getPageByUrl(url, langCode = this.state.lang) {
|
|
73
85
|
// Fetch data from the server using a GET request with the specified URL and language code
|
|
@@ -80,10 +92,13 @@ class PageApi extends asyncModules_1.default {
|
|
|
80
92
|
/**
|
|
81
93
|
* Get child pages object with information as an array.
|
|
82
94
|
*
|
|
83
|
-
* @
|
|
84
|
-
* @param {string} [langCode] - Required parameter langCode. Default language code, using the current state if not provided
|
|
95
|
+
* @handleName getChildPagesByParentUrl
|
|
85
96
|
*
|
|
86
|
-
* @
|
|
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
|
|
100
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
101
|
+
* @description Get child pages object with information as an array.
|
|
87
102
|
*/
|
|
88
103
|
async getChildPagesByParentUrl(url, langCode = this.state.lang) {
|
|
89
104
|
// Fetch data from the server using a GET request to retrieve child pages for the specified parent URL and language code
|
|
@@ -96,10 +111,13 @@ class PageApi extends asyncModules_1.default {
|
|
|
96
111
|
/**
|
|
97
112
|
* Get all blocks by page url.
|
|
98
113
|
*
|
|
99
|
-
* @
|
|
100
|
-
* @param {string} [langCode] - lang code
|
|
114
|
+
* @handleName getBlocksByPageUrl
|
|
101
115
|
*
|
|
102
|
-
* @
|
|
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
|
|
119
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
120
|
+
* @description Get all blocks by page url.
|
|
103
121
|
*/
|
|
104
122
|
async getBlocksByPageUrl(url, langCode = this.state.lang) {
|
|
105
123
|
const response = await this._fetchGet(`/${url}/blocks?langCode=${langCode}`);
|
|
@@ -180,26 +198,15 @@ class PageApi extends asyncModules_1.default {
|
|
|
180
198
|
// Return the final normalized response
|
|
181
199
|
return this._normalizeData(normalizeResponse);
|
|
182
200
|
}
|
|
183
|
-
/**
|
|
184
|
-
* Get all forms by page url.
|
|
185
|
-
*
|
|
186
|
-
* @param {string} [url] - The URL of the page for which forms are to be fetched
|
|
187
|
-
* @param {string} [langCode] - Default language code, using the current state if not provided
|
|
188
|
-
*
|
|
189
|
-
* @returns Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
|
|
190
|
-
*/
|
|
191
|
-
async getFormsByPageUrl(url, langCode = this.state.lang) {
|
|
192
|
-
// Fetch data from the server using a GET request to retrieve forms for the specified page URL and language code
|
|
193
|
-
const withTemplate = await this._fetchGet(`/${url}/forms?langCode=${langCode}`);
|
|
194
|
-
// Normalize the fetched result data and return it; ensures consistent structure or handles errors
|
|
195
|
-
return this._normalizeData(withTemplate, langCode);
|
|
196
|
-
}
|
|
197
201
|
/**
|
|
198
202
|
* Get settings for the page.
|
|
199
203
|
*
|
|
200
|
-
* @
|
|
204
|
+
* @handleName getConfigPageByUrl
|
|
201
205
|
*
|
|
202
|
-
* @
|
|
206
|
+
* @param {string} url - Page URL. Example: "about".
|
|
207
|
+
* @return {IPageConfig} Returns a ConfigPage object with page display settings
|
|
208
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
209
|
+
* @description Get settings for the page.
|
|
203
210
|
*/
|
|
204
211
|
async getConfigPageByUrl(url) {
|
|
205
212
|
// Fetch data from the server using a GET request to retrieve forms for the specified page URL and language code
|
|
@@ -210,10 +217,13 @@ class PageApi extends asyncModules_1.default {
|
|
|
210
217
|
/**
|
|
211
218
|
* Quick search for page objects with limited output.
|
|
212
219
|
*
|
|
213
|
-
* @
|
|
214
|
-
* @param {string} [langCode] - Default language code, using the current state if not provided
|
|
220
|
+
* @handleName searchPage
|
|
215
221
|
*
|
|
216
|
-
* @
|
|
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)
|
|
225
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
226
|
+
* @description Quick search for page objects with limited output.
|
|
217
227
|
*/
|
|
218
228
|
async searchPage(name, langCode = this.state.lang) {
|
|
219
229
|
// Fetch data from the server using a GET request to perform a quick search by page name and language code
|
|
@@ -241,8 +251,47 @@ class PageApi extends asyncModules_1.default {
|
|
|
241
251
|
}
|
|
242
252
|
/**
|
|
243
253
|
* Add template data to pages
|
|
244
|
-
*
|
|
245
|
-
* @
|
|
254
|
+
*
|
|
255
|
+
* @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
|
|
293
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
294
|
+
* @description Add template data to pages
|
|
246
295
|
*/
|
|
247
296
|
async addTemplateToPages(data) {
|
|
248
297
|
// Use Promise.all to handle an array of promises returned by mapping over 'data'
|
|
@@ -255,8 +304,13 @@ class PageApi extends asyncModules_1.default {
|
|
|
255
304
|
}
|
|
256
305
|
/**
|
|
257
306
|
* Add template data to page by page templateIdentifier
|
|
258
|
-
*
|
|
259
|
-
* @
|
|
307
|
+
*
|
|
308
|
+
* @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
|
|
312
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
313
|
+
* @description Add template data to page by page templateIdentifier
|
|
260
314
|
*/
|
|
261
315
|
async addTemplateToPage(data) {
|
|
262
316
|
// Check if 'templateIdentifier' exists in 'data' and is not null or an empty string
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
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
|
*
|
|
5
6
|
* @property {function} getRootPages - Get all top-level page objects.
|
|
6
7
|
* @property {function} getCatalogPages - Get all page objects with product information as an array.
|
|
@@ -8,125 +9,267 @@ 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
|
+
* @description This interface defines methods for retrieving and managing pages in the system.
|
|
14
15
|
*/
|
|
15
16
|
interface IPageApi {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Get all top-level page objects.
|
|
19
|
+
*
|
|
20
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
21
|
+
* @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
22
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
23
|
+
*/
|
|
24
|
+
getRootPages(langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
25
|
+
/**
|
|
26
|
+
* Get all page objects with product information as an array.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
29
|
+
* @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
|
|
30
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
31
|
+
*/
|
|
32
|
+
getPages(langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
33
|
+
/**
|
|
34
|
+
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
35
|
+
*
|
|
36
|
+
* @param {number} id - The unique identifier of the page to be fetched. Example: 123.
|
|
37
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
38
|
+
* @return {IPagesEntity} Returns PageEntity object
|
|
39
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
40
|
+
*/
|
|
18
41
|
getPageById(id: number, langCode?: LangType): Promise<IPagesEntity | IError>;
|
|
42
|
+
/**
|
|
43
|
+
* Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} url - Page URL. Example: "about".
|
|
46
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
47
|
+
* @return {IPagesEntity} Returns PageEntity object
|
|
48
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
49
|
+
*/
|
|
19
50
|
getPageByUrl(url: string, langCode?: LangType): Promise<IPagesEntity | IError>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Get child pages object with information as an array.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about".
|
|
55
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
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
|
|
57
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
58
|
+
*/
|
|
59
|
+
getChildPagesByParentUrl(url: string, langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
60
|
+
/**
|
|
61
|
+
* Get all blocks by page url.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} url - Page URL. Example: "about".
|
|
64
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
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
|
|
66
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
67
|
+
*/
|
|
68
|
+
getBlocksByPageUrl(url: string, langCode?: LangType): Promise<IPositionBlock[] | IError>;
|
|
69
|
+
/**
|
|
70
|
+
* Get settings for the page.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} url - Page URL. Example: "about".
|
|
73
|
+
* @return {IPageConfig} Returns a ConfigPage object with page display settings
|
|
74
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
75
|
+
*/
|
|
23
76
|
getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
|
|
24
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Quick search for page objects with limited output.
|
|
79
|
+
*
|
|
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".
|
|
81
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
82
|
+
* @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
83
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
84
|
+
*/
|
|
85
|
+
searchPage(name: string, langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
25
86
|
}
|
|
26
87
|
/**
|
|
27
|
-
*
|
|
88
|
+
* @interface IPageConfig
|
|
28
89
|
*
|
|
29
|
-
* @
|
|
30
|
-
* @property {number}
|
|
31
|
-
* @
|
|
90
|
+
* @property {number | null} rowsPerPage - Number of lines per page. Example: 1.
|
|
91
|
+
* @property {number | null} productsPerRow - Number of products per page. Example: 1.
|
|
92
|
+
* @description This interface defines the configuration for pagination in pages, including the number of rows and products displayed per page.
|
|
32
93
|
*/
|
|
33
94
|
interface IPageConfig {
|
|
34
95
|
rowsPerPage: number | null;
|
|
35
96
|
productsPerRow: number | null;
|
|
36
97
|
}
|
|
37
98
|
/**
|
|
38
|
-
*
|
|
99
|
+
* @interface IPositionForm
|
|
39
100
|
*
|
|
40
|
-
* @
|
|
41
|
-
* @property {number}
|
|
42
|
-
* @property {
|
|
43
|
-
* @property {
|
|
44
|
-
* @property {
|
|
45
|
-
* @property {
|
|
46
|
-
* @property {
|
|
47
|
-
* @property {
|
|
48
|
-
* @property {
|
|
49
|
-
|
|
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
|
+
}
|
|
146
|
+
* @description This interface defines the structure of a position form entity, including its identifiers, attributes, and processing data.
|
|
50
147
|
*/
|
|
51
148
|
interface IPositionForm {
|
|
52
149
|
id: number;
|
|
53
150
|
version: number;
|
|
54
151
|
identifier: string;
|
|
55
|
-
attributes: Array<IAttributes> | IAttributes;
|
|
56
152
|
attributeSetId: number;
|
|
57
153
|
processingType: string;
|
|
58
|
-
localizeInfos:
|
|
154
|
+
localizeInfos: ILocalizeInfo;
|
|
59
155
|
processingData: Record<string, any>;
|
|
60
156
|
position: number;
|
|
157
|
+
attributes: IAttributes[] | IAttributes;
|
|
61
158
|
}
|
|
62
159
|
/**
|
|
63
|
-
*
|
|
160
|
+
* @interface IPositionBlock
|
|
64
161
|
*
|
|
65
|
-
* @
|
|
66
|
-
* @property {
|
|
67
|
-
* @property {
|
|
68
|
-
* @property {number}
|
|
69
|
-
* @property {
|
|
70
|
-
* @property {
|
|
71
|
-
* @property {
|
|
72
|
-
* @property {
|
|
73
|
-
* @property {
|
|
74
|
-
* @property {
|
|
75
|
-
* @property {
|
|
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
|
+
}
|
|
186
|
+
* @description This interface defines the structure of a position block entity, including its identifiers, attributes, and visibility.
|
|
76
187
|
*/
|
|
77
188
|
interface IPositionBlock {
|
|
78
189
|
id: number;
|
|
79
|
-
|
|
190
|
+
attributeSetIdentifier: string | null;
|
|
191
|
+
localizeInfos: ILocalizeInfo;
|
|
80
192
|
version: number;
|
|
81
|
-
identifier: string;
|
|
82
|
-
localizeInfos: Record<string, any>;
|
|
83
193
|
position: number;
|
|
84
|
-
|
|
85
|
-
isVisible: boolean;
|
|
86
|
-
attributeValues: AttributeType;
|
|
87
|
-
attributeSetIdentifier: string | null;
|
|
194
|
+
identifier: string;
|
|
88
195
|
type: string;
|
|
89
196
|
templateIdentifier: string | null;
|
|
197
|
+
isVisible: boolean;
|
|
198
|
+
isSync: boolean;
|
|
199
|
+
attributeValues: AttributeType;
|
|
90
200
|
countElementsPerRow?: number;
|
|
201
|
+
quantity?: number;
|
|
91
202
|
}
|
|
92
203
|
/**
|
|
93
|
-
*
|
|
204
|
+
* @interface IPagesEntity
|
|
94
205
|
*
|
|
95
|
-
* @
|
|
96
|
-
* @property {number}
|
|
97
|
-
* @property {
|
|
98
|
-
* @property {
|
|
99
|
-
* @property {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
* @property {
|
|
107
|
-
* @property {
|
|
108
|
-
* @property {
|
|
109
|
-
* @property {
|
|
110
|
-
* @property {
|
|
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
|
+
}
|
|
253
|
+
* @description This interface defines the structure of a page entity, including its identifiers, attributes, and hierarchical relationships.
|
|
111
254
|
*/
|
|
112
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;
|
|
113
264
|
attributeSetIdentifier: string | null;
|
|
114
265
|
attributeValues: AttributeType;
|
|
115
|
-
childrenCount?: number;
|
|
116
|
-
config?: Record<string, number>;
|
|
117
|
-
depth: number;
|
|
118
|
-
id: number;
|
|
119
266
|
isSync: boolean;
|
|
120
|
-
|
|
121
|
-
forms?: Record<string, any>;
|
|
122
|
-
blocks?: Record<string, any>;
|
|
123
|
-
localizeInfos: Record<string, any>;
|
|
124
|
-
pageUrl: string;
|
|
125
|
-
parentId: number | null;
|
|
267
|
+
template?: any;
|
|
126
268
|
position?: number;
|
|
269
|
+
config?: Record<string, number>;
|
|
127
270
|
products?: number;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
271
|
+
childrenCount?: number;
|
|
272
|
+
blocks?: Record<string, any>;
|
|
273
|
+
moduleFormConfigs?: Array<IFormConfig>;
|
|
131
274
|
}
|
|
132
275
|
export type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock, IPositionForm, };
|