oneentry 1.0.122 → 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 +18 -10
  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 +62 -38
  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 +89 -30
  47. package/dist/pages/pagesApi.js +181 -57
  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 +57 -29
  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
@@ -1,6 +1,6 @@
1
1
  import type { IError } from '../base/utils';
2
2
  /**
3
- * Represents an interface object of Orders Api.
3
+ * @interface IOrdersApi
4
4
  *
5
5
  * @property {function} getOrderByMarker - Retrieve one order storage object by marker.
6
6
  * @property {function} createOrder - Creation of an order in the order storage.
@@ -9,32 +9,105 @@ import type { IError } from '../base/utils';
9
9
  * @property {function} getAllOrders - Getting all the order storage objects.
10
10
  * @property {function} getAllOrdersByMarker - Getting one order storage object by marker.
11
11
  * @property {function} setAccessToken - Only for custom authorization. An intermediate method for setting up an access token.
12
-
12
+ *
13
+ * @description Represents the API for managing orders in the order storage.
13
14
  */
14
15
  interface IOrdersApi {
15
- createOrder(marker: string, data: IOrderData): Promise<IBaseOrdersEntity | IError>;
16
+ /**
17
+ * Getting all the order storage objects.
18
+ *
19
+ * @param {number} [langCode] - Language code. Default: "en_US".
20
+ * @param {number} [offset] - Optional parameter for pagination. Default: 0.
21
+ * @param {number} [limit] - Optional parameter for pagination. Default: 30.
22
+ *
23
+ * @return {IOrdersEntity[]} Returns an array of order storage objects.
24
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
25
+ */
26
+ getAllOrdersStorage(langCode?: string, offset?: number, limit?: number): Promise<Array<IOrdersEntity> | IError>;
27
+ /**
28
+ * Getting all orders from the orders storage object created by the user.
29
+ *
30
+ * @param {string} marker - Textual identifier of the order storage object. Example: "order_storage_1".
31
+ * @param {string} [langCode] - Language code. Default: "en_US".
32
+ * @param {number} [offset] - Offset parameter. Default: 0.
33
+ * @param {number} [limit] - Limit parameter. Default: 30.
34
+ *
35
+ * @return {IOrdersByMarkerEntity} Returns an object with the orders.
36
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
37
+ */
16
38
  getAllOrdersByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IOrdersByMarkerEntity | IError>;
39
+ /**
40
+ * Retrieve one order storage object by marker.
41
+ *
42
+ * @param {string} marker - Marker of the order object. Example: "order_storage_1".
43
+ * @param {string} [langCode] - Language code. Default: "en_US".
44
+ *
45
+ * @return {IOrdersEntity} Return object of order information.
46
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
47
+ */
17
48
  getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity | IError>;
18
- updateOrderByMarkerAndId(marker: string, id: number, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
49
+ /**
50
+ * Getting a single order from the order storage object created by the user.
51
+ *
52
+ * @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
53
+ * @param {number} id - ID of the order object. Example: 12345.
54
+ * @param {string} [langCode] - Language code. Default: "en_US".
55
+ *
56
+ * @return {IOrderByMarkerEntity} Returns an object with the order.
57
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
58
+ */
19
59
  getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity | IError>;
20
- getAllOrdersStorage(langCode?: string, offset?: number, limit?: number): Promise<Array<IOrdersEntity> | IError>;
60
+ /**
61
+ * Creation of an order in the order storage.
62
+ *
63
+ * @param {string} marker - Textual identifier of the order storage object. Example: "order_storage_1".
64
+ * @param {IOrderData} data - Object for creating an order. Example: { "formIdentifier": "bar-orders-form", "paymentAccountIdentifier": "usd-payment", "formData": { "marker": "name_1", "value": "Name", "type": "string" }, "products": [ { "productId": 1, "quantity": 2 } ] }.
65
+ * @param {String} [langCode] - Language code. Default: "en_US".
66
+ *
67
+ * @return {IBaseOrdersEntity} Returns an object with the created order.
68
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
69
+ *
70
+ * @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.
71
+ */
72
+ createOrder(marker: string, data: IOrderData, langCode: string): Promise<IBaseOrdersEntity | IError>;
73
+ /**
74
+ * Changing an order in the orders storage
75
+ *
76
+ * @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
77
+ * @param {number} id - ID of the order object. Example: 12345.
78
+ * @param {IOrderData} data - Object for updating an order. Example: { "formIdentifier": "bar-orders-form", "paymentAccountIdentifier": "usd-payment", "formData": { "marker": "name_1", "value": "Name", "type": "string" }, "products": [ { "productId": 1, "quantity": 2 } ], "currency": "USD" }.
79
+ * @param {string} [langCode] - Language code. Default: "en_US".
80
+ *
81
+ * @return {IBaseOrdersEntity} Returns an object with the updated order.
82
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
83
+ *
84
+ * @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.
85
+ */
86
+ updateOrderByMarkerAndId(marker: string, id: number, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
21
87
  }
22
88
  /**
23
- * Represents a form data.
89
+ * @interface IOrdersByMarkerEntity
90
+ *
91
+ * @property {number} total - Total number of found records. Example: 100.
92
+ * @property {Array<IOrderByMarkerEntity>} items - Array of order storage objects. Example: .
24
93
  *
25
- * @interface
26
- * @property {number} total - Total number of found records.
27
- * @property {Array<IOrderByMarkerEntity>} items
94
+ * @description Represents a response from the order storage by marker.
28
95
  */
29
96
  interface IOrdersByMarkerEntity {
30
97
  total: number;
31
98
  items: Array<IOrderByMarkerEntity>;
32
99
  }
33
100
  /**
34
- * @property {string} filename
35
- * @property {string} downloadLink
36
- * @property {number} size
37
- * @property {string} previewLink
101
+ * Interface representing a picture entity.
102
+ *
103
+ * @interface IPicture
104
+ *
105
+ * @property {string} filename - The name of the file. Example: "image.jpg".
106
+ * @property {string} downloadLink - The URL link to download the picture. Example: "https://example.com/image.jpg".
107
+ * @property {number} size - The size of the picture in bytes. Example: 102400.
108
+ * @property {string} previewLink - The URL link to preview the picture. Example: "https://example.com/image-preview.jpg".
109
+ *
110
+ * @description This interface defines the structure for a picture entity, including its filename, download link, size, and preview link.
38
111
  */
39
112
  interface IPicture {
40
113
  filename: string;
@@ -43,7 +116,16 @@ interface IPicture {
43
116
  previewLink: string;
44
117
  }
45
118
  /**
46
- * IOrderProducts
119
+ * @interface IOrderProducts
120
+ *
121
+ * @property {number} id - Object identifier. Example: 1.
122
+ * @property {string} title - Product title. Example: "Product 1".
123
+ * @property {string | null} sku - Product SKU. Example: "SKU-123".
124
+ * @property {number} price - Product price. Example: 99.99.
125
+ * @property {number | null} quantity - Product quantity. Example: 2.
126
+ * @property {Array<IPicture>} previewImage - Array of product images.
127
+ *
128
+ * @description Represents a product in an order.
47
129
  */
48
130
  interface IOrderProducts {
49
131
  id: number;
@@ -51,12 +133,16 @@ interface IOrderProducts {
51
133
  sku: string | null;
52
134
  price: number;
53
135
  quantity: number | null;
54
- previewImage: Array<IPicture>;
136
+ previewImage: Array<IPicture> | null;
55
137
  }
56
138
  /**
57
- * @property {string} marker - Marker of form field.
58
- * @property {string} value - Value
59
- * @property {string} type - Type of value. Example "string"
139
+ * @interface IOrdersFormData
140
+ *
141
+ * @property {string} marker - Marker of form field. Example: "name_1".
142
+ * @property {string} value - Value. Example: "Name".
143
+ * @property {string} type - Type of value. Example: "string".
144
+ *
145
+ * @description Represents a form data for orders.
60
146
  */
61
147
  interface IOrdersFormData {
62
148
  marker: string;
@@ -64,28 +150,32 @@ interface IOrdersFormData {
64
150
  type: string;
65
151
  }
66
152
  /**
67
- * @interface
68
- * @property {number} productId - Product identifier.
69
- * @property {number} quantity - Quantity of the product.
153
+ * @interface IOrderProductData
154
+ *
155
+ * @property {number} productId - Product identifier. Example: 1.
156
+ * @property {number} quantity - Quantity of the product. Example: 2.
157
+ *
158
+ * @description Represents a product data in an order.
70
159
  */
71
160
  interface IOrderProductData {
72
161
  productId: number;
73
162
  quantity: number;
74
163
  }
75
164
  /**
76
- * @interface
77
- * @property {string} statusIdentifier - Text identifier of the order status.
78
- * @property {string} formIdentifier - Text identifier of the form status.
79
- * @property {string} statusIdentifier - Text identifier of order status object (if not set, default status will be assigned).
80
- * @property {string} paymentAccountIdentifier - Text identifier of the order payment.
81
- * @property {Array<IOrdersFormData>} formData - Data submitted by the form linked to the order store.
82
- * @property {Array<IOrderProducts>} products - Array of products added to order.
83
- * @property {string} createdDate - Order creation date.
84
- * @property {string} totalSum - Total order amount.
85
- * @property {string} currency - Currency used to pay for the order.
86
- * @property {string} createdDate - Date when the order was created.
165
+ * @interface IBaseOrdersEntity
166
+ *
167
+ * @property {number} id - Object identifier. Example: 1.
168
+ * @property {string} formIdentifier - Text identifier of the form status. Example: "bar-orders-form".
169
+ * @property {string} paymentAccountIdentifier - Text identifier of the order payment. Example: "payment-1".
170
+ * @property {Array<IOrdersFormData>} formData - Data submitted by the form linked to the order store. Example: [{ marker: "name_1", value: "Name", type: "string" }].
171
+ * @property {Array<IOrderProducts>} products - Array of products added to order. Example: .
172
+ * @property {string} [createdDate] - Order creation date. Example: "2023-10-01T12:00:00Z".
173
+ * @property {string} totalSum - Total order amount. Example: "99.99".
174
+ * @property {string} currency - Currency used to pay for the order. Example: "USD".
175
+ * @property {string} [statusIdentifier] - Text identifier of order status object (if not set, default status will be assigned). Example: "status-1".
87
176
  */
88
177
  interface IBaseOrdersEntity {
178
+ id: number;
89
179
  formIdentifier: string;
90
180
  paymentAccountIdentifier: string;
91
181
  formData: Array<IOrdersFormData>;
@@ -93,22 +183,32 @@ interface IBaseOrdersEntity {
93
183
  createdDate?: string;
94
184
  totalSum: number;
95
185
  currency: string;
96
- id: number;
97
186
  statusIdentifier?: string;
98
187
  }
188
+ /**
189
+ * @interface IBaseOrdersEntityResponse
190
+ *
191
+ * @property {Array<IBaseOrdersEntity>} items - Array of order storage objects. Example: .
192
+ * @property {string | number} total - Total number of found records. Example: 100.
193
+ *
194
+ * @description Represents a response from the order storage.
195
+ */
99
196
  interface IBaseOrdersEntityResponse {
100
197
  items: Array<IBaseOrdersEntity>;
101
198
  total: string | number;
102
199
  }
103
200
  /**
104
- * @interface
105
- * @property {number} id - Object identifier.
106
- * @property {Record<string, any>} localizeInfos - Name considering localization.
107
- * @property {string} identifier - Textual identifier for the record field.
108
- * @property {number} generalTypeId - Type identifier.
109
- * @property {string} formIdentifier - Textual identifier for the form used by the order storage.
110
- * @property {Array<{identifier:string}>} paymentAccountIdentifiers - Array of textual identifiers of payment accounts used by the order storage.
111
- * @property {number | null} position
201
+ * @interface IOrdersEntity
202
+ *
203
+ * @property {number} id - Object identifier. Example: 1.
204
+ * @property {Record<string, any>} localizeInfos - Name considering localization. Example: .
205
+ * @property {string} identifier - Textual identifier for the record field. Example: "order_storage_1".
206
+ * @property {number | null} generalTypeId - Type identifier. Example: 1
207
+ * @property {string} formIdentifier - Textual identifier for the form used by the order storage. Example: "bar-orders-form".
208
+ * @property {Array<{identifier:string}>} paymentAccountIdentifiers - Array of textual identifiers of payment accounts used by the order storage. Example: [{ identifier: "payment-1" }].
209
+ * @property {number | null} position - Example: 1.
210
+ *
211
+ * @description Represents an order storage object.
112
212
  */
113
213
  interface IOrdersEntity {
114
214
  id: number;
@@ -120,17 +220,24 @@ interface IOrdersEntity {
120
220
  position: number | null;
121
221
  }
122
222
  /**
123
- * IPaymentAccountIdentifiers
223
+ * @interface IPaymentAccountIdentifiers
224
+ *
225
+ * @property {string} identifier - Textual identifier of the payment account. Example: "payment-1".
226
+ *
227
+ * @description Represents an identifier for a payment account used in an order.
124
228
  */
125
229
  interface IPaymentAccountIdentifiers {
126
230
  identifier: string;
127
231
  }
128
232
  /**
129
- * @interface
130
- * @property {string} formIdentifier - Text identifier of the form object linked to the order repository.
131
- * @property {string} paymentAccountIdentifier - Text identifier of the payment object linked to the order repository.
132
- * @property {IOrdersFormData | Array<IOrdersFormData>} formData - Form data linked to the order repositor.
133
- * @property {Array<IOrderProductData>} products - An array of ordered products.
233
+ * @interface IOrderData
234
+ *
235
+ * @property {string} formIdentifier - Text identifier of the form object linked to the order repository. Example: "bar-orders-form".
236
+ * @property {string} paymentAccountIdentifier - Text identifier of the payment object linked to the order repository. Example: "payment-1".
237
+ * @property {IOrdersFormData | Array<IOrdersFormData>} formData - Form data linked to the order repository. Example: [{ marker: "name_1", value: "Name", type: "string" }].
238
+ * @property {Array<IOrderProductData>} products - An array of ordered products. Example: .
239
+ *
240
+ * @description Represents the data required to create or update an order in the order storage.
134
241
  */
135
242
  interface IOrderData {
136
243
  formIdentifier: string;
@@ -139,17 +246,23 @@ interface IOrderData {
139
246
  products: Array<IOrderProductData>;
140
247
  }
141
248
  /**
142
- * @interface
143
- * @property {string} statusIdentifier - Text identifier of the order status.
144
- * @property {string} formIdentifier - Text identifier of the form status.
145
- * @property {Array<IOrdersFormData>} formData - Data submitted by the form linked to the order store.
146
- * @property {Array<IOrderProducts>} products - Array of products added to order.
147
- * @property {string} totalSum - Total order amount.
148
- * @property {string} currency - Currency used to pay for the order.
149
- * @property {string} createdDate - Date when the order was created.
150
- * @property {string} paymentAccountIdentifier - Textual identifier for the order payment.
151
- * @property {Record<string, any>} paymentAccountLocalizeInfos - Payment account name considering localization.
152
- * @property {boolean} isHistory - Indicates that the order has been saved in the order history.
249
+ * @interface IOrderByMarkerEntity
250
+ *
251
+ * @property {string} [attributeSetIdentifier] - Text identifier of the attribute set. Example: "attribute-set-1".
252
+ * @property {string} statusIdentifier - Text identifier of the order status. Example: "order-status-1".
253
+ * @property {string} formIdentifier - Text identifier of the form status. Example: "bar-orders-form".
254
+ * @property {Array<IOrdersFormData>} formData - Data submitted by the form linked to the order store. Example: .
255
+ * @property {Array<IOrderProducts>} products - Array of products added to order. Example: [{ id: 1, name: "Product 1", quantity: 2 }].
256
+ * @property {string} totalSum - Total order amount. Example: "100.00".
257
+ * @property {string} currency - Currency used to pay for the order. Example: "USD".
258
+ * @property {string} createdDate - Date when the order was created. Example: "2023-10-01T12:00:00Z".
259
+ * @property {string} paymentAccountIdentifier - Textual identifier for the order payment. Example: "payment-1".
260
+ * @property {Record<string, any>} paymentAccountLocalizeInfos - Payment account name considering localization. Example: { "en_US": "USD Payment", "ru_RU": "Оплата в долларах США" }.
261
+ * @property {number} id - Object identifier.
262
+ * @property {number} storageId - Identifier of the order storage object. Example: 1.
263
+ * @property {boolean} isCompleted - Indicates that the order has been completed. Example: true.
264
+ *
265
+ * @description Represents an order storage object created by the user.
153
266
  */
154
267
  interface IOrderByMarkerEntity {
155
268
  attributeSetIdentifier?: string;
@@ -161,8 +274,9 @@ interface IOrderByMarkerEntity {
161
274
  currency: string;
162
275
  createdDate: string;
163
276
  paymentAccountIdentifier: string;
164
- paymentAccountLocalizeInfos: Record<string, any>;
165
- isHistory: boolean;
277
+ paymentAccountLocalizeInfos?: Record<string, any>;
166
278
  id: number;
279
+ storageId: number;
280
+ isCompleted: boolean;
167
281
  }
168
282
  export type { IBaseOrdersEntity, IBaseOrdersEntityResponse, IOrderByMarkerEntity, IOrderData, IOrderProductData, IOrderProducts, IOrdersApi, IOrdersByMarkerEntity, IOrdersEntity, IOrdersFormData, IPaymentAccountIdentifiers, IPicture, };
@@ -13,91 +13,150 @@ export default class PageApi extends AsyncModules implements IPageApi {
13
13
  /**
14
14
  * Get all top-level page objects.
15
15
  *
16
- * @param {string} [langCode] - lang code
16
+ * @handleName getRootPages
17
17
  *
18
- * @returns Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
18
+ * @param {string} [langCode] - Language code. Default: "en_US".
19
+ *
20
+ * @return {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
21
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
22
+ *
23
+ * @description
19
24
  */
20
25
  getRootPages(langCode?: string): Promise<Array<IPagesEntity> | IError>;
21
26
  /**
22
27
  * Get all page objects with product information as an array.
23
28
  *
24
- * @param {string} [langCode] - lang code
29
+ * @handleName getPages
30
+ *
31
+ * @param {string} [langCode] - Language code. Default: "en_US".
32
+ *
33
+ * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
34
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
25
35
  *
26
- * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
36
+ * @description Get all page objects with product information as an array.
27
37
  */
28
38
  getPages(langCode?: string): Promise<Array<IPagesEntity> | IError>;
29
39
  /**
30
40
  * Get page object with information about forms, blocks, menus, linked to the page.
31
41
  *
32
- * @param {number} [id] - Page object identifier
33
- * @param {string} [langCode] - lang code
42
+ * @handleName getPageById
34
43
  *
35
- * @returns Returns PageEntity object
44
+ * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
45
+ * @param {string} [langCode] - Language code. Default: "en_US".
46
+ *
47
+ * @return {IPagesEntity} Returns PageEntity object
48
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
49
+ *
50
+ * @description Get page object with information about forms, blocks, menus, linked to the page.
36
51
  */
37
52
  getPageById(id: number, langCode?: string): Promise<IPagesEntity | IError>;
38
53
  /**
39
54
  * Get page object with information about forms, blocks, menus, linked to the page by URL.
40
55
  *
41
- * @param {string} [url] - Page URL
42
- * @param {string} [langCode] - lang code
56
+ * @handleName getPageByUrl
57
+ *
58
+ * @param {string} url - Page URL. Example: "about".
59
+ * @param {string} [langCode] - Language code. Default: "en_US".
43
60
  *
44
- * @returns Returns PageEntity object
61
+ * @return {IPagesEntity} Returns PageEntity object
62
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
63
+ *
64
+ * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
45
65
  */
46
66
  getPageByUrl(url: string, langCode?: string): Promise<IPagesEntity | IError>;
47
67
  /**
48
68
  * Get child pages object with information as an array.
49
69
  *
50
- * @param {string} [url] - Parent page URL
51
- * @param {string} [langCode] - Required parameter lang code
70
+ * @handleName getChildPagesByParentUrl
71
+ *
72
+ * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
73
+ * @param {string} [langCode] - Language code. Default: "en_US".
74
+ *
75
+ * @return {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
76
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
52
77
  *
53
- * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
78
+ * @description Get child pages object with information as an array.
54
79
  */
55
80
  getChildPagesByParentUrl(url: string, langCode?: string): Promise<Array<IPagesEntity> | IError>;
56
81
  /**
57
82
  * Get all blocks by page url.
58
83
  *
59
- * @param {string} [url] - Page URL
60
- * @param {string} [langCode] - lang code
84
+ * @handleName getBlocksByPageUrl
61
85
  *
62
- * @returns Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
86
+ * @param {string} url - Page URL. Example: "about".
87
+ * @param {string} [langCode] - Language code. Default: "en_US".
88
+ *
89
+ * @return {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
90
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
91
+ *
92
+ * @description Get all blocks by page url.
63
93
  */
64
94
  getBlocksByPageUrl(url: string, langCode?: string): Promise<Array<IPositionBlock> | IError>;
65
95
  /**
66
96
  * Get all forms by page url.
67
97
  *
68
- * @param {string} [url] - Page URL
69
- * @param {string} [langCode] - lang code
98
+ * @handleName getFormsByPageUrl
99
+ *
100
+ * @param {string} url - The URL of the page for which forms are to be fetched. Example: "about".
101
+ * @param {string} [langCode] - Language code. Default: "en_US".
70
102
  *
71
- * @returns Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
103
+ * @return {IPositionForm[]} Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
104
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
105
+ *
106
+ * @description Get all forms by page url.
72
107
  */
73
108
  getFormsByPageUrl(url: string, langCode?: string): Promise<Array<IPositionForm> | IError>;
74
109
  /**
75
110
  * Get settings for the page.
76
111
  *
77
- * @param {string} [url] - Page URL
112
+ * @handleName getConfigPageByUrl
113
+ *
114
+ * @param {string} url - Page URL. Example: "about".
78
115
  *
79
- * @returns Returns a ConfigPage object with page display settings
116
+ * @return {IPageConfig} Returns a ConfigPage object with page display settings
117
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
118
+ *
119
+ * @description Get settings for the page.
80
120
  */
81
121
  getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
82
122
  /**
83
123
  * Quick search for page objects with limited output.
84
124
  *
85
- * @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)
86
- * @param {string} [langCode] - lang code
125
+ * @handleName searchPage
126
+ *
127
+ * @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
128
+ * @param {string} [langCode] - Language code. Default: "en_US".
87
129
  *
88
- * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
130
+ * @return {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
131
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
132
+ *
133
+ * @description Quick search for page objects with limited output.
89
134
  */
90
135
  searchPage(name: string, langCode?: string): Promise<Array<IPagesEntity> | IError>;
91
136
  /**
92
- * addTemplateToPages
93
- * @param data
94
- * @returns
137
+ * Add template data to pages
138
+ *
139
+ * @handleName addTemplateToPages
140
+ *
141
+ * @param data - An array of page objects (IPagesEntity[]) to which template data will be added. Example: .
142
+ *
143
+ * @return - An array of page objects with template data added
144
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
145
+ *
146
+ * @description Add template data to pages
95
147
  */
96
148
  protected addTemplateToPages(data: IPagesEntity[]): Promise<IPagesEntity[]>;
97
149
  /**
98
- * addTemplateToPage by page templateIdentifier
99
- * @param data - page object
100
- * @returns
150
+ * Add template data to page by page templateIdentifier
151
+ *
152
+ * @handleName addTemplateToPage
153
+ *
154
+ * @param data - An array of page objects (IPagesEntity[]) to which template data will be added. Example: .
155
+ *
156
+ * @return - An array of page objects with template data added
157
+ * @throws {IError} If there is an error during the fetch operation, it will return an error object.
158
+ *
159
+ * @description
101
160
  */
102
161
  protected addTemplateToPage(data: IPagesEntity): Promise<IPagesEntity>;
103
162
  }