oneentry 1.0.107 → 1.0.109
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 +2620 -794
- package/dist/attribute-sets/attributeSetsApi.d.ts +9 -12
- package/dist/attribute-sets/attributeSetsApi.js +12 -15
- package/dist/auth-provider/authProviderApi.d.ts +21 -23
- package/dist/auth-provider/authProviderApi.js +28 -30
- package/dist/auth-provider/authProvidersInterfaces.d.ts +1 -1
- package/dist/blocks/blocksApi.d.ts +6 -6
- package/dist/blocks/blocksApi.js +9 -8
- package/dist/events/eventsApi.d.ts +7 -7
- package/dist/events/eventsApi.js +11 -7
- package/dist/file-uploading/fileUploadingApi.d.ts +4 -4
- package/dist/file-uploading/fileUploadingApi.js +4 -4
- package/dist/forms/formsApi.d.ts +1 -1
- package/dist/forms/formsApi.js +1 -1
- package/dist/formsData/formsDataApi.d.ts +16 -12
- package/dist/formsData/formsDataApi.js +21 -17
- package/dist/integration-collections/integrationCollectionsApi.d.ts +2 -2
- package/dist/integration-collections/integrationCollectionsApi.js +2 -2
- package/dist/menus/menusApi.d.ts +1 -1
- package/dist/menus/menusApi.js +1 -1
- package/dist/orders/ordersApi.d.ts +43 -43
- package/dist/orders/ordersApi.js +60 -60
- package/dist/pages/pagesApi.d.ts +15 -15
- package/dist/pages/pagesApi.js +20 -20
- package/dist/payments/paymentsApi.d.ts +5 -5
- package/dist/payments/paymentsApi.js +5 -5
- package/dist/product-statuses/productStatusesApi.d.ts +7 -6
- package/dist/product-statuses/productStatusesApi.js +7 -6
- package/dist/products/productsApi.d.ts +19 -19
- package/dist/products/productsApi.js +18 -18
- package/dist/templates/templatesApi.d.ts +3 -3
- package/dist/templates/templatesApi.js +3 -3
- package/dist/templates-preview/templatesPreviewApi.d.ts +2 -2
- package/dist/templates-preview/templatesPreviewApi.js +2 -2
- package/dist/users/usersApi.d.ts +9 -9
- package/dist/users/usersApi.js +19 -19
- package/package.json +8 -9
- package/readme.js +103 -0
|
@@ -27,30 +27,34 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
27
27
|
return this._dataPostProcess(result, langCode);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Creating an object of data save information by form
|
|
31
31
|
*
|
|
32
|
-
* @param {object} [
|
|
32
|
+
* @param {object} [body] - Request body.
|
|
33
33
|
* @param {string} [langCode] - Optional language field
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
*
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
* const body = {
|
|
37
|
+
"formIdentifier": "reg",
|
|
38
|
+
"formData": {
|
|
39
|
+
"en_US": [
|
|
40
|
+
{
|
|
41
|
+
"marker": "last_name",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"value": "Федор Иванов"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
44
48
|
*
|
|
45
|
-
* @returns - Returns created
|
|
49
|
+
* @returns - Returns a created FormDataEntity object.
|
|
46
50
|
*/
|
|
47
|
-
async postFormsData(
|
|
51
|
+
async postFormsData(body, langCode = this.state.lang) {
|
|
48
52
|
const formData = {};
|
|
49
|
-
formData[langCode] = Array.isArray(
|
|
50
|
-
?
|
|
51
|
-
: [
|
|
52
|
-
|
|
53
|
-
const result = await this._fetchPost(``,
|
|
53
|
+
formData[langCode] = Array.isArray(body.formData)
|
|
54
|
+
? body.formData
|
|
55
|
+
: [body.formData];
|
|
56
|
+
body.formData = formData;
|
|
57
|
+
const result = await this._fetchPost(``, body);
|
|
54
58
|
return this._dataPostProcess(result);
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
@@ -47,7 +47,7 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
47
47
|
/**
|
|
48
48
|
* Check for the existence of a text identifier (marker)
|
|
49
49
|
*
|
|
50
|
-
* @param {string} [marker] - Collection
|
|
50
|
+
* @param {string} [marker] - Collection marker.
|
|
51
51
|
*
|
|
52
52
|
* @returns Returns object MarkerValidDto with value true if text identifier (marker) exists or false if not
|
|
53
53
|
*/
|
|
@@ -90,7 +90,7 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
90
90
|
* Edit a record in the collection
|
|
91
91
|
*
|
|
92
92
|
* @param {string} [marker] - text identifier of the collection
|
|
93
|
-
* @param {number} [id] -
|
|
93
|
+
* @param {number} [id] - row id
|
|
94
94
|
* @param {any} [body] - Object UpdateCollectionRowDto for updating a record in the collection
|
|
95
95
|
*
|
|
96
96
|
* const body = {
|
|
@@ -67,7 +67,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
67
67
|
/**
|
|
68
68
|
* Check for the existence of a text identifier (marker)
|
|
69
69
|
*
|
|
70
|
-
* @param {string} [marker] - Collection
|
|
70
|
+
* @param {string} [marker] - Collection marker.
|
|
71
71
|
*
|
|
72
72
|
* @returns Returns object MarkerValidDto with value true if text identifier (marker) exists or false if not
|
|
73
73
|
*/
|
|
@@ -117,7 +117,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
117
117
|
* Edit a record in the collection
|
|
118
118
|
*
|
|
119
119
|
* @param {string} [marker] - text identifier of the collection
|
|
120
|
-
* @param {number} [id] -
|
|
120
|
+
* @param {number} [id] - row id
|
|
121
121
|
* @param {any} [body] - Object UpdateCollectionRowDto for updating a record in the collection
|
|
122
122
|
*
|
|
123
123
|
* const body = {
|
package/dist/menus/menusApi.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export default class MenusApi extends AsyncModules implements IMenus {
|
|
|
12
12
|
/**
|
|
13
13
|
* Get pages includes in menu by marker.
|
|
14
14
|
*
|
|
15
|
-
* @param {string} marker - Menu marker
|
|
15
|
+
* @param {string} [marker] - Menu marker
|
|
16
16
|
* @param {string} [langCode] - Language code
|
|
17
17
|
*
|
|
18
18
|
* @returns Returns a single menu object as a ContentMenu object with included pages
|
package/dist/menus/menusApi.js
CHANGED
|
@@ -15,7 +15,7 @@ class MenusApi extends asyncModules_1.default {
|
|
|
15
15
|
/**
|
|
16
16
|
* Get pages includes in menu by marker.
|
|
17
17
|
*
|
|
18
|
-
* @param {string} marker - Menu marker
|
|
18
|
+
* @param {string} [marker] - Menu marker
|
|
19
19
|
* @param {string} [langCode] - Language code
|
|
20
20
|
*
|
|
21
21
|
* @returns Returns a single menu object as a ContentMenu object with included pages
|
|
@@ -9,6 +9,44 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
9
9
|
protected state: StateModule;
|
|
10
10
|
protected _url: string;
|
|
11
11
|
constructor(state: StateModule);
|
|
12
|
+
/**
|
|
13
|
+
* Getting all the order storage objects
|
|
14
|
+
* @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.
|
|
15
|
+
*
|
|
16
|
+
* @param {number} [langCode] - Optional language field
|
|
17
|
+
* @param {number} [offset] - Optional parameter for pagination, default is 0
|
|
18
|
+
* @param {number} [limit] - Optional parameter for pagination, default is 30
|
|
19
|
+
*/
|
|
20
|
+
getAllOrdersStorage(langCode?: string, offset?: number, limit?: number): Promise<Array<IOrdersEntity> | IError>;
|
|
21
|
+
/**
|
|
22
|
+
* Getting all orders from the orders storage object created by the user
|
|
23
|
+
*
|
|
24
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
25
|
+
* @param {string} [marker] - Textual identifier of the order storage object
|
|
26
|
+
* @param {string} [langCode] - Optional language field
|
|
27
|
+
* @param {number} [offset] - Offset parameter. Default 0
|
|
28
|
+
* @param {number} [limit] - Limit parameter. Default 30
|
|
29
|
+
*/
|
|
30
|
+
getAllOrdersByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IOrdersByMarkerEntity | IError>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve one order storage object by marker.
|
|
33
|
+
*
|
|
34
|
+
* @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.
|
|
35
|
+
* @param {string} [marker] - Marker of the order object
|
|
36
|
+
* @param {string} [langCode] - Language code
|
|
37
|
+
*
|
|
38
|
+
* @returns Return object of order information.
|
|
39
|
+
*/
|
|
40
|
+
getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity | IError>;
|
|
41
|
+
/**
|
|
42
|
+
* Getting a single order from the order storage object created by the user
|
|
43
|
+
*
|
|
44
|
+
* @param {string} [marker] - The text identifier of the order storage object
|
|
45
|
+
* @param {number} [id] - ID of the order object
|
|
46
|
+
* @param {string} [langCode] - Optional language field
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity | IError>;
|
|
12
50
|
/**
|
|
13
51
|
* Creation of an order in the order storage.
|
|
14
52
|
*
|
|
@@ -38,24 +76,14 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
38
76
|
* @returns Returns object for creating an order.
|
|
39
77
|
*/
|
|
40
78
|
createOrder(marker: string, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
|
|
41
|
-
/**
|
|
42
|
-
* Getting all orders from the orders storage object created by the user
|
|
43
|
-
*
|
|
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
|
-
* @param {number} marker - Textual identifier of the order storage object
|
|
46
|
-
* @param {string} [langCode] Optional language field
|
|
47
|
-
* @param {number} [offset] Offset parameter. Default 0
|
|
48
|
-
* @param {number} [limit] Limit parameter. Default 30
|
|
49
|
-
*/
|
|
50
|
-
getAllOrdersByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IOrdersByMarkerEntity | IError>;
|
|
51
79
|
/**
|
|
52
80
|
* Changing an order in the orders storage
|
|
53
81
|
*
|
|
54
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.
|
|
55
|
-
* @param marker - The text identifier of the order storage object
|
|
56
|
-
* @param id - ID of the order object
|
|
57
|
-
* @param
|
|
58
|
-
* @param langCode Optional language field
|
|
83
|
+
* @param {string} [marker] - The text identifier of the order storage object
|
|
84
|
+
* @param {number} [id] - ID of the order object
|
|
85
|
+
* @param {IOrderData} [body] - Object for updating an order
|
|
86
|
+
* @param {string} [langCode] - Optional language field
|
|
59
87
|
*
|
|
60
88
|
* @example
|
|
61
89
|
* const body = {
|
|
@@ -75,33 +103,5 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
75
103
|
* "currency": "USD"
|
|
76
104
|
* }
|
|
77
105
|
*/
|
|
78
|
-
updateOrderByMarkerAndId(marker: string, id: number,
|
|
79
|
-
/**
|
|
80
|
-
* Getting a single order from the order storage object created by the user
|
|
81
|
-
*
|
|
82
|
-
* @param marker - The text identifier of the order storage object
|
|
83
|
-
* @param id - ID of the order object
|
|
84
|
-
* @param langCode Optional language field
|
|
85
|
-
*
|
|
86
|
-
*/
|
|
87
|
-
getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity | IError>;
|
|
88
|
-
/**
|
|
89
|
-
* Getting all the order storage objects
|
|
90
|
-
* @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.
|
|
91
|
-
*
|
|
92
|
-
* @param {number} [langCode] Optional language field
|
|
93
|
-
* @param {number} [offset] - Optional parameter for pagination, default is 30
|
|
94
|
-
* @param {number} [limit] - Optional parameter for pagination, default is 0
|
|
95
|
-
*/
|
|
96
|
-
getAllOrdersStorage(langCode?: string, offset?: number, limit?: number): Promise<Array<IOrdersEntity> | IError>;
|
|
97
|
-
/**
|
|
98
|
-
* Retrieve one order storage object by marker.
|
|
99
|
-
*
|
|
100
|
-
* @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.
|
|
101
|
-
* @param {string} marker - Marker of the order object
|
|
102
|
-
* @param {string} [langCode] - Language code
|
|
103
|
-
*
|
|
104
|
-
* @returns Return object of order information.
|
|
105
|
-
*/
|
|
106
|
-
getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity | IError>;
|
|
106
|
+
updateOrderByMarkerAndId(marker: string, id: number, body: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
|
|
107
107
|
}
|
package/dist/orders/ordersApi.js
CHANGED
|
@@ -13,6 +13,56 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
13
13
|
super(state);
|
|
14
14
|
this._url = state.url + '/api/content/orders-storage';
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Getting all the order storage objects
|
|
18
|
+
* @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.
|
|
19
|
+
*
|
|
20
|
+
* @param {number} [langCode] - Optional language field
|
|
21
|
+
* @param {number} [offset] - Optional parameter for pagination, default is 0
|
|
22
|
+
* @param {number} [limit] - Optional parameter for pagination, default is 30
|
|
23
|
+
*/
|
|
24
|
+
async getAllOrdersStorage(langCode = this.state.lang, offset = 0, limit = 30) {
|
|
25
|
+
const result = await this._fetchGet(`?langCode=${langCode}&limit=${limit}&offset=${offset}`);
|
|
26
|
+
return this._normalizeData(result);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Getting all orders from the orders storage object created by the user
|
|
30
|
+
*
|
|
31
|
+
* @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.
|
|
32
|
+
* @param {string} [marker] - Textual identifier of the order storage object
|
|
33
|
+
* @param {string} [langCode] - Optional language field
|
|
34
|
+
* @param {number} [offset] - Offset parameter. Default 0
|
|
35
|
+
* @param {number} [limit] - Limit parameter. Default 30
|
|
36
|
+
*/
|
|
37
|
+
async getAllOrdersByMarker(marker, langCode = this.state.lang, offset = 0, limit = 30) {
|
|
38
|
+
const result = await this._fetchGet(`/marker/${marker}/orders?langCode=${langCode}&limit=${limit}&offset=${offset}`);
|
|
39
|
+
return this._normalizeData(result);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Retrieve one order storage object by marker.
|
|
43
|
+
*
|
|
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
|
+
* @param {string} [marker] - Marker of the order object
|
|
46
|
+
* @param {string} [langCode] - Language code
|
|
47
|
+
*
|
|
48
|
+
* @returns Return object of order information.
|
|
49
|
+
*/
|
|
50
|
+
async getOrderByMarker(marker, langCode = this.state.lang) {
|
|
51
|
+
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
52
|
+
return this._normalizeData(result);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Getting a single order from the order storage object created by the user
|
|
56
|
+
*
|
|
57
|
+
* @param {string} [marker] - The text identifier of the order storage object
|
|
58
|
+
* @param {number} [id] - ID of the order object
|
|
59
|
+
* @param {string} [langCode] - Optional language field
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
async getOrderByMarkerAndId(marker, id, langCode = this.state.lang) {
|
|
63
|
+
const result = await this._fetchGet(`/marker/${marker}/orders/${id}?langCode=${langCode}`);
|
|
64
|
+
return this._normalizeData(result);
|
|
65
|
+
}
|
|
16
66
|
/**
|
|
17
67
|
* Creation of an order in the order storage.
|
|
18
68
|
*
|
|
@@ -50,27 +100,14 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
50
100
|
const result = await this._fetchPost(`/marker/${marker}/orders`, data);
|
|
51
101
|
return this._normalizeData(result);
|
|
52
102
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Getting all orders from the orders storage object created by the user
|
|
55
|
-
*
|
|
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
|
-
* @param {number} marker - Textual identifier of the order storage object
|
|
58
|
-
* @param {string} [langCode] Optional language field
|
|
59
|
-
* @param {number} [offset] Offset parameter. Default 0
|
|
60
|
-
* @param {number} [limit] Limit parameter. Default 30
|
|
61
|
-
*/
|
|
62
|
-
async getAllOrdersByMarker(marker, langCode = this.state.lang, offset = 0, limit = 30) {
|
|
63
|
-
const result = await this._fetchGet(`/marker/${marker}/orders?langCode=${langCode}&limit=${limit}&offset=${offset}`);
|
|
64
|
-
return this._normalizeData(result);
|
|
65
|
-
}
|
|
66
103
|
/**
|
|
67
104
|
* Changing an order in the orders storage
|
|
68
105
|
*
|
|
69
106
|
* @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.
|
|
70
|
-
* @param marker - The text identifier of the order storage object
|
|
71
|
-
* @param id - ID of the order object
|
|
72
|
-
* @param
|
|
73
|
-
* @param langCode Optional language field
|
|
107
|
+
* @param {string} [marker] - The text identifier of the order storage object
|
|
108
|
+
* @param {number} [id] - ID of the order object
|
|
109
|
+
* @param {IOrderData} [body] - Object for updating an order
|
|
110
|
+
* @param {string} [langCode] - Optional language field
|
|
74
111
|
*
|
|
75
112
|
* @example
|
|
76
113
|
* const body = {
|
|
@@ -90,50 +127,13 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
90
127
|
* "currency": "USD"
|
|
91
128
|
* }
|
|
92
129
|
*/
|
|
93
|
-
async updateOrderByMarkerAndId(marker, id,
|
|
130
|
+
async updateOrderByMarkerAndId(marker, id, body, langCode = this.state.lang) {
|
|
94
131
|
const formData = {};
|
|
95
|
-
formData[langCode] = Array.isArray(
|
|
96
|
-
?
|
|
97
|
-
: [
|
|
98
|
-
|
|
99
|
-
const result = await this._fetchPut(`/marker/${marker}/orders/${id}?langCode=${langCode}`,
|
|
100
|
-
return this._normalizeData(result);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Getting a single order from the order storage object created by the user
|
|
104
|
-
*
|
|
105
|
-
* @param marker - The text identifier of the order storage object
|
|
106
|
-
* @param id - ID of the order object
|
|
107
|
-
* @param langCode Optional language field
|
|
108
|
-
*
|
|
109
|
-
*/
|
|
110
|
-
async getOrderByMarkerAndId(marker, id, langCode = this.state.lang) {
|
|
111
|
-
const result = await this._fetchGet(`/marker/${marker}/orders/${id}?langCode=${langCode}`);
|
|
112
|
-
return this._normalizeData(result);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Getting all the order storage objects
|
|
116
|
-
* @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.
|
|
117
|
-
*
|
|
118
|
-
* @param {number} [langCode] Optional language field
|
|
119
|
-
* @param {number} [offset] - Optional parameter for pagination, default is 30
|
|
120
|
-
* @param {number} [limit] - Optional parameter for pagination, default is 0
|
|
121
|
-
*/
|
|
122
|
-
async getAllOrdersStorage(langCode = this.state.lang, offset = 0, limit = 30) {
|
|
123
|
-
const result = await this._fetchGet(`?langCode=${langCode}&limit=${limit}&offset=${offset}`);
|
|
124
|
-
return this._normalizeData(result);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Retrieve one order storage object by marker.
|
|
128
|
-
*
|
|
129
|
-
* @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.
|
|
130
|
-
* @param {string} marker - Marker of the order object
|
|
131
|
-
* @param {string} [langCode] - Language code
|
|
132
|
-
*
|
|
133
|
-
* @returns Return object of order information.
|
|
134
|
-
*/
|
|
135
|
-
async getOrderByMarker(marker, langCode = this.state.lang) {
|
|
136
|
-
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
132
|
+
formData[langCode] = Array.isArray(body.formData)
|
|
133
|
+
? body.formData
|
|
134
|
+
: [body.formData];
|
|
135
|
+
body.formData = formData;
|
|
136
|
+
const result = await this._fetchPut(`/marker/${marker}/orders/${id}?langCode=${langCode}`, body);
|
|
137
137
|
return this._normalizeData(result);
|
|
138
138
|
}
|
|
139
139
|
}
|
package/dist/pages/pagesApi.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
12
12
|
/**
|
|
13
13
|
* Get all top-level page objects.
|
|
14
14
|
*
|
|
15
|
-
* @param {string} [langCode]
|
|
15
|
+
* @param {string} [langCode] - lang code
|
|
16
16
|
*
|
|
17
17
|
* @returns Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
18
18
|
*/
|
|
@@ -20,7 +20,7 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
20
20
|
/**
|
|
21
21
|
* Get all page objects with product information as an array.
|
|
22
22
|
*
|
|
23
|
-
* @param {string} [langCode]
|
|
23
|
+
* @param {string} [langCode] - lang code
|
|
24
24
|
*
|
|
25
25
|
* @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
26
26
|
*/
|
|
@@ -28,8 +28,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
28
28
|
/**
|
|
29
29
|
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
30
30
|
*
|
|
31
|
-
* @param {string} [langCode] Required parameter lang code
|
|
32
31
|
* @param {number} [id] - Page object identifier
|
|
32
|
+
* @param {string} [langCode] - lang code
|
|
33
33
|
*
|
|
34
34
|
* @returns Returns PageEntity object
|
|
35
35
|
*/
|
|
@@ -37,8 +37,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
37
37
|
/**
|
|
38
38
|
* Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
39
39
|
*
|
|
40
|
-
* @param {string} [langCode] Required parameter lang code
|
|
41
40
|
* @param {string} [url] - Page URL
|
|
41
|
+
* @param {string} [langCode] - lang code
|
|
42
42
|
*
|
|
43
43
|
* @returns Returns PageEntity object
|
|
44
44
|
*/
|
|
@@ -46,30 +46,30 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
46
46
|
/**
|
|
47
47
|
* Get child pages object with information as an array.
|
|
48
48
|
*
|
|
49
|
-
* @param {string} [
|
|
50
|
-
* @param {string} [
|
|
49
|
+
* @param {string} [url] - Parent page URL
|
|
50
|
+
* @param {string} [langCode] - Required parameter lang code
|
|
51
51
|
*
|
|
52
52
|
* @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
|
|
53
53
|
*/
|
|
54
54
|
getChildPagesByParentUrl(url: string, langCode?: string): Promise<Array<IPagesEntity> | IError>;
|
|
55
55
|
/**
|
|
56
|
-
* Get all
|
|
56
|
+
* Get all blocks by page url.
|
|
57
57
|
*
|
|
58
|
-
* @param {string} [langCode] Required parameter lang code
|
|
59
58
|
* @param {string} [url] - Page URL
|
|
59
|
+
* @param {string} [langCode] - lang code
|
|
60
60
|
*
|
|
61
|
-
* @returns Returns all
|
|
61
|
+
* @returns Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
getBlocksByPageUrl(url: string, langCode?: string): Promise<Array<IPositionBlock> | IError>;
|
|
64
64
|
/**
|
|
65
|
-
* Get all
|
|
65
|
+
* Get all forms by page url.
|
|
66
66
|
*
|
|
67
|
-
* @param {string} [langCode] Required parameter lang code
|
|
68
67
|
* @param {string} [url] - Page URL
|
|
68
|
+
* @param {string} [langCode] - lang code
|
|
69
69
|
*
|
|
70
|
-
* @returns Returns all
|
|
70
|
+
* @returns Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
getFormsByPageUrl(url: string, langCode?: string): Promise<Array<IPositionForm> | IError>;
|
|
73
73
|
/**
|
|
74
74
|
* Get settings for the page.
|
|
75
75
|
*
|
|
@@ -82,7 +82,7 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
82
82
|
* Quick search for page objects with limited output.
|
|
83
83
|
*
|
|
84
84
|
* @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)
|
|
85
|
-
* @param {string} [langCode]
|
|
85
|
+
* @param {string} [langCode] - lang code
|
|
86
86
|
*
|
|
87
87
|
* @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
88
88
|
*/
|
package/dist/pages/pagesApi.js
CHANGED
|
@@ -16,7 +16,7 @@ class PageApi extends asyncModules_1.default {
|
|
|
16
16
|
/**
|
|
17
17
|
* Get all top-level page objects.
|
|
18
18
|
*
|
|
19
|
-
* @param {string} [langCode]
|
|
19
|
+
* @param {string} [langCode] - lang code
|
|
20
20
|
*
|
|
21
21
|
* @returns Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
22
22
|
*/
|
|
@@ -27,7 +27,7 @@ class PageApi extends asyncModules_1.default {
|
|
|
27
27
|
/**
|
|
28
28
|
* Get all page objects with product information as an array.
|
|
29
29
|
*
|
|
30
|
-
* @param {string} [langCode]
|
|
30
|
+
* @param {string} [langCode] - lang code
|
|
31
31
|
*
|
|
32
32
|
* @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
33
33
|
*/
|
|
@@ -38,8 +38,8 @@ class PageApi extends asyncModules_1.default {
|
|
|
38
38
|
/**
|
|
39
39
|
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
40
40
|
*
|
|
41
|
-
* @param {string} [langCode] Required parameter lang code
|
|
42
41
|
* @param {number} [id] - Page object identifier
|
|
42
|
+
* @param {string} [langCode] - lang code
|
|
43
43
|
*
|
|
44
44
|
* @returns Returns PageEntity object
|
|
45
45
|
*/
|
|
@@ -50,8 +50,8 @@ class PageApi extends asyncModules_1.default {
|
|
|
50
50
|
/**
|
|
51
51
|
* Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
52
52
|
*
|
|
53
|
-
* @param {string} [langCode] Required parameter lang code
|
|
54
53
|
* @param {string} [url] - Page URL
|
|
54
|
+
* @param {string} [langCode] - lang code
|
|
55
55
|
*
|
|
56
56
|
* @returns Returns PageEntity object
|
|
57
57
|
*/
|
|
@@ -62,8 +62,8 @@ class PageApi extends asyncModules_1.default {
|
|
|
62
62
|
/**
|
|
63
63
|
* Get child pages object with information as an array.
|
|
64
64
|
*
|
|
65
|
-
* @param {string} [
|
|
66
|
-
* @param {string} [
|
|
65
|
+
* @param {string} [url] - Parent page URL
|
|
66
|
+
* @param {string} [langCode] - Required parameter lang code
|
|
67
67
|
*
|
|
68
68
|
* @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
|
|
69
69
|
*/
|
|
@@ -71,23 +71,11 @@ class PageApi extends asyncModules_1.default {
|
|
|
71
71
|
const result = await this._fetchGet(`/${url}/children?langCode=${langCode}`);
|
|
72
72
|
return this._normalizeData(result, langCode);
|
|
73
73
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Get all forms by page url.
|
|
76
|
-
*
|
|
77
|
-
* @param {string} [langCode] Required parameter lang code
|
|
78
|
-
* @param {string} [url] - Page URL
|
|
79
|
-
*
|
|
80
|
-
* @returns Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
|
|
81
|
-
*/
|
|
82
|
-
async getFormsByPageUrl(url, langCode = this.state.lang) {
|
|
83
|
-
const result = await this._fetchGet(`/${url}/forms?langCode=${langCode}`);
|
|
84
|
-
return this._normalizeData(result, langCode);
|
|
85
|
-
}
|
|
86
74
|
/**
|
|
87
75
|
* Get all blocks by page url.
|
|
88
76
|
*
|
|
89
|
-
* @param {string} [langCode] Required parameter lang code
|
|
90
77
|
* @param {string} [url] - Page URL
|
|
78
|
+
* @param {string} [langCode] - lang code
|
|
91
79
|
*
|
|
92
80
|
* @returns Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
|
|
93
81
|
*/
|
|
@@ -151,6 +139,18 @@ class PageApi extends asyncModules_1.default {
|
|
|
151
139
|
}
|
|
152
140
|
return this._normalizeData(normalizeResponse);
|
|
153
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Get all forms by page url.
|
|
144
|
+
*
|
|
145
|
+
* @param {string} [url] - Page URL
|
|
146
|
+
* @param {string} [langCode] - lang code
|
|
147
|
+
*
|
|
148
|
+
* @returns Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
|
|
149
|
+
*/
|
|
150
|
+
async getFormsByPageUrl(url, langCode = this.state.lang) {
|
|
151
|
+
const result = await this._fetchGet(`/${url}/forms?langCode=${langCode}`);
|
|
152
|
+
return this._normalizeData(result, langCode);
|
|
153
|
+
}
|
|
154
154
|
/**
|
|
155
155
|
* Get settings for the page.
|
|
156
156
|
*
|
|
@@ -166,7 +166,7 @@ class PageApi extends asyncModules_1.default {
|
|
|
166
166
|
* Quick search for page objects with limited output.
|
|
167
167
|
*
|
|
168
168
|
* @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)
|
|
169
|
-
* @param {string} [langCode]
|
|
169
|
+
* @param {string} [langCode] - lang code
|
|
170
170
|
*
|
|
171
171
|
* @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
172
172
|
*/
|
|
@@ -13,8 +13,8 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
13
13
|
* Get list of payment sessions.
|
|
14
14
|
*
|
|
15
15
|
* @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.
|
|
16
|
-
* @param {number} [offset] - Optional parameter for pagination, default is
|
|
17
|
-
* @param {number} [limit] - Optional parameter for pagination, default is
|
|
16
|
+
* @param {number} [offset] - Optional parameter for pagination, default is 0
|
|
17
|
+
* @param {number} [limit] - Optional parameter for pagination, default is 30
|
|
18
18
|
*
|
|
19
19
|
* @returns Returns an array of SessionEntity objects.
|
|
20
20
|
*/
|
|
@@ -32,9 +32,9 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
32
32
|
* Creation of payment session.
|
|
33
33
|
* @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.
|
|
34
34
|
*
|
|
35
|
-
* @param {number} orderId - Order identifier
|
|
36
|
-
* @param {'session' | 'intent'} type - Session type
|
|
37
|
-
* @param {boolean} automaticTaxEnabled - Automatic calculation of the tax rate
|
|
35
|
+
* @param {number} [orderId] - Order identifier
|
|
36
|
+
* @param {'session' | 'intent'} [type] - Session type
|
|
37
|
+
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate
|
|
38
38
|
*
|
|
39
39
|
* @returns Returns a single payment session object.
|
|
40
40
|
*/
|
|
@@ -16,8 +16,8 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
16
16
|
* Get list of payment sessions.
|
|
17
17
|
*
|
|
18
18
|
* @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.
|
|
19
|
-
* @param {number} [offset] - Optional parameter for pagination, default is
|
|
20
|
-
* @param {number} [limit] - Optional parameter for pagination, default is
|
|
19
|
+
* @param {number} [offset] - Optional parameter for pagination, default is 0
|
|
20
|
+
* @param {number} [limit] - Optional parameter for pagination, default is 30
|
|
21
21
|
*
|
|
22
22
|
* @returns Returns an array of SessionEntity objects.
|
|
23
23
|
*/
|
|
@@ -45,9 +45,9 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
45
45
|
* Creation of payment session.
|
|
46
46
|
* @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.
|
|
47
47
|
*
|
|
48
|
-
* @param {number} orderId - Order identifier
|
|
49
|
-
* @param {'session' | 'intent'} type - Session type
|
|
50
|
-
* @param {boolean} automaticTaxEnabled - Automatic calculation of the tax rate
|
|
48
|
+
* @param {number} [orderId] - Order identifier
|
|
49
|
+
* @param {'session' | 'intent'} [type] - Session type
|
|
50
|
+
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate
|
|
51
51
|
*
|
|
52
52
|
* @returns Returns a single payment session object.
|
|
53
53
|
*/
|
|
@@ -11,7 +11,8 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
11
11
|
constructor(state: StateModule);
|
|
12
12
|
/**
|
|
13
13
|
* Search for all product status objects.
|
|
14
|
-
*
|
|
14
|
+
*
|
|
15
|
+
* @param {string} [langCode] - language code
|
|
15
16
|
*
|
|
16
17
|
* @returns Returns an array of product status objects
|
|
17
18
|
*/
|
|
@@ -19,8 +20,8 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
19
20
|
/**
|
|
20
21
|
* Search for a product status object by identifier.
|
|
21
22
|
*
|
|
22
|
-
* @param {number} id - Status id
|
|
23
|
-
* @param {string} [langCode] -
|
|
23
|
+
* @param {number} [id] - Status id
|
|
24
|
+
* @param {string} [langCode] - language code
|
|
24
25
|
*
|
|
25
26
|
* @returns Returns a product status object
|
|
26
27
|
*/
|
|
@@ -28,8 +29,8 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
28
29
|
/**
|
|
29
30
|
* Search for a product status object by its textual identifier (marker).
|
|
30
31
|
*
|
|
31
|
-
* @param {string} marker - Product marker
|
|
32
|
-
* @param {string} [langCode] -
|
|
32
|
+
* @param {string} [marker] - Product marker
|
|
33
|
+
* @param {string} [langCode] - language code
|
|
33
34
|
*
|
|
34
35
|
* @returns Returns a product status object
|
|
35
36
|
*/
|
|
@@ -37,7 +38,7 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
37
38
|
/**
|
|
38
39
|
* Check the existence of a textual identifier.
|
|
39
40
|
*
|
|
40
|
-
* @param {string} marker - Product marker
|
|
41
|
+
* @param {string} [marker] - Product marker
|
|
41
42
|
*
|
|
42
43
|
* @returns Returns true if the textual identifier (marker) exists or false if it doesn't
|
|
43
44
|
*/
|