oneentry 1.0.173 → 1.0.174
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/changelog.md +23 -0
- package/dist/admins/adminsApi.d.ts +7 -7
- package/dist/admins/adminsApi.js +7 -7
- package/dist/admins/adminsInterfaces.d.ts +22 -22
- package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/dist/attribute-sets/attributeSetsApi.js +8 -8
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/dist/auth-provider/authProviderApi.d.ts +29 -29
- package/dist/auth-provider/authProviderApi.js +29 -29
- package/dist/auth-provider/authProvidersInterfaces.d.ts +52 -52
- package/dist/base/asyncModules.d.ts +6 -6
- package/dist/base/asyncModules.js +6 -6
- package/dist/base/syncModules.d.ts +1 -1
- package/dist/base/syncModules.js +1 -1
- package/dist/base/utils.d.ts +3 -3
- package/dist/blocks/blocksApi.d.ts +35 -35
- package/dist/blocks/blocksApi.js +35 -35
- package/dist/blocks/blocksInterfaces.d.ts +55 -55
- package/dist/discounts/discountsApi.d.ts +14 -14
- package/dist/discounts/discountsApi.js +14 -14
- package/dist/discounts/discountsInterfaces.d.ts +52 -52
- package/dist/events/eventsApi.d.ts +13 -13
- package/dist/events/eventsApi.js +13 -13
- package/dist/events/eventsInterfaces.d.ts +18 -18
- package/dist/file-uploading/fileUploadingApi.d.ts +14 -14
- package/dist/file-uploading/fileUploadingApi.js +14 -14
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- package/dist/filters/filtersApi.d.ts +1 -1
- package/dist/filters/filtersApi.js +1 -1
- package/dist/filters/filtersInterfaces.d.ts +7 -7
- package/dist/forms/formsApi.d.ts +3 -3
- package/dist/forms/formsApi.js +3 -3
- package/dist/forms/formsInterfaces.d.ts +42 -42
- package/dist/forms-data/formsDataApi.d.ts +14 -14
- package/dist/forms-data/formsDataApi.js +14 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +67 -68
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
- package/dist/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/dist/integration-collections/integrationCollectionsApi.js +20 -20
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- package/dist/locales/localesInterfaces.d.ts +8 -8
- package/dist/menus/menusApi.d.ts +1 -1
- package/dist/menus/menusApi.js +1 -1
- package/dist/menus/menusInterfaces.d.ts +12 -12
- package/dist/orders/ordersApi.d.ts +26 -26
- package/dist/orders/ordersApi.js +26 -26
- package/dist/orders/ordersInterfaces.d.ts +99 -99
- package/dist/pages/pagesApi.d.ts +6 -6
- package/dist/pages/pagesApi.js +6 -6
- package/dist/pages/pagesInterfaces.d.ts +46 -46
- package/dist/payments/paymentsApi.d.ts +8 -8
- package/dist/payments/paymentsApi.js +8 -8
- package/dist/payments/paymentsInterfaces.d.ts +31 -31
- package/dist/product-statuses/productStatusesApi.d.ts +2 -2
- package/dist/product-statuses/productStatusesApi.js +2 -2
- package/dist/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/dist/products/productsApi.d.ts +37 -37
- package/dist/products/productsApi.js +36 -36
- package/dist/products/productsInterfaces.d.ts +96 -96
- package/dist/search/searchApi.d.ts +3 -3
- package/dist/search/searchApi.js +3 -3
- package/dist/search/searchInterfaces.d.ts +4 -4
- package/dist/sitemap/sitemapApi.d.ts +1 -1
- package/dist/sitemap/sitemapApi.js +1 -1
- package/dist/sitemap/sitemapInterfaces.d.ts +2 -2
- package/dist/subscriptions/subscriptionsApi.d.ts +3 -3
- package/dist/subscriptions/subscriptionsApi.js +3 -3
- package/dist/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/dist/templates/templatesApi.d.ts +2 -2
- package/dist/templates/templatesApi.js +2 -2
- package/dist/templates/templatesInterfaces.d.ts +10 -10
- package/dist/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/dist/templates-preview/templatesPreviewApi.js +1 -1
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/dist/user-activity/userActivityApi.d.ts +1 -1
- package/dist/user-activity/userActivityApi.js +1 -1
- package/dist/user-activity/userActivityInterfaces.d.ts +4 -4
- package/dist/user-groups/userGroupsApi.d.ts +1 -1
- package/dist/user-groups/userGroupsApi.js +1 -1
- package/dist/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/dist/users/usersApi.d.ts +7 -7
- package/dist/users/usersApi.js +7 -7
- package/dist/users/usersInterfaces.d.ts +34 -34
- package/esm/admins/adminsApi.d.ts +7 -7
- package/esm/admins/adminsApi.js +7 -7
- package/esm/admins/adminsInterfaces.d.ts +22 -22
- package/esm/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/esm/attribute-sets/attributeSetsApi.js +8 -8
- package/esm/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/esm/auth-provider/authProviderApi.d.ts +29 -29
- package/esm/auth-provider/authProviderApi.js +29 -29
- package/esm/auth-provider/authProvidersInterfaces.d.ts +52 -52
- package/esm/base/asyncModules.d.ts +6 -6
- package/esm/base/asyncModules.js +6 -6
- package/esm/base/syncModules.d.ts +1 -1
- package/esm/base/syncModules.js +1 -1
- package/esm/base/utils.d.ts +3 -3
- package/esm/blocks/blocksApi.d.ts +35 -35
- package/esm/blocks/blocksApi.js +35 -35
- package/esm/blocks/blocksInterfaces.d.ts +55 -55
- package/esm/discounts/discountsApi.d.ts +14 -14
- package/esm/discounts/discountsApi.js +14 -14
- package/esm/discounts/discountsInterfaces.d.ts +52 -52
- package/esm/events/eventsApi.d.ts +13 -13
- package/esm/events/eventsApi.js +13 -13
- package/esm/events/eventsInterfaces.d.ts +18 -18
- package/esm/file-uploading/fileUploadingApi.d.ts +14 -14
- package/esm/file-uploading/fileUploadingApi.js +14 -14
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- package/esm/filters/filtersApi.d.ts +1 -1
- package/esm/filters/filtersApi.js +1 -1
- package/esm/filters/filtersInterfaces.d.ts +7 -7
- package/esm/forms/formsApi.d.ts +3 -3
- package/esm/forms/formsApi.js +3 -3
- package/esm/forms/formsInterfaces.d.ts +42 -42
- package/esm/forms-data/formsDataApi.d.ts +14 -14
- package/esm/forms-data/formsDataApi.js +14 -14
- package/esm/forms-data/formsDataInterfaces.d.ts +67 -68
- package/esm/general-types/generalTypesInterfaces.d.ts +2 -2
- package/esm/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/esm/integration-collections/integrationCollectionsApi.js +20 -20
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- package/esm/locales/localesInterfaces.d.ts +8 -8
- package/esm/menus/menusApi.d.ts +1 -1
- package/esm/menus/menusApi.js +1 -1
- package/esm/menus/menusInterfaces.d.ts +12 -12
- package/esm/orders/ordersApi.d.ts +26 -26
- package/esm/orders/ordersApi.js +26 -26
- package/esm/orders/ordersInterfaces.d.ts +99 -99
- package/esm/pages/pagesApi.d.ts +6 -6
- package/esm/pages/pagesApi.js +6 -6
- package/esm/pages/pagesInterfaces.d.ts +46 -46
- package/esm/payments/paymentsApi.d.ts +8 -8
- package/esm/payments/paymentsApi.js +8 -8
- package/esm/payments/paymentsInterfaces.d.ts +31 -31
- package/esm/product-statuses/productStatusesApi.d.ts +2 -2
- package/esm/product-statuses/productStatusesApi.js +2 -2
- package/esm/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/esm/products/productsApi.d.ts +37 -37
- package/esm/products/productsApi.js +36 -36
- package/esm/products/productsInterfaces.d.ts +96 -96
- package/esm/search/searchApi.d.ts +3 -3
- package/esm/search/searchApi.js +3 -3
- package/esm/search/searchInterfaces.d.ts +4 -4
- package/esm/sitemap/sitemapApi.d.ts +1 -1
- package/esm/sitemap/sitemapApi.js +1 -1
- package/esm/sitemap/sitemapInterfaces.d.ts +2 -2
- package/esm/subscriptions/subscriptionsApi.d.ts +3 -3
- package/esm/subscriptions/subscriptionsApi.js +3 -3
- package/esm/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/esm/templates/templatesApi.d.ts +2 -2
- package/esm/templates/templatesApi.js +2 -2
- package/esm/templates/templatesInterfaces.d.ts +10 -10
- package/esm/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/esm/templates-preview/templatesPreviewApi.js +1 -1
- package/esm/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/esm/user-activity/userActivityApi.d.ts +1 -1
- package/esm/user-activity/userActivityApi.js +1 -1
- package/esm/user-activity/userActivityInterfaces.d.ts +4 -4
- package/esm/user-groups/userGroupsApi.d.ts +1 -1
- package/esm/user-groups/userGroupsApi.js +1 -1
- package/esm/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/esm/users/usersApi.d.ts +7 -7
- package/esm/users/usersApi.js +7 -7
- package/esm/users/usersInterfaces.d.ts +34 -34
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ interface ISubscriptionsApi {
|
|
|
8
8
|
/**
|
|
9
9
|
* Create a new subscription and get a payment session for it.
|
|
10
10
|
* @handleName subscribe
|
|
11
|
-
* @param {ISubscribe} body - Subscription
|
|
11
|
+
* @param {ISubscribe} body - Subscription parameters. Example: `{ marker: "premium" }`.
|
|
12
12
|
* @returns {Promise<ICreatedSubscription | IError>} Returns the created payment session for the subscription.
|
|
13
13
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
14
14
|
* @description This method requires user authorization.
|
|
@@ -18,7 +18,7 @@ interface ISubscriptionsApi {
|
|
|
18
18
|
/**
|
|
19
19
|
* Cancel a subscription.
|
|
20
20
|
* @handleName cancelSubscription
|
|
21
|
-
* @param {ICancelSubscription} body - Subscription
|
|
21
|
+
* @param {ICancelSubscription} body - Subscription parameters. Example: `{ marker: "premium" }`.
|
|
22
22
|
* @returns {Promise<boolean | IError>} Returns true if the subscription was cancelled, or an error object if there was an issue.
|
|
23
23
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
24
24
|
* @description This method requires user authorization.
|
|
@@ -46,7 +46,7 @@ interface ISubscriptionsApi {
|
|
|
46
46
|
/**
|
|
47
47
|
* Recover a subscription through the Stripe Billing Portal.
|
|
48
48
|
* @handleName recoverSubscriptions
|
|
49
|
-
* @param {ICancelSubscription} body - Subscription
|
|
49
|
+
* @param {ICancelSubscription} body - Subscription parameters. Example: `{ marker: "premium" }`.
|
|
50
50
|
* @returns {Promise<boolean | IError>} Returns true if the recovery request was accepted, or an error object if there was an issue.
|
|
51
51
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
52
52
|
* @description This method requires user authorization.
|
|
@@ -57,7 +57,7 @@ interface ISubscriptionsApi {
|
|
|
57
57
|
/**
|
|
58
58
|
* Body for creating a subscription.
|
|
59
59
|
* @interface ISubscribe
|
|
60
|
-
* @property {string} marker -
|
|
60
|
+
* @property {string} marker - Marker of the subscription. Example: "premium".
|
|
61
61
|
* @description Body for creating a subscription.
|
|
62
62
|
*/
|
|
63
63
|
interface ISubscribe {
|
|
@@ -66,7 +66,7 @@ interface ISubscribe {
|
|
|
66
66
|
/**
|
|
67
67
|
* Body for cancelling or recovering a subscription.
|
|
68
68
|
* @interface ICancelSubscription
|
|
69
|
-
* @property {string} marker -
|
|
69
|
+
* @property {string} marker - Marker of the subscription. Example: "premium".
|
|
70
70
|
* @description Body for cancelling or recovering a subscription.
|
|
71
71
|
*/
|
|
72
72
|
interface ICancelSubscription {
|
|
@@ -75,7 +75,7 @@ interface ICancelSubscription {
|
|
|
75
75
|
/**
|
|
76
76
|
* Created subscription payment session.
|
|
77
77
|
* @interface ICreatedSubscription
|
|
78
|
-
* @property {number} id - Payment session
|
|
78
|
+
* @property {number} id - Payment session ID. Example: 1.
|
|
79
79
|
* @property {number} amount - Amount to be paid. Example: 100.
|
|
80
80
|
* @property {string} paymentUrl - Payment page URL. Example: "https://checkout.stripe.com/c/pay/...".
|
|
81
81
|
* @property {string} status - Payment session status. Example: "waiting".
|
|
@@ -90,13 +90,13 @@ interface ICreatedSubscription {
|
|
|
90
90
|
/**
|
|
91
91
|
* Available subscription.
|
|
92
92
|
* @interface ISubscriptionEntity
|
|
93
|
-
* @property {number} id - Subscription
|
|
94
|
-
* @property {string} identifier -
|
|
95
|
-
* @property {ILocalizeInfo} localizeInfos - Localized subscription
|
|
96
|
-
* @property {number[]} productIds -
|
|
93
|
+
* @property {number} id - Subscription ID. Example: 1.
|
|
94
|
+
* @property {string} identifier - Marker of the subscription. Example: "test_subscription".
|
|
95
|
+
* @property {ILocalizeInfo} localizeInfos - Localized data of the subscription in the current language. Example: `{ title: "Test subscription" }`.
|
|
96
|
+
* @property {number[]} productIds - IDs of the products included in the subscription. Example: [3445].
|
|
97
97
|
* @property {number} periodInDays - Subscription period in days. Example: 30.
|
|
98
98
|
* @property {number} paymentAccountId - Identifier of the payment account the subscription is billed through. Example: 1.
|
|
99
|
-
* @property {boolean} isUsed -
|
|
99
|
+
* @property {boolean} isUsed - Whether the subscription is in use. Example: false.
|
|
100
100
|
* @description Subscription configured in the project, returned by getAllSubscriptions.
|
|
101
101
|
*/
|
|
102
102
|
interface ISubscriptionEntity {
|
|
@@ -31,7 +31,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
31
31
|
/**
|
|
32
32
|
* Get template objects by type.
|
|
33
33
|
* @handleName getTemplateByType
|
|
34
|
-
* @param {BlockType} type -
|
|
34
|
+
* @param {BlockType} type - Type of templates to fetch. Example: "product".
|
|
35
35
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
36
36
|
* @returns {Promise<ITemplateEntity[] | IError>} Array of `ITemplateEntity` objects of the given type.
|
|
37
37
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -42,7 +42,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
42
42
|
/**
|
|
43
43
|
* Get one template object by marker.
|
|
44
44
|
* @handleName getTemplateByMarker
|
|
45
|
-
* @param {string} marker -
|
|
45
|
+
* @param {string} marker - Marker of the template to fetch. Example: "template_12345".
|
|
46
46
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
47
47
|
* @returns {Promise<ITemplateEntity | IError>} Returns an `ITemplateEntity` object
|
|
48
48
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -46,7 +46,7 @@ export default class TemplatesPreviewApi extends AsyncModules {
|
|
|
46
46
|
/**
|
|
47
47
|
* Get template objects by type.
|
|
48
48
|
* @handleName getTemplateByType
|
|
49
|
-
* @param {BlockType} type -
|
|
49
|
+
* @param {BlockType} type - Type of templates to fetch. Example: "product".
|
|
50
50
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
51
51
|
* @returns {Promise<ITemplateEntity[] | IError>} Array of `ITemplateEntity` objects of the given type.
|
|
52
52
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -62,7 +62,7 @@ export default class TemplatesPreviewApi extends AsyncModules {
|
|
|
62
62
|
/**
|
|
63
63
|
* Get one template object by marker.
|
|
64
64
|
* @handleName getTemplateByMarker
|
|
65
|
-
* @param {string} marker -
|
|
65
|
+
* @param {string} marker - Marker of the template to fetch. Example: "template_12345".
|
|
66
66
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
67
67
|
* @returns {Promise<ITemplateEntity | IError>} Returns an `ITemplateEntity` object
|
|
68
68
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -17,7 +17,7 @@ interface ITemplatesApi {
|
|
|
17
17
|
/**
|
|
18
18
|
* Get template objects by type.
|
|
19
19
|
* @handleName getTemplateByType
|
|
20
|
-
* @param {BlockType} type -
|
|
20
|
+
* @param {BlockType} type - Type of templates to fetch. Example: "product".
|
|
21
21
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
22
22
|
* @returns {ITemplateEntity[]} Array of `ITemplateEntity` objects of the given type.
|
|
23
23
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -27,7 +27,7 @@ interface ITemplatesApi {
|
|
|
27
27
|
/**
|
|
28
28
|
* Get one template object by id.
|
|
29
29
|
* @handleName getTemplateByMarker
|
|
30
|
-
* @param {string} marker -
|
|
30
|
+
* @param {string} marker - Marker of the template to fetch. Example: "template_12345".
|
|
31
31
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
32
32
|
* @returns {ITemplateEntity} Returns an `ITemplateEntity` object
|
|
33
33
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -38,20 +38,20 @@ interface ITemplatesApi {
|
|
|
38
38
|
/**
|
|
39
39
|
* The template entity interface
|
|
40
40
|
* @interface ITemplateEntity
|
|
41
|
-
* @property {number} id -
|
|
42
|
-
* @property {string | null} attributeSetIdentifier -
|
|
43
|
-
* @property {string} title -
|
|
44
|
-
* @property {number} generalTypeId -
|
|
45
|
-
* @property {string} identifier -
|
|
46
|
-
* @property {number} version -
|
|
41
|
+
* @property {number} id - ID of the object. Example: 12345.
|
|
42
|
+
* @property {string | null} attributeSetIdentifier - Marker of the attribute set, or `null` if none is assigned. Example: "attribute_set_1".
|
|
43
|
+
* @property {string} title - Name of the template. Example: "Product Template".
|
|
44
|
+
* @property {number} generalTypeId - ID of the general type. Example: 67890.
|
|
45
|
+
* @property {string} identifier - Text identifier (marker) of the object. Example: "template_12345".
|
|
46
|
+
* @property {number} version - Version number of the object; changes with each update. Example: 1.
|
|
47
47
|
* @property {BlockType} generalTypeName - General type name. Example: "product".
|
|
48
|
-
* @property {IAttributeValues} attributeValues -
|
|
48
|
+
* @property {IAttributeValues} attributeValues - Attribute values keyed by marker; an empty object when there are none.
|
|
49
49
|
* @example
|
|
50
50
|
{
|
|
51
51
|
"id": 1,
|
|
52
52
|
"value": "some"
|
|
53
53
|
}
|
|
54
|
-
* @property {number} position -
|
|
54
|
+
* @property {number} position - Position of the object, used for sorting. Example: 1.
|
|
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 {
|
|
@@ -29,7 +29,7 @@ export default class TemplatePreviewsApi extends AsyncModules implements ITempla
|
|
|
29
29
|
/**
|
|
30
30
|
* Retrieves a template object by its marker.
|
|
31
31
|
* @handleName getTemplatePreviewByMarker
|
|
32
|
-
* @param {string} marker -
|
|
32
|
+
* @param {string} marker - Marker of the template preview to fetch. Example: "template_12345".
|
|
33
33
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
34
34
|
* @returns {Promise<ITemplatesPreviewEntity | IError>} - A promise that resolves to a TemplatePreviewsEntity object representing the template.
|
|
35
35
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -34,7 +34,7 @@ export default class TemplatePreviewsApi extends AsyncModules {
|
|
|
34
34
|
/**
|
|
35
35
|
* Retrieves a template object by its marker.
|
|
36
36
|
* @handleName getTemplatePreviewByMarker
|
|
37
|
-
* @param {string} marker -
|
|
37
|
+
* @param {string} marker - Marker of the template preview to fetch. Example: "template_12345".
|
|
38
38
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
39
39
|
* @returns {Promise<ITemplatesPreviewEntity | IError>} - A promise that resolves to a TemplatePreviewsEntity object representing the template.
|
|
40
40
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -6,7 +6,7 @@ import type { IError } from '../base/utils.js';
|
|
|
6
6
|
interface ITemplatesPreviewApi {
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves all template preview objects.
|
|
9
|
-
* @param {string} langCode - Language code
|
|
9
|
+
* @param {string} langCode - Language code. Default: "en_US".
|
|
10
10
|
* @returns {ITemplatesPreviewEntity[]} A promise resolving to an array of template preview entities or an error.
|
|
11
11
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
12
12
|
*/
|
|
@@ -15,7 +15,7 @@ interface ITemplatesPreviewApi {
|
|
|
15
15
|
* Retrieves a specific template preview object by its marker.
|
|
16
16
|
* @handleName getTemplatePreviewByMarker
|
|
17
17
|
* @param {string} marker - The marker of the template preview. Example: "template_12345".
|
|
18
|
-
* @param {string} [langCode] - Language code
|
|
18
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
19
19
|
* @returns {ITemplatesPreviewEntity | IError} A promise resolving to the template preview entity or an error.
|
|
20
20
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
21
21
|
* @description This method retrieves a specific template preview object by its marker.
|
|
@@ -25,9 +25,9 @@ interface ITemplatesPreviewApi {
|
|
|
25
25
|
/**
|
|
26
26
|
* The `ITemplatesPreview` interface defines the structure of template preview entities.
|
|
27
27
|
* @interface ITemplatesPreviewEntity
|
|
28
|
-
* @property {number} id -
|
|
29
|
-
* @property {string} title -
|
|
30
|
-
* @property {object} proportions -
|
|
28
|
+
* @property {number} id - ID of the object. Example: 3.
|
|
29
|
+
* @property {string} title - Name of the preview template. Example: "Product Template".
|
|
30
|
+
* @property {object} proportions - Preview proportions: the horizontal, vertical and square variants.
|
|
31
31
|
* @example
|
|
32
32
|
{
|
|
33
33
|
"default": {
|
|
@@ -47,30 +47,30 @@ interface ITemplatesPreviewApi {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
* @property {IProportion | null} proportions.horizontal - Horizontal proportion of the
|
|
50
|
+
* @property {IProportion | null} proportions.horizontal - Horizontal proportion of the preview.
|
|
51
51
|
* @example
|
|
52
52
|
{
|
|
53
53
|
"width": 234,
|
|
54
54
|
"height": 324,
|
|
55
55
|
"alignmentType": "middleBottom"
|
|
56
56
|
}
|
|
57
|
-
* @property {IProportion | null} proportions.vertical - Vertical
|
|
57
|
+
* @property {IProportion | null} proportions.vertical - Vertical variant of the preview, or `null`.
|
|
58
58
|
* @example
|
|
59
59
|
{
|
|
60
60
|
"width": 2,
|
|
61
61
|
"height": 3,
|
|
62
62
|
"alignmentType": "leftTop"
|
|
63
63
|
}
|
|
64
|
-
* @property {ISquare} proportions.square - Square
|
|
64
|
+
* @property {ISquare} proportions.square - Square variant of the preview.
|
|
65
65
|
* @example
|
|
66
66
|
{
|
|
67
67
|
"side": 3,
|
|
68
68
|
"alignmentType": "leftTop"
|
|
69
69
|
}
|
|
70
|
-
* @property {string} identifier -
|
|
71
|
-
* @property {number} version -
|
|
72
|
-
* @property {number} position -
|
|
73
|
-
* @property {boolean} isUsed -
|
|
70
|
+
* @property {string} identifier - Text identifier (marker) of the object. Example: "preview-templates"
|
|
71
|
+
* @property {number} version - Version number of the object; changes with each update. Example: 1.
|
|
72
|
+
* @property {number} position - Position of the object, used for sorting. Example: 1.
|
|
73
|
+
* @property {boolean} isUsed - Whether the template preview is in use. Example: true.
|
|
74
74
|
* @description This interface defines the structure of a template preview entity, including its identifiers, attributes, proportions, and title.
|
|
75
75
|
*/
|
|
76
76
|
interface ITemplatesPreviewEntity {
|
|
@@ -105,9 +105,9 @@ interface ITemplatesPreviewProportionVariants {
|
|
|
105
105
|
/**
|
|
106
106
|
* The `IProportion` interface defines the structure of a proportion object used in template previews.
|
|
107
107
|
* @interface IProportion
|
|
108
|
-
* @property {string | number | null} width -
|
|
109
|
-
* @property {string | number | null} height -
|
|
110
|
-
* @property {string} alignmentType -
|
|
108
|
+
* @property {string | number | null} width - Width of the preview. Example: 100.
|
|
109
|
+
* @property {string | number | null} height - Height of the preview. Example: 200.
|
|
110
|
+
* @property {string} alignmentType - Alignment of the preview, such as `center`. Example: "center".
|
|
111
111
|
* @description Represents a proportion object used in template previews.
|
|
112
112
|
*/
|
|
113
113
|
interface IProportion {
|
|
@@ -118,8 +118,8 @@ interface IProportion {
|
|
|
118
118
|
/**
|
|
119
119
|
* The `ISquare` interface defines the structure of a square proportion object used in template previews.
|
|
120
120
|
* @interface ISquare
|
|
121
|
-
* @property {number | string} side - Side length of the square
|
|
122
|
-
* @property {string} alignmentType - Alignment
|
|
121
|
+
* @property {number | string} side - Side length of the square preview, as a number or a string. Example: 100.
|
|
122
|
+
* @property {string} alignmentType - Alignment of the square preview, such as `center`. Example: "center".
|
|
123
123
|
* @description Represents a square proportion object used in template previews.
|
|
124
124
|
*/
|
|
125
125
|
interface ISquare {
|
|
@@ -21,7 +21,7 @@ export default class UserActivityApi extends AsyncModules implements IUserActivi
|
|
|
21
21
|
/**
|
|
22
22
|
* Track a user or guest activity event.
|
|
23
23
|
* @handleName trackUserActivity
|
|
24
|
-
* @param {ITrackActivity} body - Activity event
|
|
24
|
+
* @param {ITrackActivity} body - Activity event to record. Example: `{ type: "product_view", productId: 12345 }`.
|
|
25
25
|
* @returns {Promise<boolean | IError>} Returns true if the event was recorded, or an error object if there was an issue.
|
|
26
26
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
27
27
|
* @description Records an activity event for the current authorized user or guest.
|
|
@@ -19,7 +19,7 @@ export default class UserActivityApi extends AsyncModules {
|
|
|
19
19
|
/**
|
|
20
20
|
* Track a user or guest activity event.
|
|
21
21
|
* @handleName trackUserActivity
|
|
22
|
-
* @param {ITrackActivity} body - Activity event
|
|
22
|
+
* @param {ITrackActivity} body - Activity event to record. Example: `{ type: "product_view", productId: 12345 }`.
|
|
23
23
|
* @returns {Promise<boolean | IError>} Returns true if the event was recorded, or an error object if there was an issue.
|
|
24
24
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
25
25
|
* @description Records an activity event for the current authorized user or guest.
|
|
@@ -8,7 +8,7 @@ interface IUserActivityApi {
|
|
|
8
8
|
/**
|
|
9
9
|
* Track a user or guest activity event.
|
|
10
10
|
* @handleName trackUserActivity
|
|
11
|
-
* @param {ITrackActivity} body - Activity event
|
|
11
|
+
* @param {ITrackActivity} body - Activity event to record. Example: `{ type: "product_view", productId: 12345 }`.
|
|
12
12
|
* @returns {Promise<boolean | IError>} Returns true if the event was recorded, or an error object if there was an issue.
|
|
13
13
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
14
14
|
* @description Records an activity event for the current authorized user or guest.
|
|
@@ -24,9 +24,9 @@ type TUserActivityType = 'product_view' | 'page_view' | 'category_view' | 'searc
|
|
|
24
24
|
* Body for tracking a user activity event.
|
|
25
25
|
* @interface ITrackActivity
|
|
26
26
|
* @property {TUserActivityType} type - Activity event type. Example: "product_view".
|
|
27
|
-
* @property {number} [productId] - Product
|
|
28
|
-
* @property {number} [pageId] -
|
|
29
|
-
* @property {number} [categoryId] -
|
|
27
|
+
* @property {number} [productId] - Product ID. Example: 12345.
|
|
28
|
+
* @property {number} [pageId] - ID of the page, for `page_view` and `category_view` events. Example: 7.
|
|
29
|
+
* @property {number} [categoryId] - Category ID (legacy). Example: 67.
|
|
30
30
|
* @property {string} [query] - Search query (for type=search). Example: "iphone case".
|
|
31
31
|
* @property {Record<string, unknown>} [meta] - Arbitrary meta information (source block, A/B variant, scroll-depth).
|
|
32
32
|
* @description Body for tracking a user activity event.
|
|
@@ -47,7 +47,7 @@ export default class UserGroupsApi extends AsyncModules implements IUserGroups {
|
|
|
47
47
|
/**
|
|
48
48
|
* Get a single user group object by its identifier.
|
|
49
49
|
* @handleName getUserGroupById
|
|
50
|
-
* @param {number} id -
|
|
50
|
+
* @param {number} id - User group ID. Example: 1.
|
|
51
51
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
52
52
|
* @returns {Promise<IUserGroupEntity | IError>} Returns a single user group object.
|
|
53
53
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -57,7 +57,7 @@ export default class UserGroupsApi extends AsyncModules {
|
|
|
57
57
|
/**
|
|
58
58
|
* Get a single user group object by its identifier.
|
|
59
59
|
* @handleName getUserGroupById
|
|
60
|
-
* @param {number} id -
|
|
60
|
+
* @param {number} id - User group ID. Example: 1.
|
|
61
61
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
62
62
|
* @returns {Promise<IUserGroupEntity | IError>} Returns a single user group object.
|
|
63
63
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -27,7 +27,7 @@ interface IUserGroups {
|
|
|
27
27
|
/**
|
|
28
28
|
* Get a single user group object by its identifier.
|
|
29
29
|
* @handleName getUserGroupById
|
|
30
|
-
* @param {number} id -
|
|
30
|
+
* @param {number} id - User group ID. Example: 1.
|
|
31
31
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
32
32
|
* @returns {IUserGroupEntity} Returns a single user group object.
|
|
33
33
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -58,12 +58,12 @@ interface IUserGroups {
|
|
|
58
58
|
/**
|
|
59
59
|
* The `IUserGroupEntity` interface defines the structure of a user group object.
|
|
60
60
|
* @interface IUserGroupEntity
|
|
61
|
-
* @property {number} id -
|
|
61
|
+
* @property {number} id - User group ID. Example: 1.
|
|
62
62
|
* @property {number} depth - Nesting depth relative to the parent. Example: 0.
|
|
63
63
|
* @property {number | null} parentId - Identifier of the parent group, `null` for a top-level group. Example: null.
|
|
64
|
-
* @property {ILocalizeInfo} localizeInfos -
|
|
65
|
-
* @property {boolean} isVisible -
|
|
66
|
-
* @property {string} childrenCount - Number of child groups. The API sends it as a
|
|
64
|
+
* @property {ILocalizeInfo} localizeInfos - Localized title of the group.
|
|
65
|
+
* @property {boolean} isVisible - Whether the group is visible. Example: true.
|
|
66
|
+
* @property {string} childrenCount - Number of child groups. The API sends it as a string, not a number. Example: "0".
|
|
67
67
|
* @property {string} identifier - Text identifier (marker) of the group. Example: "guest".
|
|
68
68
|
* @property {boolean} isSync - Synchronization flag. Example: false.
|
|
69
69
|
* @property {IAttributeValues} attributeValues - Attribute values of the group.
|
package/esm/users/usersApi.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export default class UsersApi extends AsyncModules implements IUsersApi {
|
|
|
127
127
|
/**
|
|
128
128
|
* Adds an FCM (Firebase Cloud Messaging) token for sending push notifications.
|
|
129
129
|
* @handleName addFCMToken
|
|
130
|
-
* @param {string} token -
|
|
130
|
+
* @param {string} token - Firebase Cloud Messaging token that identifies the user's device for push notifications. Example: "fcm_token_1234567890abcdefg".
|
|
131
131
|
* @returns {Promise<boolean | IError>} Returns `true` if the token was successfully added; otherwise, returns an error object.
|
|
132
132
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
133
133
|
* @description This method adds an FCM token for sending push notifications. This method requires user authorization.
|
|
@@ -138,7 +138,7 @@ export default class UsersApi extends AsyncModules implements IUsersApi {
|
|
|
138
138
|
/**
|
|
139
139
|
* Deletes an FCM (Firebase Cloud Messaging) token.
|
|
140
140
|
* @handleName deleteFCMToken
|
|
141
|
-
* @param {string} token -
|
|
141
|
+
* @param {string} token - Firebase Cloud Messaging token to remove from the user's devices. Example: "fcm_token_1234567890abcdefg".
|
|
142
142
|
* @returns {Promise<boolean | IError>} Returns `true` if the token was successfully deleted; otherwise, returns an error object.
|
|
143
143
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
144
144
|
* @description This method deletes an existing FCM token. This method requires user authorization.
|
|
@@ -181,7 +181,7 @@ export default class UsersApi extends AsyncModules implements IUsersApi {
|
|
|
181
181
|
/**
|
|
182
182
|
* Remove an item from the cart.
|
|
183
183
|
* @handleName removeCartItem
|
|
184
|
-
* @param {number} productId - Product
|
|
184
|
+
* @param {number} productId - Product ID. Example: 12345.
|
|
185
185
|
* @returns {Promise<ICartResponse | IError>} Returns the updated cart.
|
|
186
186
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
187
187
|
* @description This method requires user authorization (or a guest context).
|
|
@@ -224,7 +224,7 @@ export default class UsersApi extends AsyncModules implements IUsersApi {
|
|
|
224
224
|
/**
|
|
225
225
|
* Remove an item from the wishlist.
|
|
226
226
|
* @handleName removeWishlistItem
|
|
227
|
-
* @param {number} productId - Product
|
|
227
|
+
* @param {number} productId - Product ID. Example: 12345.
|
|
228
228
|
* @returns {Promise<IWishlistResponse | IError>} Returns the updated wishlist.
|
|
229
229
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
230
230
|
* @description This method requires user authorization (or a guest context).
|
|
@@ -235,10 +235,10 @@ export default class UsersApi extends AsyncModules implements IUsersApi {
|
|
|
235
235
|
/**
|
|
236
236
|
* Semantic (vector) search for users.
|
|
237
237
|
* @handleName getUsersByVectorSearch
|
|
238
|
-
* @param {IUsersVectorSearch} body - Vector search
|
|
238
|
+
* @param {IUsersVectorSearch} body - Vector search parameters. Example: `{ queryText: "john" }`.
|
|
239
239
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
240
|
-
* @param {number} [offset] -
|
|
241
|
-
* @param {number} [limit] -
|
|
240
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
241
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
242
242
|
* @returns {Promise<IVectorSearchResponse<IUsersResponse> | IError>} Returns an object with an array of found users and total count.
|
|
243
243
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
244
244
|
* @description This method performs a semantic (vector) search for users. It requires user authorization.
|
package/esm/users/usersApi.js
CHANGED
|
@@ -144,7 +144,7 @@ export default class UsersApi extends AsyncModules {
|
|
|
144
144
|
/**
|
|
145
145
|
* Adds an FCM (Firebase Cloud Messaging) token for sending push notifications.
|
|
146
146
|
* @handleName addFCMToken
|
|
147
|
-
* @param {string} token -
|
|
147
|
+
* @param {string} token - Firebase Cloud Messaging token that identifies the user's device for push notifications. Example: "fcm_token_1234567890abcdefg".
|
|
148
148
|
* @returns {Promise<boolean | IError>} Returns `true` if the token was successfully added; otherwise, returns an error object.
|
|
149
149
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
150
150
|
* @description This method adds an FCM token for sending push notifications. This method requires user authorization.
|
|
@@ -158,7 +158,7 @@ export default class UsersApi extends AsyncModules {
|
|
|
158
158
|
/**
|
|
159
159
|
* Deletes an FCM (Firebase Cloud Messaging) token.
|
|
160
160
|
* @handleName deleteFCMToken
|
|
161
|
-
* @param {string} token -
|
|
161
|
+
* @param {string} token - Firebase Cloud Messaging token to remove from the user's devices. Example: "fcm_token_1234567890abcdefg".
|
|
162
162
|
* @returns {Promise<boolean | IError>} Returns `true` if the token was successfully deleted; otherwise, returns an error object.
|
|
163
163
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
164
164
|
* @description This method deletes an existing FCM token. This method requires user authorization.
|
|
@@ -216,7 +216,7 @@ export default class UsersApi extends AsyncModules {
|
|
|
216
216
|
/**
|
|
217
217
|
* Remove an item from the cart.
|
|
218
218
|
* @handleName removeCartItem
|
|
219
|
-
* @param {number} productId - Product
|
|
219
|
+
* @param {number} productId - Product ID. Example: 12345.
|
|
220
220
|
* @returns {Promise<ICartResponse | IError>} Returns the updated cart.
|
|
221
221
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
222
222
|
* @description This method requires user authorization (or a guest context).
|
|
@@ -275,7 +275,7 @@ export default class UsersApi extends AsyncModules {
|
|
|
275
275
|
/**
|
|
276
276
|
* Remove an item from the wishlist.
|
|
277
277
|
* @handleName removeWishlistItem
|
|
278
|
-
* @param {number} productId - Product
|
|
278
|
+
* @param {number} productId - Product ID. Example: 12345.
|
|
279
279
|
* @returns {Promise<IWishlistResponse | IError>} Returns the updated wishlist.
|
|
280
280
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
281
281
|
* @description This method requires user authorization (or a guest context).
|
|
@@ -290,10 +290,10 @@ export default class UsersApi extends AsyncModules {
|
|
|
290
290
|
/**
|
|
291
291
|
* Semantic (vector) search for users.
|
|
292
292
|
* @handleName getUsersByVectorSearch
|
|
293
|
-
* @param {IUsersVectorSearch} body - Vector search
|
|
293
|
+
* @param {IUsersVectorSearch} body - Vector search parameters. Example: `{ queryText: "john" }`.
|
|
294
294
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
295
|
-
* @param {number} [offset] -
|
|
296
|
-
* @param {number} [limit] -
|
|
295
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
296
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
297
297
|
* @returns {Promise<IVectorSearchResponse<IUsersResponse> | IError>} Returns an object with an array of found users and total count.
|
|
298
298
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
299
299
|
* @description This method performs a semantic (vector) search for users. It requires user authorization.
|