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
|
@@ -1,4 +1,5 @@
|
|
|
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
|
*
|
|
@@ -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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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}
|
|
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 {
|
|
129
|
-
* @property {
|
|
130
|
-
* @property {
|
|
131
|
-
* @property {
|
|
132
|
-
* @property {
|
|
133
|
-
* @property {
|
|
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:
|
|
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 {
|
|
153
|
-
* @property {
|
|
154
|
-
* @property {
|
|
155
|
-
* @property {
|
|
156
|
-
* @property {
|
|
157
|
-
* @property {
|
|
158
|
-
* @property {
|
|
159
|
-
* @property {
|
|
160
|
-
* @property {boolean}
|
|
161
|
-
* @property {
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
190
|
+
attributeSetIdentifier: string | null;
|
|
191
|
+
localizeInfos: ILocalizeInfo;
|
|
170
192
|
version: number;
|
|
171
|
-
identifier: string;
|
|
172
|
-
localizeInfos: Record<string, any>;
|
|
173
193
|
position: number;
|
|
174
|
-
|
|
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 {
|
|
186
|
-
* @property {
|
|
187
|
-
* @property {
|
|
188
|
-
* @property {
|
|
189
|
-
* @property {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
* @property {
|
|
197
|
-
* @property {
|
|
198
|
-
* @property {
|
|
199
|
-
* @property {
|
|
200
|
-
* @property {
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
|
|
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
|
-
|
|
223
|
-
|
|
224
|
-
|
|
271
|
+
childrenCount?: number;
|
|
272
|
+
blocks?: Record<string, any>;
|
|
273
|
+
moduleFormConfigs?: Array<IFormConfig>;
|
|
225
274
|
}
|
|
226
275
|
export type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock, IPositionForm, };
|
|
@@ -1,9 +1,10 @@
|
|
|
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 { IAccountsEntity,
|
|
4
|
+
import type { IAccountsEntity, ICreateSessionEntity, IPaymentsApi, ISessionEntity, ISessionsEntity } from './paymentsInterfaces';
|
|
5
5
|
/**
|
|
6
6
|
* Controllers for working with payments
|
|
7
|
+
*
|
|
7
8
|
* @handle /api/content/payments
|
|
8
9
|
*/
|
|
9
10
|
export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
@@ -11,104 +12,83 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
11
12
|
protected _url: string;
|
|
12
13
|
constructor(state: StateModule);
|
|
13
14
|
/**
|
|
14
|
-
* Get list of payment sessions.
|
|
15
|
+
* Get list of payment sessions. This method requires user authorization.
|
|
15
16
|
*
|
|
16
17
|
* @handleName getSessions
|
|
17
18
|
*
|
|
18
19
|
* @param {number} [offset] - Optional parameter for pagination. Default: 0.
|
|
19
20
|
* @param {number} [limit] - Optional parameter for pagination. Default: 30.
|
|
20
|
-
*
|
|
21
21
|
* @return {ISessionsEntity} Returns an array of SessionEntity objects.
|
|
22
22
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
23
|
-
*
|
|
24
|
-
* @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.
|
|
23
|
+
* @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.
|
|
25
24
|
*/
|
|
26
25
|
getSessions(offset?: number, limit?: number): Promise<ISessionsEntity | IError>;
|
|
27
26
|
/**
|
|
28
|
-
* Get a single payment session object by its identifier.
|
|
27
|
+
* Get a single payment session object by its identifier. This method requires user authorization.
|
|
29
28
|
*
|
|
30
29
|
* @handleName getSessionById
|
|
31
30
|
*
|
|
32
31
|
* @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
|
|
33
|
-
*
|
|
34
32
|
* @return {ISessionEntity} Returns a single payment session object.
|
|
35
33
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
36
|
-
*
|
|
37
|
-
* @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.
|
|
34
|
+
* @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.
|
|
38
35
|
*/
|
|
39
36
|
getSessionById(id: number): Promise<ISessionEntity | IError>;
|
|
40
37
|
/**
|
|
41
|
-
* Get one payment session object by order identifier
|
|
38
|
+
* Get one payment session object by order identifier
|
|
42
39
|
*
|
|
43
40
|
* @handleName getSessionByOrderId
|
|
44
41
|
*
|
|
45
42
|
* @param {number} id - Order identifier. Example: 12345.
|
|
46
|
-
*
|
|
47
|
-
* @return {IAccountsEntity}
|
|
43
|
+
* @return {IAccountsEntity} Returns a single payment account object.
|
|
48
44
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
49
|
-
*
|
|
50
|
-
* @description
|
|
45
|
+
* @description Get one payment session object by order identifier. This method requires user authorization.
|
|
51
46
|
*/
|
|
52
|
-
getSessionByOrderId(id: number): Promise<
|
|
47
|
+
getSessionByOrderId(id: number): Promise<ISessionEntity | IError>;
|
|
53
48
|
/**
|
|
54
|
-
* Creation of payment session.
|
|
49
|
+
* Creation of payment session. This method requires user authorization.
|
|
55
50
|
*
|
|
56
51
|
* @handleName createSession
|
|
57
52
|
*
|
|
58
53
|
* @param {number} orderId - Order identifier. Example: 12345.
|
|
59
|
-
* @param {'session' | 'intent'} type - Session type. Possible values:
|
|
54
|
+
* @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
|
|
60
55
|
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
|
|
61
|
-
*
|
|
62
56
|
* @return {ICreateSessionEntity} Returns a single payment session object.
|
|
63
57
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
64
|
-
*
|
|
65
|
-
* @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.
|
|
58
|
+
* @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.
|
|
66
59
|
*/
|
|
67
60
|
createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ICreateSessionEntity | IError>;
|
|
68
61
|
/**
|
|
69
|
-
* Get payment
|
|
70
|
-
*
|
|
71
|
-
* @handleName getConnected
|
|
72
|
-
*
|
|
73
|
-
* @return {IConnectedEntity} Returns object PaymentsConnected or null.
|
|
74
|
-
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
75
|
-
*
|
|
76
|
-
* @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.
|
|
77
|
-
*/
|
|
78
|
-
getConnected(): Promise<IConnectedEntity | null | IError>;
|
|
79
|
-
/**
|
|
80
|
-
* Get all payment accounts as an array.
|
|
62
|
+
* Get all payment accounts as an array. This method requires user authorization.
|
|
81
63
|
*
|
|
82
64
|
* @handleName getAccounts
|
|
83
65
|
*
|
|
84
66
|
* @return {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
85
67
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
86
|
-
*
|
|
87
|
-
* @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.
|
|
68
|
+
* @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.
|
|
88
69
|
*/
|
|
89
|
-
getAccounts(): Promise<
|
|
70
|
+
getAccounts(): Promise<IAccountsEntity[] | IError>;
|
|
90
71
|
/**
|
|
91
|
-
* Get a single payment account object by its identifier.
|
|
72
|
+
* Get a single payment account object by its identifier. This method requires user authorization.
|
|
92
73
|
*
|
|
93
74
|
* @handleName getAccountById
|
|
94
75
|
*
|
|
95
|
-
* @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.
|
|
96
|
-
*
|
|
97
76
|
* @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
|
|
98
|
-
*
|
|
77
|
+
* @param {any} settings - Settings object. Example: !!!
|
|
99
78
|
* @return {IAccountsEntity} Returns a single payment account object.
|
|
100
79
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
80
|
+
* @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.
|
|
101
81
|
*/
|
|
102
|
-
getAccountById(id: number): Promise<IAccountsEntity | IError>;
|
|
82
|
+
getAccountById(id: number, settings?: any): Promise<IAccountsEntity | IError>;
|
|
103
83
|
/**
|
|
104
|
-
* Webhook for
|
|
84
|
+
* Webhook for payment account.
|
|
105
85
|
*
|
|
106
|
-
* @handleName
|
|
86
|
+
* @handleName webhookByMarker
|
|
107
87
|
*
|
|
108
|
-
* @
|
|
88
|
+
* @param {number} marker - marker. Example: "stripe".
|
|
89
|
+
* @return {boolean} Returns ...!!!
|
|
109
90
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
110
|
-
*
|
|
111
91
|
* @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.
|
|
112
92
|
*/
|
|
113
|
-
|
|
93
|
+
webhookByMarker(marker: string): Promise<any | IError>;
|
|
114
94
|
}
|