oneentry 1.0.123 → 1.0.124

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 (73) hide show
  1. package/dist/admins/adminsApi.d.ts +16 -8
  2. package/dist/admins/adminsApi.js +17 -9
  3. package/dist/admins/adminsInterfaces.d.ts +49 -25
  4. package/dist/attribute-sets/attributeSetsApi.d.ts +43 -21
  5. package/dist/attribute-sets/attributeSetsApi.js +49 -25
  6. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +70 -24
  7. package/dist/auth-provider/authProviderApi.d.ts +94 -83
  8. package/dist/auth-provider/authProviderApi.js +96 -83
  9. package/dist/auth-provider/authProvidersInterfaces.d.ts +188 -10
  10. package/dist/base/asyncModules.d.ts +32 -28
  11. package/dist/base/asyncModules.js +61 -36
  12. package/dist/base/syncModules.d.ts +44 -44
  13. package/dist/base/syncModules.js +65 -63
  14. package/dist/blocks/blocksApi.d.ts +56 -25
  15. package/dist/blocks/blocksApi.js +56 -25
  16. package/dist/blocks/blocksInterfaces.d.ts +71 -22
  17. package/dist/events/eventsApi.d.ts +45 -11
  18. package/dist/events/eventsApi.js +47 -17
  19. package/dist/events/eventsInterfaces.d.ts +44 -2
  20. package/dist/file-uploading/fileUploadingApi.d.ts +44 -24
  21. package/dist/file-uploading/fileUploadingApi.js +46 -27
  22. package/dist/file-uploading/fileUploadingInterfaces.d.ts +63 -14
  23. package/dist/forms/formsApi.d.ts +23 -8
  24. package/dist/forms/formsApi.js +23 -8
  25. package/dist/forms/formsInterfaces.d.ts +62 -15
  26. package/dist/formsData/formsDataApi.d.ts +33 -33
  27. package/dist/formsData/formsDataApi.js +33 -33
  28. package/dist/formsData/formsDataInterfaces.d.ts +123 -35
  29. package/dist/general-types/generalTypesApi.d.ts +12 -1
  30. package/dist/general-types/generalTypesApi.js +12 -1
  31. package/dist/general-types/generalTypesInterfaces.d.ts +18 -5
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/integration-collections/integrationCollectionsApi.d.ts +96 -70
  35. package/dist/integration-collections/integrationCollectionsApi.js +114 -81
  36. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +152 -30
  37. package/dist/locales/localesApi.d.ts +6 -1
  38. package/dist/locales/localesApi.js +6 -1
  39. package/dist/locales/localesInterfaces.d.ts +20 -11
  40. package/dist/menus/menusApi.d.ts +8 -3
  41. package/dist/menus/menusApi.js +8 -3
  42. package/dist/menus/menusInterfaces.d.ts +30 -17
  43. package/dist/orders/ordersApi.d.ts +64 -64
  44. package/dist/orders/ordersApi.js +67 -65
  45. package/dist/orders/ordersInterfaces.d.ts +174 -60
  46. package/dist/pages/pagesApi.d.ts +87 -28
  47. package/dist/pages/pagesApi.js +87 -28
  48. package/dist/pages/pagesInterfaces.d.ts +117 -23
  49. package/dist/payments/paymentsApi.d.ts +56 -22
  50. package/dist/payments/paymentsApi.js +56 -22
  51. package/dist/payments/paymentsInterfaces.d.ts +119 -36
  52. package/dist/product-statuses/productStatusesApi.d.ts +21 -15
  53. package/dist/product-statuses/productStatusesApi.js +21 -18
  54. package/dist/product-statuses/productStatusesInterfaces.d.ts +37 -9
  55. package/dist/products/productsApi.d.ts +137 -157
  56. package/dist/products/productsApi.js +137 -157
  57. package/dist/products/productsInterfaces.d.ts +240 -57
  58. package/dist/system/systemApi.d.ts +29 -10
  59. package/dist/system/systemApi.js +29 -10
  60. package/dist/system/systemInterfaces.d.ts +8 -0
  61. package/dist/templates/templatesApi.d.ts +26 -16
  62. package/dist/templates/templatesApi.js +26 -19
  63. package/dist/templates/templatesInterfaces.d.ts +40 -14
  64. package/dist/templates-preview/templatesPreviewApi.d.ts +18 -14
  65. package/dist/templates-preview/templatesPreviewApi.js +18 -17
  66. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +54 -26
  67. package/dist/users/usersApi.d.ts +37 -33
  68. package/dist/users/usersApi.js +37 -33
  69. package/dist/users/usersInterfaces.d.ts +80 -9
  70. package/dist/web-socket/wsApi.d.ts +6 -3
  71. package/dist/web-socket/wsApi.js +6 -3
  72. package/dist/web-socket/wsInterfaces.d.ts +3 -1
  73. package/package.json +11 -11
