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.
Files changed (83) hide show
  1. package/README.md +0 -2
  2. package/configure.js +25 -18
  3. package/dist/admins/adminsApi.d.ts +30 -25
  4. package/dist/admins/adminsApi.js +30 -25
  5. package/dist/admins/adminsInterfaces.d.ts +45 -54
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
  7. package/dist/attribute-sets/attributeSetsApi.js +26 -27
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
  9. package/dist/auth-provider/authProviderApi.d.ts +132 -158
  10. package/dist/auth-provider/authProviderApi.js +131 -157
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +30 -25
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -1
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +41 -49
  19. package/dist/base/syncModules.js +49 -48
  20. package/dist/base/utils.d.ts +38 -7
  21. package/dist/blocks/blocksApi.d.ts +27 -36
  22. package/dist/blocks/blocksApi.js +27 -36
  23. package/dist/blocks/blocksInterfaces.d.ts +92 -97
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +16 -33
  27. package/dist/events/eventsApi.js +32 -46
  28. package/dist/events/eventsInterfaces.d.ts +42 -37
  29. package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
  30. package/dist/file-uploading/fileUploadingApi.js +44 -47
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
  32. package/dist/forms/formsApi.d.ts +15 -14
  33. package/dist/forms/formsApi.js +15 -14
  34. package/dist/forms/formsInterfaces.d.ts +36 -40
  35. package/dist/forms-data/formsDataApi.d.ts +40 -44
  36. package/dist/forms-data/formsDataApi.js +42 -44
  37. package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
  38. package/dist/general-types/generalTypesApi.d.ts +5 -5
  39. package/dist/general-types/generalTypesApi.js +5 -5
  40. package/dist/general-types/generalTypesInterfaces.d.ts +6 -9
  41. package/dist/index.d.ts +12 -13
  42. package/dist/index.js +12 -13
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
  44. package/dist/integration-collections/integrationCollectionsApi.js +86 -102
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +14 -13
  49. package/dist/menus/menusApi.d.ts +9 -5
  50. package/dist/menus/menusApi.js +9 -5
  51. package/dist/menus/menusInterfaces.d.ts +43 -48
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +62 -70
  54. package/dist/orders/ordersApi.js +62 -71
  55. package/dist/orders/ordersInterfaces.d.ts +238 -203
  56. package/dist/pages/pagesApi.d.ts +67 -80
  57. package/dist/pages/pagesApi.js +71 -81
  58. package/dist/pages/pagesInterfaces.d.ts +164 -160
  59. package/dist/payments/paymentsApi.d.ts +24 -34
  60. package/dist/payments/paymentsApi.js +24 -38
  61. package/dist/payments/paymentsInterfaces.d.ts +82 -76
  62. package/dist/product-statuses/productStatusesApi.d.ts +13 -13
  63. package/dist/product-statuses/productStatusesApi.js +13 -13
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
  65. package/dist/products/productsApi.d.ts +246 -267
  66. package/dist/products/productsApi.js +247 -267
  67. package/dist/products/productsInterfaces.d.ts +333 -339
  68. package/dist/system/systemApi.d.ts +19 -21
  69. package/dist/system/systemApi.js +20 -21
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +13 -16
  72. package/dist/templates/templatesApi.js +13 -16
  73. package/dist/templates/templatesInterfaces.d.ts +30 -29
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
  75. package/dist/templates-preview/templatesPreviewApi.js +10 -11
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
  77. package/dist/users/usersApi.d.ts +36 -43
  78. package/dist/users/usersApi.js +36 -43
  79. package/dist/users/usersInterfaces.d.ts +92 -96
  80. package/dist/web-socket/wsApi.d.ts +5 -3
  81. package/dist/web-socket/wsApi.js +6 -3
  82. package/dist/web-socket/wsInterfaces.d.ts +7 -2
  83. 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 {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.
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 {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)
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 {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).
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 {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
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 {string} url - Page URL. Example: "about".
46
- * @param {string} [langCode] - Language code. Default: "en_US".
47
- * @return {IPagesEntity} Returns PageEntity object
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 {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
+ * @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 {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
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 {string} url - Page URL. Example: "about".
73
- * @return {IPageConfig} Returns a ConfigPage object with page display settings
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 {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)
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} 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
- }
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 - 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
- }
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} 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".
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 - 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
- }
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?: any;
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 {number} [offset] - Optional parameter for pagination. Default: 0.
20
- * @param {number} [limit] - Optional parameter for pagination. Default: 30.
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
- * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
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
- * @param {number} id - Order identifier. Example: 12345.
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 {number} orderId - Order identifier. Example: 12345.
54
- * @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
55
- * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
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
- * @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
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, settings?: any): Promise<IAccountsEntity | IError>;
74
+ getAccountById(id: number): Promise<IAccountsEntity | IError>;
83
75
  /**
84
76
  * Webhook for payment account.
85
- *
86
77
  * @handleName webhookByMarker
87
- *
88
- * @param {number} marker - marker. Example: "stripe".
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<any | IError>;
83
+ webhookByMarker(marker: string): Promise<boolean | IError>;
94
84
  }