oneentry 1.0.127 → 1.0.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/admins/adminsApi.d.ts +20 -20
- package/dist/admins/adminsApi.js +20 -20
- package/dist/admins/adminsInterfaces.d.ts +43 -43
- package/dist/attribute-sets/attributeSetsApi.d.ts +16 -16
- package/dist/attribute-sets/attributeSetsApi.js +16 -16
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +87 -85
- package/dist/auth-provider/authProviderApi.d.ts +127 -127
- package/dist/auth-provider/authProviderApi.js +127 -127
- package/dist/auth-provider/authProvidersInterfaces.d.ts +208 -202
- package/dist/base/asyncModules.d.ts +17 -17
- package/dist/base/asyncModules.js +39 -27
- package/dist/base/result.d.ts +11 -11
- package/dist/base/result.js +12 -16
- package/dist/base/stateModule.d.ts +6 -5
- package/dist/base/stateModule.js +15 -14
- package/dist/base/syncModules.d.ts +42 -37
- package/dist/base/syncModules.js +103 -49
- package/dist/base/utils.d.ts +45 -22
- package/dist/blocks/blocksApi.d.ts +24 -24
- package/dist/blocks/blocksApi.js +24 -24
- package/dist/blocks/blocksInterfaces.d.ts +85 -85
- package/dist/events/eventsApi.d.ts +11 -11
- package/dist/events/eventsApi.js +11 -11
- package/dist/events/eventsInterfaces.d.ts +23 -23
- package/dist/file-uploading/fileUploadingApi.d.ts +38 -38
- package/dist/file-uploading/fileUploadingApi.js +38 -38
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +44 -44
- package/dist/forms/formsApi.d.ts +7 -7
- package/dist/forms/formsApi.js +7 -7
- package/dist/forms/formsInterfaces.d.ts +43 -31
- package/dist/forms-data/formsDataApi.d.ts +49 -37
- package/dist/forms-data/formsDataApi.js +49 -38
- package/dist/forms-data/formsDataInterfaces.d.ts +241 -219
- package/dist/general-types/generalTypesApi.d.ts +1 -1
- package/dist/general-types/generalTypesApi.js +1 -1
- package/dist/general-types/generalTypesInterfaces.d.ts +3 -3
- package/dist/index.d.ts +11 -10
- package/dist/index.js +11 -10
- package/dist/integration-collections/integrationCollectionsApi.d.ts +76 -80
- package/dist/integration-collections/integrationCollectionsApi.js +76 -80
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +145 -149
- package/dist/locales/localesInterfaces.d.ts +8 -8
- package/dist/menus/menusApi.d.ts +3 -3
- package/dist/menus/menusApi.js +3 -3
- package/dist/menus/menusInterfaces.d.ts +39 -39
- package/dist/orders/ordersApi.d.ts +56 -56
- package/dist/orders/ordersApi.js +56 -56
- package/dist/orders/ordersInterfaces.d.ts +204 -198
- package/dist/pages/pagesApi.d.ts +60 -60
- package/dist/pages/pagesApi.js +60 -60
- package/dist/pages/pagesInterfaces.d.ts +133 -141
- package/dist/payments/paymentsApi.d.ts +15 -15
- package/dist/payments/paymentsApi.js +15 -15
- package/dist/payments/paymentsInterfaces.d.ts +58 -57
- package/dist/product-statuses/productStatusesApi.d.ts +7 -7
- package/dist/product-statuses/productStatusesApi.js +7 -7
- package/dist/product-statuses/productStatusesInterfaces.d.ts +21 -21
- package/dist/products/productsApi.d.ts +240 -240
- package/dist/products/productsApi.js +240 -240
- package/dist/products/productsInterfaces.d.ts +311 -311
- package/dist/system/systemApi.d.ts +10 -10
- package/dist/system/systemApi.js +10 -10
- package/dist/templates/templatesApi.d.ts +8 -8
- package/dist/templates/templatesApi.js +8 -8
- package/dist/templates/templatesInterfaces.d.ts +22 -22
- package/dist/templates-preview/templatesPreviewApi.d.ts +5 -5
- package/dist/templates-preview/templatesPreviewApi.js +5 -5
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +54 -54
- package/dist/users/usersApi.d.ts +29 -29
- package/dist/users/usersApi.js +29 -29
- package/dist/users/usersInterfaces.d.ts +77 -77
- package/package.json +9 -8
|
@@ -3,22 +3,22 @@ import type { IProductsEntity, IProductsResponse } from '../products/productsInt
|
|
|
3
3
|
/**
|
|
4
4
|
* Interface for managing and retrieving blocks in the system.
|
|
5
5
|
* @interface IBlocks
|
|
6
|
-
* @property {Function} getBlocks
|
|
7
|
-
* @property {Function} getBlockByMarker
|
|
8
|
-
* @property {Function} getSimilarProducts
|
|
6
|
+
* @property {Function} getBlocks - Get all Blocks objects.
|
|
7
|
+
* @property {Function} getBlockByMarker - Get Block object by marker.
|
|
8
|
+
* @property {Function} getSimilarProducts - Get Array of similar products from product-similar block.
|
|
9
9
|
* @property {Function} getProductsByBlockMarker - Get Array of products from product block.
|
|
10
|
-
* @property {Function} searchBlock
|
|
10
|
+
* @property {Function} searchBlock - Quick search for block objects with limited output.
|
|
11
11
|
* @description This interface defines methods for retrieving and managing blocks in the system.
|
|
12
12
|
*/
|
|
13
13
|
interface IBlocks {
|
|
14
14
|
/**
|
|
15
15
|
* Retrieves all block objects of a specific type.
|
|
16
16
|
* @handleName getBlocks
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
* @param
|
|
20
|
-
* @param
|
|
21
|
-
* @returns {IBlocksResponse}
|
|
17
|
+
* @param {BlockType} type - The type of blocks to retrieve. Example: "product".
|
|
18
|
+
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
19
|
+
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
20
|
+
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
21
|
+
* @returns {IBlocksResponse} A promise that resolves to a blocks response or an error.
|
|
22
22
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
23
23
|
* @description This method retrieves all block objects of a specific type.
|
|
24
24
|
*/
|
|
@@ -26,11 +26,11 @@ interface IBlocks {
|
|
|
26
26
|
/**
|
|
27
27
|
* Retrieves a block object by its marker.
|
|
28
28
|
* @handleName getBlockByMarker
|
|
29
|
-
* @param
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @returns {IBlockEntity}
|
|
29
|
+
* @param {string} marker - The marker identifying the block. Example: "product_block".
|
|
30
|
+
* @param {string} langCode - Language code for localization. Default: "en_US".
|
|
31
|
+
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
32
|
+
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
33
|
+
* @returns {IBlockEntity} A promise that resolves to a block entity or an error.
|
|
34
34
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
35
35
|
* @description This method retrieves a block object by its marker.
|
|
36
36
|
*/
|
|
@@ -38,9 +38,9 @@ interface IBlocks {
|
|
|
38
38
|
/**
|
|
39
39
|
* Performs a quick search for block objects with limited output.
|
|
40
40
|
* @handleName searchBlock
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
43
|
-
* @returns {ISearchBlock[]}
|
|
41
|
+
* @param {string} name - The name to search for. Example: "product_block".
|
|
42
|
+
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
43
|
+
* @returns {ISearchBlock[]} A promise that resolves to an array of search blocks or an error.
|
|
44
44
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
45
45
|
* @description This method performs a quick search for block objects with limited output.
|
|
46
46
|
*/
|
|
@@ -49,37 +49,37 @@ interface IBlocks {
|
|
|
49
49
|
/**
|
|
50
50
|
* Represents a response from the blocks API.
|
|
51
51
|
* @interface IBlocksResponse
|
|
52
|
-
* @property {number}
|
|
52
|
+
* @property {number} total - Total number of found records. Example: 100.
|
|
53
53
|
* @property {IBlockEntity[]} items - Array of block entities. Example:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
54
|
+
[
|
|
55
|
+
{
|
|
56
|
+
"attributeValues": [],
|
|
57
|
+
"id": 1,
|
|
58
|
+
"identifier": "block1",
|
|
59
|
+
"isVisible": true,
|
|
60
|
+
"localizeInfos": { "key": "value" },
|
|
61
|
+
"position": 1,
|
|
62
|
+
"templateIdentifier": null,
|
|
63
|
+
"type": "product",
|
|
64
|
+
"version": 1,
|
|
65
|
+
"countElementsPerRow": 3,
|
|
66
|
+
"quantity": 9,
|
|
67
|
+
"similarProducts": {
|
|
68
|
+
"total": 0,
|
|
69
|
+
"items": []
|
|
70
|
+
},
|
|
71
|
+
"products": [
|
|
72
|
+
{
|
|
73
|
+
"id": 1,
|
|
74
|
+
"name": "Product 1"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": 2,
|
|
78
|
+
"name": "Product 2"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
83
|
* @description Represents a response from the blocks API containing a total count and an array of block entities.
|
|
84
84
|
*/
|
|
85
85
|
interface IBlocksResponse {
|
|
@@ -89,42 +89,42 @@ interface IBlocksResponse {
|
|
|
89
89
|
/**
|
|
90
90
|
* Represents a block entity with various attributes and properties.
|
|
91
91
|
* @interface IBlockEntity
|
|
92
|
-
* @property {AttributeType}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
* @property {number}
|
|
104
|
-
* @property {ILocalizeInfo}
|
|
105
|
-
* @property {number}
|
|
106
|
-
* @property {string}
|
|
107
|
-
* @property {string}
|
|
108
|
-
* @property {string | null}
|
|
109
|
-
* @property {boolean}
|
|
110
|
-
* @property {number}
|
|
111
|
-
* @property {number}
|
|
112
|
-
* @property {IProductsResponse} [similarProducts]
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
* @property {IProductsEntity[]} [products]
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
92
|
+
* @property {AttributeType} attributeValues - Type of attributes used in the block. Example:
|
|
93
|
+
{
|
|
94
|
+
"block-text": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"value": "some text",
|
|
97
|
+
"isIcon": false,
|
|
98
|
+
"position": 0,
|
|
99
|
+
"additionalFields": [],
|
|
100
|
+
"isProductPreview": false
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
* @property {number} id - Unique identifier of the block. Example: 1234.
|
|
104
|
+
* @property {ILocalizeInfo} localizeInfos - Localization information for the block. Example: {"key": "value"}
|
|
105
|
+
* @property {number} version - Version of the block entity. Example: 1.
|
|
106
|
+
* @property {string} identifier - Unique string identifier for the block. Example: "block1".
|
|
107
|
+
* @property {string} type - Type of the block, such as 'product', 'error_page', etc. Example: "product".
|
|
108
|
+
* @property {string | null} templateIdentifier - Identifier for the template used by the block, or null if not applicable. Example: "template1".
|
|
109
|
+
* @property {boolean} isVisible - Indicates whether the block is visible. Example: true.
|
|
110
|
+
* @property {number} [countElementsPerRow] - Number of elements displayed per row in the block, if applicable. Example: 3.
|
|
111
|
+
* @property {number} [quantity] - Quantity of items in the block, if applicable. Example: 5.
|
|
112
|
+
* @property {IProductsResponse} [similarProducts] - Response containing similar products associated with the block. Example:
|
|
113
|
+
{
|
|
114
|
+
"total": 10,
|
|
115
|
+
"items": []
|
|
116
|
+
}
|
|
117
|
+
* @property {IProductsEntity[]} [products] - Array of product entities associated with the block. Example:
|
|
118
|
+
[
|
|
119
|
+
{
|
|
120
|
+
"id": 1,
|
|
121
|
+
"name": "Product 1"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": 2,
|
|
125
|
+
"name": "Product 2"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
128
|
* @description Represents a block entity with various attributes and properties.
|
|
129
129
|
*/
|
|
130
130
|
interface IBlockEntity {
|
|
@@ -145,9 +145,9 @@ interface IBlockEntity {
|
|
|
145
145
|
/**
|
|
146
146
|
* Represents a search block entity with an identifier, name, and ID.
|
|
147
147
|
* @interface ISearchBlock
|
|
148
|
-
* @property {number} id
|
|
148
|
+
* @property {number} id - Unique identifier of the search block. Example: 1.
|
|
149
149
|
* @property {string} identifier - Unique string identifier for the search block. Example: "search_block_1".
|
|
150
|
-
* @property {string} name
|
|
150
|
+
* @property {string} name - Name of the search block. Example: "Search Block 1".
|
|
151
151
|
* @description Represents a search block entity with an identifier, name, and ID.
|
|
152
152
|
*/
|
|
153
153
|
interface ISearchBlock {
|
|
@@ -25,9 +25,9 @@ export default class EventsApi extends AsyncModules implements IEvents {
|
|
|
25
25
|
/**
|
|
26
26
|
* Return all subscriptions to product.
|
|
27
27
|
* @handleName getAllSubscriptions
|
|
28
|
-
* @param
|
|
29
|
-
* @param
|
|
30
|
-
* @returns {ISubscriptions}
|
|
28
|
+
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
29
|
+
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
30
|
+
* @returns {ISubscriptions} Returns an object containing all subscriptions or an error object if there was an issue.
|
|
31
31
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
32
32
|
* @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.
|
|
33
33
|
*/
|
|
@@ -35,10 +35,10 @@ export default class EventsApi extends AsyncModules implements IEvents {
|
|
|
35
35
|
/**
|
|
36
36
|
* Subscribing to an event on a product.
|
|
37
37
|
* @handleName subscribeByMarker
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @returns {Promise<boolean | IError>}
|
|
38
|
+
* @param {string} marker - Event marker. Example: "product_price_change".
|
|
39
|
+
* @param {number} productId - Product id. Example: 12345.
|
|
40
|
+
* @param {string} [langCode] - Language code. Default: "en_US".=
|
|
41
|
+
* @returns {Promise<boolean | IError>} Returns true if subscription was successful, or an error object if there was an issue.
|
|
42
42
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
43
43
|
* @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.
|
|
44
44
|
*/
|
|
@@ -46,10 +46,10 @@ export default class EventsApi extends AsyncModules implements IEvents {
|
|
|
46
46
|
/**
|
|
47
47
|
* Unsubscribing to an event on a product.
|
|
48
48
|
* @handleName unsubscribeByMarker
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
* @returns {any}
|
|
49
|
+
* @param {string} marker - The marker of the event to unsubscribe from. Example: "product_price_change".
|
|
50
|
+
* @param {number} productId - The ID of the product to unsubscribe from. Example: 12345.
|
|
51
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
52
|
+
* @returns {any} - Returns a promise that resolves to the result of the unsubscription operation or an error object if there was an issue.
|
|
53
53
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
54
54
|
* @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
55
|
*/
|
package/dist/events/eventsApi.js
CHANGED
|
@@ -30,9 +30,9 @@ class EventsApi extends asyncModules_1.default {
|
|
|
30
30
|
/**
|
|
31
31
|
* Return all subscriptions to product.
|
|
32
32
|
* @handleName getAllSubscriptions
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
* @returns {ISubscriptions}
|
|
33
|
+
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
34
|
+
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
35
|
+
* @returns {ISubscriptions} Returns an object containing all subscriptions or an error object if there was an issue.
|
|
36
36
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
37
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.
|
|
38
38
|
*/
|
|
@@ -47,10 +47,10 @@ class EventsApi extends asyncModules_1.default {
|
|
|
47
47
|
/**
|
|
48
48
|
* Subscribing to an event on a product.
|
|
49
49
|
* @handleName subscribeByMarker
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
* @param
|
|
53
|
-
* @returns {Promise<boolean | IError>}
|
|
50
|
+
* @param {string} marker - Event marker. Example: "product_price_change".
|
|
51
|
+
* @param {number} productId - Product id. Example: 12345.
|
|
52
|
+
* @param {string} [langCode] - Language code. Default: "en_US".=
|
|
53
|
+
* @returns {Promise<boolean | IError>} Returns true if subscription was successful, or an error object if there was an issue.
|
|
54
54
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
55
55
|
* @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.
|
|
56
56
|
*/
|
|
@@ -70,10 +70,10 @@ class EventsApi extends asyncModules_1.default {
|
|
|
70
70
|
/**
|
|
71
71
|
* Unsubscribing to an event on a product.
|
|
72
72
|
* @handleName unsubscribeByMarker
|
|
73
|
-
* @param
|
|
74
|
-
* @param
|
|
75
|
-
* @param
|
|
76
|
-
* @returns {any}
|
|
73
|
+
* @param {string} marker - The marker of the event to unsubscribe from. Example: "product_price_change".
|
|
74
|
+
* @param {number} productId - The ID of the product to unsubscribe from. Example: 12345.
|
|
75
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
76
|
+
* @returns {any} - Returns a promise that resolves to the result of the unsubscription operation or an error object if there was an issue.
|
|
77
77
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
78
78
|
* @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.
|
|
79
79
|
*/
|
|
@@ -8,9 +8,9 @@ interface IEvents {
|
|
|
8
8
|
/**
|
|
9
9
|
* Retrieves all subscriptions to products.
|
|
10
10
|
* @handleName getAllSubscriptions
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @returns {ISubscriptions}
|
|
11
|
+
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
12
|
+
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
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.
|
|
16
16
|
*/
|
|
@@ -18,10 +18,10 @@ interface IEvents {
|
|
|
18
18
|
/**
|
|
19
19
|
* Subscribes to an event on a product by its marker.
|
|
20
20
|
* @handleName subscribeByMarker
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @param
|
|
24
|
-
* @returns {boolean}
|
|
21
|
+
* @param {string} marker - The marker identifying the event. Example: "product_price_change".
|
|
22
|
+
* @param {number} productId - The ID of the product to subscribe to. Example: 12345.
|
|
23
|
+
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
24
|
+
* @returns {Promise<boolean | IError>} A promise that resolves to any type or an error.
|
|
25
25
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
26
26
|
* @description This method subscribes to an event on a product by its marker.
|
|
27
27
|
*/
|
|
@@ -29,10 +29,10 @@ interface IEvents {
|
|
|
29
29
|
/**
|
|
30
30
|
* Unsubscribes from an event on a product by its marker.
|
|
31
31
|
* @handleName unsubscribeByMarker
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
* @returns {boolean}
|
|
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.
|
|
34
|
+
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
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.
|
|
37
37
|
* @description This method unsubscribes from an event on a product by its marker.
|
|
38
38
|
*/
|
|
@@ -41,18 +41,18 @@ interface IEvents {
|
|
|
41
41
|
/**
|
|
42
42
|
* Represents a response from the events API containing a total count and an array of subscription items.
|
|
43
43
|
* @interface ISubscriptions
|
|
44
|
-
* @property {number}
|
|
44
|
+
* @property {number} total - Total number of found records. Example: 100.
|
|
45
45
|
* @property {{ eventMarker: string; productId: number }[]} items - Array of subscription items, each containing an event marker and a product ID. Example:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
[
|
|
47
|
+
{
|
|
48
|
+
eventMarker: 'product_price_change',
|
|
49
|
+
productId: 12345
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
eventMarker: 'product_stock_update',
|
|
53
|
+
productId: 67890
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
56
|
* @description Represents a response from the events API containing a total count and an array of subscription items.
|
|
57
57
|
*/
|
|
58
58
|
interface ISubscriptions {
|
|
@@ -65,7 +65,7 @@ interface ISubscriptions {
|
|
|
65
65
|
/**
|
|
66
66
|
* Interface for the body of the subscribe methods.
|
|
67
67
|
* @interface ISubscribeBody
|
|
68
|
-
* @property {string} locale
|
|
68
|
+
* @property {string} locale - Locale of the user. Example: "en_US".
|
|
69
69
|
* @property {number} productId - Product ID. Example: 12345.
|
|
70
70
|
* @description Represents a body for the subscribe methods, containing the locale and product ID.
|
|
71
71
|
*/
|
|
@@ -21,25 +21,25 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
|
|
|
21
21
|
/**
|
|
22
22
|
* Upload file function.
|
|
23
23
|
* @handleName upload
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
42
|
-
* @returns {IUploadingReturn[]}
|
|
24
|
+
* @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
|
|
25
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
|
|
26
|
+
{
|
|
27
|
+
"type": "page",
|
|
28
|
+
"entity": "editor",
|
|
29
|
+
"id": 3787,
|
|
30
|
+
"width": 0,
|
|
31
|
+
"height": 0,
|
|
32
|
+
"compress": true,
|
|
33
|
+
"template": 1
|
|
34
|
+
}
|
|
35
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
|
|
36
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
|
|
37
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
|
|
38
|
+
* @param {number} [fileQuery.width] - Optional width parameter. Example: 0.
|
|
39
|
+
* @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
|
|
40
|
+
* @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
|
|
41
|
+
* @param {any} [fileQuery.template] - preview template identifier. Example: 1.
|
|
42
|
+
* @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
|
|
43
43
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
44
44
|
* @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.
|
|
45
45
|
*/
|
|
@@ -47,19 +47,19 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
|
|
|
47
47
|
/**
|
|
48
48
|
* Deletes a file from the cloud file storage.
|
|
49
49
|
* @handleName delete
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
* @param
|
|
59
|
-
* @param
|
|
60
|
-
* @param
|
|
61
|
-
* @param
|
|
62
|
-
* @returns {any}
|
|
50
|
+
* @param {string} filename - File name. Example: "file.png".
|
|
51
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
|
|
52
|
+
{
|
|
53
|
+
"type": "page",
|
|
54
|
+
"entity": "editor",
|
|
55
|
+
"id": 3787,
|
|
56
|
+
"template": 1
|
|
57
|
+
}
|
|
58
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
|
|
59
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
|
|
60
|
+
* @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 {number} [fileQuery.template] - preview template identifier. Example: 1.
|
|
62
|
+
* @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
|
|
63
63
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
64
64
|
* @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.
|
|
65
65
|
*/
|
|
@@ -67,12 +67,12 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
|
|
|
67
67
|
/**
|
|
68
68
|
* Get file by parameters.
|
|
69
69
|
* @handleName getFile
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
72
|
-
* @param
|
|
73
|
-
* @param
|
|
74
|
-
* @param
|
|
75
|
-
* @returns {any}
|
|
70
|
+
* @param {number} id - Object identifier, from which the file is uploaded, determines the folder name in the storage. Example: 3787.
|
|
71
|
+
* @param {string} type - Type, determines the folder name in the storage. Example: "page".
|
|
72
|
+
* @param {string} entity - Entity name, from which the file is uploaded, determines the folder name in the storage. Example: "editor".
|
|
73
|
+
* @param {string} filename - Filename. Example: "file.png".
|
|
74
|
+
* @param {string} [template] - Preview template identifier. Example: 1.
|
|
75
|
+
* @returns {any} Returns a promise that resolves to a Blob object containing the file data or an error object if there was an issue.
|
|
76
76
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
77
77
|
* @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
78
|
*/
|
|
@@ -33,25 +33,25 @@ class FileUploadingApi extends asyncModules_1.default {
|
|
|
33
33
|
/**
|
|
34
34
|
* Upload file function.
|
|
35
35
|
* @handleName upload
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* @param
|
|
48
|
-
* @param
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
* @param
|
|
53
|
-
* @param
|
|
54
|
-
* @returns {IUploadingReturn[]}
|
|
36
|
+
* @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
|
|
37
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
|
|
38
|
+
{
|
|
39
|
+
"type": "page",
|
|
40
|
+
"entity": "editor",
|
|
41
|
+
"id": 3787,
|
|
42
|
+
"width": 0,
|
|
43
|
+
"height": 0,
|
|
44
|
+
"compress": true,
|
|
45
|
+
"template": 1
|
|
46
|
+
}
|
|
47
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
|
|
48
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
|
|
49
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
|
|
50
|
+
* @param {number} [fileQuery.width] - Optional width parameter. Example: 0.
|
|
51
|
+
* @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
|
|
52
|
+
* @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
|
|
53
|
+
* @param {any} [fileQuery.template] - preview template identifier. Example: 1.
|
|
54
|
+
* @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
|
|
55
55
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
56
56
|
* @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.
|
|
57
57
|
*/
|
|
@@ -65,19 +65,19 @@ class FileUploadingApi extends asyncModules_1.default {
|
|
|
65
65
|
/**
|
|
66
66
|
* Deletes a file from the cloud file storage.
|
|
67
67
|
* @handleName delete
|
|
68
|
-
* @param
|
|
69
|
-
* @param
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
* @param
|
|
77
|
-
* @param
|
|
78
|
-
* @param
|
|
79
|
-
* @param
|
|
80
|
-
* @returns {any}
|
|
68
|
+
* @param {string} filename - File name. Example: "file.png".
|
|
69
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
|
|
70
|
+
{
|
|
71
|
+
"type": "page",
|
|
72
|
+
"entity": "editor",
|
|
73
|
+
"id": 3787,
|
|
74
|
+
"template": 1
|
|
75
|
+
}
|
|
76
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
|
|
77
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
|
|
78
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
|
|
79
|
+
* @param {number} [fileQuery.template] - preview template identifier. Example: 1.
|
|
80
|
+
* @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
|
|
81
81
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
82
82
|
* @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.
|
|
83
83
|
*/
|
|
@@ -89,12 +89,12 @@ class FileUploadingApi extends asyncModules_1.default {
|
|
|
89
89
|
/**
|
|
90
90
|
* Get file by parameters.
|
|
91
91
|
* @handleName getFile
|
|
92
|
-
* @param
|
|
93
|
-
* @param
|
|
94
|
-
* @param
|
|
95
|
-
* @param
|
|
96
|
-
* @param
|
|
97
|
-
* @returns {any}
|
|
92
|
+
* @param {number} id - Object identifier, from which the file is uploaded, determines the folder name in the storage. Example: 3787.
|
|
93
|
+
* @param {string} type - Type, determines the folder name in the storage. Example: "page".
|
|
94
|
+
* @param {string} entity - Entity name, from which the file is uploaded, determines the folder name in the storage. Example: "editor".
|
|
95
|
+
* @param {string} filename - Filename. Example: "file.png".
|
|
96
|
+
* @param {string} [template] - Preview template identifier. Example: 1.
|
|
97
|
+
* @returns {any} Returns a promise that resolves to a Blob object containing the file data or an error object if there was an issue.
|
|
98
98
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
99
99
|
* @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.
|
|
100
100
|
*/
|