oneentry 1.0.124 → 1.0.126
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 +17 -4
- package/dist/admins/adminsApi.js +16 -3
- package/dist/admins/adminsInterfaces.d.ts +47 -26
- package/dist/attribute-sets/attributeSetsApi.d.ts +10 -18
- package/dist/attribute-sets/attributeSetsApi.js +9 -17
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +92 -44
- package/dist/auth-provider/authProviderApi.d.ts +146 -36
- package/dist/auth-provider/authProviderApi.js +163 -37
- package/dist/auth-provider/authProvidersInterfaces.d.ts +189 -40
- package/dist/base/asyncModules.d.ts +7 -1
- package/dist/base/asyncModules.js +127 -21
- package/dist/base/result.js +23 -0
- package/dist/base/syncModules.d.ts +4 -0
- package/dist/base/syncModules.js +19 -1
- package/dist/base/utils.d.ts +1 -1
- package/dist/blocks/blocksApi.d.ts +7 -17
- package/dist/blocks/blocksApi.js +7 -17
- package/dist/blocks/blocksInterfaces.d.ts +77 -32
- package/dist/events/eventsApi.d.ts +7 -8
- package/dist/events/eventsApi.js +12 -7
- package/dist/events/eventsInterfaces.d.ts +16 -11
- package/dist/file-uploading/fileUploadingApi.d.ts +22 -14
- package/dist/file-uploading/fileUploadingApi.js +20 -12
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +42 -18
- package/dist/forms/formsApi.d.ts +3 -7
- package/dist/forms/formsApi.js +2 -6
- package/dist/forms/formsInterfaces.d.ts +44 -28
- package/dist/{formsData → forms-data}/formsDataApi.d.ts +31 -15
- package/dist/{formsData → forms-data}/formsDataApi.js +30 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +462 -0
- package/dist/general-types/generalTypesApi.d.ts +1 -3
- package/dist/general-types/generalTypesApi.js +0 -2
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +74 -47
- package/dist/integration-collections/integrationCollectionsApi.js +64 -45
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +144 -63
- package/dist/locales/localesApi.d.ts +1 -2
- package/dist/locales/localesApi.js +1 -2
- package/dist/locales/localesInterfaces.d.ts +2 -4
- package/dist/menus/menusApi.d.ts +1 -3
- package/dist/menus/menusApi.js +1 -3
- package/dist/menus/menusInterfaces.d.ts +39 -13
- package/dist/orders/ordersApi.d.ts +36 -18
- package/dist/orders/ordersApi.js +40 -22
- package/dist/orders/ordersInterfaces.d.ts +163 -81
- package/dist/pages/pagesApi.d.ts +48 -48
- package/dist/pages/pagesApi.js +40 -45
- package/dist/pages/pagesInterfaces.d.ts +147 -98
- package/dist/payments/paymentsApi.d.ts +25 -45
- package/dist/payments/paymentsApi.js +27 -46
- package/dist/payments/paymentsInterfaces.d.ts +42 -60
- package/dist/product-statuses/productStatusesApi.d.ts +6 -12
- package/dist/product-statuses/productStatusesApi.js +5 -11
- package/dist/product-statuses/productStatusesInterfaces.d.ts +16 -15
- package/dist/products/productsApi.d.ts +256 -104
- package/dist/products/productsApi.js +263 -97
- package/dist/products/productsInterfaces.d.ts +343 -160
- package/dist/system/systemApi.d.ts +21 -10
- package/dist/system/systemApi.js +22 -8
- package/dist/system/systemInterfaces.d.ts +0 -1
- package/dist/templates/templatesApi.d.ts +6 -12
- package/dist/templates/templatesApi.js +4 -10
- package/dist/templates/templatesInterfaces.d.ts +20 -20
- package/dist/templates-preview/templatesPreviewApi.d.ts +2 -6
- package/dist/templates-preview/templatesPreviewApi.js +1 -5
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +50 -25
- package/dist/users/usersApi.d.ts +33 -13
- package/dist/users/usersApi.js +38 -15
- package/dist/users/usersInterfaces.d.ts +78 -27
- package/dist/web-socket/wsApi.d.ts +1 -5
- package/dist/web-socket/wsApi.js +1 -5
- package/dist/web-socket/wsInterfaces.d.ts +0 -1
- package/package.json +18 -16
- package/dist/formsData/formsDataInterfaces.d.ts +0 -267
- /package/dist/{formsData → forms-data}/formsDataInterfaces.js +0 -0
package/dist/pages/pagesApi.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import AsyncModules from '../base/asyncModules';
|
|
2
2
|
import type StateModule from '../base/stateModule';
|
|
3
3
|
import type { IError } from '../base/utils';
|
|
4
|
-
import type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock
|
|
4
|
+
import type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock } from './pagesInterfaces';
|
|
5
5
|
/**
|
|
6
6
|
* Controllers for working with page objects, including catalog pages
|
|
7
7
|
* @handle /api/content/pages
|
|
@@ -16,26 +16,22 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
16
16
|
* @handleName getRootPages
|
|
17
17
|
*
|
|
18
18
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
19
|
-
*
|
|
20
19
|
* @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
21
20
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
22
|
-
*
|
|
23
|
-
* @description
|
|
21
|
+
* @description Get all top-level page objects.
|
|
24
22
|
*/
|
|
25
|
-
getRootPages(langCode?: string): Promise<
|
|
23
|
+
getRootPages(langCode?: string): Promise<IPagesEntity[] | IError>;
|
|
26
24
|
/**
|
|
27
25
|
* Get all page objects with product information as an array.
|
|
28
26
|
*
|
|
29
27
|
* @handleName getPages
|
|
30
28
|
*
|
|
31
29
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
32
|
-
*
|
|
33
30
|
* @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
|
|
34
31
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
35
|
-
*
|
|
36
32
|
* @description Get all page objects with product information as an array.
|
|
37
33
|
*/
|
|
38
|
-
getPages(langCode?: string): Promise<
|
|
34
|
+
getPages(langCode?: string): Promise<IPagesEntity[] | IError>;
|
|
39
35
|
/**
|
|
40
36
|
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
41
37
|
*
|
|
@@ -43,10 +39,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
43
39
|
*
|
|
44
40
|
* @param {number} id - The unique identifier of the page to be fetched. Example: 1.
|
|
45
41
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
46
|
-
*
|
|
47
42
|
* @return {IPagesEntity} Returns PageEntity object
|
|
48
43
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
49
|
-
*
|
|
50
44
|
* @description Get page object with information about forms, blocks, menus, linked to the page.
|
|
51
45
|
*/
|
|
52
46
|
getPageById(id: number, langCode?: string): Promise<IPagesEntity | IError>;
|
|
@@ -57,10 +51,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
57
51
|
*
|
|
58
52
|
* @param {string} url - Page URL. Example: "about".
|
|
59
53
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
60
|
-
*
|
|
61
54
|
* @return {IPagesEntity} Returns PageEntity object
|
|
62
55
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
63
|
-
*
|
|
64
56
|
* @description Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
65
57
|
*/
|
|
66
58
|
getPageByUrl(url: string, langCode?: string): Promise<IPagesEntity | IError>;
|
|
@@ -71,13 +63,11 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
71
63
|
*
|
|
72
64
|
* @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
|
|
73
65
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
74
|
-
*
|
|
75
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
|
|
76
67
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
77
|
-
*
|
|
78
68
|
* @description Get child pages object with information as an array.
|
|
79
69
|
*/
|
|
80
|
-
getChildPagesByParentUrl(url: string, langCode?: string): Promise<
|
|
70
|
+
getChildPagesByParentUrl(url: string, langCode?: string): Promise<IPagesEntity[] | IError>;
|
|
81
71
|
/**
|
|
82
72
|
* Get all blocks by page url.
|
|
83
73
|
*
|
|
@@ -85,37 +75,19 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
85
75
|
*
|
|
86
76
|
* @param {string} url - Page URL. Example: "about".
|
|
87
77
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
88
|
-
*
|
|
89
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
|
|
90
79
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
91
|
-
*
|
|
92
80
|
* @description Get all blocks by page url.
|
|
93
81
|
*/
|
|
94
|
-
getBlocksByPageUrl(url: string, langCode?: string): Promise<
|
|
95
|
-
/**
|
|
96
|
-
* Get all forms by page url.
|
|
97
|
-
*
|
|
98
|
-
* @handleName getFormsByPageUrl
|
|
99
|
-
*
|
|
100
|
-
* @param {string} url - The URL of the page for which forms are to be fetched. Example: "about".
|
|
101
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
102
|
-
*
|
|
103
|
-
* @return {IPositionForm[]} Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
|
|
104
|
-
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
105
|
-
*
|
|
106
|
-
* @description Get all forms by page url.
|
|
107
|
-
*/
|
|
108
|
-
getFormsByPageUrl(url: string, langCode?: string): Promise<Array<IPositionForm> | IError>;
|
|
82
|
+
getBlocksByPageUrl(url: string, langCode?: string): Promise<IPositionBlock[] | IError>;
|
|
109
83
|
/**
|
|
110
84
|
* Get settings for the page.
|
|
111
85
|
*
|
|
112
86
|
* @handleName getConfigPageByUrl
|
|
113
87
|
*
|
|
114
88
|
* @param {string} url - Page URL. Example: "about".
|
|
115
|
-
*
|
|
116
89
|
* @return {IPageConfig} Returns a ConfigPage object with page display settings
|
|
117
90
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
118
|
-
*
|
|
119
91
|
* @description Get settings for the page.
|
|
120
92
|
*/
|
|
121
93
|
getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
|
|
@@ -126,37 +98,65 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
126
98
|
*
|
|
127
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".
|
|
128
100
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
129
|
-
*
|
|
130
101
|
* @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
131
102
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
132
|
-
*
|
|
133
103
|
* @description Quick search for page objects with limited output.
|
|
134
104
|
*/
|
|
135
|
-
searchPage(name: string, langCode?: string): Promise<
|
|
105
|
+
searchPage(name: string, langCode?: string): Promise<IPagesEntity[] | IError>;
|
|
136
106
|
/**
|
|
137
107
|
* Add template data to pages
|
|
138
108
|
*
|
|
139
109
|
* @handleName addTemplateToPages
|
|
140
110
|
*
|
|
141
|
-
* @param data - An array of page objects (IPagesEntity[]) to which template data will be added. Example:
|
|
142
|
-
|
|
143
|
-
|
|
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
|
|
144
147
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
145
|
-
*
|
|
146
148
|
* @description Add template data to pages
|
|
147
149
|
*/
|
|
148
|
-
protected addTemplateToPages(data: IPagesEntity[]): Promise<
|
|
150
|
+
protected addTemplateToPages(data: IPagesEntity[]): Promise<any | IError>;
|
|
149
151
|
/**
|
|
150
152
|
* Add template data to page by page templateIdentifier
|
|
151
153
|
*
|
|
152
154
|
* @handleName addTemplateToPage
|
|
153
155
|
*
|
|
154
|
-
* @param data -
|
|
155
|
-
*
|
|
156
|
-
* @return - An array of page objects with template data added
|
|
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
|
|
157
158
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
158
|
-
*
|
|
159
|
-
* @description
|
|
159
|
+
* @description Add template data to page by page templateIdentifier
|
|
160
160
|
*/
|
|
161
|
-
protected addTemplateToPage(data: IPagesEntity): Promise<
|
|
161
|
+
protected addTemplateToPage(data: IPagesEntity): Promise<any | IError>;
|
|
162
162
|
}
|
package/dist/pages/pagesApi.js
CHANGED
|
@@ -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
|
-
|
|
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 -
|
|
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
|