oneentry 1.0.72 → 1.0.74
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 +8 -127
- package/dist/auth-provider/authProviderApi.d.ts +4 -1
- package/dist/auth-provider/authProviderApi.js +4 -1
- package/dist/auth-provider/authProvidersInterfaces.d.ts +5 -5
- package/dist/base/utils.d.ts +1 -1
- package/dist/formsData/formsDataInterfaces.d.ts +4 -11
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/orders/ordersApi.d.ts +11 -2
- package/dist/orders/ordersApi.js +11 -2
- package/dist/pages/pagesApi.d.ts +0 -12
- package/dist/pages/pagesApi.js +0 -15
- package/dist/pages/pagesInterfaces.d.ts +1 -2
- package/dist/payments/paymentsApi.d.ts +7 -0
- package/dist/payments/paymentsApi.js +7 -0
- package/dist/payments/paymentsInterfaces.d.ts +3 -0
- package/dist/users/usersApi.d.ts +5 -0
- package/dist/users/usersApi.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,8 @@ const api = defineOneEntry('https://my-project.oneentry.cloud', {
|
|
|
95
95
|
langCode:'en_US',
|
|
96
96
|
traficLimit: true,
|
|
97
97
|
auth: {
|
|
98
|
-
customAuth: true
|
|
98
|
+
customAuth: true,
|
|
99
|
+
refreshToken: localStorage.getItem('refreshToken')
|
|
99
100
|
}
|
|
100
101
|
})
|
|
101
102
|
```
|
|
@@ -449,8 +450,7 @@ Example return:
|
|
|
449
450
|
"identifier": "catalog",
|
|
450
451
|
"isActive": false,
|
|
451
452
|
"authProviderId": 1,
|
|
452
|
-
"formData":
|
|
453
|
-
"en_US": [
|
|
453
|
+
"formData": [
|
|
454
454
|
{
|
|
455
455
|
"marker": "login",
|
|
456
456
|
"value": "test"
|
|
@@ -459,8 +459,7 @@ Example return:
|
|
|
459
459
|
"marker": "f-name",
|
|
460
460
|
"value": "Second name"
|
|
461
461
|
}
|
|
462
|
-
|
|
463
|
-
},
|
|
462
|
+
],
|
|
464
463
|
"notificationData": {
|
|
465
464
|
"email": "test@test.com",
|
|
466
465
|
"phonePush": "",
|
|
@@ -2029,15 +2028,13 @@ Example return:
|
|
|
2029
2028
|
"formIdentifier": "bars",
|
|
2030
2029
|
"paymentAccountIdentifier": "payment1",
|
|
2031
2030
|
"statusIdentifier": "inprogress",
|
|
2032
|
-
"formData":
|
|
2033
|
-
"en_US": [
|
|
2031
|
+
"formData": [
|
|
2034
2032
|
{
|
|
2035
2033
|
"marker": "naimenovanie_1",
|
|
2036
2034
|
"type": "string",
|
|
2037
2035
|
"value": "Name"
|
|
2038
2036
|
}
|
|
2039
|
-
|
|
2040
|
-
},
|
|
2037
|
+
],
|
|
2041
2038
|
"products": [
|
|
2042
2039
|
{
|
|
2043
2040
|
"productId": 1,
|
|
@@ -2458,123 +2455,6 @@ Enum:
|
|
|
2458
2455
|
[ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
|
|
2459
2456
|
|
|
2460
2457
|
|
|
2461
|
-
**childrenCount:** number <br>
|
|
2462
|
-
*number of nested pages* <br>
|
|
2463
|
-
example: 0 <br>
|
|
2464
|
-
|
|
2465
|
-
</details>
|
|
2466
|
-
|
|
2467
|
-
### Pages.getCatalogPages(langCode, limit, offset)
|
|
2468
|
-
|
|
2469
|
-
```js
|
|
2470
|
-
const value = await Pages.getCatalogPages('en_US', 0, 30)
|
|
2471
|
-
```
|
|
2472
|
-
|
|
2473
|
-
> This method retrieves all page objects with product information as an array from the API. It accepts two optional parameters limit and offset for pagination and language code parameter. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data.
|
|
2474
|
-
|
|
2475
|
-
Example return:
|
|
2476
|
-
|
|
2477
|
-
```json
|
|
2478
|
-
[
|
|
2479
|
-
{
|
|
2480
|
-
"id": 1,
|
|
2481
|
-
"config": {},
|
|
2482
|
-
"depth": 0,
|
|
2483
|
-
"parentId": null,
|
|
2484
|
-
"pageUrl": "blog",
|
|
2485
|
-
"attributeSetIdentifier": "page",
|
|
2486
|
-
"localizeInfos": {
|
|
2487
|
-
"title": "Blog",
|
|
2488
|
-
"menuTitle": "Blog",
|
|
2489
|
-
"htmlContent": "",
|
|
2490
|
-
"plainContent": ""
|
|
2491
|
-
},
|
|
2492
|
-
"position": 1,
|
|
2493
|
-
"isVisible": true,
|
|
2494
|
-
"products": 0,
|
|
2495
|
-
"childrenCount": 1,
|
|
2496
|
-
"type": "forUsualPage",
|
|
2497
|
-
"templateIdentifier": "template",
|
|
2498
|
-
"isSync": true,
|
|
2499
|
-
"attributeValues": {
|
|
2500
|
-
"text": {
|
|
2501
|
-
"type": "string",
|
|
2502
|
-
"value": "some text",
|
|
2503
|
-
"position": 0
|
|
2504
|
-
}
|
|
2505
|
-
}
|
|
2506
|
-
}
|
|
2507
|
-
]
|
|
2508
|
-
```
|
|
2509
|
-
<details>
|
|
2510
|
-
<summary>Schema</summary>
|
|
2511
|
-
|
|
2512
|
-
**id:** number <br>
|
|
2513
|
-
*object identifier* <br>
|
|
2514
|
-
example: 1764 <br>
|
|
2515
|
-
|
|
2516
|
-
**parentId** number <br>
|
|
2517
|
-
*parent page identifier, if null, it is a top-level page* <br>
|
|
2518
|
-
example: null <br>
|
|
2519
|
-
|
|
2520
|
-
**config** Record<string, number> <br>
|
|
2521
|
-
*output settings for catalog pages* <br>
|
|
2522
|
-
example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 } <br>
|
|
2523
|
-
|
|
2524
|
-
**pageUrl** string <br>
|
|
2525
|
-
*unique page URL* <br>
|
|
2526
|
-
|
|
2527
|
-
**depth** number <br>
|
|
2528
|
-
*page nesting depth relative to parentId* <br>
|
|
2529
|
-
example: 3 <br>
|
|
2530
|
-
|
|
2531
|
-
**localizeInfos:** Record<string, any> <br>
|
|
2532
|
-
*json description of the main page data object taking into account the language "en_US" (for example)* <br>
|
|
2533
|
-
example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
|
|
2534
|
-
|
|
2535
|
-
**isVisible:** boolean <br>
|
|
2536
|
-
*Page visibility flag* <br>
|
|
2537
|
-
example: true <br>
|
|
2538
|
-
|
|
2539
|
-
**products** number <br>
|
|
2540
|
-
*Number of products linked to the page* <br>
|
|
2541
|
-
example: 0 <br>
|
|
2542
|
-
|
|
2543
|
-
**attributeSetId:** number <br>
|
|
2544
|
-
*attribute set identifier* <br>
|
|
2545
|
-
example: 7 <br>
|
|
2546
|
-
|
|
2547
|
-
**forms** <br>
|
|
2548
|
-
*Array of FormEntity object identifier values linked to the page (optional)* <br>
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
**blocks** <br>
|
|
2552
|
-
*Array of BlockEntity object identifier values linked to the page (optional)* <br>
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
**isSync:** boolean <br>
|
|
2556
|
-
*indicator of page indexing (true or false)* <br>
|
|
2557
|
-
example: false <br>
|
|
2558
|
-
|
|
2559
|
-
**templateIdentifier:** string <br>
|
|
2560
|
-
*Custom identifier of the linked template* <br>
|
|
2561
|
-
example: my-template <br>
|
|
2562
|
-
|
|
2563
|
-
**attributeValues:** Record<string, string> <br>
|
|
2564
|
-
*Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
|
|
2565
|
-
example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
|
|
2566
|
-
|
|
2567
|
-
**position:** number <br>
|
|
2568
|
-
*position number for sorting (optional)* <br>
|
|
2569
|
-
example: 192 <br>
|
|
2570
|
-
|
|
2571
|
-
**type:** string <br>
|
|
2572
|
-
*Page type* <br>
|
|
2573
|
-
example: forNewsPage <br>
|
|
2574
|
-
Enum:
|
|
2575
|
-
[ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
2458
|
**childrenCount:** number <br>
|
|
2579
2459
|
*number of nested pages* <br>
|
|
2580
2460
|
example: 0 <br>
|
|
@@ -3471,7 +3351,8 @@ Example return:
|
|
|
3471
3351
|
"id": 1764,
|
|
3472
3352
|
"updatedDate": "2024-06-21T09:53:28.898Z",
|
|
3473
3353
|
"version": 10,
|
|
3474
|
-
"identifier": "my-id"
|
|
3354
|
+
"identifier": "my-id",
|
|
3355
|
+
"paymentUrl": "https://paymewntlink.com"
|
|
3475
3356
|
}
|
|
3476
3357
|
```
|
|
3477
3358
|
<details>
|
|
@@ -92,9 +92,12 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
92
92
|
*/
|
|
93
93
|
refresh(marker: string, token: string): Promise<IAuthEntity>;
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
*
|
|
96
|
+
* User logout.
|
|
96
97
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
97
98
|
* @param {string} token - Refresh token
|
|
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.
|
|
98
101
|
*/
|
|
99
102
|
logout(marker: string, token: string): Promise<boolean>;
|
|
100
103
|
/**
|
|
@@ -136,9 +136,12 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
136
136
|
return result;
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
*
|
|
140
|
+
* User logout.
|
|
140
141
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
141
142
|
* @param {string} token - Refresh token
|
|
143
|
+
*
|
|
144
|
+
* @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.
|
|
142
145
|
*/
|
|
143
146
|
async logout(marker, token) {
|
|
144
147
|
const data = {
|
|
@@ -50,16 +50,16 @@ interface ISignUpEntity {
|
|
|
50
50
|
version: number;
|
|
51
51
|
identifier: string;
|
|
52
52
|
isActive: boolean;
|
|
53
|
-
authProviderId: number;
|
|
54
53
|
formData: Array<{
|
|
55
54
|
marker: string;
|
|
56
55
|
value: string;
|
|
57
56
|
}>;
|
|
58
|
-
notificationData:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
notificationData: {
|
|
58
|
+
email: string;
|
|
59
|
+
phonePush: string;
|
|
60
|
+
phoneSMS: string;
|
|
62
61
|
};
|
|
62
|
+
locale: string;
|
|
63
63
|
}
|
|
64
64
|
interface ICodeEntity {
|
|
65
65
|
code: string;
|
package/dist/base/utils.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ type Types = 'forCatalogProducts' | 'forBasketPage' | 'forErrorPage' | 'forCatal
|
|
|
2
2
|
/**
|
|
3
3
|
* @param {string} [token] - If your project is protected by a token, specify this token in this parameter.
|
|
4
4
|
* @param {string} [langCode] - specify the default language to avoid specifying it in every request.
|
|
5
|
-
* @param {boolean} [
|
|
5
|
+
* @param {boolean} [traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
|
|
6
6
|
* @param {boolean} [auth] - An object with authorization settings
|
|
7
7
|
* @param {boolean} [auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal
|
|
8
8
|
* @param {boolean} [auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created
|
|
@@ -29,28 +29,21 @@ interface IFormsDataEntity {
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Contains an array of data form objects with the following values
|
|
32
|
-
*
|
|
33
|
-
* @property {string} marker Form data marker.
|
|
34
|
-
*
|
|
35
|
-
* @property {string} value Form data value.
|
|
36
32
|
*/
|
|
37
|
-
|
|
38
|
-
marker?: string;
|
|
39
|
-
value?: string;
|
|
40
|
-
}
|
|
33
|
+
type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | Record<string, any>;
|
|
41
34
|
/**
|
|
42
35
|
* interface to create an object of information about saving data using the form
|
|
43
36
|
*
|
|
44
37
|
* @property {number} id
|
|
45
38
|
* @property {string} formIdentifier - The identifier of the page.
|
|
46
39
|
* @property {Date | string} time - Date and time of form modification
|
|
47
|
-
* @property {
|
|
40
|
+
* @property {Array<FormDataType>} formData - The identifier of the page.
|
|
48
41
|
*/
|
|
49
42
|
interface IFormsPost {
|
|
50
43
|
id?: number;
|
|
51
44
|
formIdentifier: string;
|
|
52
45
|
time?: Date | string;
|
|
53
|
-
formData: Array<
|
|
46
|
+
formData: Array<FormDataType>;
|
|
54
47
|
}
|
|
55
48
|
/**
|
|
56
49
|
* @property {string} marker - marker name
|
|
@@ -168,4 +161,4 @@ interface IBodyTypeRadioButtonList {
|
|
|
168
161
|
};
|
|
169
162
|
}>;
|
|
170
163
|
}
|
|
171
|
-
export { IFormsPost, IFormsData,
|
|
164
|
+
export { IFormsPost, IFormsData, FormDataType, IFormsDataEntity, IBodyTypeStringNumberFloat, IBodyTypeTimeDate, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeImageGroupOfImages, IBodyTypeFile, IBodyTypeRadioButtonList };
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,11 @@ interface IDefineApi {
|
|
|
47
47
|
* @param {IConfig} config - Custom configuration settings
|
|
48
48
|
* @param {string} [config.token] - Optional token parameter
|
|
49
49
|
* @param {string} [config.langCode] - Optional langCode parameter
|
|
50
|
+
* @param {boolean} [config.traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
|
|
51
|
+
* @param {string} [config.auth] - An object with authorization settings.
|
|
52
|
+
* @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
|
|
53
|
+
* @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
|
|
54
|
+
* @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
|
|
50
55
|
* @returns {IDefineApi} - List of methods set.
|
|
51
56
|
*/
|
|
52
57
|
export declare function defineOneEntry(url: string, config: IConfig): IDefineApi;
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,11 @@ const stateModule_1 = require("./base/stateModule");
|
|
|
28
28
|
* @param {IConfig} config - Custom configuration settings
|
|
29
29
|
* @param {string} [config.token] - Optional token parameter
|
|
30
30
|
* @param {string} [config.langCode] - Optional langCode parameter
|
|
31
|
+
* @param {boolean} [config.traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
|
|
32
|
+
* @param {string} [config.auth] - An object with authorization settings.
|
|
33
|
+
* @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
|
|
34
|
+
* @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
|
|
35
|
+
* @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
|
|
31
36
|
* @returns {IDefineApi} - List of methods set.
|
|
32
37
|
*/
|
|
33
38
|
function defineOneEntry(url, config) {
|
|
@@ -15,6 +15,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
15
15
|
* @param {IOrderData} data - Object for creating an order
|
|
16
16
|
* @param {String} langCode - Optional language field
|
|
17
17
|
*
|
|
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
|
+
*
|
|
18
20
|
* @example
|
|
19
21
|
* const body = {
|
|
20
22
|
* "formIdentifier": "bar-orders-form",
|
|
@@ -36,7 +38,9 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
36
38
|
*/
|
|
37
39
|
createOrder(marker: string, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity>;
|
|
38
40
|
/**
|
|
39
|
-
* Getting all
|
|
41
|
+
* Getting all orders from the orders storage object created by the user
|
|
42
|
+
*
|
|
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.
|
|
40
44
|
* @param {number} marker - Textual identifier of the order storage object
|
|
41
45
|
* @param {string} [langCode] Optional language field
|
|
42
46
|
* @param {number} [limit] Limit parameter. Default 30
|
|
@@ -44,7 +48,9 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
44
48
|
*/
|
|
45
49
|
getAllOrdersByMarker(marker: string, langCode?: string, limit?: number, offset?: number): Promise<Array<IOrdersByMarkersEntity>>;
|
|
46
50
|
/**
|
|
47
|
-
* Changing an order in the
|
|
51
|
+
* Changing an order in the orders storage
|
|
52
|
+
*
|
|
53
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
48
54
|
* @param marker - The text identifier of the order storage object
|
|
49
55
|
* @param id - ID of the order object
|
|
50
56
|
* @param data Object for updating an order
|
|
@@ -71,6 +77,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
71
77
|
updateOrderByMarkerAndId(marker: string, id: number, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity>;
|
|
72
78
|
/**
|
|
73
79
|
* Getting all the order storage objects
|
|
80
|
+
* @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.
|
|
81
|
+
*
|
|
74
82
|
* @param {number} [langCode] Optional language field
|
|
75
83
|
* @param {number} [limit] - Optional parameter for pagination, default is 0
|
|
76
84
|
* @param {number} [offset] - Optional parameter for pagination, default is 30
|
|
@@ -79,6 +87,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
79
87
|
/**
|
|
80
88
|
* Retrieve one order storage object by marker.
|
|
81
89
|
*
|
|
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.
|
|
82
91
|
* @param {string} marker - Marker of the order object
|
|
83
92
|
* @param {string} [langCode] - Language code
|
|
84
93
|
*
|
package/dist/orders/ordersApi.js
CHANGED
|
@@ -16,6 +16,8 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
16
16
|
* @param {IOrderData} data - Object for creating an order
|
|
17
17
|
* @param {String} langCode - Optional language field
|
|
18
18
|
*
|
|
19
|
+
* @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.
|
|
20
|
+
*
|
|
19
21
|
* @example
|
|
20
22
|
* const body = {
|
|
21
23
|
* "formIdentifier": "bar-orders-form",
|
|
@@ -43,7 +45,9 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
43
45
|
return this._normalizeData(result);
|
|
44
46
|
}
|
|
45
47
|
/**
|
|
46
|
-
* Getting all
|
|
48
|
+
* Getting all orders from the orders storage object created by the user
|
|
49
|
+
*
|
|
50
|
+
* @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
51
|
* @param {number} marker - Textual identifier of the order storage object
|
|
48
52
|
* @param {string} [langCode] Optional language field
|
|
49
53
|
* @param {number} [limit] Limit parameter. Default 30
|
|
@@ -54,7 +58,9 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
54
58
|
return this._normalizeData(result.items);
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
57
|
-
* Changing an order in the
|
|
61
|
+
* Changing an order in the orders storage
|
|
62
|
+
*
|
|
63
|
+
* @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.
|
|
58
64
|
* @param marker - The text identifier of the order storage object
|
|
59
65
|
* @param id - ID of the order object
|
|
60
66
|
* @param data Object for updating an order
|
|
@@ -87,6 +93,8 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
87
93
|
}
|
|
88
94
|
/**
|
|
89
95
|
* Getting all the order storage objects
|
|
96
|
+
* @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.
|
|
97
|
+
*
|
|
90
98
|
* @param {number} [langCode] Optional language field
|
|
91
99
|
* @param {number} [limit] - Optional parameter for pagination, default is 0
|
|
92
100
|
* @param {number} [offset] - Optional parameter for pagination, default is 30
|
|
@@ -98,6 +106,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
98
106
|
/**
|
|
99
107
|
* Retrieve one order storage object by marker.
|
|
100
108
|
*
|
|
109
|
+
* @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
110
|
* @param {string} marker - Marker of the order object
|
|
102
111
|
* @param {string} [langCode] - Language code
|
|
103
112
|
*
|
package/dist/pages/pagesApi.d.ts
CHANGED
|
@@ -16,18 +16,6 @@ export default class PageApi extends AsyncModules implements IPageApi {
|
|
|
16
16
|
* @returns Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
17
17
|
*/
|
|
18
18
|
getRootPages(langCode?: string): Promise<Array<IPagesEntity>>;
|
|
19
|
-
/**
|
|
20
|
-
* Get all page objects with product information as an array.
|
|
21
|
-
*
|
|
22
|
-
* @param {string} [langCode] Required parameter lang code
|
|
23
|
-
*
|
|
24
|
-
* @param {number} [limit] - Optional parameter for pagination, default is 30
|
|
25
|
-
*
|
|
26
|
-
* @param {number} [offset] - Optional parameter for pagination, default is 0
|
|
27
|
-
*
|
|
28
|
-
* @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
29
|
-
*/
|
|
30
|
-
getCatalogPages(langCode?: string, limit?: number, offset?: number): Promise<Array<IPagesEntity>>;
|
|
31
19
|
/**
|
|
32
20
|
* Get all page objects with product information as an array.
|
|
33
21
|
*
|
package/dist/pages/pagesApi.js
CHANGED
|
@@ -21,21 +21,6 @@ class PageApi extends asyncModules_1.default {
|
|
|
21
21
|
const result = await this._fetchGet(`/root?langCode=${langCode}`);
|
|
22
22
|
return this._normalizeData(result, langCode);
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Get all page objects with product information as an array.
|
|
26
|
-
*
|
|
27
|
-
* @param {string} [langCode] Required parameter lang code
|
|
28
|
-
*
|
|
29
|
-
* @param {number} [limit] - Optional parameter for pagination, default is 30
|
|
30
|
-
*
|
|
31
|
-
* @param {number} [offset] - Optional parameter for pagination, default is 0
|
|
32
|
-
*
|
|
33
|
-
* @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
34
|
-
*/
|
|
35
|
-
async getCatalogPages(langCode = this.state.lang, limit = 30, offset = 0) {
|
|
36
|
-
const result = await this._fetchGet(`/catalog?langCode=${langCode}&limit=${limit}&offset=${offset}`);
|
|
37
|
-
return this._normalizeData(result, langCode);
|
|
38
|
-
}
|
|
39
24
|
/**
|
|
40
25
|
* Get all page objects with product information as an array.
|
|
41
26
|
*
|
|
@@ -22,7 +22,6 @@ import { IAttributes, LangType, Types } from "../base/utils";
|
|
|
22
22
|
*/
|
|
23
23
|
interface IPageApi {
|
|
24
24
|
getRootPages(langCode?: LangType): Promise<Array<IPagesEntity>>;
|
|
25
|
-
getCatalogPages(langCode: LangType, limit: number, offset: number): Promise<Array<IPagesEntity>>;
|
|
26
25
|
getPages(langCode: LangType): Promise<Array<IPagesEntity>>;
|
|
27
26
|
getPageById(id: number, langCode: LangType): Promise<IPagesEntity>;
|
|
28
27
|
getPageByUrl(url: string, langCode: LangType): Promise<IPagesEntity>;
|
|
@@ -118,7 +117,7 @@ interface IPositionBlock {
|
|
|
118
117
|
* @property {number} childrenCount - Children count.
|
|
119
118
|
*/
|
|
120
119
|
interface IPagesEntity {
|
|
121
|
-
attributeSetIdentifier
|
|
120
|
+
attributeSetIdentifier: string;
|
|
122
121
|
attributeValues: Record<string, any>;
|
|
123
122
|
childrenCount?: number;
|
|
124
123
|
config?: Record<string, number>;
|
|
@@ -11,6 +11,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
11
11
|
/**
|
|
12
12
|
* Get list of payment sessions.
|
|
13
13
|
*
|
|
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.
|
|
14
15
|
* @param {number} [limit] - Optional parameter for pagination, default is 0
|
|
15
16
|
* @param {number} [offset] - Optional parameter for pagination, default is 30
|
|
16
17
|
*
|
|
@@ -19,6 +20,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
19
20
|
getSessions(limit?: number, offset?: number): Promise<Array<ISessionEntity>>;
|
|
20
21
|
/**
|
|
21
22
|
* Get a single payment session object by its identifier.
|
|
23
|
+
* @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.
|
|
22
24
|
*
|
|
23
25
|
* @param {number} id - Identifier of the retrieved payment session object
|
|
24
26
|
*
|
|
@@ -27,6 +29,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
27
29
|
getSessionById(id: number): Promise<ISessionEntity>;
|
|
28
30
|
/**
|
|
29
31
|
* Creation of payment session.
|
|
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.
|
|
30
33
|
*
|
|
31
34
|
* @param {number} orderId - Order identifier
|
|
32
35
|
* @param {'session' | 'intent'} type - Session type
|
|
@@ -37,18 +40,21 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
37
40
|
createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ICreateSessionEntity>;
|
|
38
41
|
/**
|
|
39
42
|
* Get payment settings.
|
|
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.
|
|
40
44
|
*
|
|
41
45
|
* @returns Returns object PaymentsConnected or null.
|
|
42
46
|
*/
|
|
43
47
|
getConnected(): Promise<IConnectedEntity | null>;
|
|
44
48
|
/**
|
|
45
49
|
* Get all payment accounts as an array.
|
|
50
|
+
* @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.
|
|
46
51
|
*
|
|
47
52
|
* @returns Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
48
53
|
*/
|
|
49
54
|
getAccounts(): Promise<Array<IAccountsEntity>>;
|
|
50
55
|
/**
|
|
51
56
|
* Get a single payment account object by its identifier.
|
|
57
|
+
* @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.
|
|
52
58
|
*
|
|
53
59
|
* @param {number} id - Identifier of the retrieved payment account object
|
|
54
60
|
*
|
|
@@ -57,6 +63,7 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
57
63
|
getAccountById(id: number): Promise<IAccountsEntity>;
|
|
58
64
|
/**
|
|
59
65
|
* Webhook for Stripe.
|
|
66
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
60
67
|
*
|
|
61
68
|
* @returns Returns true (in case of successful execution) or false (in case of unsuccessful execution)
|
|
62
69
|
*/
|
|
@@ -12,6 +12,7 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
12
12
|
/**
|
|
13
13
|
* Get list of payment sessions.
|
|
14
14
|
*
|
|
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.
|
|
15
16
|
* @param {number} [limit] - Optional parameter for pagination, default is 0
|
|
16
17
|
* @param {number} [offset] - Optional parameter for pagination, default is 30
|
|
17
18
|
*
|
|
@@ -23,6 +24,7 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Get a single payment session object by its identifier.
|
|
27
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
26
28
|
*
|
|
27
29
|
* @param {number} id - Identifier of the retrieved payment session object
|
|
28
30
|
*
|
|
@@ -34,6 +36,7 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
38
|
* Creation of payment session.
|
|
39
|
+
* @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.
|
|
37
40
|
*
|
|
38
41
|
* @param {number} orderId - Order identifier
|
|
39
42
|
* @param {'session' | 'intent'} type - Session type
|
|
@@ -50,6 +53,7 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
50
53
|
}
|
|
51
54
|
/**
|
|
52
55
|
* Get payment settings.
|
|
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.
|
|
53
57
|
*
|
|
54
58
|
* @returns Returns object PaymentsConnected or null.
|
|
55
59
|
*/
|
|
@@ -59,6 +63,7 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
59
63
|
}
|
|
60
64
|
/**
|
|
61
65
|
* Get all payment accounts as an array.
|
|
66
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
62
67
|
*
|
|
63
68
|
* @returns Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
64
69
|
*/
|
|
@@ -68,6 +73,7 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
68
73
|
}
|
|
69
74
|
/**
|
|
70
75
|
* Get a single payment account object by its identifier.
|
|
76
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
71
77
|
*
|
|
72
78
|
* @param {number} id - Identifier of the retrieved payment account object
|
|
73
79
|
*
|
|
@@ -79,6 +85,7 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
79
85
|
}
|
|
80
86
|
/**
|
|
81
87
|
* Webhook for Stripe.
|
|
88
|
+
* @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.
|
|
82
89
|
*
|
|
83
90
|
* @returns Returns true (in case of successful execution) or false (in case of unsuccessful execution)
|
|
84
91
|
*/
|
|
@@ -49,6 +49,7 @@ interface IIntent {
|
|
|
49
49
|
* @property {number} id - Object identifier.
|
|
50
50
|
* @property {string} updatedDate - Object modification date.
|
|
51
51
|
* @property {string} type - Type may be 'session' or 'intent'.
|
|
52
|
+
* @property {string} status - payment status.
|
|
52
53
|
* @property {number} orderId - Order identifier.
|
|
53
54
|
* @property {number} paymentAccountId - Payment account object identifier.
|
|
54
55
|
* @property {string} paymentUrl - Payment link.
|
|
@@ -62,12 +63,14 @@ interface ISessionEntity {
|
|
|
62
63
|
paymentAccountId: number;
|
|
63
64
|
paymentUrl: string;
|
|
64
65
|
clientSecret: string;
|
|
66
|
+
status: string;
|
|
65
67
|
}
|
|
66
68
|
interface ICreateSessionEntity {
|
|
67
69
|
id: number;
|
|
68
70
|
updatedDate: string;
|
|
69
71
|
version: number;
|
|
70
72
|
identifier: string;
|
|
73
|
+
paymentUrl: string;
|
|
71
74
|
}
|
|
72
75
|
/**
|
|
73
76
|
* @interface
|
package/dist/users/usersApi.d.ts
CHANGED
|
@@ -10,11 +10,16 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
10
10
|
constructor(state: StateModule);
|
|
11
11
|
/**
|
|
12
12
|
* Getting the data of an authorized user.
|
|
13
|
+
*
|
|
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
|
+
*
|
|
13
16
|
* @param {string} [langCode] Required parameter lang code.
|
|
14
17
|
*/
|
|
15
18
|
getUser(langCode?: string): Promise<IUserEntity>;
|
|
16
19
|
/**
|
|
17
20
|
* Updating a single user object.
|
|
21
|
+
* @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.
|
|
22
|
+
*
|
|
18
23
|
* @param {object} data - Request body.
|
|
19
24
|
* @param {string} langCode - Optional language field
|
|
20
25
|
*
|
package/dist/users/usersApi.js
CHANGED
|
@@ -11,6 +11,9 @@ class UsersApi extends asyncModules_1.default {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Getting the data of an authorized user.
|
|
14
|
+
*
|
|
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
|
+
*
|
|
14
17
|
* @param {string} [langCode] Required parameter lang code.
|
|
15
18
|
*/
|
|
16
19
|
async getUser(langCode = this.state.lang) {
|
|
@@ -19,6 +22,8 @@ class UsersApi extends asyncModules_1.default {
|
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
21
24
|
* Updating a single user object.
|
|
25
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
26
|
+
*
|
|
22
27
|
* @param {object} data - Request body.
|
|
23
28
|
* @param {string} langCode - Optional language field
|
|
24
29
|
*
|