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.
- package/README.md +0 -2
- package/configure.js +25 -18
- package/dist/admins/adminsApi.d.ts +30 -25
- package/dist/admins/adminsApi.js +30 -25
- package/dist/admins/adminsInterfaces.d.ts +45 -54
- package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
- package/dist/attribute-sets/attributeSetsApi.js +26 -27
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
- package/dist/auth-provider/authProviderApi.d.ts +132 -158
- package/dist/auth-provider/authProviderApi.js +131 -157
- package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
- package/dist/base/asyncModules.d.ts +23 -21
- package/dist/base/asyncModules.js +30 -25
- package/dist/base/result.d.ts +31 -0
- package/dist/base/result.js +32 -1
- package/dist/base/stateModule.d.ts +10 -0
- package/dist/base/stateModule.js +50 -2
- package/dist/base/syncModules.d.ts +41 -49
- package/dist/base/syncModules.js +49 -48
- package/dist/base/utils.d.ts +38 -7
- package/dist/blocks/blocksApi.d.ts +27 -36
- package/dist/blocks/blocksApi.js +27 -36
- package/dist/blocks/blocksInterfaces.d.ts +92 -97
- package/dist/config.d.ts +13 -0
- package/dist/config.js +30 -0
- package/dist/events/eventsApi.d.ts +16 -33
- package/dist/events/eventsApi.js +32 -46
- package/dist/events/eventsInterfaces.d.ts +42 -37
- package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
- package/dist/file-uploading/fileUploadingApi.js +44 -47
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
- package/dist/forms/formsApi.d.ts +15 -14
- package/dist/forms/formsApi.js +15 -14
- package/dist/forms/formsInterfaces.d.ts +36 -40
- package/dist/forms-data/formsDataApi.d.ts +40 -44
- package/dist/forms-data/formsDataApi.js +42 -44
- package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
- package/dist/general-types/generalTypesApi.d.ts +5 -5
- package/dist/general-types/generalTypesApi.js +5 -5
- package/dist/general-types/generalTypesInterfaces.d.ts +6 -9
- package/dist/index.d.ts +12 -13
- package/dist/index.js +12 -13
- package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
- package/dist/integration-collections/integrationCollectionsApi.js +86 -102
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
- package/dist/locales/localesApi.d.ts +7 -3
- package/dist/locales/localesApi.js +7 -3
- package/dist/locales/localesInterfaces.d.ts +14 -13
- package/dist/menus/menusApi.d.ts +9 -5
- package/dist/menus/menusApi.js +9 -5
- package/dist/menus/menusInterfaces.d.ts +43 -48
- package/dist/menus/menusInterfaces.js +1 -0
- package/dist/orders/ordersApi.d.ts +62 -70
- package/dist/orders/ordersApi.js +62 -71
- package/dist/orders/ordersInterfaces.d.ts +238 -203
- package/dist/pages/pagesApi.d.ts +67 -80
- package/dist/pages/pagesApi.js +71 -81
- package/dist/pages/pagesInterfaces.d.ts +164 -160
- package/dist/payments/paymentsApi.d.ts +24 -34
- package/dist/payments/paymentsApi.js +24 -38
- package/dist/payments/paymentsInterfaces.d.ts +82 -76
- package/dist/product-statuses/productStatusesApi.d.ts +13 -13
- package/dist/product-statuses/productStatusesApi.js +13 -13
- package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
- package/dist/products/productsApi.d.ts +246 -267
- package/dist/products/productsApi.js +247 -267
- package/dist/products/productsInterfaces.d.ts +333 -339
- package/dist/system/systemApi.d.ts +19 -21
- package/dist/system/systemApi.js +20 -21
- package/dist/system/systemInterfaces.d.ts +14 -3
- package/dist/templates/templatesApi.d.ts +13 -16
- package/dist/templates/templatesApi.js +13 -16
- package/dist/templates/templatesInterfaces.d.ts +30 -29
- package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
- package/dist/templates-preview/templatesPreviewApi.js +10 -11
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
- package/dist/users/usersApi.d.ts +36 -43
- package/dist/users/usersApi.js +36 -43
- package/dist/users/usersInterfaces.d.ts +92 -96
- package/dist/web-socket/wsApi.d.ts +5 -3
- package/dist/web-socket/wsApi.js +6 -3
- package/dist/web-socket/wsInterfaces.d.ts +7 -2
- package/package.json +16 -12
|
@@ -1,93 +1,100 @@
|
|
|
1
1
|
import type { IFormConfig } from 'forms/formsInterfaces';
|
|
2
|
+
import type { ITemplateEntity } from 'templates/templatesInterfaces';
|
|
2
3
|
import type { AttributeType, IAttributes, IError, ILocalizeInfo, LangType, Types } from '../base/utils';
|
|
3
4
|
/**
|
|
4
5
|
* @interface IPageApi
|
|
5
|
-
*
|
|
6
|
-
* @property {
|
|
7
|
-
* @property {
|
|
8
|
-
* @property {
|
|
9
|
-
* @property {
|
|
10
|
-
* @property {
|
|
11
|
-
* @property {
|
|
12
|
-
* @property {
|
|
13
|
-
* @property {function} searchPage - Quick search for page objects with limited output.
|
|
6
|
+
* @property {Function} getRootPages - Get all top-level page objects.
|
|
7
|
+
* @property {Function} getCatalogPages - Get all page objects with product information as an array.
|
|
8
|
+
* @property {Function} getPages - Get all page objects with product information as an array.
|
|
9
|
+
* @property {Function} getPageById - Get page object with information about forms, blocks, menus, linked to the page.
|
|
10
|
+
* @property {Function} getPageByUrl - Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
11
|
+
* @property {Function} getChildPagesByParentUrl - Get child pages object with information as an array.
|
|
12
|
+
* @property {Function} getConfigPageByUrl - Get settings for the page.
|
|
13
|
+
* @property {Function} searchPage - Quick search for page objects with limited output.
|
|
14
14
|
* @description This interface defines methods for retrieving and managing pages in the system.
|
|
15
15
|
*/
|
|
16
16
|
interface IPageApi {
|
|
17
17
|
/**
|
|
18
18
|
* Get all top-level page objects.
|
|
19
|
-
*
|
|
20
|
-
* @param
|
|
21
|
-
* @
|
|
19
|
+
* @handleName getRootPages
|
|
20
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
21
|
+
* @returns {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
22
22
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
23
|
+
* @description This method gets all top-level page objects.
|
|
23
24
|
*/
|
|
24
25
|
getRootPages(langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
25
26
|
/**
|
|
26
27
|
* Get all page objects with product information as an array.
|
|
27
|
-
*
|
|
28
|
-
* @param
|
|
29
|
-
* @
|
|
28
|
+
* @handleName getPages
|
|
29
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
30
|
+
* @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
|
|
30
31
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
32
|
+
* @description This method gets all page objects with product information as an array.
|
|
31
33
|
*/
|
|
32
34
|
getPages(langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
33
35
|
/**
|
|
34
36
|
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
35
|
-
*
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @
|
|
37
|
+
* @handleName getPageById
|
|
38
|
+
* @param {number} id - The unique identifier of the page to be fetched. Example: 123.
|
|
39
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
40
|
+
* @returns {IPagesEntity} Returns PageEntity object
|
|
39
41
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
42
|
+
* @description This method gets a page object with information about forms, blocks, menus, linked to the page.
|
|
40
43
|
*/
|
|
41
44
|
getPageById(id: number, langCode?: LangType): Promise<IPagesEntity | IError>;
|
|
42
45
|
/**
|
|
43
46
|
* Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
44
|
-
*
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
47
|
-
* @
|
|
47
|
+
* @handleName getPageByUrl
|
|
48
|
+
* @param {string} url - Page URL. Example: "about".
|
|
49
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
50
|
+
* @returns {IPagesEntity} Returns PageEntity object
|
|
48
51
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
52
|
+
* @description This method gets a page object with information about forms, blocks, menus, linked to the page by URL.
|
|
49
53
|
*/
|
|
50
54
|
getPageByUrl(url: string, langCode?: LangType): Promise<IPagesEntity | IError>;
|
|
51
55
|
/**
|
|
52
56
|
* Get child pages object with information as an array.
|
|
53
|
-
*
|
|
54
|
-
* @param
|
|
55
|
-
* @param
|
|
56
|
-
* @
|
|
57
|
+
* @handleName getChildPagesByParentUrl
|
|
58
|
+
* @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about".
|
|
59
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
60
|
+
* @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
|
|
57
61
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
62
|
+
* @description This method gets child pages object with information as an array.
|
|
58
63
|
*/
|
|
59
64
|
getChildPagesByParentUrl(url: string, langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
60
65
|
/**
|
|
61
66
|
* Get all blocks by page url.
|
|
62
|
-
*
|
|
63
|
-
* @param
|
|
64
|
-
* @param
|
|
65
|
-
* @
|
|
67
|
+
* @handleName getBlocksByPageUrl
|
|
68
|
+
* @param {string} url - Page URL. Example: "about".
|
|
69
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
70
|
+
* @returns {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
|
|
66
71
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
72
|
+
* @description This method gets all blocks by page url.
|
|
67
73
|
*/
|
|
68
74
|
getBlocksByPageUrl(url: string, langCode?: LangType): Promise<IPositionBlock[] | IError>;
|
|
69
75
|
/**
|
|
70
76
|
* Get settings for the page.
|
|
71
|
-
*
|
|
72
|
-
* @param
|
|
73
|
-
* @
|
|
77
|
+
* @handleName getConfigPageByUrl
|
|
78
|
+
* @param {string} url - Page URL. Example: "about".
|
|
79
|
+
* @returns {IPageConfig} Returns a ConfigPage object with page display settings
|
|
74
80
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
81
|
+
* @description This method gets settings for the page.
|
|
75
82
|
*/
|
|
76
83
|
getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
|
|
77
84
|
/**
|
|
78
85
|
* Quick search for page objects with limited output.
|
|
79
|
-
*
|
|
80
|
-
* @param
|
|
81
|
-
* @param
|
|
82
|
-
* @
|
|
86
|
+
* @handleName searchPage
|
|
87
|
+
* @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".
|
|
88
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
89
|
+
* @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
83
90
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
91
|
+
* @description This method performs a quick search for page objects with limited output.
|
|
84
92
|
*/
|
|
85
93
|
searchPage(name: string, langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
86
94
|
}
|
|
87
95
|
/**
|
|
88
96
|
* @interface IPageConfig
|
|
89
|
-
*
|
|
90
|
-
* @property {number | null} rowsPerPage - Number of lines per page. Example: 1.
|
|
97
|
+
* @property {number | null} rowsPerPage - Number of lines per page. Example: 1.
|
|
91
98
|
* @property {number | null} productsPerRow - Number of products per page. Example: 1.
|
|
92
99
|
* @description This interface defines the configuration for pagination in pages, including the number of rows and products displayed per page.
|
|
93
100
|
*/
|
|
@@ -97,52 +104,51 @@ interface IPageConfig {
|
|
|
97
104
|
}
|
|
98
105
|
/**
|
|
99
106
|
* @interface IPositionForm
|
|
100
|
-
*
|
|
101
|
-
* @property {number}
|
|
102
|
-
* @property {
|
|
103
|
-
* @property {
|
|
104
|
-
* @property {
|
|
105
|
-
* @property {
|
|
106
|
-
* @property {
|
|
107
|
-
* @property {
|
|
108
|
-
* @property {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
107
|
+
* @property {number} id - The identifier of the object. Example: 1764.
|
|
108
|
+
* @property {number} version - The version number of the object. Example: 10.
|
|
109
|
+
* @property {string} identifier - The textual identifier for the record field. Example: "catalog".
|
|
110
|
+
* @property {number} attributeSetId - The identifier of the attribute set being used. Example: 0.
|
|
111
|
+
* @property {string} processingType - Type of form processing. Example: "email".
|
|
112
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization. Example:
|
|
113
|
+
* @property {object} processingData - Form data. Example: {}.
|
|
114
|
+
* @property {number} position - The position of the object. Example: 0.
|
|
115
|
+
* @property {IAttributes[]} attributes - Array of attribute values from the used attribute set for displaying the form (taking into account the specified language). Example:
|
|
116
|
+
[
|
|
117
|
+
{
|
|
118
|
+
"type": "list",
|
|
119
|
+
"marker": "list_marker",
|
|
120
|
+
"position": 2,
|
|
121
|
+
"listTitles": [
|
|
122
|
+
{
|
|
123
|
+
"title": "red",
|
|
124
|
+
"value": 1,
|
|
125
|
+
"position": 1,
|
|
126
|
+
"extendedValue": null,
|
|
127
|
+
"extendedValueType": null
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"title": "yellow",
|
|
131
|
+
"value": 2,
|
|
132
|
+
"position": 2,
|
|
133
|
+
"extendedValue": null,
|
|
134
|
+
"extendedValueType": null
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"validators": {},
|
|
138
|
+
"localizeInfos": {
|
|
139
|
+
"title": "l1"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
{
|
|
144
|
+
"title": "My form",
|
|
145
|
+
"titleForSite": "",
|
|
146
|
+
"successMessage": "",
|
|
147
|
+
"unsuccessMessage": "",
|
|
148
|
+
"urlAddress": "",
|
|
149
|
+
"database": "0",
|
|
150
|
+
"script": "0"
|
|
151
|
+
}
|
|
146
152
|
* @description This interface defines the structure of a position form entity, including its identifiers, attributes, and processing data.
|
|
147
153
|
*/
|
|
148
154
|
interface IPositionForm {
|
|
@@ -158,31 +164,30 @@ interface IPositionForm {
|
|
|
158
164
|
}
|
|
159
165
|
/**
|
|
160
166
|
* @interface IPositionBlock
|
|
161
|
-
*
|
|
162
|
-
* @property {number} id - The identifier of the object. Example: 1.
|
|
167
|
+
* @property {number} id - The identifier of the object. Example: 1.
|
|
163
168
|
* @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "block".
|
|
164
|
-
* @property {ILocalizeInfo} localizeInfos
|
|
165
|
-
* @property {number}
|
|
166
|
-
* @property {number}
|
|
167
|
-
* @property {string}
|
|
168
|
-
* @property {Types}
|
|
169
|
-
* @property {string | null} templateIdentifier
|
|
170
|
-
* @property {boolean}
|
|
171
|
-
* @property {boolean}
|
|
172
|
-
* @property {AttributeType} attributeValues
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
* @property {number}
|
|
182
|
-
* @property {number}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
169
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization. Example:
|
|
170
|
+
* @property {number} version - The version number of the object. Example: 0.
|
|
171
|
+
* @property {number} position - The position of the object. Example: 1.
|
|
172
|
+
* @property {string} identifier - The textual identifier for the record field. Example: "product_block".
|
|
173
|
+
* @property {Types} type - Page type. Example: "product".
|
|
174
|
+
* @property {string | null} templateIdentifier - User id of the linked template. Example: null.
|
|
175
|
+
* @property {boolean} isVisible - A sign of page visibility. Example: true.
|
|
176
|
+
* @property {boolean} isSync - Indication of page indexing. Example: false.
|
|
177
|
+
* @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value). Example:
|
|
178
|
+
{
|
|
179
|
+
"block-text": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"value": "some text",
|
|
182
|
+
"position": 0,
|
|
183
|
+
"additionalFields": []
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
* @property {number} [countElementsPerRow] - Number of elements displayed per row in the block, if applicable. Example: 3.
|
|
187
|
+
* @property {number} [quantity] - Quantity pages in block. Example: 1.
|
|
188
|
+
{
|
|
189
|
+
"title": "Product Block"
|
|
190
|
+
}
|
|
186
191
|
* @description This interface defines the structure of a position block entity, including its identifiers, attributes, and visibility.
|
|
187
192
|
*/
|
|
188
193
|
interface IPositionBlock {
|
|
@@ -202,54 +207,52 @@ interface IPositionBlock {
|
|
|
202
207
|
}
|
|
203
208
|
/**
|
|
204
209
|
* @interface IPagesEntity
|
|
205
|
-
*
|
|
206
|
-
* @property {number}
|
|
207
|
-
* @property {
|
|
208
|
-
* @property {
|
|
209
|
-
* @property {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
* @property {
|
|
218
|
-
* @property {
|
|
219
|
-
* @property {string | null} templateIdentifier - User id of the linked template. Example: "template".
|
|
210
|
+
* @property {number} id - The identifier of the object. Example: 8.
|
|
211
|
+
* @property {number | null} parentId - The id of the parent page, if it contains null, then it is the top-level page. Example: 10.
|
|
212
|
+
* @property {string} pageUrl - Unique page Url. Example: "blog".
|
|
213
|
+
* @property {number} depth - Page nesting depth relative to parentId. Example: 10.
|
|
214
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization. Example:
|
|
215
|
+
{
|
|
216
|
+
"title": "Blog",
|
|
217
|
+
"menuTitle": "Blog",
|
|
218
|
+
"htmlContent": "",
|
|
219
|
+
"plainContent": ""
|
|
220
|
+
}
|
|
221
|
+
* @property {boolean} isVisible - A sign of page visibility. Example: true.
|
|
222
|
+
* @property {Types} type - Page type. Example: "common_page".
|
|
223
|
+
* @property {string | null} templateIdentifier - User id of the linked template. Example: "template".
|
|
220
224
|
* @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "page".
|
|
221
|
-
* @property {AttributeType} attributeValues
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
* @property {boolean}
|
|
231
|
-
* @property {any}
|
|
232
|
-
* @property {number}
|
|
233
|
-
* @property {any}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
* @property {number}
|
|
239
|
-
* @property {number}
|
|
240
|
-
* @property {any}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
225
|
+
* @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value). Example:
|
|
226
|
+
{
|
|
227
|
+
"text": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"value": "some text",
|
|
230
|
+
"position": 0,
|
|
231
|
+
"additionalFields": []
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
* @property {boolean} isSync - Indication of page indexing. Example: true.
|
|
235
|
+
* @property {any} [template] - Template object. Example:
|
|
236
|
+
* @property {number} [position] - Item number (for sorting). Example: 2.
|
|
237
|
+
* @property {any} [config] - Output settings for catalog pages. Example:
|
|
238
|
+
{
|
|
239
|
+
"rowsPerPage": 1,
|
|
240
|
+
"productsPerRow": 1
|
|
241
|
+
}
|
|
242
|
+
* @property {number} [products] - The number of products linked to the page. Example: 0.
|
|
243
|
+
* @property {number} [childrenCount] - Children count. Example: 1.
|
|
244
|
+
* @property {any} [blocks]
|
|
245
|
+
{
|
|
246
|
+
"id": 4,
|
|
247
|
+
"attributeSetIdentifier": null,
|
|
248
|
+
"title": "Template",
|
|
249
|
+
"generalTypeId": 4,
|
|
250
|
+
"identifier": "template",
|
|
251
|
+
"version": 0,
|
|
252
|
+
"generalTypeName": "catalog_page",
|
|
253
|
+
"attributeValues": {},
|
|
254
|
+
"position": 1
|
|
255
|
+
}
|
|
253
256
|
* @description This interface defines the structure of a page entity, including its identifiers, attributes, and hierarchical relationships.
|
|
254
257
|
*/
|
|
255
258
|
interface IPagesEntity {
|
|
@@ -259,17 +262,18 @@ interface IPagesEntity {
|
|
|
259
262
|
depth: number;
|
|
260
263
|
localizeInfos: ILocalizeInfo;
|
|
261
264
|
isVisible: boolean;
|
|
265
|
+
blocks?: any[];
|
|
266
|
+
forms?: any[];
|
|
262
267
|
type: Types;
|
|
263
268
|
templateIdentifier: string | null;
|
|
264
269
|
attributeSetIdentifier: string | null;
|
|
265
270
|
attributeValues: AttributeType;
|
|
271
|
+
moduleFormConfigs?: IFormConfig[];
|
|
266
272
|
isSync: boolean;
|
|
267
|
-
template?:
|
|
273
|
+
template?: ITemplateEntity;
|
|
268
274
|
position?: number;
|
|
269
275
|
config?: Record<string, number>;
|
|
270
276
|
products?: number;
|
|
271
277
|
childrenCount?: number;
|
|
272
|
-
blocks?: Record<string, any>;
|
|
273
|
-
moduleFormConfigs?: Array<IFormConfig>;
|
|
274
278
|
}
|
|
275
279
|
export type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock, IPositionForm, };
|
|
@@ -4,91 +4,81 @@ import type { IError } from '../base/utils';
|
|
|
4
4
|
import type { IAccountsEntity, ICreateSessionEntity, IPaymentsApi, ISessionEntity, ISessionsEntity } from './paymentsInterfaces';
|
|
5
5
|
/**
|
|
6
6
|
* Controllers for working with payments
|
|
7
|
-
*
|
|
8
7
|
* @handle /api/content/payments
|
|
8
|
+
* @description Controllers for working with payments
|
|
9
9
|
*/
|
|
10
10
|
export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
11
11
|
protected state: StateModule;
|
|
12
12
|
protected _url: string;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param {StateModule} state - StateModule instance
|
|
16
|
+
* @description Constructor initializes the PaymentsApi with a given state.
|
|
17
|
+
*/
|
|
13
18
|
constructor(state: StateModule);
|
|
14
19
|
/**
|
|
15
20
|
* Get list of payment sessions. This method requires user authorization.
|
|
16
|
-
*
|
|
17
21
|
* @handleName getSessions
|
|
18
|
-
*
|
|
19
|
-
* @param
|
|
20
|
-
* @
|
|
21
|
-
* @return {ISessionsEntity} Returns an array of SessionEntity objects.
|
|
22
|
+
* @param {number} [offset] - Optional parameter for pagination. Default: 0.
|
|
23
|
+
* @param {number} [limit] - Optional parameter for pagination. Default: 30.
|
|
24
|
+
* @returns {ISessionsEntity} Returns an array of SessionEntity objects.
|
|
22
25
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
23
26
|
* @description Get list of payment sessions. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
24
27
|
*/
|
|
25
28
|
getSessions(offset?: number, limit?: number): Promise<ISessionsEntity | IError>;
|
|
26
29
|
/**
|
|
27
30
|
* Get a single payment session object by its identifier. This method requires user authorization.
|
|
28
|
-
*
|
|
29
31
|
* @handleName getSessionById
|
|
30
|
-
*
|
|
31
|
-
* @
|
|
32
|
-
* @return {ISessionEntity} Returns a single payment session object.
|
|
32
|
+
* @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
|
|
33
|
+
* @returns {ISessionEntity} Returns a single payment session object.
|
|
33
34
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
34
35
|
* @description Get a single payment session object by its identifier. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
35
36
|
*/
|
|
36
37
|
getSessionById(id: number): Promise<ISessionEntity | IError>;
|
|
37
38
|
/**
|
|
38
39
|
* Get one payment session object by order identifier
|
|
39
|
-
*
|
|
40
40
|
* @handleName getSessionByOrderId
|
|
41
|
-
*
|
|
42
|
-
* @
|
|
43
|
-
* @return {IAccountsEntity} Returns a single payment account object.
|
|
41
|
+
* @param {number} id - Order identifier. Example: 12345.
|
|
42
|
+
* @returns {IAccountsEntity} Returns a single payment account object.
|
|
44
43
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
45
44
|
* @description Get one payment session object by order identifier. This method requires user authorization.
|
|
46
45
|
*/
|
|
47
46
|
getSessionByOrderId(id: number): Promise<ISessionEntity | IError>;
|
|
48
47
|
/**
|
|
49
48
|
* Creation of payment session. This method requires user authorization.
|
|
50
|
-
*
|
|
51
49
|
* @handleName createSession
|
|
52
|
-
*
|
|
53
|
-
* @param
|
|
54
|
-
* @param
|
|
55
|
-
* @
|
|
56
|
-
* @return {ICreateSessionEntity} Returns a single payment session object.
|
|
50
|
+
* @param {number} orderId - Order identifier. Example: 12345.
|
|
51
|
+
* @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
|
|
52
|
+
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
|
|
53
|
+
* @returns {ICreateSessionEntity} Returns a single payment session object.
|
|
57
54
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
58
55
|
* @description Creation of payment session. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
59
56
|
*/
|
|
60
57
|
createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ICreateSessionEntity | IError>;
|
|
61
58
|
/**
|
|
62
59
|
* Get all payment accounts as an array. This method requires user authorization.
|
|
63
|
-
*
|
|
64
60
|
* @handleName getAccounts
|
|
65
|
-
*
|
|
66
|
-
* @return {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
61
|
+
* @returns {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
67
62
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
68
63
|
* @description Get all payment accounts as an array. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
69
64
|
*/
|
|
70
65
|
getAccounts(): Promise<IAccountsEntity[] | IError>;
|
|
71
66
|
/**
|
|
72
67
|
* Get a single payment account object by its identifier. This method requires user authorization.
|
|
73
|
-
*
|
|
74
68
|
* @handleName getAccountById
|
|
75
|
-
*
|
|
76
|
-
* @
|
|
77
|
-
* @param {any} settings - Settings object. Example: !!!
|
|
78
|
-
* @return {IAccountsEntity} Returns a single payment account object.
|
|
69
|
+
* @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
|
|
70
|
+
* @returns {IAccountsEntity} Returns a single payment account object.
|
|
79
71
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
80
72
|
* @description Get a single payment account object by its identifier. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
81
73
|
*/
|
|
82
|
-
getAccountById(id: number
|
|
74
|
+
getAccountById(id: number): Promise<IAccountsEntity | IError>;
|
|
83
75
|
/**
|
|
84
76
|
* Webhook for payment account.
|
|
85
|
-
*
|
|
86
77
|
* @handleName webhookByMarker
|
|
87
|
-
*
|
|
88
|
-
* @
|
|
89
|
-
* @return {boolean} Returns ...!!!
|
|
78
|
+
* @param {string} marker - marker. Example: "stripe".
|
|
79
|
+
* @returns {boolean} Returns true if the webhook was processed successfully.
|
|
90
80
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
91
81
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
92
82
|
*/
|
|
93
|
-
webhookByMarker(marker: string): Promise<
|
|
83
|
+
webhookByMarker(marker: string): Promise<boolean | IError>;
|
|
94
84
|
}
|