oneentry 1.0.124 → 1.0.126
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 +24 -22
- package/dist/admins/adminsApi.d.ts +17 -4
- package/dist/admins/adminsApi.js +16 -3
- package/dist/admins/adminsInterfaces.d.ts +47 -26
- package/dist/attribute-sets/attributeSetsApi.d.ts +10 -18
- package/dist/attribute-sets/attributeSetsApi.js +9 -17
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +92 -44
- package/dist/auth-provider/authProviderApi.d.ts +146 -36
- package/dist/auth-provider/authProviderApi.js +163 -37
- package/dist/auth-provider/authProvidersInterfaces.d.ts +189 -40
- package/dist/base/asyncModules.d.ts +7 -1
- package/dist/base/asyncModules.js +127 -21
- package/dist/base/result.js +23 -0
- package/dist/base/syncModules.d.ts +4 -0
- package/dist/base/syncModules.js +19 -1
- package/dist/base/utils.d.ts +1 -1
- package/dist/blocks/blocksApi.d.ts +7 -17
- package/dist/blocks/blocksApi.js +7 -17
- package/dist/blocks/blocksInterfaces.d.ts +77 -32
- package/dist/events/eventsApi.d.ts +7 -8
- package/dist/events/eventsApi.js +12 -7
- package/dist/events/eventsInterfaces.d.ts +16 -11
- package/dist/file-uploading/fileUploadingApi.d.ts +22 -14
- package/dist/file-uploading/fileUploadingApi.js +20 -12
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +42 -18
- package/dist/forms/formsApi.d.ts +3 -7
- package/dist/forms/formsApi.js +2 -6
- package/dist/forms/formsInterfaces.d.ts +44 -28
- package/dist/{formsData → forms-data}/formsDataApi.d.ts +31 -15
- package/dist/{formsData → forms-data}/formsDataApi.js +30 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +462 -0
- package/dist/general-types/generalTypesApi.d.ts +1 -3
- package/dist/general-types/generalTypesApi.js +0 -2
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +74 -47
- package/dist/integration-collections/integrationCollectionsApi.js +64 -45
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +144 -63
- package/dist/locales/localesApi.d.ts +1 -2
- package/dist/locales/localesApi.js +1 -2
- package/dist/locales/localesInterfaces.d.ts +2 -4
- package/dist/menus/menusApi.d.ts +1 -3
- package/dist/menus/menusApi.js +1 -3
- package/dist/menus/menusInterfaces.d.ts +39 -13
- package/dist/orders/ordersApi.d.ts +36 -18
- package/dist/orders/ordersApi.js +40 -22
- package/dist/orders/ordersInterfaces.d.ts +163 -81
- package/dist/pages/pagesApi.d.ts +48 -48
- package/dist/pages/pagesApi.js +40 -45
- package/dist/pages/pagesInterfaces.d.ts +147 -98
- package/dist/payments/paymentsApi.d.ts +25 -45
- package/dist/payments/paymentsApi.js +27 -46
- package/dist/payments/paymentsInterfaces.d.ts +42 -60
- package/dist/product-statuses/productStatusesApi.d.ts +6 -12
- package/dist/product-statuses/productStatusesApi.js +5 -11
- package/dist/product-statuses/productStatusesInterfaces.d.ts +16 -15
- package/dist/products/productsApi.d.ts +256 -104
- package/dist/products/productsApi.js +263 -97
- package/dist/products/productsInterfaces.d.ts +343 -160
- package/dist/system/systemApi.d.ts +21 -10
- package/dist/system/systemApi.js +22 -8
- package/dist/system/systemInterfaces.d.ts +0 -1
- package/dist/templates/templatesApi.d.ts +6 -12
- package/dist/templates/templatesApi.js +4 -10
- package/dist/templates/templatesInterfaces.d.ts +20 -20
- package/dist/templates-preview/templatesPreviewApi.d.ts +2 -6
- package/dist/templates-preview/templatesPreviewApi.js +1 -5
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +50 -25
- package/dist/users/usersApi.d.ts +33 -13
- package/dist/users/usersApi.js +38 -15
- package/dist/users/usersInterfaces.d.ts +78 -27
- package/dist/web-socket/wsApi.d.ts +1 -5
- package/dist/web-socket/wsApi.js +1 -5
- package/dist/web-socket/wsInterfaces.d.ts +0 -1
- package/package.json +18 -16
- package/dist/formsData/formsDataInterfaces.d.ts +0 -267
- /package/dist/{formsData → forms-data}/formsDataInterfaces.js +0 -0
|
@@ -17,10 +17,9 @@ export default class SystemApi extends AsyncModules implements ISystem {
|
|
|
17
17
|
*
|
|
18
18
|
* @return {any} The response from the server after fetching data from the '/test404' endpoint.
|
|
19
19
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
20
|
-
*
|
|
21
20
|
* @description This method is used to test the 404 error handling by sending a GET request to a specific endpoint.
|
|
22
21
|
*/
|
|
23
|
-
test404(): Promise<any>;
|
|
22
|
+
test404(): Promise<any | IError>;
|
|
24
23
|
/**
|
|
25
24
|
* Sends a GET request to the '/test500' endpoint and returns the result.
|
|
26
25
|
*
|
|
@@ -28,23 +27,25 @@ export default class SystemApi extends AsyncModules implements ISystem {
|
|
|
28
27
|
*
|
|
29
28
|
* @return {any} The response from the server after fetching data from the '/test500' endpoint.
|
|
30
29
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
31
|
-
*
|
|
32
30
|
* @description This method is used to test the 500 error handling by sending a GET request to a specific endpoint.
|
|
33
31
|
*/
|
|
34
|
-
test500(): Promise<any>;
|
|
32
|
+
test500(): Promise<any | IError>;
|
|
35
33
|
/**
|
|
36
34
|
* Validates a CAPTCHA token by sending it to the server for verification.
|
|
37
35
|
*
|
|
38
36
|
* @handleName validateCapcha
|
|
39
37
|
*
|
|
40
|
-
* @param {Object} event - The event object containing CAPTCHA data.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
* @param {Object} event - The event object containing CAPTCHA data. Example:
|
|
39
|
+
{
|
|
40
|
+
"token": "03AGdBq24...",
|
|
41
|
+
"expectedAction": "login",
|
|
42
|
+
"siteKey": "6Lc_aCMTAAAAAB..."
|
|
43
|
+
}
|
|
44
|
+
* @param {string} event.token - The CAPTCHA token to be validated. Example: "03AGdBq24...".
|
|
45
|
+
* @param {string} event.expectedAction - The expected action associated with the CAPTCHA. Example: "login".
|
|
46
|
+
* @param {string} event.siteKey - The site key used for the CAPTCHA. Example: "6Lc_aCMTAAAAAB...".
|
|
45
47
|
* @return {any} The response from the server after validating the CAPTCHA, or an error object if validation fails.
|
|
46
48
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
47
|
-
*
|
|
48
49
|
* @description This method sends the CAPTCHA token and related information to the server endpoint '/captcha/validate' to verify its validity.
|
|
49
50
|
*/
|
|
50
51
|
validateCapcha(event: {
|
|
@@ -52,4 +53,14 @@ export default class SystemApi extends AsyncModules implements ISystem {
|
|
|
52
53
|
expectedAction: string;
|
|
53
54
|
siteKey: string;
|
|
54
55
|
}): Promise<any | IError>;
|
|
56
|
+
/**
|
|
57
|
+
* Getting the number of requests to API.
|
|
58
|
+
*
|
|
59
|
+
* @handleName getApiStat
|
|
60
|
+
*
|
|
61
|
+
* @return {any} Return object with date and count.
|
|
62
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
63
|
+
* @description Getting the number of requests to API.
|
|
64
|
+
*/
|
|
65
|
+
getApiStat(): Promise<any | IError>;
|
|
55
66
|
}
|
package/dist/system/systemApi.js
CHANGED
|
@@ -21,7 +21,6 @@ class SystemApi extends asyncModules_1.default {
|
|
|
21
21
|
*
|
|
22
22
|
* @return {any} The response from the server after fetching data from the '/test404' endpoint.
|
|
23
23
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
24
|
-
*
|
|
25
24
|
* @description This method is used to test the 404 error handling by sending a GET request to a specific endpoint.
|
|
26
25
|
*/
|
|
27
26
|
async test404() {
|
|
@@ -35,7 +34,6 @@ class SystemApi extends asyncModules_1.default {
|
|
|
35
34
|
*
|
|
36
35
|
* @return {any} The response from the server after fetching data from the '/test500' endpoint.
|
|
37
36
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
38
|
-
*
|
|
39
37
|
* @description This method is used to test the 500 error handling by sending a GET request to a specific endpoint.
|
|
40
38
|
*/
|
|
41
39
|
async test500() {
|
|
@@ -47,14 +45,17 @@ class SystemApi extends asyncModules_1.default {
|
|
|
47
45
|
*
|
|
48
46
|
* @handleName validateCapcha
|
|
49
47
|
*
|
|
50
|
-
* @param {Object} event - The event object containing CAPTCHA data.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
* @param {Object} event - The event object containing CAPTCHA data. Example:
|
|
49
|
+
{
|
|
50
|
+
"token": "03AGdBq24...",
|
|
51
|
+
"expectedAction": "login",
|
|
52
|
+
"siteKey": "6Lc_aCMTAAAAAB..."
|
|
53
|
+
}
|
|
54
|
+
* @param {string} event.token - The CAPTCHA token to be validated. Example: "03AGdBq24...".
|
|
55
|
+
* @param {string} event.expectedAction - The expected action associated with the CAPTCHA. Example: "login".
|
|
56
|
+
* @param {string} event.siteKey - The site key used for the CAPTCHA. Example: "6Lc_aCMTAAAAAB...".
|
|
55
57
|
* @return {any} The response from the server after validating the CAPTCHA, or an error object if validation fails.
|
|
56
58
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
57
|
-
*
|
|
58
59
|
* @description This method sends the CAPTCHA token and related information to the server endpoint '/captcha/validate' to verify its validity.
|
|
59
60
|
*/
|
|
60
61
|
async validateCapcha(event) {
|
|
@@ -64,5 +65,18 @@ class SystemApi extends asyncModules_1.default {
|
|
|
64
65
|
const result = await this._fetchPost('/captcha/validate', data);
|
|
65
66
|
return result;
|
|
66
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Getting the number of requests to API.
|
|
70
|
+
*
|
|
71
|
+
* @handleName getApiStat
|
|
72
|
+
*
|
|
73
|
+
* @return {any} Return object with date and count.
|
|
74
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
75
|
+
* @description Getting the number of requests to API.
|
|
76
|
+
*/
|
|
77
|
+
async getApiStat() {
|
|
78
|
+
const result = await this._fetchGet('/api-stat');
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
67
81
|
}
|
|
68
82
|
exports.default = SystemApi;
|
|
@@ -20,38 +20,32 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
20
20
|
* @handleName getAllTemplates
|
|
21
21
|
*
|
|
22
22
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
23
|
-
*
|
|
24
|
-
* @return {Record<Types, ITemplateEntity>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
23
|
+
* @return {Record<Types, ITemplateEntity[]>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
25
24
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
26
|
-
*
|
|
27
25
|
* @description This function is designed to fetch organized template objects in groups based on their types.
|
|
28
26
|
*/
|
|
29
|
-
getAllTemplates(langCode?: string): Promise<Record<Types, ITemplateEntity> | IError>;
|
|
27
|
+
getAllTemplates(langCode?: string): Promise<Record<Types, ITemplateEntity[]> | IError>;
|
|
30
28
|
/**
|
|
31
29
|
* Get template objects by type.
|
|
32
30
|
*
|
|
33
31
|
* @handleName getTemplateByType
|
|
34
32
|
*
|
|
35
|
-
* @param {Types} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example:
|
|
33
|
+
* @param {Types} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example: "product".
|
|
36
34
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
37
|
-
*
|
|
38
|
-
* @return {TemplateEntity[]} Returns a TemplateEntity object.
|
|
35
|
+
* @return {ITemplateEntity[]} Returns a TemplateEntity object.
|
|
39
36
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
40
|
-
*
|
|
41
37
|
* @description Fetch template objects that belong to a specific type, with an optional filter by language.
|
|
42
38
|
*/
|
|
43
|
-
getTemplateByType(type: Types, langCode?: string): Promise<
|
|
39
|
+
getTemplateByType(type: Types, langCode?: string): Promise<ITemplateEntity[] | IError>;
|
|
44
40
|
/**
|
|
45
41
|
* Get one template object by marker.
|
|
46
42
|
*
|
|
47
43
|
* @handleName getTemplateByMarker
|
|
48
44
|
*
|
|
49
|
-
* @param {
|
|
45
|
+
* @param {string} marker - The unique marker of the template to retrieve. Example: "template_12345".
|
|
50
46
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
51
|
-
*
|
|
52
47
|
* @return {ITemplateEntity} Returns a TemplateEntity object
|
|
53
48
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
54
|
-
*
|
|
55
49
|
* @description Fetch a specific template object based on its unique marker.
|
|
56
50
|
*/
|
|
57
51
|
getTemplateByMarker(marker: string, langCode?: string): Promise<ITemplateEntity | IError>;
|
|
@@ -24,10 +24,8 @@ class TemplatesPreviewApi extends asyncModules_1.default {
|
|
|
24
24
|
* @handleName getAllTemplates
|
|
25
25
|
*
|
|
26
26
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
|
-
*
|
|
28
|
-
* @return {Record<Types, ITemplateEntity>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
27
|
+
* @return {Record<Types, ITemplateEntity[]>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
29
28
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
30
|
-
*
|
|
31
29
|
* @description This function is designed to fetch organized template objects in groups based on their types.
|
|
32
30
|
*/
|
|
33
31
|
async getAllTemplates(langCode = this.state.lang) {
|
|
@@ -44,12 +42,10 @@ class TemplatesPreviewApi extends asyncModules_1.default {
|
|
|
44
42
|
*
|
|
45
43
|
* @handleName getTemplateByType
|
|
46
44
|
*
|
|
47
|
-
* @param {Types} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example:
|
|
45
|
+
* @param {Types} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example: "product".
|
|
48
46
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
49
|
-
*
|
|
50
|
-
* @return {TemplateEntity[]} Returns a TemplateEntity object.
|
|
47
|
+
* @return {ITemplateEntity[]} Returns a TemplateEntity object.
|
|
51
48
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
52
|
-
*
|
|
53
49
|
* @description Fetch template objects that belong to a specific type, with an optional filter by language.
|
|
54
50
|
*/
|
|
55
51
|
async getTemplateByType(type, langCode = this.state.lang) {
|
|
@@ -61,12 +57,10 @@ class TemplatesPreviewApi extends asyncModules_1.default {
|
|
|
61
57
|
*
|
|
62
58
|
* @handleName getTemplateByMarker
|
|
63
59
|
*
|
|
64
|
-
* @param {
|
|
60
|
+
* @param {string} marker - The unique marker of the template to retrieve. Example: "template_12345".
|
|
65
61
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
66
|
-
*
|
|
67
62
|
* @return {ITemplateEntity} Returns a TemplateEntity object
|
|
68
63
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
69
|
-
*
|
|
70
64
|
* @description Fetch a specific template object based on its unique marker.
|
|
71
65
|
*/
|
|
72
66
|
async getTemplateByMarker(marker, langCode = this.state.lang) {
|
|
@@ -13,27 +13,24 @@ interface ITemplatesApi {
|
|
|
13
13
|
* Get all template objects grouped by types.
|
|
14
14
|
*
|
|
15
15
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
16
|
-
*
|
|
17
|
-
* @return {Record<Types, ITemplateEntity>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
16
|
+
* @return {Record<Types, ITemplateEntity[]>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
18
17
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
19
18
|
*/
|
|
20
|
-
getAllTemplates(langCode?: string): Promise<Record<Types, ITemplateEntity> | IError>;
|
|
19
|
+
getAllTemplates(langCode?: string): Promise<Record<Types, ITemplateEntity[]> | IError>;
|
|
21
20
|
/**
|
|
22
21
|
* Get template objects by type.
|
|
23
22
|
*
|
|
24
|
-
* @param {Types} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example:
|
|
23
|
+
* @param {Types} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example: "product".
|
|
25
24
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
26
|
-
*
|
|
27
25
|
* @return {TemplateEntity[]} Returns a TemplateEntity object.
|
|
28
26
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
29
27
|
*/
|
|
30
|
-
getTemplateByType(type: Types, langCode: string): Promise<
|
|
28
|
+
getTemplateByType(type: Types, langCode: string): Promise<ITemplateEntity[] | IError>;
|
|
31
29
|
/**
|
|
32
30
|
* Get one template object by id.
|
|
33
31
|
*
|
|
34
|
-
* @param {
|
|
32
|
+
* @param {string} marker - The unique marker of the template to retrieve. Example: "template_12345".
|
|
35
33
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
36
|
-
*
|
|
37
34
|
* @return {ITemplateEntity} Returns a TemplateEntity object
|
|
38
35
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
39
36
|
*/
|
|
@@ -43,26 +40,29 @@ interface ITemplatesApi {
|
|
|
43
40
|
* @interface ITemplateEntity
|
|
44
41
|
*
|
|
45
42
|
* @property {number} id - The unique identifier of the position. Example: 12345.
|
|
46
|
-
* @property {
|
|
47
|
-
* @property {string}
|
|
43
|
+
* @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "attribute_set_1".
|
|
44
|
+
* @property {string} title - The name of the template. Example: "Product Template".
|
|
48
45
|
* @property {number} generalTypeId - General type Entity id. Example: 67890.
|
|
49
|
-
* @property {string}
|
|
46
|
+
* @property {string} identifier - The textual identifier for the record field. Example: "template_12345".
|
|
47
|
+
* @property {number} version - The version number of the object. Example: 1.
|
|
48
|
+
* @property {Types} generalTypeName - General type name. Example: "product".
|
|
49
|
+
* @property {AttributeType} attributeValues - Attribute values from the index (represented as a pair of user attribute id: attribute value). Example:
|
|
50
50
|
* @property {number} position - The position of the object. Example: 1.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
{
|
|
52
|
+
"id": 1,
|
|
53
|
+
"value": "some"
|
|
54
|
+
}
|
|
55
55
|
* @description This interface defines the structure of a template entity, including its identifiers, attributes, and general type information.
|
|
56
56
|
*/
|
|
57
57
|
interface ITemplateEntity {
|
|
58
58
|
id: number;
|
|
59
|
-
|
|
60
|
-
identifier: string;
|
|
61
|
-
generalTypeId: number;
|
|
59
|
+
attributeSetIdentifier: string | null;
|
|
62
60
|
title: string;
|
|
63
|
-
|
|
61
|
+
generalTypeId: number;
|
|
62
|
+
identifier: string;
|
|
63
|
+
version: number;
|
|
64
64
|
generalTypeName: Types;
|
|
65
65
|
attributeValues: AttributeType;
|
|
66
|
-
|
|
66
|
+
position: number;
|
|
67
67
|
}
|
|
68
68
|
export type { ITemplateEntity, ITemplatesApi };
|
|
@@ -19,24 +19,20 @@ export default class TemplatePreviewsApi extends AsyncModules implements ITempla
|
|
|
19
19
|
* @handleName getTemplatePreviews
|
|
20
20
|
*
|
|
21
21
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
22
|
-
*
|
|
23
22
|
* @return {ITemplatesPreviewEntity[]} - Returns all TemplatePreviewsEntity template objects.
|
|
24
23
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
25
|
-
*
|
|
26
24
|
* @description This method is used to fetch all available template objects.
|
|
27
25
|
*/
|
|
28
|
-
getTemplatePreviews(langCode?: string): Promise<
|
|
26
|
+
getTemplatePreviews(langCode?: string): Promise<ITemplatesPreviewEntity[] | IError>;
|
|
29
27
|
/**
|
|
30
28
|
* Retrieves a template object by its marker.
|
|
31
29
|
*
|
|
32
30
|
* @handleName getTemplatePreviewByMarker
|
|
33
31
|
*
|
|
34
|
-
* @param {string} marker - The unique product marker used to identify the template. If not provided, a default behavior or error may occur. Example:
|
|
32
|
+
* @param {string} marker - The unique product marker used to identify the template. If not provided, a default behavior or error may occur. Example: "template_12345".
|
|
35
33
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
36
|
-
*
|
|
37
34
|
* @return {TemplatePreviewsEntity} - A promise that resolves to a TemplatePreviewsEntity object representing the template.
|
|
38
35
|
* @throws {IError} - Throws an error object if there is an issue during the fetch operation.
|
|
39
|
-
*
|
|
40
36
|
* @description This method is used to fetch a specific template object based on the provided marker.
|
|
41
37
|
*/
|
|
42
38
|
getTemplatePreviewByMarker(marker: string, langCode?: string): Promise<ITemplatesPreviewEntity | IError>;
|
|
@@ -22,10 +22,8 @@ class TemplatePreviewsApi extends asyncModules_1.default {
|
|
|
22
22
|
* @handleName getTemplatePreviews
|
|
23
23
|
*
|
|
24
24
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
25
|
-
*
|
|
26
25
|
* @return {ITemplatesPreviewEntity[]} - Returns all TemplatePreviewsEntity template objects.
|
|
27
26
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
28
|
-
*
|
|
29
27
|
* @description This method is used to fetch all available template objects.
|
|
30
28
|
*/
|
|
31
29
|
async getTemplatePreviews(langCode = this.state.lang) {
|
|
@@ -37,12 +35,10 @@ class TemplatePreviewsApi extends asyncModules_1.default {
|
|
|
37
35
|
*
|
|
38
36
|
* @handleName getTemplatePreviewByMarker
|
|
39
37
|
*
|
|
40
|
-
* @param {string} marker - The unique product marker used to identify the template. If not provided, a default behavior or error may occur. Example:
|
|
38
|
+
* @param {string} marker - The unique product marker used to identify the template. If not provided, a default behavior or error may occur. Example: "template_12345".
|
|
41
39
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
42
|
-
*
|
|
43
40
|
* @return {TemplatePreviewsEntity} - A promise that resolves to a TemplatePreviewsEntity object representing the template.
|
|
44
41
|
* @throws {IError} - Throws an error object if there is an issue during the fetch operation.
|
|
45
|
-
*
|
|
46
42
|
* @description This method is used to fetch a specific template object based on the provided marker.
|
|
47
43
|
*/
|
|
48
44
|
async getTemplatePreviewByMarker(marker, langCode = this.state.lang) {
|
|
@@ -13,17 +13,15 @@ interface ITemplatesPreview {
|
|
|
13
13
|
* Retrieves all template preview objects.
|
|
14
14
|
*
|
|
15
15
|
* @param {string} langCode - Language code for localization. Default: "en_US".
|
|
16
|
-
*
|
|
17
16
|
* @returns {ITemplatesPreviewEntity[]} A promise resolving to an array of template preview entities or an error.
|
|
18
17
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
19
18
|
*/
|
|
20
|
-
getTemplatePreviews(langCode: string): Promise<
|
|
19
|
+
getTemplatePreviews(langCode: string): Promise<ITemplatesPreviewEntity[] | IError>;
|
|
21
20
|
/**
|
|
22
21
|
* Retrieves a specific template preview object by its marker.
|
|
23
22
|
*
|
|
24
|
-
* @param {string} marker - The marker of the template preview. Example:
|
|
23
|
+
* @param {string} marker - The marker of the template preview. Example: "template_12345".
|
|
25
24
|
* @param {string} [langCode] - Language code for localization. Default: "en_US".
|
|
26
|
-
*
|
|
27
25
|
* @returns {ITemplatesPreviewEntity} A promise resolving to the template preview entity or an error.
|
|
28
26
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
29
27
|
*/
|
|
@@ -32,26 +30,54 @@ interface ITemplatesPreview {
|
|
|
32
30
|
/**
|
|
33
31
|
* @interface ITemplatesPreviewEntity
|
|
34
32
|
*
|
|
35
|
-
* @property {number} id - The unique identifier of the position. Example:
|
|
33
|
+
* @property {number} id - The unique identifier of the position. Example: 3.
|
|
34
|
+
* @property {string} title - The name of the template preview. Example: "Product Template"..
|
|
35
|
+
* @property {object} proportions - Object contains info by proportions template preview. Example:
|
|
36
|
+
{
|
|
37
|
+
"default": {
|
|
38
|
+
"horizontal": {
|
|
39
|
+
"width": 234,
|
|
40
|
+
"height": 324,
|
|
41
|
+
"alignmentType": "middleBottom"
|
|
42
|
+
},
|
|
43
|
+
"vertical": {
|
|
44
|
+
"width": 2,
|
|
45
|
+
"height": 3,
|
|
46
|
+
"alignmentType": "leftTop"
|
|
47
|
+
},
|
|
48
|
+
"square": {
|
|
49
|
+
"side": 3,
|
|
50
|
+
"alignmentType": "leftTop"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
* @property {string} identifier - The textual identifier for the record field. Example: "preview-templates"
|
|
36
55
|
* @property {number} version - The version number of the object. Example: 1.
|
|
37
|
-
* @property {
|
|
38
|
-
* @property {AttributeType} attributeValues - Attribute values from index. Example: .
|
|
39
|
-
* @property {string} attributeSetIdentifier - Text identifier used for a set of attributes. Example: 'attribute_set_1'.
|
|
40
|
-
* @property {string} title - The name of the template preview. Example: 'Product Template'.
|
|
56
|
+
* @property {AttributeType} attributeValues - Attribute values from index. Example: {}
|
|
41
57
|
* @property {number} position - The position of the object. Example: 1.
|
|
42
|
-
* @property {
|
|
43
|
-
* @property {IProportion | null} proportions.horizontal - Horizontal proportion of the template preview. Example:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
* @property {string | null} [attributeSetIdentifier] - Text identifier used for a set of attributes. Example: "attribute_set_1".
|
|
59
|
+
* @property {IProportion | null} proportions.horizontal - Horizontal proportion of the template preview. Example:
|
|
60
|
+
{
|
|
61
|
+
"width": 234,
|
|
62
|
+
"height": 324,
|
|
63
|
+
"alignmentType": "middleBottom"
|
|
64
|
+
}
|
|
65
|
+
* @property {IProportion | null} proportions.vertical - Vertical proportion of the template preview. Example:
|
|
66
|
+
{
|
|
67
|
+
"width": 2,
|
|
68
|
+
"height": 3,
|
|
69
|
+
"alignmentType": "leftTop"
|
|
70
|
+
}
|
|
71
|
+
* @property {ISquare} proportions.square - Square proportion of the template preview. Example:
|
|
72
|
+
{
|
|
73
|
+
"side": 3,
|
|
74
|
+
"alignmentType": "leftTop"
|
|
75
|
+
}
|
|
47
76
|
* @description This interface defines the structure of a template preview entity, including its identifiers, attributes, proportions, and title.
|
|
48
77
|
*/
|
|
49
78
|
interface ITemplatesPreviewEntity {
|
|
50
79
|
id: number;
|
|
51
|
-
|
|
52
|
-
identifier: string;
|
|
53
|
-
attributeValues: AttributeType;
|
|
54
|
-
attributeSetIdentifier?: string | null;
|
|
80
|
+
title: string;
|
|
55
81
|
proportions: {
|
|
56
82
|
default: {
|
|
57
83
|
horizontal: IProportion | null;
|
|
@@ -59,18 +85,19 @@ interface ITemplatesPreviewEntity {
|
|
|
59
85
|
square: ISquare;
|
|
60
86
|
};
|
|
61
87
|
};
|
|
62
|
-
|
|
88
|
+
identifier: string;
|
|
89
|
+
version: number;
|
|
90
|
+
attributeValues: AttributeType;
|
|
63
91
|
position: number;
|
|
64
92
|
isUsed: boolean;
|
|
93
|
+
attributeSetIdentifier?: string | null;
|
|
65
94
|
}
|
|
66
95
|
/**
|
|
67
96
|
* @interface IProportion
|
|
68
97
|
*
|
|
69
98
|
* @property {string | number | null} width - width of the template preview. Example: 100.
|
|
70
99
|
* @property {string | number | null} height - height of the template preview. Example: 200.
|
|
71
|
-
* @property {string}
|
|
72
|
-
* @property {string} alignmentType - alignment type of the template preview. Example: 'center'.
|
|
73
|
-
*
|
|
100
|
+
* @property {string} alignmentType - alignment type of the template preview. Example: "center".
|
|
74
101
|
* @description Represents a proportion object used in template previews.
|
|
75
102
|
*/
|
|
76
103
|
interface IProportion {
|
|
@@ -81,10 +108,8 @@ interface IProportion {
|
|
|
81
108
|
/**
|
|
82
109
|
* @interface ISquare
|
|
83
110
|
*
|
|
84
|
-
* @property {string} marker - Marker of the square template preview. Example: 'square_template_12345'.
|
|
85
111
|
* @property {number | string} side - Side length of the square template preview, can be a number or string. Example: 100.
|
|
86
|
-
* @property {string} alignmentType - Alignment type of the square template preview. Example:
|
|
87
|
-
*
|
|
112
|
+
* @property {string} alignmentType - Alignment type of the square template preview. Example: "center".
|
|
88
113
|
* @description Represents a square proportion object used in template previews.
|
|
89
114
|
*/
|
|
90
115
|
interface ISquare {
|
package/dist/users/usersApi.d.ts
CHANGED
|
@@ -17,11 +17,9 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
17
17
|
* @handleName getUser
|
|
18
18
|
*
|
|
19
19
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
20
|
-
*
|
|
21
20
|
* @return {IUserEntity} Returns a promise that resolves to the user entity object if successful; otherwise, returns an error object.
|
|
22
21
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
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.
|
|
22
|
+
* @description Getting the data of an authorized user. 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
23
|
*/
|
|
26
24
|
getUser(langCode?: string): Promise<IUserEntity | IError>;
|
|
27
25
|
/**
|
|
@@ -29,24 +27,50 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
29
27
|
*
|
|
30
28
|
* @handleName updateUser
|
|
31
29
|
*
|
|
32
|
-
* @param {
|
|
30
|
+
* @param {IUserBody} body - Request body. Example:
|
|
31
|
+
{
|
|
32
|
+
"formIdentifier": "reg",
|
|
33
|
+
"authData": [
|
|
34
|
+
{
|
|
35
|
+
"marker": "password",
|
|
36
|
+
"value": "12345"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"formData": {
|
|
40
|
+
"marker": "last_name",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"value": "Username"
|
|
43
|
+
},
|
|
44
|
+
"notificationData": {
|
|
45
|
+
"email": "example@oneentry.cloud",
|
|
46
|
+
"phonePush": ["+99999999999"],
|
|
47
|
+
"phoneSMS": "+99999999999"
|
|
48
|
+
},
|
|
49
|
+
"state": {}
|
|
50
|
+
}
|
|
33
51
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
34
|
-
*
|
|
35
52
|
* @return {boolean} Returns `true` if the user object was successfully updated; otherwise, returns an error object.
|
|
36
53
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
54
|
+
* @description Updating a single user object. 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
|
+
*/
|
|
56
|
+
updateUser(body: IUserBody, langCode?: string): Promise<boolean | IError>;
|
|
57
|
+
/**
|
|
58
|
+
* Archiving one user object (marked for deletion).
|
|
37
59
|
*
|
|
38
|
-
* @
|
|
60
|
+
* @handleName archiveUser
|
|
39
61
|
*
|
|
62
|
+
* @return {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
|
|
63
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
64
|
+
* @description Archiving one user object (marked for deletion). 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
65
|
*/
|
|
41
|
-
|
|
66
|
+
archiveUser(): Promise<boolean | IError>;
|
|
42
67
|
/**
|
|
43
|
-
* Delete a single user
|
|
68
|
+
* Delete a single user.
|
|
44
69
|
*
|
|
45
70
|
* @handleName deleteUser
|
|
46
71
|
*
|
|
47
72
|
* @return {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
|
|
48
73
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
49
|
-
*
|
|
50
74
|
* @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.
|
|
51
75
|
*/
|
|
52
76
|
deleteUser(): Promise<boolean | IError>;
|
|
@@ -56,10 +80,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
56
80
|
* @handleName addFCMToken
|
|
57
81
|
*
|
|
58
82
|
* @param {string} token - The cloud messaging token to be added. This token is used to identify the user's device for push notifications. Example: "fcm_token_1234567890abcdefg".
|
|
59
|
-
*
|
|
60
83
|
* @return {boolean} Returns `true` if the token was successfully added; otherwise, returns an error object.
|
|
61
84
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
62
|
-
*
|
|
63
85
|
* @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.
|
|
64
86
|
*/
|
|
65
87
|
addFCMToken(token: string): Promise<boolean | IError>;
|
|
@@ -69,10 +91,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
69
91
|
* @handleName deleteFCMToken
|
|
70
92
|
*
|
|
71
93
|
* @param {string} token - The cloud messaging token to be deleted. This token is used to identify the user's device for push notifications and will be removed. Example: "fcm_token_1234567890abcdefg".
|
|
72
|
-
*
|
|
73
94
|
* @return {boolean} Returns `true` if the token was successfully deleted; otherwise, returns an error object.
|
|
74
95
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
75
|
-
*
|
|
76
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.
|
|
77
97
|
*/
|
|
78
98
|
deleteFCMToken(token: string): Promise<boolean | IError>;
|