@@ -18,9 +18,14 @@ class PageApi extends asyncModules_1.default {
18
18
  /**
19
19
  * Get all top-level page objects.
20
20
  *
21
- * @param {string} [langCode] - Default language code, using the current state if not provided
21
+ * @handleName getRootPages
22
22
  *
23
- * @returns Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
23
+ * @param {string} [langCode] - Language code. Default: "en_US".
24
+ *
25
+ * @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
26
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
27
+ *
28
+ * @description
24
29
  */
25
30
  async getRootPages(langCode = this.state.lang) {
26
31
  // Fetch data from the server using a GET request to retrieve root pages for the specified language code
@@ -33,9 +38,14 @@ class PageApi extends asyncModules_1.default {
33
38
  /**
34
39
  * Get all page objects with product information as an array.
35
40
  *
36
- * @param {string} [langCode] - Default language code, using the current state if not provided
41
+ * @handleName getPages
42
+ *
43
+ * @param {string} [langCode] - Language code. Default: "en_US".
44
+ *
45
+ * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
46
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
37
47
  *
38
- * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
48
+ * @description Get all page objects with product information as an array.
39
49
  */
40
50
  async getPages(langCode = this.state.lang) {
41
51
  // Fetch data from the server using a GET request to retrieve all pages for the specified language code
@@ -48,10 +58,15 @@ class PageApi extends asyncModules_1.default {
48
58
  /**
49
59
  * Get page object with information about forms, blocks, menus, linked to the page.
50
60
  *
51
- * @param {number} [id] - The unique identifier of the page to be fetched
52
- * @param {string} [langCode] - Default language code, using the current state if not provided
61
+ * @handleName getPageById
53
62
  *
54
- * @returns Returns PageEntity object
63
+ * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
64
+ * @param {string} [langCode] - Language code. Default: "en_US".
65
+ *
66
+ * @return {IPagesEntity} Returns PageEntity object
67
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
68
+ *
69
+ * @description Get page object with information about forms, blocks, menus, linked to the page.
55
70
  */
56
71
  async getPageById(id, langCode = this.state.lang) {
57
72
  // Fetch data from the server using a GET request to retrieve page details by ID and language code
@@ -64,10 +79,15 @@ class PageApi extends asyncModules_1.default {
64
79
  /**
65
80
  * Get page object with information about forms, blocks, menus, linked to the page by URL.
66
81
  *
67
- * @param {string} [url] - Page URL
68
- * @param {string} [langCode] - lang code
82
+ * @handleName getPageByUrl
83
+ *
84
+ * @param {string} url - Page URL. Example: "about".
85
+ * @param {string} [langCode] - Language code. Default: "en_US".
69
86
  *
70
- * @returns Returns PageEntity object
87
+ * @return {IPagesEntity} Returns PageEntity object
88
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
89
+ *
90
+ * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
71
91
  */
72
92
  async getPageByUrl(url, langCode = this.state.lang) {
73
93
  // Fetch data from the server using a GET request with the specified URL and language code
@@ -80,10 +100,15 @@ class PageApi extends asyncModules_1.default {
80
100
  /**
81
101
  * Get child pages object with information as an array.
82
102
  *
83
- * @param {string} [url] - The URL of the parent page for which child pages are to be fetched
84
- * @param {string} [langCode] - Required parameter langCode. Default language code, using the current state if not provided
103
+ * @handleName getChildPagesByParentUrl
104
+ *
105
+ * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
106
+ * @param {string} [langCode] - Language code. Default: "en_US".
107
+ *
108
+ * @return {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
109
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
85
110
  *
86
- * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
111
+ * @description Get child pages object with information as an array.
87
112
  */
88
113
  async getChildPagesByParentUrl(url, langCode = this.state.lang) {
89
114
  // Fetch data from the server using a GET request to retrieve child pages for the specified parent URL and language code
@@ -96,10 +121,15 @@ class PageApi extends asyncModules_1.default {
96
121
  /**
97
122
  * Get all blocks by page url.
98
123
  *
99
- * @param {string} [url] - Page URL
100
- * @param {string} [langCode] - lang code
124
+ * @handleName getBlocksByPageUrl
101
125
  *
102
- * @returns Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
126
+ * @param {string} url - Page URL. Example: "about".
127
+ * @param {string} [langCode] - Language code. Default: "en_US".
128
+ *
129
+ * @return {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
130
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
131
+ *
132
+ * @description Get all blocks by page url.
103
133
  */
104
134
  async getBlocksByPageUrl(url, langCode = this.state.lang) {
105
135
  const response = await this._fetchGet(`/${url}/blocks?langCode=${langCode}`);
@@ -183,10 +213,15 @@ class PageApi extends asyncModules_1.default {
183
213
  /**
184
214
  * Get all forms by page url.
185
215
  *
186
- * @param {string} [url] - The URL of the page for which forms are to be fetched
187
- * @param {string} [langCode] - Default language code, using the current state if not provided
216
+ * @handleName getFormsByPageUrl
217
+ *
218
+ * @param {string} url - The URL of the page for which forms are to be fetched. Example: "about".
219
+ * @param {string} [langCode] - Language code. Default: "en_US".
188
220
  *
189
- * @returns Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
221
+ * @return {IPositionForm[]} Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
222
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
223
+ *
224
+ * @description Get all forms by page url.
190
225
  */
191
226
  async getFormsByPageUrl(url, langCode = this.state.lang) {
192
227
  // Fetch data from the server using a GET request to retrieve forms for the specified page URL and language code
@@ -197,9 +232,14 @@ class PageApi extends asyncModules_1.default {
197
232
  /**
198
233
  * Get settings for the page.
199
234
  *
200
- * @param {string} [url] - Page URL
235
+ * @handleName getConfigPageByUrl
236
+ *
237
+ * @param {string} url - Page URL. Example: "about".
201
238
  *
202
- * @returns Returns a ConfigPage object with page display settings
239
+ * @return {IPageConfig} Returns a ConfigPage object with page display settings
240
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
241
+ *
242
+ * @description Get settings for the page.
203
243
  */
204
244
  async getConfigPageByUrl(url) {
205
245
  // Fetch data from the server using a GET request to retrieve forms for the specified page URL and language code
@@ -210,10 +250,15 @@ class PageApi extends asyncModules_1.default {
210
250
  /**
211
251
  * Quick search for page objects with limited output.
212
252
  *
213
- * @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)
214
- * @param {string} [langCode] - Default language code, using the current state if not provided
253
+ * @handleName searchPage
254
+ *
255
+ * @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
256
+ * @param {string} [langCode] - Language code. Default: "en_US".
215
257
  *
216
- * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
258
+ * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
259
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
260
+ *
261
+ * @description Quick search for page objects with limited output.
217
262
  */
218
263
  async searchPage(name, langCode = this.state.lang) {
219
264
  // Fetch data from the server using a GET request to perform a quick search by page name and language code
@@ -241,8 +286,15 @@ class PageApi extends asyncModules_1.default {
241
286
  }
242
287
  /**
243
288
  * Add template data to pages
244
- * @param data
245
- * @returns
289
+ *
290
+ * @handleName addTemplateToPages
291
+ *
292
+ * @param data - An array of page objects (IPagesEntity[]) to which template data will be added. Example: .
293
+ *
294
+ * @return - An array of page objects with template data added
295
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
296
+ *
297
+ * @description Add template data to pages
246
298
  */
247
299
  async addTemplateToPages(data) {
248
300
  // Use Promise.all to handle an array of promises returned by mapping over 'data'
@@ -255,8 +307,15 @@ class PageApi extends asyncModules_1.default {
255
307
  }
256
308
  /**
257
309
  * Add template data to page by page templateIdentifier
258
- * @param data - page object
259
- * @returns
310
+ *
311
+ * @handleName addTemplateToPage
312
+ *
313
+ * @param data - An array of page objects (IPagesEntity[]) to which template data will be added. Example: .
314
+ *
315
+ * @return - An array of page objects with template data added
316
+ * @throws {IError} If there is an error during the fetch operation, it will return an error object.
317
+ *
318
+ * @description
260
319
  */
261
320
  async addTemplateToPage(data) {
262
321
  // Check if 'templateIdentifier' exists in 'data' and is not null or an empty string
@@ -1,6 +1,6 @@
1
1
  import type { AttributeType, IAttributes, IError, LangType, Types } from '../base/utils';
2
2
  /**
3
- * Represents an interface object of Pages Api.
3
+ * @interface IPageApi
4
4
  *
5
5
  * @property {function} getRootPages - Get all top-level page objects.
6
6
  * @property {function} getCatalogPages - Get all page objects with product information as an array.
@@ -11,33 +11,117 @@ import type { AttributeType, IAttributes, IError, LangType, Types } from '../bas
11
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
+ * @description This interface defines methods for retrieving and managing pages in the system.
14
16
  */
15
17
  interface IPageApi {
18
+ /**
19
+ * Get all top-level page objects.
20
+ *
21
+ * @param {string} [langCode] - Language code. Default: "en_US".
22
+ *
23
+ * @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
24
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
25
+ */
16
26
  getRootPages(langCode?: LangType): Promise<Array<IPagesEntity> | IError>;
27
+ /**
28
+ * Get all page objects with product information as an array.
29
+ *
30
+ * @param {string} [langCode] - Language code. Default: "en_US".
31
+ *
32
+ * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
33
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
+ */
17
35
  getPages(langCode?: LangType): Promise<Array<IPagesEntity> | IError>;
36
+ /**
37
+ * Get page object with information about forms, blocks, menus, linked to the page.
38
+ *
39
+ * @param {number} id - The unique identifier of the page to be fetched. Example: 123.
40
+ * @param {string} [langCode] - Language code. Default: "en_US".
41
+ *
42
+ * @return {IPagesEntity} Returns PageEntity object
43
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
44
+ */
18
45
  getPageById(id: number, langCode?: LangType): Promise<IPagesEntity | IError>;
46
+ /**
47
+ * Get page object with information about forms, blocks, menus, linked to the page by URL.
48
+ *
49
+ * @param {string} url - Page URL. Example: "about".
50
+ * @param {string} [langCode] - Language code. Default: "en_US".
51
+ *
52
+ * @return {IPagesEntity} Returns PageEntity object
53
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
54
+ */
19
55
  getPageByUrl(url: string, langCode?: LangType): Promise<IPagesEntity | IError>;
56
+ /**
57
+ * Get child pages object with information as an array.
58
+ *
59
+ * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about".
60
+ * @param {string} [langCode] - Language code. Default: "en_US".
61
+ *
62
+ * @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
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
64
+ */
20
65
  getChildPagesByParentUrl(url: string, langCode?: LangType): Promise<Array<IPagesEntity> | IError>;
21
- getFormsByPageUrl(url: string, langCode?: LangType): Promise<Array<IPositionForm> | IError>;
66
+ /**
67
+ * Get all blocks by page url.
68
+ *
69
+ * @param {string} url - Page URL. Example: "about".
70
+ * @param {string} [langCode] - Language code. Default: "en_US".
71
+ *
72
+ * @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
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
74
+ */
22
75
  getBlocksByPageUrl(url: string, langCode?: LangType): Promise<Array<IPositionBlock> | IError>;
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>;
90
+ /**
91
+ * Get settings for the page.
92
+ *
93
+ * @param {string} url - Page URL. Example: "about".
94
+ *
95
+ * @return {IPageConfig} Returns a ConfigPage object with page display settings
96
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
97
+ */
23
98
  getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
99
+ /**
100
+ * Quick search for page objects with limited output.
101
+ *
102
+ * @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
+ * @param {string} [langCode] - Language code. Default: "en_US".
104
+ *
105
+ * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
106
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
107
+ */
24
108
  searchPage(name: string, langCode?: LangType): Promise<Array<IPagesEntity> | IError>;
25
109
  }
26
110
  /**
27
- * Represents a config object.
111
+ * @interface IPageConfig
28
112
  *
29
- * @interface
30
113
  * @property {number} rowsPerPage - Number of lines per page.
31
114
  * @property {number} rowsPerPage - Number of products per page.
115
+ *
116
+ * @description This interface defines the configuration for pagination in pages, including the number of rows and products displayed per page.
32
117
  */
33
118
  interface IPageConfig {
34
119
  rowsPerPage: number | null;
35
120
  productsPerRow: number | null;
36
121
  }
37
122
  /**
38
- * Represents an object with various properties.
123
+ * @interface IPositionForm
39
124
  *
40
- * @interface
41
125
  * @property {number} id - The identifier of the object.
42
126
  * @property {number} version - The version number of the object.
43
127
  * @property {string} identifier - The textual identifier for the record field.
@@ -47,6 +131,8 @@ interface IPageConfig {
47
131
  * @property {Record<string, any>} localizeInfos - The name of the page, taking into account localization.
48
132
  * @property {object} processingData - Form data.
49
133
  * @property {number} position - The position of the object.
134
+ *
135
+ * @description This interface defines the structure of a position form entity, including its identifiers, attributes, and processing data.
50
136
  */
51
137
  interface IPositionForm {
52
138
  id: number;
@@ -60,19 +146,23 @@ interface IPositionForm {
60
146
  position: number;
61
147
  }
62
148
  /**
63
- * Represents an object with various properties.
149
+ * @interface IPositionBlock
64
150
  *
65
- * @interface
66
151
  * @property {number} id - The identifier of the object.
152
+ * @property {number} [quantity] - Quantity pages in block.
67
153
  * @property {number} version - The version number of the object.
68
- * @property {number} quantity - Quantity pages in block.
69
154
  * @property {string} identifier - The textual identifier for the record field.
70
155
  * @property {Record<string, any>} localizeInfos - The name of the page, taking into account localization.
71
156
  * @property {number} position - The position of the object.
72
157
  * @property {boolean} isSync - Indication of page indexing.
73
158
  * @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value).
74
- * @property {string} attributeSetIdentifier
159
+ * @property {string} attributeSetIdentifier - Set of attributes id.
160
+ * @property {boolean} isVisible - A sign of page visibility.
75
161
  * @property {Types} type - Page type.
162
+ * @property {string | null} templateIdentifier - User id of the linked template.
163
+ * @property {number} [countElementsPerRow] - Number of elements displayed per row in the block, if applicable.
164
+ *
165
+ * @description This interface defines the structure of a position block entity, including its identifiers, attributes, and visibility.
76
166
  */
77
167
  interface IPositionBlock {
78
168
  id: number;
@@ -90,24 +180,28 @@ interface IPositionBlock {
90
180
  countElementsPerRow?: number;
91
181
  }
92
182
  /**
93
- * Represents an object with various properties.
183
+ * @interface IPagesEntity
94
184
  *
95
- * @interface
96
- * @property {number} id - The identifier of the object.
97
- * @property {number} parentId - The id of the parent page, if it contains null, then it is the top-level page.
98
- * @property {Record<string, number>} config - Output settings for catalog pages.
99
- * @property {string} pageUrl - Unique page Url.
100
- * @property {number} depth - Page nesting depth relative to parentId.
101
- * @property {Record<string, any>} localizeInfos - The name of the page, taking into account localization.
102
- * @property {boolean} isVisible - A sign of page visibility.
103
- * @property {number} products - The number of products linked to the page.
104
185
  * @property {string} attributeSetIdentifier - Set of attributes id.
186
+ * @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value).
187
+ * @property {number} [childrenCount] - Children count.
188
+ * @property {Record<string, number>} [config] - Output settings for catalog pages.
189
+ * @property {number} depth - Page nesting depth relative to parentId.
190
+ * @property {number} id - The identifier of the object.
105
191
  * @property {boolean} isSync - Indication of page indexing.
192
+ * @property {boolean} isVisible - A sign of page visibility.
193
+ * @property {Record<string, any>} [forms] -
194
+ * @property {Record<string, any>} [blocks] -
195
+ * @property {Record<string, any>} localizeInfos - The name of the page, taking into account localization.
196
+ * @property {string} pageUrl - Unique page Url.
197
+ * @property {number} parentId - The id of the parent page, if it contains null, then it is the top-level page.
198
+ * @property {number} [position] - Item number (for sorting).
199
+ * @property {number} [products] - The number of products linked to the page.
106
200
  * @property {string} templateIdentifier - User id of the linked template.
107
- * @property {AttributeType} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value).
108
- * @property {number} position - Item number (for sorting).
109
201
  * @property {Types} type - Page type.
110
- * @property {number} childrenCount - Children count.
202
+ * @property {any} [template] - Template object.
203
+ *
204
+ * @description This interface defines the structure of a page entity, including its identifiers, attributes, and hierarchical relationships.
111
205
  */
112
206
  interface IPagesEntity {
113
207
  attributeSetIdentifier: string | null;
@@ -13,68 +13,102 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
13
13
  /**
14
14
  * Get list of payment sessions.
15
15
  *
16
- * @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.
17
- * @param {number} [offset] - Optional parameter for pagination, default is 0
18
- * @param {number} [limit] - Optional parameter for pagination, default is 30
16
+ * @handleName getSessions
17
+ *
18
+ * @param {number} [offset] - Optional parameter for pagination. Default: 0.
19
+ * @param {number} [limit] - Optional parameter for pagination. Default: 30.
19
20
  *
20
- * @returns Returns an array of SessionEntity objects.
21
+ * @return {ISessionsEntity} Returns an array of SessionEntity objects.
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.
21
25
  */
22
26
  getSessions(offset?: number, limit?: number): Promise<ISessionsEntity | IError>;
23
27
  /**
24
28
  * Get a single payment session object by its identifier.
25
- * @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.
26
29
  *
27
- * @param {number} id - Identifier of the retrieved payment session object
30
+ * @handleName getSessionById
31
+ *
32
+ * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
28
33
  *
29
- * @returns Returns a single payment session object.
34
+ * @return {ISessionEntity} Returns a single payment session object.
35
+ * @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.
30
38
  */
31
39
  getSessionById(id: number): Promise<ISessionEntity | IError>;
32
40
  /**
33
41
  * Get one payment session object by order identifier 🔐
34
42
  *
35
- * @param id - order identifier
36
- * @returns
43
+ * @handleName getSessionByOrderId
44
+ *
45
+ * @param {number} id - Order identifier. Example: 12345.
46
+ *
47
+ * @return {IAccountsEntity}
48
+ * @throws {IError} If there is an error during the fetch operation, it will return an error object.
49
+ *
50
+ * @description
37
51
  */
38
52
  getSessionByOrderId(id: number): Promise<IAccountsEntity | IError>;
39
53
  /**
40
54
  * Creation of payment session.
41
- * @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.
42
55
  *
43
- * @param {number} [orderId] - Order identifier
44
- * @param {'session' | 'intent'} [type] - Session type
45
- * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate
56
+ * @handleName createSession
46
57
  *
47
- * @returns Returns a single payment session object.
58
+ * @param {number} orderId - Order identifier. Example: 12345.
59
+ * @param {'session' | 'intent'} type - Session type. Possible values: 'session' or 'intent'. Example: 'session'.
60
+ * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
61
+ *
62
+ * @return {ICreateSessionEntity} Returns a single payment session object.
63
+ * @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.
48
66
  */
49
67
  createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ICreateSessionEntity | IError>;
50
68
  /**
51
69
  * Get payment settings.
52
- * @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.
53
70
  *
54
- * @returns Returns object PaymentsConnected or null.
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.
55
77
  */
56
78
  getConnected(): Promise<IConnectedEntity | null | IError>;
57
79
  /**
58
80
  * Get all payment accounts as an array.
59
- * @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.
60
81
  *
61
- * @returns Returns all created payment accounts as an array of PaymentAccountEntity objects.
82
+ * @handleName getAccounts
83
+ *
84
+ * @return {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
85
+ * @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.
62
88
  */
63
89
  getAccounts(): Promise<Array<IAccountsEntity> | IError>;
64
90
  /**
65
91
  * Get a single payment account object by its identifier.
92
+ *
93
+ * @handleName getAccountById
94
+ *
66
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.
67
96
  *
68
- * @param {number} id - Identifier of the retrieved payment account object
97
+ * @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
69
98
  *
70
- * @returns Returns a single payment account object.
99
+ * @return {IAccountsEntity} Returns a single payment account object.
100
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
71
101
  */
72
102
  getAccountById(id: number): Promise<IAccountsEntity | IError>;
73
103
  /**
74
104
  * Webhook for Stripe.
75
- * @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.
76
105
  *
77
- * @returns Returns true (in case of successful execution) or false (in case of unsuccessful execution)
106
+ * @handleName webhookStripe
107
+ *
108
+ * @return {boolean} Returns true (in case of successful execution) or false (in case of unsuccessful execution)
109
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
110
+ *
111
+ * @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.
78
112
  */
79
113
  webhookStripe(): Promise<boolean | IError>;
80
114
  }