oneentry 1.0.90 → 1.0.92
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/dist/admins/adminsApi.d.ts +2 -1
- package/dist/admins/adminsInterfaces.d.ts +2 -2
- package/dist/attribute-sets/attributeSetsApi.d.ts +3 -2
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +3 -2
- package/dist/auth-provider/authProviderApi.d.ts +11 -10
- package/dist/auth-provider/authProvidersInterfaces.d.ts +11 -11
- package/dist/blocks/blocksApi.d.ts +4 -3
- package/dist/blocks/blocksInterfaces.d.ts +4 -4
- package/dist/events/eventsApi.d.ts +3 -2
- package/dist/events/eventsInterfaces.d.ts +3 -2
- package/dist/file-uploding/fileUploadingApi.d.ts +4 -3
- package/dist/file-uploding/fileUploadingInterfaces.d.ts +4 -3
- package/dist/forms/formsApi.d.ts +3 -2
- package/dist/forms/formsInterfaces.d.ts +3 -3
- package/dist/formsData/formsDataApi.d.ts +4 -3
- package/dist/formsData/formsDataInterfaces.d.ts +4 -3
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
- package/dist/general-types/typesApi.d.ts +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/locales/localesApi.d.ts +2 -1
- package/dist/locales/localesInterfaces.d.ts +2 -1
- package/dist/menus/menusApi.d.ts +2 -1
- package/dist/menus/menusInterfaces.d.ts +2 -1
- package/dist/orders/ordersApi.d.ts +7 -6
- package/dist/orders/ordersInterfaces.d.ts +7 -6
- package/dist/pages/pagesApi.d.ts +10 -9
- package/dist/pages/pagesInterfaces.d.ts +10 -10
- package/dist/payments/paymentsApi.d.ts +8 -7
- package/dist/payments/paymentsInterfaces.d.ts +8 -7
- package/dist/product-statuses/productStatusesApi.d.ts +5 -4
- package/dist/product-statuses/productStatusesInterfaces.d.ts +5 -4
- package/dist/products/productsApi.d.ts +10 -9
- package/dist/products/productsInterfaces.d.ts +10 -10
- package/dist/templates/templatesApi.d.ts +5 -5
- package/dist/templates/templatesInterfaces.d.ts +5 -5
- package/dist/templates-preview/templatesPreviewApi.d.ts +4 -3
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +4 -4
- package/dist/users/usersApi.d.ts +5 -4
- package/dist/users/usersInterfaces.d.ts +5 -4
- package/dist/web-socket/wsApi.d.ts +3 -2
- package/dist/web-socket/wsApi.js +3 -3
- package/dist/web-socket/wsInterfaces.d.ts +9 -0
- package/dist/web-socket/wsInterfaces.js +2 -0
- package/package.json +4 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IAdminEntity, IAdmins } from "./adminsInterfaces";
|
|
3
3
|
import StateModule from "../base/stateModule";
|
|
4
|
+
import { IError } from "../base/utils";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with users - admins
|
|
6
7
|
*/
|
|
@@ -17,5 +18,5 @@ export default class AdminsApi extends AsyncModules implements IAdmins {
|
|
|
17
18
|
*
|
|
18
19
|
* @returns Returns all AdminEntity user objects
|
|
19
20
|
*/
|
|
20
|
-
getAdminsInfo(langCode?: string, offset?: number, limit?: number): Promise<Array<IAdminEntity
|
|
21
|
+
getAdminsInfo(langCode?: string, offset?: number, limit?: number): Promise<Array<IAdminEntity> | IError>;
|
|
21
22
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AttributeType } from "../base/utils";
|
|
1
|
+
import { AttributeType, IError } from "../base/utils";
|
|
2
2
|
/**
|
|
3
3
|
* Represents a interface object of Admins Api.
|
|
4
4
|
*
|
|
5
5
|
* @property {function} getAdminsInfo - Get all user objects - admins.
|
|
6
6
|
*/
|
|
7
7
|
interface IAdmins {
|
|
8
|
-
getAdminsInfo(langCode: string, offset?: number, limit?: number): Promise<Array<IAdminEntity
|
|
8
|
+
getAdminsInfo(langCode: string, offset?: number, limit?: number): Promise<Array<IAdminEntity> | IError>;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Represents a position object.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IAttributesSets, IAttributesSetsEntity } from "./attributeSetsInterfaces";
|
|
3
|
+
import { IError } from "../base/utils";
|
|
3
4
|
import StateModule from "../base/stateModule";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with attributes.
|
|
@@ -16,7 +17,7 @@ export default class AttributesSetsApi extends AsyncModules implements IAttribut
|
|
|
16
17
|
*
|
|
17
18
|
* @returns Returns an array of AttributeInSet objects.
|
|
18
19
|
*/
|
|
19
|
-
getAttributesByMarker(marker: string, langCode?: string): Promise<Array<IAttributesSetsEntity
|
|
20
|
+
getAttributesByMarker(marker: string, langCode?: string): Promise<Array<IAttributesSetsEntity> | IError>;
|
|
20
21
|
/**
|
|
21
22
|
* Get a single attribute with data from the attribute sets.
|
|
22
23
|
*
|
|
@@ -26,5 +27,5 @@ export default class AttributesSetsApi extends AsyncModules implements IAttribut
|
|
|
26
27
|
*
|
|
27
28
|
* @returns Returns a AttributeInSet object.
|
|
28
29
|
*/
|
|
29
|
-
getSingleAttributeByMarkerSet(attributeMarker: string, setMarker: string, langCode?: string): Promise<IAttributesSetsEntity>;
|
|
30
|
+
getSingleAttributeByMarkerSet(attributeMarker: string, setMarker: string, langCode?: string): Promise<IAttributesSetsEntity | IError>;
|
|
30
31
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IError } from "../base/utils";
|
|
1
2
|
/**
|
|
2
3
|
* Represents an interface object of AttributesSets Api.
|
|
3
4
|
*
|
|
@@ -6,8 +7,8 @@
|
|
|
6
7
|
* @property {function} getSingleAttributeByMarkerSet - Get a single attribute with data from the attribute sets.
|
|
7
8
|
*/
|
|
8
9
|
interface IAttributesSets {
|
|
9
|
-
getAttributesByMarker(marker: string, langCode: string): Promise<Array<IAttributesSetsEntity
|
|
10
|
-
getSingleAttributeByMarkerSet(attributeMarker: string, setMarker: string, langCode: string): Promise<IAttributesSetsEntity>;
|
|
10
|
+
getAttributesByMarker(marker: string, langCode: string): Promise<Array<IAttributesSetsEntity> | IError>;
|
|
11
|
+
getSingleAttributeByMarkerSet(attributeMarker: string, setMarker: string, langCode: string): Promise<IAttributesSetsEntity | IError>;
|
|
11
12
|
}
|
|
12
13
|
interface IListTitle {
|
|
13
14
|
title: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IAuthProvider, ISignUpData, ISignUpEntity, IAuthEntity, IAuthProvidersEntity, IAuthPostBody } from "./authProvidersInterfaces";
|
|
3
3
|
import StateModule from "../base/stateModule";
|
|
4
|
+
import { IError } from "../base/utils";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with auth services.
|
|
6
7
|
*/
|
|
@@ -41,28 +42,28 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
41
42
|
* }
|
|
42
43
|
* }
|
|
43
44
|
*/
|
|
44
|
-
signUp(marker: string, data: ISignUpData, langCode?: string): Promise<ISignUpEntity>;
|
|
45
|
+
signUp(marker: string, data: ISignUpData, langCode?: string): Promise<ISignUpEntity | IError>;
|
|
45
46
|
/**
|
|
46
47
|
* Getting a user activation code. The code is returned via the appropriate user notification method
|
|
47
48
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
48
49
|
* @param {string} userIdentifier - The text identifier of the user's object (user login)
|
|
49
50
|
* @param {string} eventIdentifier - Text identifier of the event object for which the code is generated
|
|
50
51
|
*/
|
|
51
|
-
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void>;
|
|
52
|
+
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void | IError>;
|
|
52
53
|
/**
|
|
53
54
|
* User activation code verification. Returns true (if the code is correct) or false (if it is incorrect).
|
|
54
55
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
55
56
|
* @param {string} userIdentifier - The text identifier of the user's object (user login)
|
|
56
57
|
* @param {string} code - Service code
|
|
57
58
|
*/
|
|
58
|
-
checkCode(marker: string, userIdentifier: string, code: string): Promise<boolean>;
|
|
59
|
+
checkCode(marker: string, userIdentifier: string, code: string): Promise<boolean | IError>;
|
|
59
60
|
/**
|
|
60
61
|
* User activate.
|
|
61
62
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
62
63
|
* @param {string} userIdentifier - The text identifier of the user's object (user login)
|
|
63
64
|
* @param {string} code - Service code
|
|
64
65
|
*/
|
|
65
|
-
activateUser(marker: string, userIdentifier: string, code: string): Promise<boolean>;
|
|
66
|
+
activateUser(marker: string, userIdentifier: string, code: string): Promise<boolean | IError>;
|
|
66
67
|
/**
|
|
67
68
|
* User authorization
|
|
68
69
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
@@ -83,14 +84,14 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
83
84
|
* }
|
|
84
85
|
*
|
|
85
86
|
*/
|
|
86
|
-
auth(marker: string, data: IAuthPostBody): Promise<IAuthEntity>;
|
|
87
|
+
auth(marker: string, data: IAuthPostBody): Promise<IAuthEntity | IError>;
|
|
87
88
|
/**
|
|
88
89
|
* Refresh token
|
|
89
90
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
90
91
|
* @param {string} token - Refresh token
|
|
91
92
|
*
|
|
92
93
|
*/
|
|
93
|
-
refresh(marker: string, token: string): Promise<IAuthEntity>;
|
|
94
|
+
refresh(marker: string, token: string): Promise<IAuthEntity | IError>;
|
|
94
95
|
/**
|
|
95
96
|
*
|
|
96
97
|
* User logout.
|
|
@@ -99,7 +100,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
99
100
|
*
|
|
100
101
|
* @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
102
|
*/
|
|
102
|
-
logout(marker: string, token: string): Promise<boolean>;
|
|
103
|
+
logout(marker: string, token: string): Promise<boolean | IError>;
|
|
103
104
|
/**
|
|
104
105
|
* Change password
|
|
105
106
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
@@ -109,18 +110,18 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
109
110
|
* @param {string} newPassword - New password
|
|
110
111
|
* @param {string} [repeatPassword] - Optional variable contains repeat new password for validation
|
|
111
112
|
*/
|
|
112
|
-
changePassword(marker: string, userIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean>;
|
|
113
|
+
changePassword(marker: string, userIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean | IError>;
|
|
113
114
|
/**
|
|
114
115
|
* Get all auth providers objects
|
|
115
116
|
* @param {string} [langCode] - Language code. Default "en_US"
|
|
116
117
|
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
117
118
|
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
118
119
|
*/
|
|
119
|
-
getAuthProviders(langCode?: string, offset?: number, limit?: number): Promise<Array<IAuthProvidersEntity
|
|
120
|
+
getAuthProviders(langCode?: string, offset?: number, limit?: number): Promise<Array<IAuthProvidersEntity> | IError>;
|
|
120
121
|
/**
|
|
121
122
|
* Get one auth provider object by marker
|
|
122
123
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
123
124
|
* @param {string} [langCode] - Optional parameter language code. Default "en_US"
|
|
124
125
|
*/
|
|
125
|
-
getMarker(marker: string, langCode?: string): Promise<IAuthProvidersEntity>;
|
|
126
|
+
getMarker(marker: string, langCode?: string): Promise<IAuthProvidersEntity | IError>;
|
|
126
127
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILocalizeInfo } from "../base/utils";
|
|
1
|
+
import { IError, ILocalizeInfo } from "../base/utils";
|
|
2
2
|
/**
|
|
3
3
|
* Represents a interface object of User Auth Provider Api.
|
|
4
4
|
*
|
|
@@ -14,16 +14,16 @@ import { ILocalizeInfo } from "../base/utils";
|
|
|
14
14
|
* @property {function} getMarker - Get one auth provider object by marker.
|
|
15
15
|
*/
|
|
16
16
|
interface IAuthProvider {
|
|
17
|
-
signUp(marker: string, data: ISignUpData, langCode?: string): Promise<ISignUpEntity>;
|
|
18
|
-
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void>;
|
|
19
|
-
checkCode(marker: string, userIdentifier: string, code: string): Promise<boolean>;
|
|
20
|
-
activateUser(marker: string, userIdentifier: string, code: string): Promise<boolean>;
|
|
21
|
-
auth(marker: string, data: IAuthPostBody): Promise<IAuthEntity>;
|
|
22
|
-
refresh(marker: string, token: string): Promise<IAuthEntity>;
|
|
23
|
-
logout(marker: string, token: string): Promise<boolean>;
|
|
24
|
-
changePassword(marker: string, userIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean>;
|
|
25
|
-
getAuthProviders(langCode?: string, offset?: number, limit?: number): Promise<Array<IAuthProvidersEntity
|
|
26
|
-
getMarker(marker: string, langCode?: string): Promise<IAuthProvidersEntity>;
|
|
17
|
+
signUp(marker: string, data: ISignUpData, langCode?: string): Promise<ISignUpEntity | IError>;
|
|
18
|
+
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void | IError>;
|
|
19
|
+
checkCode(marker: string, userIdentifier: string, code: string): Promise<boolean | IError>;
|
|
20
|
+
activateUser(marker: string, userIdentifier: string, code: string): Promise<boolean | IError>;
|
|
21
|
+
auth(marker: string, data: IAuthPostBody): Promise<IAuthEntity | IError>;
|
|
22
|
+
refresh(marker: string, token: string): Promise<IAuthEntity | IError>;
|
|
23
|
+
logout(marker: string, token: string): Promise<boolean | IError>;
|
|
24
|
+
changePassword(marker: string, userIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean | IError>;
|
|
25
|
+
getAuthProviders(langCode?: string, offset?: number, limit?: number): Promise<Array<IAuthProvidersEntity> | IError>;
|
|
26
|
+
getMarker(marker: string, langCode?: string): Promise<IAuthProvidersEntity | IError>;
|
|
27
27
|
}
|
|
28
28
|
interface IAuthFormData {
|
|
29
29
|
marker: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IBlocks, IBlocksResponse, IBlockEntity, ISearchBlock, BlockType } from "./blocksInterfaces";
|
|
3
3
|
import StateModule from "../base/stateModule";
|
|
4
|
+
import { IError } from "../base/utils";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with blocks
|
|
6
7
|
*/
|
|
@@ -18,7 +19,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
18
19
|
*
|
|
19
20
|
* @returns Return array of BlocksEntity object.
|
|
20
21
|
*/
|
|
21
|
-
getBlocks(type: BlockType, langCode?: string, offset?: number, limit?: number): Promise<IBlocksResponse>;
|
|
22
|
+
getBlocks(type: BlockType, langCode?: string, offset?: number, limit?: number): Promise<IBlocksResponse | IError>;
|
|
22
23
|
/**
|
|
23
24
|
* Get block by marker.
|
|
24
25
|
*
|
|
@@ -29,7 +30,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
29
30
|
*
|
|
30
31
|
* @returns Return BlocksEntity object.
|
|
31
32
|
*/
|
|
32
|
-
getBlockByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IBlockEntity>;
|
|
33
|
+
getBlockByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IBlockEntity | IError>;
|
|
33
34
|
/**
|
|
34
35
|
* Get similar products by block marker.
|
|
35
36
|
*
|
|
@@ -57,5 +58,5 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
57
58
|
* @param name - Search string
|
|
58
59
|
* @param [langCode] - Language code. Default "en_US"
|
|
59
60
|
*/
|
|
60
|
-
searchBlock(name: string, langCode?: string): Promise<Array<ISearchBlock
|
|
61
|
+
searchBlock(name: string, langCode?: string): Promise<Array<ISearchBlock> | IError>;
|
|
61
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AttributeType } from "../base/utils";
|
|
1
|
+
import { AttributeType, IError } from "../base/utils";
|
|
2
2
|
import { IProductsEntity } from "../products/productsInterfaces";
|
|
3
3
|
/**
|
|
4
4
|
* Represents a interface object of Blocks Api.
|
|
@@ -10,9 +10,9 @@ import { IProductsEntity } from "../products/productsInterfaces";
|
|
|
10
10
|
* @property {function} searchBlock - Quick search for block objects with limited output.
|
|
11
11
|
*/
|
|
12
12
|
interface IBlocks {
|
|
13
|
-
getBlocks(type: BlockType, langCode?: string, offset?: number, limit?: number): Promise<IBlocksResponse>;
|
|
14
|
-
getBlockByMarker(marker: string, langCode: string, offset?: number, limit?: number): Promise<IBlockEntity>;
|
|
15
|
-
searchBlock(name: string, langCode?: string): Promise<Array<ISearchBlock
|
|
13
|
+
getBlocks(type: BlockType, langCode?: string, offset?: number, limit?: number): Promise<IBlocksResponse | IError>;
|
|
14
|
+
getBlockByMarker(marker: string, langCode: string, offset?: number, limit?: number): Promise<IBlockEntity | IError>;
|
|
15
|
+
searchBlock(name: string, langCode?: string): Promise<Array<ISearchBlock> | IError>;
|
|
16
16
|
}
|
|
17
17
|
interface IBlocksResponse {
|
|
18
18
|
total: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IEvents } from "./eventsInterfaces";
|
|
3
3
|
import StateModule from "../base/stateModule";
|
|
4
|
+
import { IError } from "../base/utils";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with events
|
|
6
7
|
*/
|
|
@@ -16,7 +17,7 @@ export default class EventsApi extends AsyncModules implements IEvents {
|
|
|
16
17
|
* @param langCode - Language code.
|
|
17
18
|
* @param productId - Product id.
|
|
18
19
|
*/
|
|
19
|
-
subscribeByMarker(marker: string, productId: number, langCode?: string): Promise<any>;
|
|
20
|
+
subscribeByMarker(marker: string, productId: number, langCode?: string): Promise<any | IError>;
|
|
20
21
|
/**
|
|
21
22
|
* Unsubscribing to an event on a product.
|
|
22
23
|
*
|
|
@@ -25,5 +26,5 @@ export default class EventsApi extends AsyncModules implements IEvents {
|
|
|
25
26
|
* @param langCode - Language code.
|
|
26
27
|
* @param productId - Product id.
|
|
27
28
|
*/
|
|
28
|
-
unsubscribeByMarker(marker: string, productId: number, langCode?: string): Promise<any>;
|
|
29
|
+
unsubscribeByMarker(marker: string, productId: number, langCode?: string): Promise<any | IError>;
|
|
29
30
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IError } from "../base/utils";
|
|
1
2
|
/**
|
|
2
3
|
* Represents a interface object of Events Api.
|
|
3
4
|
*
|
|
@@ -5,7 +6,7 @@
|
|
|
5
6
|
* @property {function} unsubscribeByMarker - Unsubscribing to an event on a product.
|
|
6
7
|
*/
|
|
7
8
|
interface IEvents {
|
|
8
|
-
subscribeByMarker(marker: string, productId: number, langCode: string): Promise<any>;
|
|
9
|
-
unsubscribeByMarker(marker: string, productId: number, langCode: string): Promise<any>;
|
|
9
|
+
subscribeByMarker(marker: string, productId: number, langCode: string): Promise<any | IError>;
|
|
10
|
+
unsubscribeByMarker(marker: string, productId: number, langCode: string): Promise<any | IError>;
|
|
10
11
|
}
|
|
11
12
|
export { IEvents };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import AsyncModules from '../base/asyncModules';
|
|
2
2
|
import { IUploadingQuery, IUploadingReturns, IFileUploading } from "./fileUploadingInterfaces";
|
|
3
|
+
import { IError } from "../base/utils";
|
|
3
4
|
import StateModule from "../base/stateModule";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with file uploading
|
|
@@ -24,7 +25,7 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
|
|
|
24
25
|
*
|
|
25
26
|
* @returns Uploads a file to an Amazon S3-compatible cloud file storage
|
|
26
27
|
*/
|
|
27
|
-
upload(data: File | Blob, fileQuery?: IUploadingQuery): Promise<IUploadingReturns>;
|
|
28
|
+
upload(data: File | Blob, fileQuery?: IUploadingQuery): Promise<IUploadingReturns | IError>;
|
|
28
29
|
/**
|
|
29
30
|
* Deletes a file from the cloud file storage.
|
|
30
31
|
*
|
|
@@ -37,7 +38,7 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
|
|
|
37
38
|
*
|
|
38
39
|
* @returns Deletes a file from the cloud file storage
|
|
39
40
|
*/
|
|
40
|
-
delete(filename: string, fileQuery?: IUploadingQuery): Promise<any>;
|
|
41
|
+
delete(filename: string, fileQuery?: IUploadingQuery): Promise<any | IError>;
|
|
41
42
|
/**
|
|
42
43
|
* Get file by parameters.
|
|
43
44
|
*
|
|
@@ -49,5 +50,5 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
|
|
|
49
50
|
*
|
|
50
51
|
* @returns Return file as File object
|
|
51
52
|
*/
|
|
52
|
-
getFile(id: number, type: string, entity: string, filename?: string): Promise<Blob>;
|
|
53
|
+
getFile(id: number, type: string, entity: string, filename?: string): Promise<Blob | IError>;
|
|
53
54
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IError } from "../base/utils";
|
|
1
2
|
/**
|
|
2
3
|
* Represents a interface object of File Uploading Api.
|
|
3
4
|
*
|
|
@@ -6,9 +7,9 @@
|
|
|
6
7
|
* @property {function} getFile - Get file by parameters.
|
|
7
8
|
*/
|
|
8
9
|
interface IFileUploading {
|
|
9
|
-
upload(data: File, fileQuery?: IUploadingQuery): Promise<IUploadingReturns>;
|
|
10
|
-
delete(filename: string, fileQuery?: IUploadingQuery): Promise<any>;
|
|
11
|
-
getFile(id: number, type: string, entity: string, filename?: string): Promise<Blob>;
|
|
10
|
+
upload(data: File, fileQuery?: IUploadingQuery): Promise<IUploadingReturns | IError>;
|
|
11
|
+
delete(filename: string, fileQuery?: IUploadingQuery): Promise<any | IError>;
|
|
12
|
+
getFile(id: number, type: string, entity: string, filename?: string): Promise<Blob | IError>;
|
|
12
13
|
}
|
|
13
14
|
interface IFileEntity {
|
|
14
15
|
file: File | string | null;
|
package/dist/forms/formsApi.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IForms, IFormsEntity } from "./formsInterfaces";
|
|
3
|
+
import { IError } from "../base/utils";
|
|
3
4
|
import StateModule from "../base/stateModule";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for forms objects
|
|
@@ -17,7 +18,7 @@ export default class FormsApi extends AsyncModules implements IForms {
|
|
|
17
18
|
*
|
|
18
19
|
* @returns Returns array for all objects of type FormEntity
|
|
19
20
|
*/
|
|
20
|
-
getAllForms(langCode?: string, offset?: number, limit?: number): Promise<Array<IFormsEntity
|
|
21
|
+
getAllForms(langCode?: string, offset?: number, limit?: number): Promise<Array<IFormsEntity> | IError>;
|
|
21
22
|
/**
|
|
22
23
|
* Get one form by form marker.
|
|
23
24
|
*
|
|
@@ -26,5 +27,5 @@ export default class FormsApi extends AsyncModules implements IForms {
|
|
|
26
27
|
*
|
|
27
28
|
* @returns Returns object of type FormEntity
|
|
28
29
|
*/
|
|
29
|
-
getFormByMarker(marker: string, langCode?: string): Promise<IFormsEntity>;
|
|
30
|
+
getFormByMarker(marker: string, langCode?: string): Promise<IFormsEntity | IError>;
|
|
30
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAttributes } from "../base/utils";
|
|
1
|
+
import { IAttributes, IError } from "../base/utils";
|
|
2
2
|
/**
|
|
3
3
|
* Represents an interface object of Forms Api.
|
|
4
4
|
*
|
|
@@ -7,8 +7,8 @@ import { IAttributes } from "../base/utils";
|
|
|
7
7
|
* @property {function} getFormByMarker - Get one form by form marker.
|
|
8
8
|
*/
|
|
9
9
|
interface IForms {
|
|
10
|
-
getAllForms(langCode: string, offset?: number, limit?: number): Promise<Array<IFormsEntity
|
|
11
|
-
getFormByMarker(marker: string, langCode: string): Promise<IFormsEntity>;
|
|
10
|
+
getAllForms(langCode: string, offset?: number, limit?: number): Promise<Array<IFormsEntity> | IError>;
|
|
11
|
+
getFormByMarker(marker: string, langCode: string): Promise<IFormsEntity | IError>;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Represents an object with various properties.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AsyncModules from '../base/asyncModules';
|
|
2
2
|
import { IFormsPost, IFormsData, IFormsDataEntity, IFormDataEntity } from './formsDataInterfaces';
|
|
3
3
|
import StateModule from "../base/stateModule";
|
|
4
|
+
import { IError } from "../base/utils";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with form data
|
|
6
7
|
*/
|
|
@@ -17,7 +18,7 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
17
18
|
*
|
|
18
19
|
* @returns Returns array for all objects of FormData
|
|
19
20
|
*/
|
|
20
|
-
getFormsData(langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity>;
|
|
21
|
+
getFormsData(langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
|
|
21
22
|
/**
|
|
22
23
|
* Find all product page objects with pagination and multiple filtering.
|
|
23
24
|
*
|
|
@@ -36,7 +37,7 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
36
37
|
*
|
|
37
38
|
* @returns - Returns created FormData objects.
|
|
38
39
|
*/
|
|
39
|
-
postFormsData(data: IFormsPost, langCode?: string): Promise<IFormDataEntity>;
|
|
40
|
+
postFormsData(data: IFormsPost, langCode?: string): Promise<IFormDataEntity | IError>;
|
|
40
41
|
/**
|
|
41
42
|
* Get one object of form data by marker.
|
|
42
43
|
*
|
|
@@ -47,5 +48,5 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
47
48
|
*
|
|
48
49
|
* @returns Returns array of object FormDataEntity
|
|
49
50
|
*/
|
|
50
|
-
getFormsDataByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity>;
|
|
51
|
+
getFormsDataByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
|
|
51
52
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IError } from "../base/utils";
|
|
1
2
|
/**
|
|
2
3
|
* Represents a interface object of Forms Api.
|
|
3
4
|
*
|
|
@@ -6,9 +7,9 @@
|
|
|
6
7
|
* @property {function} getFormsDataByMarker - Get one object of form data by marker.
|
|
7
8
|
*/
|
|
8
9
|
interface IFormsData {
|
|
9
|
-
getFormsData(langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity>;
|
|
10
|
-
postFormsData(data: IFormsPost, langCode?: string): Promise<IFormDataEntity>;
|
|
11
|
-
getFormsDataByMarker(marker: string, langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity>;
|
|
10
|
+
getFormsData(langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
|
|
11
|
+
postFormsData(data: IFormsPost, langCode?: string): Promise<IFormDataEntity | IError>;
|
|
12
|
+
getFormsDataByMarker(marker: string, langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Represents a form data.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Types } from "../base/utils";
|
|
1
|
+
import { IError, Types } from "../base/utils";
|
|
2
2
|
/**
|
|
3
3
|
* Represents an interface object of General Type Api.
|
|
4
4
|
*
|
|
5
5
|
* @property {function} getAllTypes - Get all types.
|
|
6
6
|
*/
|
|
7
7
|
interface IGeneralTypes {
|
|
8
|
-
getAllTypes(): Promise<Array<IGeneralTypesEntity
|
|
8
|
+
getAllTypes(): Promise<Array<IGeneralTypesEntity> | IError>;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Represents a general types object.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IGeneralTypes, IGeneralTypesEntity } from "./generalTypesInterfaces";
|
|
3
3
|
import StateModule from "../base/stateModule";
|
|
4
|
+
import { IError } from "../base/utils";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with types
|
|
6
7
|
*/
|
|
@@ -13,5 +14,5 @@ export default class GeneralTypesApi extends AsyncModules implements IGeneralTyp
|
|
|
13
14
|
*
|
|
14
15
|
* @returns Returns all objects of type GeneralTypeEntity
|
|
15
16
|
*/
|
|
16
|
-
getAllTypes(): Promise<Array<IGeneralTypesEntity
|
|
17
|
+
getAllTypes(): Promise<Array<IGeneralTypesEntity> | IError>;
|
|
17
18
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import PaymentsApi from "./payments/paymentsApi";
|
|
|
19
19
|
import AuthProviderApi from "./auth-provider/authProviderApi";
|
|
20
20
|
import EventsApi from "./events/eventsApi";
|
|
21
21
|
import UsersApi from "./users/usersApi";
|
|
22
|
+
import WsApi from "./web-socket/wsApi";
|
|
22
23
|
interface IDefineApi {
|
|
23
24
|
Admins: AdminsApi;
|
|
24
25
|
AttributesSets: AttributesSetsApi;
|
|
@@ -40,6 +41,7 @@ interface IDefineApi {
|
|
|
40
41
|
Templates: TemplatesApi;
|
|
41
42
|
TemplatePreviews: TemplatePreviewsApi;
|
|
42
43
|
Users: UsersApi;
|
|
44
|
+
WS: WsApi;
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* Define API.
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const authProviderApi_1 = require("./auth-provider/authProviderApi");
|
|
|
22
22
|
const eventsApi_1 = require("./events/eventsApi");
|
|
23
23
|
const usersApi_1 = require("./users/usersApi");
|
|
24
24
|
const stateModule_1 = require("./base/stateModule");
|
|
25
|
+
const wsApi_1 = require("./web-socket/wsApi");
|
|
25
26
|
/**
|
|
26
27
|
* Define API.
|
|
27
28
|
* @param {string} url - URl of your project.
|
|
@@ -57,6 +58,7 @@ function defineOneEntry(url, config) {
|
|
|
57
58
|
const Templates = new templatesApi_1.default(stateModule);
|
|
58
59
|
const TemplatePreviews = new templatesPreviewApi_1.default(stateModule);
|
|
59
60
|
const Users = new usersApi_1.default(stateModule);
|
|
61
|
+
const WS = new wsApi_1.default(stateModule);
|
|
60
62
|
return {
|
|
61
63
|
Admins,
|
|
62
64
|
AttributesSets,
|
|
@@ -77,7 +79,8 @@ function defineOneEntry(url, config) {
|
|
|
77
79
|
System,
|
|
78
80
|
Templates,
|
|
79
81
|
TemplatePreviews,
|
|
80
|
-
Users
|
|
82
|
+
Users,
|
|
83
|
+
WS
|
|
81
84
|
};
|
|
82
85
|
}
|
|
83
86
|
exports.defineOneEntry = defineOneEntry;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { ILocales, ILocalEntity } from "./localesInterfaces";
|
|
3
|
+
import { IError } from "../base/utils";
|
|
3
4
|
import StateModule from "../base/stateModule";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with localizations (content language)
|
|
@@ -13,5 +14,5 @@ export default class LocalesApi extends AsyncModules implements ILocales {
|
|
|
13
14
|
*
|
|
14
15
|
* @returns Returns an array of LocaleEntity objects
|
|
15
16
|
*/
|
|
16
|
-
getLocales(): Promise<Array<ILocalEntity
|
|
17
|
+
getLocales(): Promise<Array<ILocalEntity> | IError>;
|
|
17
18
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { IError } from "../base/utils";
|
|
1
2
|
/**
|
|
2
3
|
* Represents an interface object of Locales Api.
|
|
3
4
|
*
|
|
4
5
|
* @property {function} getLocales - Find all active language localization objects.
|
|
5
6
|
*/
|
|
6
7
|
interface ILocales {
|
|
7
|
-
getLocales(): Promise<Array<ILocalEntity
|
|
8
|
+
getLocales(): Promise<Array<ILocalEntity> | IError>;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Represents a locales object.
|
package/dist/menus/menusApi.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IMenus, IMenusEntity } from "./menusInterfaces";
|
|
3
|
+
import { IError } from "../base/utils";
|
|
3
4
|
import StateModule from "../base/stateModule";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with menu objects
|
|
@@ -16,5 +17,5 @@ export default class MenusApi extends AsyncModules implements IMenus {
|
|
|
16
17
|
*
|
|
17
18
|
* @returns Returns a single menu object as a ContentMenu object with included pages
|
|
18
19
|
*/
|
|
19
|
-
getMenusByMarker(marker: string, langCode?: string): Promise<IMenusEntity>;
|
|
20
|
+
getMenusByMarker(marker: string, langCode?: string): Promise<IMenusEntity | IError>;
|
|
20
21
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { IError } from "../base/utils";
|
|
1
2
|
/**
|
|
2
3
|
* Represents an interface object of Menus Api.
|
|
3
4
|
*
|
|
4
5
|
* @property {function} getAdminsInfo - Get pages includes in menu by marker.
|
|
5
6
|
*/
|
|
6
7
|
interface IMenus {
|
|
7
|
-
getMenusByMarker(marker: string, langCode: string): Promise<IMenusEntity>;
|
|
8
|
+
getMenusByMarker(marker: string, langCode: string): Promise<IMenusEntity | IError>;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Represents a position object.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
2
|
import { IOrdersApi, IOrdersEntity, IBaseOrdersEntity, IOrderData, IOrdersByMarkerEntity, IOrderByMarkerEntity } from "./ordersInterfaces";
|
|
3
3
|
import StateModule from "../base/stateModule";
|
|
4
|
+
import { IError } from "../base/utils";
|
|
4
5
|
/**
|
|
5
6
|
* Controllers for working with orders
|
|
6
7
|
*/
|
|
@@ -36,7 +37,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
36
37
|
*
|
|
37
38
|
* @returns Returns object for creating an order.
|
|
38
39
|
*/
|
|
39
|
-
createOrder(marker: string, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity>;
|
|
40
|
+
createOrder(marker: string, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
|
|
40
41
|
/**
|
|
41
42
|
* Getting all orders from the orders storage object created by the user
|
|
42
43
|
*
|
|
@@ -46,7 +47,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
46
47
|
* @param {number} [limit] Limit parameter. Default 30
|
|
47
48
|
* @param {number} [offset] Offset parameter. Default 0
|
|
48
49
|
*/
|
|
49
|
-
getAllOrdersByMarker(marker: string, langCode?: string, limit?: number, offset?: number): Promise<IOrdersByMarkerEntity>;
|
|
50
|
+
getAllOrdersByMarker(marker: string, langCode?: string, limit?: number, offset?: number): Promise<IOrdersByMarkerEntity | IError>;
|
|
50
51
|
/**
|
|
51
52
|
* Changing an order in the orders storage
|
|
52
53
|
*
|
|
@@ -74,7 +75,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
74
75
|
* "currency": "USD"
|
|
75
76
|
* }
|
|
76
77
|
*/
|
|
77
|
-
updateOrderByMarkerAndId(marker: string, id: number, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity>;
|
|
78
|
+
updateOrderByMarkerAndId(marker: string, id: number, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
|
|
78
79
|
/**
|
|
79
80
|
* Getting a single order from the order storage object created by the user
|
|
80
81
|
*
|
|
@@ -83,7 +84,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
83
84
|
* @param langCode Optional language field
|
|
84
85
|
*
|
|
85
86
|
*/
|
|
86
|
-
getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity>;
|
|
87
|
+
getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity | IError>;
|
|
87
88
|
/**
|
|
88
89
|
* Getting all the order storage objects
|
|
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.
|
|
@@ -92,7 +93,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
92
93
|
* @param {number} [limit] - Optional parameter for pagination, default is 0
|
|
93
94
|
* @param {number} [offset] - Optional parameter for pagination, default is 30
|
|
94
95
|
*/
|
|
95
|
-
getAllOrdersStorage(langCode?: string, limit?: number, offset?: number): Promise<Array<IOrdersEntity
|
|
96
|
+
getAllOrdersStorage(langCode?: string, limit?: number, offset?: number): Promise<Array<IOrdersEntity> | IError>;
|
|
96
97
|
/**
|
|
97
98
|
* Retrieve one order storage object by marker.
|
|
98
99
|
*
|
|
@@ -102,5 +103,5 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
102
103
|
*
|
|
103
104
|
* @returns Return object of order information.
|
|
104
105
|
*/
|
|
105
|
-
getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity>;
|
|
106
|
+
getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity | IError>;
|
|
106
107
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IError } from "../base/utils";
|
|
1
2
|
/**
|
|
2
3
|
* Represents an interface object of Orders Api.
|
|
3
4
|
*
|
|
@@ -11,12 +12,12 @@
|
|
|
11
12
|
|
|
12
13
|
*/
|
|
13
14
|
interface IOrdersApi {
|
|
14
|
-
createOrder(marker: string, data: IOrderData): Promise<IBaseOrdersEntity>;
|
|
15
|
-
getAllOrdersByMarker(marker: string, langCode?: string, limit?: number, offset?: number): Promise<IOrdersByMarkerEntity>;
|
|
16
|
-
getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity>;
|
|
17
|
-
updateOrderByMarkerAndId(marker: string, id: number, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity>;
|
|
18
|
-
getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity>;
|
|
19
|
-
getAllOrdersStorage(langCode?: string, limit?: number, offset?: number): Promise<Array<IOrdersEntity
|
|
15
|
+
createOrder(marker: string, data: IOrderData): Promise<IBaseOrdersEntity | IError>;
|
|
16
|
+
getAllOrdersByMarker(marker: string, langCode?: string, limit?: number, offset?: number): Promise<IOrdersByMarkerEntity | IError>;
|
|
17
|
+
getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity | IError>;
|
|
18
|
+
updateOrderByMarkerAndId(marker: string, id: number, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
|
|
19
|
+
getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity | IError>;
|
|
20
|
+
getAllOrdersStorage(langCode?: string, limit?: number, offset?: number): Promise<Array<IOrdersEntity> | IError>;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Represents a form data.
|