oneentry 1.0.172 → 1.0.174

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 (176) hide show
  1. package/changelog.md +48 -0
  2. package/dist/admins/adminsApi.d.ts +7 -7
  3. package/dist/admins/adminsApi.js +7 -7
  4. package/dist/admins/adminsInterfaces.d.ts +22 -22
  5. package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
  6. package/dist/attribute-sets/attributeSetsApi.js +8 -8
  7. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
  8. package/dist/auth-provider/authProviderApi.d.ts +31 -31
  9. package/dist/auth-provider/authProviderApi.js +31 -31
  10. package/dist/auth-provider/authProvidersInterfaces.d.ts +54 -54
  11. package/dist/base/asyncModules.d.ts +6 -6
  12. package/dist/base/asyncModules.js +6 -6
  13. package/dist/base/syncModules.d.ts +1 -1
  14. package/dist/base/syncModules.js +1 -1
  15. package/dist/base/utils.d.ts +4 -4
  16. package/dist/blocks/blocksApi.d.ts +35 -35
  17. package/dist/blocks/blocksApi.js +35 -35
  18. package/dist/blocks/blocksInterfaces.d.ts +55 -55
  19. package/dist/discounts/discountsApi.d.ts +14 -14
  20. package/dist/discounts/discountsApi.js +14 -14
  21. package/dist/discounts/discountsInterfaces.d.ts +52 -52
  22. package/dist/events/eventsApi.d.ts +13 -13
  23. package/dist/events/eventsApi.js +13 -13
  24. package/dist/events/eventsInterfaces.d.ts +18 -18
  25. package/dist/file-uploading/fileUploadingApi.d.ts +16 -16
  26. package/dist/file-uploading/fileUploadingApi.js +14 -17
  27. package/dist/file-uploading/fileUploadingInterfaces.d.ts +30 -30
  28. package/dist/filters/filtersApi.d.ts +1 -1
  29. package/dist/filters/filtersApi.js +1 -1
  30. package/dist/filters/filtersInterfaces.d.ts +7 -7
  31. package/dist/forms/formsApi.d.ts +3 -3
  32. package/dist/forms/formsApi.js +3 -3
  33. package/dist/forms/formsInterfaces.d.ts +42 -42
  34. package/dist/forms-data/formsDataApi.d.ts +14 -14
  35. package/dist/forms-data/formsDataApi.js +14 -14
  36. package/dist/forms-data/formsDataInterfaces.d.ts +67 -68
  37. package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.js +1 -1
  40. package/dist/integration-collections/integrationCollectionsApi.d.ts +26 -30
  41. package/dist/integration-collections/integrationCollectionsApi.js +24 -28
  42. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +61 -60
  43. package/dist/locales/localesInterfaces.d.ts +8 -8
  44. package/dist/menus/menusApi.d.ts +1 -1
  45. package/dist/menus/menusApi.js +1 -1
  46. package/dist/menus/menusInterfaces.d.ts +12 -12
  47. package/dist/orders/ordersApi.d.ts +26 -26
  48. package/dist/orders/ordersApi.js +26 -26
  49. package/dist/orders/ordersInterfaces.d.ts +101 -101
  50. package/dist/pages/pagesApi.d.ts +6 -6
  51. package/dist/pages/pagesApi.js +6 -6
  52. package/dist/pages/pagesInterfaces.d.ts +46 -46
  53. package/dist/payments/paymentsApi.d.ts +8 -8
  54. package/dist/payments/paymentsApi.js +8 -8
  55. package/dist/payments/paymentsInterfaces.d.ts +31 -31
  56. package/dist/product-statuses/productStatusesApi.d.ts +2 -2
  57. package/dist/product-statuses/productStatusesApi.js +2 -2
  58. package/dist/product-statuses/productStatusesInterfaces.d.ts +8 -8
  59. package/dist/products/productsApi.d.ts +37 -37
  60. package/dist/products/productsApi.js +36 -36
  61. package/dist/products/productsInterfaces.d.ts +100 -100
  62. package/dist/search/searchApi.d.ts +3 -3
  63. package/dist/search/searchApi.js +3 -3
  64. package/dist/search/searchInterfaces.d.ts +4 -4
  65. package/dist/sitemap/sitemapApi.d.ts +1 -1
  66. package/dist/sitemap/sitemapApi.js +1 -1
  67. package/dist/sitemap/sitemapInterfaces.d.ts +2 -2
  68. package/dist/subscriptions/subscriptionsApi.d.ts +3 -3
  69. package/dist/subscriptions/subscriptionsApi.js +3 -3
  70. package/dist/subscriptions/subscriptionsInterfaces.d.ts +11 -11
  71. package/dist/system/systemApi.d.ts +4 -4
  72. package/dist/system/systemApi.js +2 -2
  73. package/dist/system/systemInterfaces.d.ts +11 -5
  74. package/dist/templates/templatesApi.d.ts +5 -5
  75. package/dist/templates/templatesApi.js +5 -5
  76. package/dist/templates/templatesInterfaces.d.ts +13 -13
  77. package/dist/templates-preview/templatesPreviewApi.d.ts +1 -1
  78. package/dist/templates-preview/templatesPreviewApi.js +1 -1
  79. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
  80. package/dist/user-activity/userActivityApi.d.ts +1 -1
  81. package/dist/user-activity/userActivityApi.js +1 -1
  82. package/dist/user-activity/userActivityInterfaces.d.ts +4 -4
  83. package/dist/user-groups/userGroupsApi.d.ts +1 -1
  84. package/dist/user-groups/userGroupsApi.js +1 -1
  85. package/dist/user-groups/userGroupsInterfaces.d.ts +5 -5
  86. package/dist/users/usersApi.d.ts +7 -7
  87. package/dist/users/usersApi.js +7 -7
  88. package/dist/users/usersInterfaces.d.ts +34 -34
  89. package/esm/admins/adminsApi.d.ts +7 -7
  90. package/esm/admins/adminsApi.js +7 -7
  91. package/esm/admins/adminsInterfaces.d.ts +22 -22
  92. package/esm/attribute-sets/attributeSetsApi.d.ts +8 -8
  93. package/esm/attribute-sets/attributeSetsApi.js +8 -8
  94. package/esm/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
  95. package/esm/auth-provider/authProviderApi.d.ts +31 -31
  96. package/esm/auth-provider/authProviderApi.js +31 -31
  97. package/esm/auth-provider/authProvidersInterfaces.d.ts +54 -54
  98. package/esm/base/asyncModules.d.ts +6 -6
  99. package/esm/base/asyncModules.js +6 -6
  100. package/esm/base/syncModules.d.ts +1 -1
  101. package/esm/base/syncModules.js +1 -1
  102. package/esm/base/utils.d.ts +4 -4
  103. package/esm/blocks/blocksApi.d.ts +35 -35
  104. package/esm/blocks/blocksApi.js +35 -35
  105. package/esm/blocks/blocksInterfaces.d.ts +55 -55
  106. package/esm/discounts/discountsApi.d.ts +14 -14
  107. package/esm/discounts/discountsApi.js +14 -14
  108. package/esm/discounts/discountsInterfaces.d.ts +52 -52
  109. package/esm/events/eventsApi.d.ts +13 -13
  110. package/esm/events/eventsApi.js +13 -13
  111. package/esm/events/eventsInterfaces.d.ts +18 -18
  112. package/esm/file-uploading/fileUploadingApi.d.ts +16 -16
  113. package/esm/file-uploading/fileUploadingApi.js +14 -17
  114. package/esm/file-uploading/fileUploadingInterfaces.d.ts +30 -30
  115. package/esm/filters/filtersApi.d.ts +1 -1
  116. package/esm/filters/filtersApi.js +1 -1
  117. package/esm/filters/filtersInterfaces.d.ts +7 -7
  118. package/esm/forms/formsApi.d.ts +3 -3
  119. package/esm/forms/formsApi.js +3 -3
  120. package/esm/forms/formsInterfaces.d.ts +42 -42
  121. package/esm/forms-data/formsDataApi.d.ts +14 -14
  122. package/esm/forms-data/formsDataApi.js +14 -14
  123. package/esm/forms-data/formsDataInterfaces.d.ts +67 -68
  124. package/esm/general-types/generalTypesInterfaces.d.ts +2 -2
  125. package/esm/index.d.ts +1 -1
  126. package/esm/index.js +1 -1
  127. package/esm/integration-collections/integrationCollectionsApi.d.ts +26 -30
  128. package/esm/integration-collections/integrationCollectionsApi.js +24 -28
  129. package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +61 -60
  130. package/esm/locales/localesInterfaces.d.ts +8 -8
  131. package/esm/menus/menusApi.d.ts +1 -1
  132. package/esm/menus/menusApi.js +1 -1
  133. package/esm/menus/menusInterfaces.d.ts +12 -12
  134. package/esm/orders/ordersApi.d.ts +26 -26
  135. package/esm/orders/ordersApi.js +26 -26
  136. package/esm/orders/ordersInterfaces.d.ts +101 -101
  137. package/esm/pages/pagesApi.d.ts +6 -6
  138. package/esm/pages/pagesApi.js +6 -6
  139. package/esm/pages/pagesInterfaces.d.ts +46 -46
  140. package/esm/payments/paymentsApi.d.ts +8 -8
  141. package/esm/payments/paymentsApi.js +8 -8
  142. package/esm/payments/paymentsInterfaces.d.ts +31 -31
  143. package/esm/product-statuses/productStatusesApi.d.ts +2 -2
  144. package/esm/product-statuses/productStatusesApi.js +2 -2
  145. package/esm/product-statuses/productStatusesInterfaces.d.ts +8 -8
  146. package/esm/products/productsApi.d.ts +37 -37
  147. package/esm/products/productsApi.js +36 -36
  148. package/esm/products/productsInterfaces.d.ts +100 -100
  149. package/esm/search/searchApi.d.ts +3 -3
  150. package/esm/search/searchApi.js +3 -3
  151. package/esm/search/searchInterfaces.d.ts +4 -4
  152. package/esm/sitemap/sitemapApi.d.ts +1 -1
  153. package/esm/sitemap/sitemapApi.js +1 -1
  154. package/esm/sitemap/sitemapInterfaces.d.ts +2 -2
  155. package/esm/subscriptions/subscriptionsApi.d.ts +3 -3
  156. package/esm/subscriptions/subscriptionsApi.js +3 -3
  157. package/esm/subscriptions/subscriptionsInterfaces.d.ts +11 -11
  158. package/esm/system/systemApi.d.ts +4 -4
  159. package/esm/system/systemApi.js +2 -2
  160. package/esm/system/systemInterfaces.d.ts +11 -5
  161. package/esm/templates/templatesApi.d.ts +5 -5
  162. package/esm/templates/templatesApi.js +5 -5
  163. package/esm/templates/templatesInterfaces.d.ts +13 -13
  164. package/esm/templates-preview/templatesPreviewApi.d.ts +1 -1
  165. package/esm/templates-preview/templatesPreviewApi.js +1 -1
  166. package/esm/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
  167. package/esm/user-activity/userActivityApi.d.ts +1 -1
  168. package/esm/user-activity/userActivityApi.js +1 -1
  169. package/esm/user-activity/userActivityInterfaces.d.ts +4 -4
  170. package/esm/user-groups/userGroupsApi.d.ts +1 -1
  171. package/esm/user-groups/userGroupsApi.js +1 -1
  172. package/esm/user-groups/userGroupsInterfaces.d.ts +5 -5
  173. package/esm/users/usersApi.d.ts +7 -7
  174. package/esm/users/usersApi.js +7 -7
  175. package/esm/users/usersInterfaces.d.ts +34 -34
  176. package/package.json +2 -2
@@ -12,9 +12,9 @@ interface IDiscountsApi {
12
12
  * Return all discounts.
13
13
  * @handleName getAllSubscriptions
14
14
  * @param {string} [langCode] - Language code. Default: "en_US".
15
- * @param {number} [offset] - Optional parameter for pagination. Default: 0.
16
- * @param {number} [limit] - Optional parameter for pagination. Default: 30.
17
- * @param {IDiscountType} [type] - Optional parameter to filter discounts by type.
15
+ * @param {number} [offset] - Number of records to skip. Default: 0.
16
+ * @param {number} [limit] - Maximum number of records to return. Default: 30.
17
+ * @param {IDiscountType} [type] - Discount type to filter by. Optional.
18
18
  * @returns {Promise<IDiscountsResponse | IError>} Returns an object containing all discounts or an error object if there was an issue.
19
19
  * @throws {IError} When isShell=false and an error occurs during the fetch
20
20
  * @description Fetches all discounts from the server.
@@ -23,7 +23,7 @@ interface IDiscountsApi {
23
23
  /**
24
24
  * Get discount by marker
25
25
  * @handleName getDiscountByMarker
26
- * @param {string} marker - Textual identifier of the discount storage object. Example: "discount_storage".
26
+ * @param {string} marker - Marker of the discount storage. Example: "discount_storage".
27
27
  * @param {string} [langCode] - Language code. Default: "en_US".
28
28
  * @returns {Promise<IDiscountsEntity | IError>} Returns an object containing discount by marker or an error object if there was an issue.
29
29
  * @throws {IError} When isShell=false and an error occurs during the fetch
@@ -33,7 +33,7 @@ interface IDiscountsApi {
33
33
  /**
34
34
  * Validate discounts coupon
35
35
  * @handleName validateDiscountsCoupon
36
- * @param {string} code - The coupon code to validate.
36
+ * @param {string} code - Coupon code to validate.
37
37
  * @returns {Promise<ICouponValidationResult | IError>} Returns an coupon validation result or an error object if there was an issue.
38
38
  * @throws {IError} When isShell=false and an error occurs during the fetch
39
39
  * @description This function validates a coupon code and returns the result.
@@ -49,12 +49,12 @@ interface IDiscountsApi {
49
49
  /**
50
50
  * Get bonus transaction history of the current user.
51
51
  * @handleName getBonusHistory
52
- * @param {string} [type] - Transaction type filter.
53
- * @param {string} [dateFrom] - Start date filter.
54
- * @param {string} [dateTo] - End date filter.
55
- * @param {number} [discountId] - Discount id filter.
56
- * @param {number} [moduleId] - Module id filter.
57
- * @param {boolean} [isAdmin] - Admin filter.
52
+ * @param {string} [type] - Transaction type to filter by.
53
+ * @param {string} [dateFrom] - Start of the date range.
54
+ * @param {string} [dateTo] - End of the date range.
55
+ * @param {number} [discountId] - Return only transactions of this discount ID.
56
+ * @param {number} [moduleId] - Filter by module ID.
57
+ * @param {boolean} [isAdmin] - Filter by the transaction's `isAdmin` flag.
58
58
  * @returns {Promise<IBonusHistoryResponse | IError>} Returns the container with the transactions and their total, or an error object.
59
59
  * @throws {IError} When isShell=false and an error occurs during the fetch
60
60
  */
@@ -62,10 +62,10 @@ interface IDiscountsApi {
62
62
  /**
63
63
  * Semantic (vector) search for discounts.
64
64
  * @handleName getDiscountsByVectorSearch
65
- * @param {IDiscountsVectorSearch} body - Vector search body. Example: `{ queryText: "winter sale" }`.
65
+ * @param {IDiscountsVectorSearch} body - Vector search parameters. Example: `{ queryText: "winter sale" }`.
66
66
  * @param {string} [langCode] - Language code. Default: "en_US".
67
- * @param {number} [offset] - Parameter for pagination. Default: 0.
68
- * @param {number} [limit] - Parameter for pagination. Default: 30.
67
+ * @param {number} [offset] - Number of records to skip. Default: 0.
68
+ * @param {number} [limit] - Maximum number of records to return. Default: 30.
69
69
  * @returns {Promise<IVectorSearchResponse<IDiscountsResponse> | IError>} Returns an object with an array of found discounts and total count.
70
70
  * @throws {IError} When isShell=false and an error occurs during the fetch
71
71
  */
@@ -76,8 +76,8 @@ interface IDiscountsApi {
76
76
  * @interface IDiscountsVectorSearch
77
77
  * @property {string} queryText - Natural-language search query. Example: "winter sale".
78
78
  * @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2). Example: 0.3.
79
- * @property {number} [maxHits] - Top-K candidates fetched before pagination. Default: 100. Max: 500. Example: 10.
80
- * @property {boolean} [debug] - When true, each returned item gets a `distance` field. Example: false.
79
+ * @property {number} [maxHits] - Number of top candidates fetched before pagination. Default: 100. Maximum: 500. Example: 10.
80
+ * @property {boolean} [debug] - When `true`, each returned item gets a `distance` field. Example: false.
81
81
  * @description Body for the discounts vector/search endpoint.
82
82
  */
83
83
  interface IDiscountsVectorSearch {
@@ -113,26 +113,26 @@ interface IDiscountCondition {
113
113
  /**
114
114
  * Represents a discount entity.
115
115
  * @interface IDiscountsEntity
116
- * @property {number} id - The unique identifier of the discount.
117
- * @property {number | null} [attributeSetId] - The identifier of the attribute set linked to the discount, or `null` when no set is linked.
118
- * @property {ILocalizeInfo} [localizeInfos] - The name of the discount.
119
- * @property {number} [version] - The version of the discount.
120
- * @property {string} [identifier] - The identifier of the discount.
116
+ * @property {number} id - ID of the discount.
117
+ * @property {number | null} [attributeSetId] - ID of the attribute set linked to the discount, or `null` when no set is linked.
118
+ * @property {ILocalizeInfo} [localizeInfos] - Localized name of the discount.
119
+ * @property {number} [version] - Version number of the discount.
120
+ * @property {string} [identifier] - Marker of the discount.
121
121
  * @property {IDiscountType} type - The type of the discount.
122
122
  * @property {string} [startDate] - The start date of the discount.
123
- * @property {string} [endDate] - The end date of the discount.
124
- * @property {IDiscountValue} [discountValue] - The value of the discount, including its type and amount limits.
125
- * @property {string} [conditionLogic] - The logic of the discount. Possible values are "AND" | "OR".
126
- * @property {IDiscountCondition[]} [conditions] - The conditions of the discount.
127
- * @property {Record<string, unknown> | null} [exclusions] - The exclusions of the discount.
128
- * @property {Record<string, unknown> | null} [gifts] - The gifts of the discount.
123
+ * @property {string} [endDate] - End date of the discount.
124
+ * @property {IDiscountValue} [discountValue] - Discount value with its type and amount limits.
125
+ * @property {string} [conditionLogic] - How the conditions combine: `AND` or `OR`.
126
+ * @property {IDiscountCondition[]} [conditions] - Conditions of the discount.
127
+ * @property {Record<string, unknown> | null} [exclusions] - Exclusions of the discount.
128
+ * @property {Record<string, unknown> | null} [gifts] - Gifts of the discount.
129
129
  * @property {boolean} [giftsReplaceCartItems] - Whether the gifts replace cart items.
130
- * @property {Record<string, unknown> | null} [userGroups] - The user groups of the discount.
131
- * @property {Record<string, unknown> | null} [userExclusions] - The user exclusions of the discount.
132
- * @property {IAttributeValues} [attributeValues] - The attribute values of the discount.
133
- * @property {string} [attributeSetIdentifier] - The identifier of the attribute set.
130
+ * @property {Record<string, unknown> | null} [userGroups] - User groups the discount applies to.
131
+ * @property {Record<string, unknown> | null} [userExclusions] - Users excluded from the discount.
132
+ * @property {IAttributeValues} [attributeValues] - Attribute values of the discount.
133
+ * @property {string} [attributeSetIdentifier] - Marker of the attribute set.
134
134
  * @property {Record<string, unknown>} [bonusEvent] - Bonus event configuration.
135
- * @property {number} [position] - Position number for sorting. Example: 1.
135
+ * @property {number} [position] - Position used for sorting. Example: 1.
136
136
  * @property {number | string} [total] - Total count of related entries. Example: "1".
137
137
  * @property {number} [distance] - Cosine distance to the query. Returned only by the semantic (vector) search endpoint when `debug: true` is passed in the search body. Example: 0.12.
138
138
  */
@@ -163,7 +163,7 @@ interface IDiscountsEntity {
163
163
  /**
164
164
  * @interface IDiscountValue
165
165
  * @property {'TO_PRODUCT' | 'TO_ORDER'} applicability - What the discount applies to. Example: "TO_PRODUCT".
166
- * @property {'FIXED_AMOUNT' | 'PERCENT'} discountType - How the discount value is interpreted. Example: "FIXED_AMOUNT".
166
+ * @property {'FIXED_AMOUNT' | 'PERCENT'} discountType - How the discount value is applied. Example: "FIXED_AMOUNT".
167
167
  * @property {number} value - Discount amount (currency units for FIXED_AMOUNT, percentage points for PERCENT). Example: 10.
168
168
  * @property {number | null} [maxAmount] - Cap on the absolute discount applied, or `null` when uncapped. Example: 5.
169
169
  * @description Configuration of the discount calculation.
@@ -176,12 +176,12 @@ interface IDiscountValue {
176
176
  }
177
177
  /**
178
178
  * @interface ICouponEntity
179
- * @property {number} id - Coupon record id. Example: 1.
180
- * @property {number} discountId - Discount the coupon belongs to. Example: 1.
179
+ * @property {number} id - Coupon record ID. Example: 1.
180
+ * @property {number} discountId - ID of the discount the coupon belongs to. Example: 1.
181
181
  * @property {string} code - Coupon code. Example: "SUMMER-KBWZ-2428".
182
182
  * @property {boolean} isReusable - Whether the coupon can be used more than once. Example: false.
183
183
  * @property {boolean} isUsed - Whether the coupon has already been used. Example: false.
184
- * @property {number | null} orderId - Order id where the coupon was applied, or null. Example: null.
184
+ * @property {number | null} orderId - ID of the order the coupon was applied to, or `null`. Example: null.
185
185
  * @property {string | null} usedAt - When the coupon was used, or null. Example: null.
186
186
  * @description Coupon entity returned by the discounts API.
187
187
  */
@@ -197,7 +197,7 @@ interface ICouponEntity {
197
197
  /**
198
198
  * Paginated response for discounts list.
199
199
  * @interface IDiscountsResponse
200
- * @property {IDiscountsEntity[]} items - Array of discount entities.
200
+ * @property {IDiscountsEntity[]} items - Discounts in this response.
201
201
  * @property {number} total - Total number of discounts.
202
202
  */
203
203
  interface IDiscountsResponse {
@@ -207,7 +207,7 @@ interface IDiscountsResponse {
207
207
  /**
208
208
  * Request body for coupon validation.
209
209
  * @interface IDiscountsValidateCoupon
210
- * @property {string} code - The coupon code to validate.
210
+ * @property {string} code - Coupon code to validate.
211
211
  */
212
212
  interface IDiscountsValidateCoupon {
213
213
  code: string;
@@ -216,8 +216,8 @@ interface IDiscountsValidateCoupon {
216
216
  * Result of coupon validation.
217
217
  * @interface ICouponValidationResult
218
218
  * @property {boolean} valid - Whether the coupon is valid.
219
- * @property {ICouponEntity} [coupon] - Coupon data if the coupon is valid.
220
- * @property {string} [error] - Error message if the coupon is invalid.
219
+ * @property {ICouponEntity} [coupon] - Coupon data, if the coupon is valid.
220
+ * @property {string} [error] - Error message, if the coupon is invalid.
221
221
  */
222
222
  interface ICouponValidationResult {
223
223
  valid: boolean;
@@ -240,12 +240,12 @@ interface IDiscountByMarkerQuery {
240
240
  type IBonusTransactionType = 'ACCRUAL' | 'USAGE' | 'REDUCE' | 'REVERSAL_ACCRUAL' | 'REVERSAL_USAGE' | 'EXPIRATION';
241
241
  /**
242
242
  * @interface IBonusHistoryQuery
243
- * @property {IBonusTransactionType} [type] - Transaction type filter.
244
- * @property {string} [dateFrom] - Start date filter.
245
- * @property {string} [dateTo] - End date filter.
246
- * @property {number} [discountId] - Discount id filter.
247
- * @property {number} [moduleId] - Module id filter.
248
- * @property {boolean} [isAdmin] - Admin filter.
243
+ * @property {IBonusTransactionType} [type] - Transaction type to filter by.
244
+ * @property {string} [dateFrom] - Start of the date range.
245
+ * @property {string} [dateTo] - End of the date range.
246
+ * @property {number} [discountId] - Return only transactions of this discount ID.
247
+ * @property {number} [moduleId] - Filter by module ID.
248
+ * @property {boolean} [isAdmin] - Filter by the transaction's `isAdmin` flag.
249
249
  */
250
250
  interface IBonusHistoryQuery {
251
251
  type?: IBonusTransactionType;
@@ -257,16 +257,16 @@ interface IBonusHistoryQuery {
257
257
  }
258
258
  /**
259
259
  * @interface IBonusTransactionEntity
260
- * @property {number} balanceId - Balance id.
260
+ * @property {number} balanceId - ID of the bonus balance.
261
261
  * @property {number} amount - Transaction amount.
262
262
  * @property {IBonusTransactionType} type - Transaction type.
263
- * @property {number} [discountId] - Discount id.
264
- * @property {number} [moduleId] - Module id.
263
+ * @property {number} [discountId] - Discount ID.
264
+ * @property {number} [moduleId] - ID of the module.
265
265
  * @property {string} [entityIdentifier] - Entity identifier.
266
266
  * @property {string} [comment] - Comment.
267
267
  * @property {boolean} isAdmin - Admin flag.
268
268
  * @property {number} [remainingAmount] - Remaining amount.
269
- * @property {'EVENT' | 'SCHEDULED'} [triggerType] - Trigger type.
269
+ * @property {'EVENT' | 'SCHEDULED'} [triggerType] - What triggered the transaction: `"EVENT"` or `"SCHEDULED"`.
270
270
  * @property {string} [expiresAt] - Expiration date.
271
271
  * @property {string} [createdAt] - Creation date.
272
272
  */
@@ -286,7 +286,7 @@ interface IBonusTransactionEntity {
286
286
  }
287
287
  /**
288
288
  * @interface IBonusHistoryResponse
289
- * @property {IBonusTransactionEntity[]} items - The transactions of the current page.
289
+ * @property {IBonusTransactionEntity[]} items - Transactions on the current page.
290
290
  * @property {number} total - How many transactions the filter matches in total.
291
291
  * @description Container the bonus history arrives in. The endpoint answers
292
292
  * `{ items, total }`, not a bare array — measured on the SDK test stand,
@@ -299,7 +299,7 @@ interface IBonusHistoryResponse {
299
299
  /**
300
300
  * @interface IBonusBalanceEntity
301
301
  * @description Represents the balance of bonus points.
302
- * @property {number} balance - The balance of bonus points. Example: 100
302
+ * @property {number} balance - Bonus point balance. Example: 100
303
303
  */
304
304
  interface IBonusBalanceEntity {
305
305
  balance: number;
@@ -25,8 +25,8 @@ export default class EventsApi extends AsyncModules implements IEvents {
25
25
  /**
26
26
  * Return all subscriptions to product.
27
27
  * @handleName getAllSubscriptions
28
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
29
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
28
+ * @param {number} [offset] - Number of records to skip. Default: 0.
29
+ * @param {number} [limit] - Maximum number of records to return. Default: 30.
30
30
  * @returns {Promise<ISubscriptions | IError>} Returns an object containing all subscriptions or an error object if there was an issue.
31
31
  * @throws {IError} When isShell=false and an error occurs during the fetch
32
32
  * @description This method requires user authorization.
@@ -37,9 +37,9 @@ export default class EventsApi extends AsyncModules implements IEvents {
37
37
  /**
38
38
  * Subscribing to an event on a product.
39
39
  * @handleName subscribeByMarker
40
- * @param {string} marker - Event marker. Example: "product_price_change".
41
- * @param {number} productId - Product id. Example: 12345.
42
- * @param {string} [langCode] - Language code. Default: "en_US".=
40
+ * @param {string} marker - Marker of the event. Example: "product_price_change".
41
+ * @param {number} productId - Product ID. Example: 12345.
42
+ * @param {string} [langCode] - Language code. Default: "en_US".
43
43
  * @returns {Promise<boolean | IError>} Returns true if subscription was successful, or an error object if there was an issue.
44
44
  * @throws {IError} When isShell=false and an error occurs during the fetch
45
45
  * @description This method requires user authorization.
@@ -50,8 +50,8 @@ export default class EventsApi extends AsyncModules implements IEvents {
50
50
  /**
51
51
  * Unsubscribing to an event on a product.
52
52
  * @handleName unsubscribeByMarker
53
- * @param {string} marker - The marker of the event to unsubscribe from. Example: "product_price_change".
54
- * @param {number} productId - The ID of the product to unsubscribe from. Example: 12345.
53
+ * @param {string} marker - Marker of the event to unsubscribe from. Example: "product_price_change".
54
+ * @param {number} productId - ID of the product to unsubscribe from. Example: 12345.
55
55
  * @param {string} [langCode] - Language code. Default: "en_US".
56
56
  * @returns {Promise<boolean | IError>} - Returns true if the unsubscription succeeded, or an error object if there was an issue.
57
57
  * @throws {IError} When isShell=false and an error occurs during the fetch
@@ -72,8 +72,8 @@ export default class EventsApi extends AsyncModules implements IEvents {
72
72
  /**
73
73
  * Subscribe to a form event by marker.
74
74
  * @handleName subscribeToForm
75
- * @param {string} marker - Event marker. Example: "form_marker".
76
- * @param {ISubscribeFormEvent} body - Subscription body. Example: `{ formDataId: 123 }`.
75
+ * @param {string} marker - Marker of the event. Example: "form_marker".
76
+ * @param {ISubscribeFormEvent} body - Subscription parameters. Example: `{ formDataId: 123 }`.
77
77
  * @returns {Promise<boolean | IError>} Returns true if the subscription was successful, or an error object.
78
78
  * @throws {IError} When isShell=false and an error occurs during the fetch
79
79
  * @description This method requires user authorization.
@@ -84,8 +84,8 @@ export default class EventsApi extends AsyncModules implements IEvents {
84
84
  /**
85
85
  * Returns all form subscriptions.
86
86
  * @handleName getFormSubscriptions
87
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
88
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
87
+ * @param {number} [offset] - Number of records to skip. Default: 0.
88
+ * @param {number} [limit] - Maximum number of records to return. Default: 30.
89
89
  * @returns {Promise<IFormSubscriptionsResponse | IError>} Returns an object with an array of form subscriptions and total count.
90
90
  * @throws {IError} When isShell=false and an error occurs during the fetch
91
91
  * @description This method requires user authorization.
@@ -96,8 +96,8 @@ export default class EventsApi extends AsyncModules implements IEvents {
96
96
  /**
97
97
  * Unsubscribe from form notifications by marker.
98
98
  * @handleName unsubscribeFromForm
99
- * @param {string} marker - Event marker. Example: "form_marker".
100
- * @param {ISubscribeFormEvent} body - Subscription body. Example: `{ formDataId: 123 }`.
99
+ * @param {string} marker - Marker of the event. Example: "form_marker".
100
+ * @param {ISubscribeFormEvent} body - Subscription parameters. Example: `{ formDataId: 123 }`.
101
101
  * @returns {Promise<boolean | IError>} Returns true if the unsubscription was successful, or an error object.
102
102
  * @throws {IError} When isShell=false and an error occurs during the fetch
103
103
  * @description This method requires user authorization.
@@ -29,8 +29,8 @@ class EventsApi extends asyncModules_1.default {
29
29
  /**
30
30
  * Return all subscriptions to product.
31
31
  * @handleName getAllSubscriptions
32
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
33
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
32
+ * @param {number} [offset] - Number of records to skip. Default: 0.
33
+ * @param {number} [limit] - Maximum number of records to return. Default: 30.
34
34
  * @returns {Promise<ISubscriptions | IError>} Returns an object containing all subscriptions or an error object if there was an issue.
35
35
  * @throws {IError} When isShell=false and an error occurs during the fetch
36
36
  * @description This method requires user authorization.
@@ -48,9 +48,9 @@ class EventsApi extends asyncModules_1.default {
48
48
  /**
49
49
  * Subscribing to an event on a product.
50
50
  * @handleName subscribeByMarker
51
- * @param {string} marker - Event marker. Example: "product_price_change".
52
- * @param {number} productId - Product id. Example: 12345.
53
- * @param {string} [langCode] - Language code. Default: "en_US".=
51
+ * @param {string} marker - Marker of the event. Example: "product_price_change".
52
+ * @param {number} productId - Product ID. Example: 12345.
53
+ * @param {string} [langCode] - Language code. Default: "en_US".
54
54
  * @returns {Promise<boolean | IError>} Returns true if subscription was successful, or an error object if there was an issue.
55
55
  * @throws {IError} When isShell=false and an error occurs during the fetch
56
56
  * @description This method requires user authorization.
@@ -67,8 +67,8 @@ class EventsApi extends asyncModules_1.default {
67
67
  /**
68
68
  * Unsubscribing to an event on a product.
69
69
  * @handleName unsubscribeByMarker
70
- * @param {string} marker - The marker of the event to unsubscribe from. Example: "product_price_change".
71
- * @param {number} productId - The ID of the product to unsubscribe from. Example: 12345.
70
+ * @param {string} marker - Marker of the event to unsubscribe from. Example: "product_price_change".
71
+ * @param {number} productId - ID of the product to unsubscribe from. Example: 12345.
72
72
  * @param {string} [langCode] - Language code. Default: "en_US".
73
73
  * @returns {Promise<boolean | IError>} - Returns true if the unsubscription succeeded, or an error object if there was an issue.
74
74
  * @throws {IError} When isShell=false and an error occurs during the fetch
@@ -98,8 +98,8 @@ class EventsApi extends asyncModules_1.default {
98
98
  /**
99
99
  * Subscribe to a form event by marker.
100
100
  * @handleName subscribeToForm
101
- * @param {string} marker - Event marker. Example: "form_marker".
102
- * @param {ISubscribeFormEvent} body - Subscription body. Example: `{ formDataId: 123 }`.
101
+ * @param {string} marker - Marker of the event. Example: "form_marker".
102
+ * @param {ISubscribeFormEvent} body - Subscription parameters. Example: `{ formDataId: 123 }`.
103
103
  * @returns {Promise<boolean | IError>} Returns true if the subscription was successful, or an error object.
104
104
  * @throws {IError} When isShell=false and an error occurs during the fetch
105
105
  * @description This method requires user authorization.
@@ -112,8 +112,8 @@ class EventsApi extends asyncModules_1.default {
112
112
  /**
113
113
  * Returns all form subscriptions.
114
114
  * @handleName getFormSubscriptions
115
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
116
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
115
+ * @param {number} [offset] - Number of records to skip. Default: 0.
116
+ * @param {number} [limit] - Maximum number of records to return. Default: 30.
117
117
  * @returns {Promise<IFormSubscriptionsResponse | IError>} Returns an object with an array of form subscriptions and total count.
118
118
  * @throws {IError} When isShell=false and an error occurs during the fetch
119
119
  * @description This method requires user authorization.
@@ -131,8 +131,8 @@ class EventsApi extends asyncModules_1.default {
131
131
  /**
132
132
  * Unsubscribe from form notifications by marker.
133
133
  * @handleName unsubscribeFromForm
134
- * @param {string} marker - Event marker. Example: "form_marker".
135
- * @param {ISubscribeFormEvent} body - Subscription body. Example: `{ formDataId: 123 }`.
134
+ * @param {string} marker - Marker of the event. Example: "form_marker".
135
+ * @param {ISubscribeFormEvent} body - Subscription parameters. Example: `{ formDataId: 123 }`.
136
136
  * @returns {Promise<boolean | IError>} Returns true if the unsubscription was successful, or an error object.
137
137
  * @throws {IError} When isShell=false and an error occurs during the fetch
138
138
  * @description This method requires user authorization.
@@ -8,8 +8,8 @@ interface IEvents {
8
8
  /**
9
9
  * Retrieves all subscriptions to products.
10
10
  * @handleName getAllSubscriptions
11
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
12
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
11
+ * @param {number} [offset] - Number of records to skip. Default: 0.
12
+ * @param {number} [limit] - Maximum number of records to return. Default: 30.
13
13
  * @returns {Promise<ISubscriptions | IError>} A promise that resolves to a subscriptions object or an error.
14
14
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
15
15
  * @description This method retrieves all subscriptions to products.
@@ -30,7 +30,7 @@ interface IEvents {
30
30
  * Unsubscribes from an event on a product by its marker.
31
31
  * @handleName unsubscribeByMarker
32
32
  * @param {string} marker - The marker identifying the event. Example: "product_price_change".
33
- * @param {number} productId - The ID of the product to unsubscribe from. Example: 12345.
33
+ * @param {number} productId - ID of the product to unsubscribe from. Example: 12345.
34
34
  * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
35
35
  * @returns {Promise<boolean | IError>} A promise that resolves to any type or an error.
36
36
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
@@ -48,8 +48,8 @@ interface IEvents {
48
48
  /**
49
49
  * Subscribe to a form event by marker.
50
50
  * @handleName subscribeToForm
51
- * @param {string} marker - Event marker. Example: "form_marker".
52
- * @param {ISubscribeFormEvent} body - Subscription body. Example: `{ formDataId: 123 }`.
51
+ * @param {string} marker - Marker of the event. Example: "form_marker".
52
+ * @param {ISubscribeFormEvent} body - Subscription parameters. Example: `{ formDataId: 123 }`.
53
53
  * @returns {Promise<boolean | IError>} A promise that resolves to true on success, or an error.
54
54
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
55
55
  * @description This method subscribes to a form event by marker. This method requires user authorization.
@@ -59,8 +59,8 @@ interface IEvents {
59
59
  /**
60
60
  * Returns all form subscriptions.
61
61
  * @handleName getFormSubscriptions
62
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
63
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
62
+ * @param {number} [offset] - Number of records to skip. Default: 0.
63
+ * @param {number} [limit] - Maximum number of records to return. Default: 30.
64
64
  * @returns {Promise<IFormSubscriptionsResponse | IError>} A promise that resolves to an object with an array of form subscriptions and total count, or an error.
65
65
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
66
66
  * @description This method returns all form subscriptions. This method requires user authorization.
@@ -70,8 +70,8 @@ interface IEvents {
70
70
  /**
71
71
  * Unsubscribe from form notifications by marker.
72
72
  * @handleName unsubscribeFromForm
73
- * @param {string} marker - Event marker. Example: "form_marker".
74
- * @param {ISubscribeFormEvent} body - Subscription body. Example: `{ formDataId: 123 }`.
73
+ * @param {string} marker - Marker of the event. Example: "form_marker".
74
+ * @param {ISubscribeFormEvent} body - Subscription parameters. Example: `{ formDataId: 123 }`.
75
75
  * @returns {Promise<boolean | IError>} A promise that resolves to true on success, or an error.
76
76
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
77
77
  * @description This method unsubscribes from form notifications by marker. This method requires user authorization.
@@ -83,7 +83,7 @@ interface IEvents {
83
83
  * Represents a response from the events API containing a total count and an array of subscription items.
84
84
  * @interface ISubscriptions
85
85
  * @property {number} total - Total number of found records. Example: 100.
86
- * @property {ISubscriptionItem[]} items - Array of subscription items, each containing an event marker and a product ID.
86
+ * @property {ISubscriptionItem[]} items - Subscriptions, each with an event marker and a product ID.
87
87
  * @example
88
88
  [
89
89
  {
@@ -128,10 +128,10 @@ interface ISubscribeBody {
128
128
  /**
129
129
  * Represents an event returned by the events API.
130
130
  * @interface IContentApiEvent
131
- * @property {number} id - Event identifier. Example: 1.
132
- * @property {string} identifier - Event text identifier. Example: "price_change".
133
- * @property {Record<string, unknown>} localizeInfos - Localized info of the event.
134
- * @property {string} [module] - Module the event belongs to; absent on system events not bound to a module (e.g. "send_code"). Example: "catalog".
131
+ * @property {number} id - Event ID. Example: 1.
132
+ * @property {string} identifier - Marker of the event. Example: "price_change".
133
+ * @property {Record<string, unknown>} localizeInfos - Localized data of the event.
134
+ * @property {string} [module] - Module the event belongs to; absent on system events that are not bound to a module, such as `send_code`. Example: "catalog".
135
135
  * @description Represents a single available event.
136
136
  */
137
137
  interface IContentApiEvent {
@@ -144,7 +144,7 @@ interface IContentApiEvent {
144
144
  * Represents a form subscription item.
145
145
  * @interface IListFormSubscription
146
146
  * @property {string} eventMarker - Event marker. Example: "form_marker".
147
- * @property {number} formDataId - Form data identifier. Example: 123.
147
+ * @property {number} formDataId - Form data ID. Example: 123.
148
148
  * @description Represents a single form subscription.
149
149
  */
150
150
  interface IListFormSubscription {
@@ -154,7 +154,7 @@ interface IListFormSubscription {
154
154
  /**
155
155
  * Represents the response of the form subscriptions list endpoint.
156
156
  * @interface IFormSubscriptionsResponse
157
- * @property {IListFormSubscription[]} items - Array of form subscriptions.
157
+ * @property {IListFormSubscription[]} items - Form subscriptions of the current user.
158
158
  * @property {number} total - Total number of subscriptions. Example: 0.
159
159
  * @description Container returned by `getFormSubscriptions`.
160
160
  */
@@ -165,8 +165,8 @@ interface IFormSubscriptionsResponse {
165
165
  /**
166
166
  * Body for subscribing to / unsubscribing from a form event.
167
167
  * @interface ISubscribeFormEvent
168
- * @property {number} formDataId - Form data identifier. Example: 123.
169
- * @property {string} [status] - Optional subscription status.
168
+ * @property {number} formDataId - Form data ID. Example: 123.
169
+ * @property {string} [status] - Moderation status of the form data to subscribe to, for example `"approved"`. Optional.
170
170
  * @description Body for the form subscribe/unsubscribe methods.
171
171
  */
172
172
  interface ISubscribeFormEvent {
@@ -23,7 +23,7 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
23
23
  * Upload file function.
24
24
  * @handleName upload
25
25
  * @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
26
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
26
+ * @param {IUploadingQuery} fileQuery - Where the file is stored. Required: without `type`, `entity` and `id` the endpoint answers `400 … should not be empty`.
27
27
  * @example
28
28
  {
29
29
  "type": "page",
@@ -34,9 +34,9 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
34
34
  "compress": true,
35
35
  "template": 1
36
36
  }
37
- * @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
38
- * @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
39
- * @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
37
+ * @param {string} fileQuery.type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
38
+ * @param {string} fileQuery.entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
39
+ * @param {number} fileQuery.id - ID of the object the file belongs to; sets the folder name in the storage. Example: 3787.
40
40
  * @param {number} [fileQuery.width] - Optional width parameter. Example: 0.
41
41
  * @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
42
42
  * @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
@@ -45,12 +45,12 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
45
45
  * @throws {IError} When isShell=false and an error occurs during the fetch
46
46
  * @see {@link https://js-sdk.oneentry.cloud/docs/file-uploading/upload upload} documentation.
47
47
  */
48
- upload(file: File | Blob, fileQuery?: IUploadingQuery): Promise<IUploadingReturn[] | IError>;
48
+ upload(file: File | Blob, fileQuery: IUploadingQuery): Promise<IUploadingReturn[] | IError>;
49
49
  /**
50
50
  * Deletes a file from the cloud file storage.
51
51
  * @handleName delete
52
52
  * @param {string} filename - File name. Example: "file.png".
53
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
53
+ * @param {IUploadingQuery} fileQuery - Where the file is stored. Required: without `type`, `entity` and `id` the endpoint answers `400 … should not be empty`.
54
54
  * @example
55
55
  {
56
56
  "type": "page",
@@ -58,15 +58,15 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
58
58
  "id": 3787,
59
59
  "template": 1
60
60
  }
61
- * @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
62
- * @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
63
- * @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
61
+ * @param {string} fileQuery.type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
62
+ * @param {string} fileQuery.entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
63
+ * @param {number} fileQuery.id - ID of the object the file belongs to; sets the folder name in the storage. Example: 3787.
64
64
  * @param {number} [fileQuery.template] - preview template identifier. Example: 1.
65
65
  * @returns {Promise<boolean | IError>} Returns a promise that resolves to true when the file was deleted or an error object if there was an issue.
66
66
  * @throws {IError} When isShell=false and an error occurs during the fetch
67
67
  * @see {@link https://js-sdk.oneentry.cloud/docs/file-uploading/delete delete} documentation.
68
68
  */
69
- delete(filename: string, fileQuery?: IUploadingQuery): Promise<boolean | IError>;
69
+ delete(filename: string, fileQuery: IUploadingQuery): Promise<boolean | IError>;
70
70
  /**
71
71
  * Public search across the content of files attached to records.
72
72
  * @handleName searchFileContent
@@ -76,7 +76,7 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
76
76
  * @param {string[]} [ownerTables] - Filter by the section the attached record belongs to, sent comma-separated. Example: ["products", "pages"].
77
77
  * @param {string[]} [localeCodes] - Filter by the locale of the link, not of the file content. Example: ["en_US"].
78
78
  * @param {boolean} [onlyTruncated] - Return only files whose extracted text was cut at the size ceiling.
79
- * @param {number} [offset] - Parameter for pagination. Default: 0.
79
+ * @param {number} [offset] - Number of records to skip. Default: 0.
80
80
  * @param {number} [limit] - Parameter for pagination. Default: 10, maximum 50 — a larger value is rejected with 400 "limit must not be greater than 50".
81
81
  * @returns {Promise<IFileSearchResponse | IError>} Returns the found files with their matching fragments.
82
82
  * @throws {IError} When isShell=false and an error occurs during the fetch
@@ -104,11 +104,11 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
104
104
  /**
105
105
  * Get file by parameters.
106
106
  * @handleName getFile
107
- * @param {number} id - Object identifier, from which the file is uploaded, determines the folder name in the storage. Example: 3787.
108
- * @param {string} type - Type, determines the folder name in the storage. Example: "page".
109
- * @param {string} entity - Entity name, from which the file is uploaded, determines the folder name in the storage. Example: "editor".
110
- * @param {string} filename - Filename. Example: "file.png".
111
- * @param {string} [template] - Preview template identifier. Example: "preview_template".
107
+ * @param {number} id - ID of the object the file belongs to; sets the folder name in the storage. Example: 3787.
108
+ * @param {string} type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
109
+ * @param {string} entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
110
+ * @param {string} filename - File name. Example: "file.png".
111
+ * @param {string} [template] - Preview template: its numeric ID or its marker, for example `"preview"`. Without it, no preview is generated. Example: "preview_template".
112
112
  * @returns {Promise<Response | IError>} Returns a promise that resolves to a Response object containing the file data or an error object if there was an issue.
113
113
  * @throws {IError} When isShell=false and an error occurs during the fetch
114
114
  * @see {@link https://js-sdk.oneentry.cloud/docs/file-uploading/getFile getFile} documentation.