oneentry 1.0.156 → 1.0.158
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 +143 -0
- package/dist/attribute-sets/attributeSetsApi.d.ts +2 -2
- package/dist/attribute-sets/attributeSetsApi.js +5 -5
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +20 -8
- package/dist/auth-provider/authProviderSchemas.d.ts +2 -0
- package/dist/auth-provider/authProviderSchemas.js +2 -0
- package/dist/auth-provider/authProvidersInterfaces.d.ts +4 -0
- package/dist/base/asyncModules.d.ts +18 -2
- package/dist/base/asyncModules.js +32 -8
- package/dist/base/syncModules.d.ts +37 -36
- package/dist/base/syncModules.js +69 -82
- package/dist/base/timeIntervals.js +6 -5
- package/dist/base/utils.d.ts +14 -10
- package/dist/blocks/blocksApi.d.ts +21 -21
- package/dist/blocks/blocksApi.js +10 -10
- package/dist/blocks/blocksInterfaces.d.ts +20 -20
- package/dist/blocks/blocksSchemas.d.ts +2 -0
- package/dist/discounts/discountsInterfaces.d.ts +4 -4
- package/dist/events/eventsApi.d.ts +3 -3
- package/dist/events/eventsApi.js +1 -1
- package/dist/events/eventsInterfaces.d.ts +16 -5
- package/dist/forms/formsApi.js +2 -2
- package/dist/forms/formsInterfaces.d.ts +23 -21
- package/dist/forms-data/formsDataApi.js +2 -2
- package/dist/forms-data/formsDataInterfaces.d.ts +4 -4
- package/dist/integration-collections/integrationCollectionsApi.js +6 -6
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +4 -0
- package/dist/integration-collections/integrationCollectionsSchemas.d.ts +4 -0
- package/dist/integration-collections/integrationCollectionsSchemas.js +2 -0
- package/dist/menus/menusApi.js +1 -1
- package/dist/orders/ordersInterfaces.d.ts +21 -3
- package/dist/orders/ordersSchemas.d.ts +10 -0
- package/dist/orders/ordersSchemas.js +12 -0
- package/dist/pages/pagesApi.d.ts +4 -4
- package/dist/pages/pagesApi.js +10 -9
- package/dist/pages/pagesInterfaces.d.ts +14 -4
- package/dist/pages/pagesSchemas.d.ts +15 -0
- package/dist/pages/pagesSchemas.js +13 -1
- package/dist/products/productsApi.d.ts +6 -6
- package/dist/products/productsApi.js +13 -11
- package/dist/products/productsInterfaces.d.ts +39 -19
- package/dist/products/productsSchemas.d.ts +18 -0
- package/dist/products/productsSchemas.js +15 -1
- package/dist/subscriptions/subscriptionsApi.d.ts +4 -4
- package/dist/subscriptions/subscriptionsApi.js +3 -3
- package/dist/subscriptions/subscriptionsInterfaces.d.ts +26 -5
- package/dist/subscriptions/subscriptionsSchemas.d.ts +27 -1
- package/dist/subscriptions/subscriptionsSchemas.js +20 -2
- package/package.json +1 -1
|
@@ -59,10 +59,10 @@ interface IBlocks {
|
|
|
59
59
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
60
60
|
* @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
|
|
61
61
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
62
|
-
* @returns {
|
|
62
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
63
63
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
64
64
|
*/
|
|
65
|
-
getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<
|
|
65
|
+
getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
|
|
66
66
|
/**
|
|
67
67
|
* Get "complete your cart" products by an explicit list of productIds (POST body).
|
|
68
68
|
* @handleName getCartComplementByProductIds
|
|
@@ -73,10 +73,10 @@ interface IBlocks {
|
|
|
73
73
|
"productIds": [1, 2],
|
|
74
74
|
"langCode": "en_US"
|
|
75
75
|
}
|
|
76
|
-
* @returns {
|
|
76
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
77
77
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
78
78
|
*/
|
|
79
|
-
getCartComplementByProductIds(marker: string, body: IBlockProductsLookup): Promise<
|
|
79
|
+
getCartComplementByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
|
|
80
80
|
/**
|
|
81
81
|
* Get "similar to cart" products by the cart from context (auth user or guest).
|
|
82
82
|
* @handleName getCartSimilar
|
|
@@ -84,10 +84,10 @@ interface IBlocks {
|
|
|
84
84
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
85
85
|
* @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
|
|
86
86
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
87
|
-
* @returns {
|
|
87
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
88
88
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
89
89
|
*/
|
|
90
|
-
getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<
|
|
90
|
+
getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
|
|
91
91
|
/**
|
|
92
92
|
* Get "similar to cart" products by an explicit list of productIds (POST body).
|
|
93
93
|
* @handleName getCartSimilarByProductIds
|
|
@@ -98,10 +98,10 @@ interface IBlocks {
|
|
|
98
98
|
"productIds": [1, 2],
|
|
99
99
|
"langCode": "en_US"
|
|
100
100
|
}
|
|
101
|
-
* @returns {
|
|
101
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
102
102
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
103
103
|
*/
|
|
104
|
-
getCartSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<
|
|
104
|
+
getCartSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
|
|
105
105
|
/**
|
|
106
106
|
* Get personal recommendations for the user.
|
|
107
107
|
* @handleName getPersonalRecommendations
|
|
@@ -109,10 +109,10 @@ interface IBlocks {
|
|
|
109
109
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
110
110
|
* @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
|
|
111
111
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
112
|
-
* @returns {
|
|
112
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
113
113
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
114
114
|
*/
|
|
115
|
-
getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<
|
|
115
|
+
getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
|
|
116
116
|
/**
|
|
117
117
|
* Get recently viewed products.
|
|
118
118
|
* @handleName getRecentlyViewed
|
|
@@ -120,10 +120,10 @@ interface IBlocks {
|
|
|
120
120
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
121
121
|
* @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
|
|
122
122
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
123
|
-
* @returns {
|
|
123
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
124
124
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
125
125
|
*/
|
|
126
|
-
getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<
|
|
126
|
+
getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
|
|
127
127
|
/**
|
|
128
128
|
* Get products for repeat purchase.
|
|
129
129
|
* @handleName getRepeatPurchase
|
|
@@ -131,10 +131,10 @@ interface IBlocks {
|
|
|
131
131
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
132
132
|
* @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
|
|
133
133
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
134
|
-
* @returns {
|
|
134
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
135
135
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
136
136
|
*/
|
|
137
|
-
getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<
|
|
137
|
+
getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
|
|
138
138
|
/**
|
|
139
139
|
* Get the block's slides tree as a flat pre-order array (slider_block only).
|
|
140
140
|
* @handleName getSlides
|
|
@@ -150,10 +150,10 @@ interface IBlocks {
|
|
|
150
150
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
151
151
|
* @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
|
|
152
152
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
153
|
-
* @returns {
|
|
153
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
154
154
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
155
155
|
*/
|
|
156
|
-
getTrending(marker: string, langCode?: string, signPrice?: string): Promise<
|
|
156
|
+
getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
|
|
157
157
|
/**
|
|
158
158
|
* Get "similar to wishlist" products by the wishlist from context (auth user or guest).
|
|
159
159
|
* @handleName getWishlistSimilar
|
|
@@ -161,10 +161,10 @@ interface IBlocks {
|
|
|
161
161
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
162
162
|
* @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
|
|
163
163
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
164
|
-
* @returns {
|
|
164
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
165
165
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
166
166
|
*/
|
|
167
|
-
getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<
|
|
167
|
+
getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
|
|
168
168
|
/**
|
|
169
169
|
* Get "similar to wishlist" products by an explicit list of productIds (POST body).
|
|
170
170
|
* @handleName getWishlistSimilarByProductIds
|
|
@@ -175,10 +175,10 @@ interface IBlocks {
|
|
|
175
175
|
"productIds": [1, 2],
|
|
176
176
|
"langCode": "en_US"
|
|
177
177
|
}
|
|
178
|
-
* @returns {
|
|
178
|
+
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
179
179
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
180
180
|
*/
|
|
181
|
-
getWishlistSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<
|
|
181
|
+
getWishlistSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
184
|
* Represents a response from the blocks API.
|
|
@@ -53,6 +53,7 @@ export declare const BlockEntitySchema: z.ZodObject<{
|
|
|
53
53
|
discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
54
54
|
}, z.core.$strip>>;
|
|
55
55
|
total: z.ZodNumber;
|
|
56
|
+
totalFound: z.ZodOptional<z.ZodNumber>;
|
|
56
57
|
}, z.core.$strip>>;
|
|
57
58
|
countElementsPerRow: z.ZodOptional<z.ZodNumber>;
|
|
58
59
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -149,6 +150,7 @@ export declare const BlocksResponseSchema: z.ZodObject<{
|
|
|
149
150
|
discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
150
151
|
}, z.core.$strip>>;
|
|
151
152
|
total: z.ZodNumber;
|
|
153
|
+
totalFound: z.ZodOptional<z.ZodNumber>;
|
|
152
154
|
}, z.core.$strip>>;
|
|
153
155
|
countElementsPerRow: z.ZodOptional<z.ZodNumber>;
|
|
154
156
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -88,7 +88,7 @@ interface IDiscountCondition {
|
|
|
88
88
|
* Represents a discount entity.
|
|
89
89
|
* @interface IDiscountsEntity
|
|
90
90
|
* @property {number} id - The unique identifier of the discount.
|
|
91
|
-
* @property {number} [attributeSetId] - The identifier of the discount.
|
|
91
|
+
* @property {number | null} [attributeSetId] - The identifier of the attribute set linked to the discount, or `null` when no set is linked.
|
|
92
92
|
* @property {ILocalizeInfo} [localizeInfos] - The name of the discount.
|
|
93
93
|
* @property {number} [version] - The version of the discount.
|
|
94
94
|
* @property {string} [identifier] - The identifier of the discount.
|
|
@@ -111,7 +111,7 @@ interface IDiscountCondition {
|
|
|
111
111
|
*/
|
|
112
112
|
interface IDiscountsEntity {
|
|
113
113
|
id: number;
|
|
114
|
-
attributeSetId?: number;
|
|
114
|
+
attributeSetId?: number | null;
|
|
115
115
|
localizeInfos?: ILocalizeInfo;
|
|
116
116
|
version?: number;
|
|
117
117
|
identifier?: string;
|
|
@@ -137,14 +137,14 @@ interface IDiscountsEntity {
|
|
|
137
137
|
* @property {'TO_PRODUCT' | 'TO_ORDER'} applicability - What the discount applies to. Example: "TO_PRODUCT".
|
|
138
138
|
* @property {'FIXED_AMOUNT' | 'PERCENT'} discountType - How the discount value is interpreted. Example: "FIXED_AMOUNT".
|
|
139
139
|
* @property {number} value - Discount amount (currency units for FIXED_AMOUNT, percentage points for PERCENT). Example: 10.
|
|
140
|
-
* @property {number} [maxAmount] -
|
|
140
|
+
* @property {number | null} [maxAmount] - Cap on the absolute discount applied, or `null` when uncapped. Example: 5.
|
|
141
141
|
* @description Configuration of the discount calculation.
|
|
142
142
|
*/
|
|
143
143
|
interface IDiscountValue {
|
|
144
144
|
applicability: 'TO_PRODUCT' | 'TO_ORDER';
|
|
145
145
|
discountType: 'FIXED_AMOUNT' | 'PERCENT';
|
|
146
146
|
value: number;
|
|
147
|
-
maxAmount?: number;
|
|
147
|
+
maxAmount?: number | null;
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* @interface ICouponEntity
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import AsyncModules from '../base/asyncModules';
|
|
2
2
|
import type StateModule from '../base/stateModule';
|
|
3
3
|
import type { IError } from '../base/utils';
|
|
4
|
-
import type { IContentApiEvent, IEvents,
|
|
4
|
+
import type { IContentApiEvent, IEvents, IFormSubscriptionsResponse, ISubscribeFormEvent, ISubscriptions } from './eventsInterfaces';
|
|
5
5
|
/**
|
|
6
6
|
* Controllers for working with events
|
|
7
7
|
* @handle /api/content/events
|
|
@@ -86,13 +86,13 @@ export default class EventsApi extends AsyncModules implements IEvents {
|
|
|
86
86
|
* @handleName getFormSubscriptions
|
|
87
87
|
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
88
88
|
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
89
|
-
* @returns {Promise<
|
|
89
|
+
* @returns {Promise<IFormSubscriptionsResponse | IError>} Returns an object with an array of form subscriptions and total count.
|
|
90
90
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
91
91
|
* @description This method requires user authorization.
|
|
92
92
|
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
93
93
|
* @see {@link https://js-sdk.oneentry.cloud/docs/events/getFormSubscriptions getFormSubscriptions} documentation.
|
|
94
94
|
*/
|
|
95
|
-
getFormSubscriptions(offset?: number, limit?: number): Promise<
|
|
95
|
+
getFormSubscriptions(offset?: number, limit?: number): Promise<IFormSubscriptionsResponse | IError>;
|
|
96
96
|
/**
|
|
97
97
|
* Unsubscribe from form notifications by marker.
|
|
98
98
|
* @handleName unsubscribeFromForm
|
package/dist/events/eventsApi.js
CHANGED
|
@@ -115,7 +115,7 @@ class EventsApi extends asyncModules_1.default {
|
|
|
115
115
|
* @handleName getFormSubscriptions
|
|
116
116
|
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
117
117
|
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
118
|
-
* @returns {Promise<
|
|
118
|
+
* @returns {Promise<IFormSubscriptionsResponse | IError>} Returns an object with an array of form subscriptions and total count.
|
|
119
119
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
120
120
|
* @description This method requires user authorization.
|
|
121
121
|
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
@@ -61,12 +61,12 @@ interface IEvents {
|
|
|
61
61
|
* @handleName getFormSubscriptions
|
|
62
62
|
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
63
63
|
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
64
|
-
* @returns {Promise<
|
|
64
|
+
* @returns {Promise<IFormSubscriptionsResponse | IError>} A promise that resolves to an object with an array of form subscriptions and total count, or an error.
|
|
65
65
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
66
66
|
* @description This method returns all form subscriptions. This method requires user authorization.
|
|
67
67
|
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
68
68
|
*/
|
|
69
|
-
getFormSubscriptions(offset?: number, limit?: number): Promise<
|
|
69
|
+
getFormSubscriptions(offset?: number, limit?: number): Promise<IFormSubscriptionsResponse | IError>;
|
|
70
70
|
/**
|
|
71
71
|
* Unsubscribe from form notifications by marker.
|
|
72
72
|
* @handleName unsubscribeFromForm
|
|
@@ -131,14 +131,14 @@ interface ISubscribeBody {
|
|
|
131
131
|
* @property {number} id - Event identifier. Example: 1.
|
|
132
132
|
* @property {string} identifier - Event text identifier. Example: "price_change".
|
|
133
133
|
* @property {Record<string, unknown>} localizeInfos - Localized info of the event.
|
|
134
|
-
* @property {string} module - Module the event belongs to. Example: "catalog".
|
|
134
|
+
* @property {string} [module] - Module the event belongs to; absent on system events not bound to a module (e.g. "send_code"). Example: "catalog".
|
|
135
135
|
* @description Represents a single available event.
|
|
136
136
|
*/
|
|
137
137
|
interface IContentApiEvent {
|
|
138
138
|
id: number;
|
|
139
139
|
identifier: string;
|
|
140
140
|
localizeInfos: Record<string, unknown>;
|
|
141
|
-
module
|
|
141
|
+
module?: string;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
144
|
* Represents a form subscription item.
|
|
@@ -151,6 +151,17 @@ interface IListFormSubscription {
|
|
|
151
151
|
eventMarker: string;
|
|
152
152
|
formDataId: number;
|
|
153
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Represents the response of the form subscriptions list endpoint.
|
|
156
|
+
* @interface IFormSubscriptionsResponse
|
|
157
|
+
* @property {IListFormSubscription[]} items - Array of form subscriptions.
|
|
158
|
+
* @property {number} total - Total number of subscriptions. Example: 0.
|
|
159
|
+
* @description Container returned by `getFormSubscriptions`.
|
|
160
|
+
*/
|
|
161
|
+
interface IFormSubscriptionsResponse {
|
|
162
|
+
items: IListFormSubscription[];
|
|
163
|
+
total: number;
|
|
164
|
+
}
|
|
154
165
|
/**
|
|
155
166
|
* Body for subscribing to / unsubscribing from a form event.
|
|
156
167
|
* @interface ISubscribeFormEvent
|
|
@@ -162,4 +173,4 @@ interface ISubscribeFormEvent {
|
|
|
162
173
|
formDataId: number;
|
|
163
174
|
status?: string;
|
|
164
175
|
}
|
|
165
|
-
export type { IContentApiEvent, IEvents, IListFormSubscription, ISubscribeBody, ISubscribeFormEvent, ISubscriptions, };
|
|
176
|
+
export type { IContentApiEvent, IEvents, IFormSubscriptionsResponse, IListFormSubscription, ISubscribeBody, ISubscribeFormEvent, ISubscriptions, };
|
package/dist/forms/formsApi.js
CHANGED
|
@@ -38,7 +38,7 @@ class FormsApi extends asyncModules_1.default {
|
|
|
38
38
|
const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
39
39
|
// Validate response if validation is enabled
|
|
40
40
|
const validated = this._validateResponse(result, formsSchemas_1.FormsResponseSchema);
|
|
41
|
-
return this.
|
|
41
|
+
return this._normalizeData(validated, langCode);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Get one form by form marker.
|
|
@@ -53,7 +53,7 @@ class FormsApi extends asyncModules_1.default {
|
|
|
53
53
|
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
54
54
|
// Validate response if validation is enabled
|
|
55
55
|
const validated = this._validateResponse(result, formsSchemas_1.FormEntitySchema);
|
|
56
|
-
return this.
|
|
56
|
+
return this._normalizeData(validated, langCode);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
exports.default = FormsApi;
|
|
@@ -71,7 +71,7 @@ interface IFromPages {
|
|
|
71
71
|
* @property {string} identifier - The textual identifier for the record field. Example: "form_contact_us".
|
|
72
72
|
* @property {string} processingType - Type of form processing. Example: "async".
|
|
73
73
|
* @property {number | null} templateId - The identifier of the template used by the form, or null if no template is used. Example: 6789.
|
|
74
|
-
* @property {IFormAttribute[]} attributes - Form fields with their localization, validators and form-specific flags.
|
|
74
|
+
* @property {IFormAttribute[]} attributes - Form fields with their localization, validators and form-specific flags, sorted by `position`. The API returns an empty object for forms with no attributes — the SDK normalizes it to an empty array.
|
|
75
75
|
* @property {number | string} [total] - Total count of related entries. Example: "1".
|
|
76
76
|
* @property {IFormConfig[]} [moduleFormConfigs] - Array of module form configurations associated with the form.
|
|
77
77
|
* @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
|
|
@@ -92,15 +92,17 @@ interface IFormsEntity {
|
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* @interface IFormLocalizeInfo
|
|
95
|
+
* @property {string} [title] - Localized name of the form. Optional — the payload is an empty object when the form has no localization for the requested language (e.g. in list responses). Example: "Contact form".
|
|
95
96
|
* @property {string} [titleForSite] - Public-facing title shown on the website. Example: "Form title (for application)".
|
|
96
97
|
* @property {string} [successMessage] - Message shown to the user after successful submission.
|
|
97
98
|
* @property {string} [unsuccessMessage] - Message shown to the user after a failed submission.
|
|
98
99
|
* @property {string} [urlAddress] - URL where the form data is sent for processing (used by `processingType: "url"`).
|
|
99
100
|
* @property {string} [database] - Database flag/id used by the form processor (stringly-typed in the API: "0" / "1" / id).
|
|
100
101
|
* @property {string} [script] - Script flag/id used by the form processor (stringly-typed in the API: "0" / "1" / id).
|
|
101
|
-
* @description Localization payload of a form — extends {@link ILocalizeInfo} with form-side fields (messages, processing config).
|
|
102
|
+
* @description Localization payload of a form — extends {@link ILocalizeInfo} with form-side fields (messages, processing config). Unlike the base type, `title` is optional here.
|
|
102
103
|
*/
|
|
103
|
-
interface IFormLocalizeInfo extends ILocalizeInfo {
|
|
104
|
+
interface IFormLocalizeInfo extends Omit<ILocalizeInfo, 'title'> {
|
|
105
|
+
title?: string;
|
|
104
106
|
titleForSite?: string;
|
|
105
107
|
successMessage?: string;
|
|
106
108
|
unsuccessMessage?: string;
|
|
@@ -120,14 +122,14 @@ interface IFormLocalizeInfo extends ILocalizeInfo {
|
|
|
120
122
|
* @property {IAttributeValidators} validators - Validation rules; empty object when no validators are configured.
|
|
121
123
|
* @property {Record<string, unknown>} settings - Field-specific configuration; empty object by default.
|
|
122
124
|
* @property {Record<string, IFormAttributeAdditionalField>} additionalFields - Nested sub-fields keyed by marker; empty object when none.
|
|
123
|
-
* @property {boolean} isLogin - Whether this field carries the login value used for authentication. Example: false.
|
|
124
|
-
* @property {boolean} isSignUp - Whether this field is required during sign-up. Example: false.
|
|
125
|
-
* @property {boolean} isPassword - Whether this field carries the password value used for authentication. Example: false.
|
|
126
|
-
* @property {boolean} isSignUpRequired - Whether this field is required during sign-up. Example: false.
|
|
127
|
-
* @property {boolean} isNotificationEmail - Whether this field stores the email used for notifications. Example: false.
|
|
128
|
-
* @property {boolean} isNotificationPhonePush - Whether this field stores the phone number used for push notifications. Example: false.
|
|
129
|
-
* @property {boolean} isNotificationPhoneSMS - Whether this field stores the phone number used for SMS notifications. Example: false.
|
|
130
|
-
* @description Definition of a single field inside a form — extends a generic attribute with form-specific authentication / notification flags.
|
|
125
|
+
* @property {boolean} [isLogin] - Whether this field carries the login value used for authentication. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
|
|
126
|
+
* @property {boolean} [isSignUp] - Whether this field is required during sign-up. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
|
|
127
|
+
* @property {boolean} [isPassword] - Whether this field carries the password value used for authentication. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
|
|
128
|
+
* @property {boolean} [isSignUpRequired] - Whether this field is required during sign-up. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
|
|
129
|
+
* @property {boolean} [isNotificationEmail] - Whether this field stores the email used for notifications. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
|
|
130
|
+
* @property {boolean} [isNotificationPhonePush] - Whether this field stores the phone number used for push notifications. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
|
|
131
|
+
* @property {boolean} [isNotificationPhoneSMS] - Whether this field stores the phone number used for SMS notifications. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
|
|
132
|
+
* @description Definition of a single field inside a form — extends a generic attribute with form-specific authentication / notification flags (returned only for sign-in/sign-up forms).
|
|
131
133
|
*/
|
|
132
134
|
interface IFormAttribute {
|
|
133
135
|
marker: string;
|
|
@@ -140,24 +142,24 @@ interface IFormAttribute {
|
|
|
140
142
|
validators: IAttributeValidators;
|
|
141
143
|
settings: Record<string, unknown>;
|
|
142
144
|
additionalFields: Record<string, IFormAttributeAdditionalField>;
|
|
143
|
-
isLogin
|
|
144
|
-
isSignUp
|
|
145
|
-
isPassword
|
|
146
|
-
isSignUpRequired
|
|
147
|
-
isNotificationEmail
|
|
148
|
-
isNotificationPhonePush
|
|
149
|
-
isNotificationPhoneSMS
|
|
145
|
+
isLogin?: boolean;
|
|
146
|
+
isSignUp?: boolean;
|
|
147
|
+
isPassword?: boolean;
|
|
148
|
+
isSignUpRequired?: boolean;
|
|
149
|
+
isNotificationEmail?: boolean;
|
|
150
|
+
isNotificationPhonePush?: boolean;
|
|
151
|
+
isNotificationPhoneSMS?: boolean;
|
|
150
152
|
[key: string]: unknown;
|
|
151
153
|
}
|
|
152
154
|
/**
|
|
153
155
|
* @interface IFormAttributeAdditionalField
|
|
154
|
-
* @property {string} marker - Marker of the additional field. Example: "additional_field".
|
|
156
|
+
* @property {string} [marker] - Marker of the additional field. Optional — the API returns entries as `{ type, value }`, the marker itself is the key of the `additionalFields` map. Example: "additional_field".
|
|
155
157
|
* @property {string} type - Type of the additional field. Example: "string".
|
|
156
|
-
* @property {unknown} value - Value of the additional field. Example: "Additional field data".
|
|
158
|
+
* @property {unknown} value - Value of the additional field, normalized like any other attribute value: `number | null` for numeric types, the file object itself for a single-file `image`/`file`, `null` when empty. Example: "Additional field data".
|
|
157
159
|
* @description A single nested entry inside {@link IFormAttribute}'s `additionalFields` map.
|
|
158
160
|
*/
|
|
159
161
|
interface IFormAttributeAdditionalField {
|
|
160
|
-
marker
|
|
162
|
+
marker?: string;
|
|
161
163
|
type: string;
|
|
162
164
|
value: unknown;
|
|
163
165
|
}
|
|
@@ -123,7 +123,7 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
123
123
|
const result = await this._fetchPost(``, body);
|
|
124
124
|
// Validate response if validation is enabled
|
|
125
125
|
const validated = this._validateResponse(result, formsDataSchemas_1.PostFormResponseSchema);
|
|
126
|
-
return this.
|
|
126
|
+
return this._normalizeData(validated);
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* Get one object of form data by marker.
|
|
@@ -152,7 +152,7 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
152
152
|
const result = await this._fetchPost(`/marker/${marker}?formModuleConfigId=${formModuleConfigId}&isExtended=${isExtended}&langCode=${langCode}&offset=${offset}&limit=${limit}`, body);
|
|
153
153
|
// Validate response if validation is enabled
|
|
154
154
|
const validated = this._validateResponse(result, formsDataSchemas_1.FormsByMarkerDataResponseSchema);
|
|
155
|
-
return this.
|
|
155
|
+
return this._normalizeData(validated, langCode);
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* Update one object of form data by id. Requires user authentication.
|
|
@@ -346,13 +346,13 @@ interface IBodyPostFormData {
|
|
|
346
346
|
* @interface IBodyTypeStringNumberFloat
|
|
347
347
|
* @property {string} marker - marker name. Example: "some_marker".
|
|
348
348
|
* @property {string} type - Type value. "string" | "number" | "float". Example: "string".
|
|
349
|
-
* @property {string} value - Value of the form data entity
|
|
349
|
+
* @property {string | number | null} value - Value of the form data entity. Send it as a string; in responses numeric fields come back normalized to `number`, or `null` when the field is empty. Example: "string".
|
|
350
350
|
* @description Represents a form data entity with a marker, type, and value.
|
|
351
351
|
*/
|
|
352
352
|
interface IBodyTypeStringNumberFloat {
|
|
353
353
|
marker: string;
|
|
354
354
|
type: 'string' | 'number' | 'float';
|
|
355
|
-
value: string;
|
|
355
|
+
value: string | number | null;
|
|
356
356
|
}
|
|
357
357
|
/**
|
|
358
358
|
* Represents a date/time form data entity.
|
|
@@ -520,7 +520,7 @@ interface IImageValue {
|
|
|
520
520
|
* @interface IBodyTypeFile
|
|
521
521
|
* @property {string} marker - marker name. Example: "picture".
|
|
522
522
|
* @property {'file'} type - Type value. Example: "file".
|
|
523
|
-
* @property {object} value - File Object. Contains file information.
|
|
523
|
+
* @property {object} value - File Object. Contains file information. A single attached file is returned as the object itself, several files as an array.
|
|
524
524
|
* @example
|
|
525
525
|
[
|
|
526
526
|
{
|
|
@@ -534,7 +534,7 @@ interface IImageValue {
|
|
|
534
534
|
interface IBodyTypeFile {
|
|
535
535
|
marker: string;
|
|
536
536
|
type: 'file';
|
|
537
|
-
value: IFileValue;
|
|
537
|
+
value: IFileValue | IFileValue[];
|
|
538
538
|
}
|
|
539
539
|
/**
|
|
540
540
|
* @interface IFileValue
|
|
@@ -52,7 +52,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
52
52
|
const result = await this._fetchGet(`?` + this._queryParamsToString(query));
|
|
53
53
|
// Validate response if validation is enabled
|
|
54
54
|
const validated = this._validateResponse(result, integrationCollectionsSchemas_1.CollectionsResponseSchema);
|
|
55
|
-
return this.
|
|
55
|
+
return this._normalizeData(validated, langCode);
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Get a single collection object by id.
|
|
@@ -67,7 +67,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
67
67
|
const result = await this._fetchGet(`/${id}?` + this._queryParamsToString({ langCode }));
|
|
68
68
|
// Validate response if validation is enabled
|
|
69
69
|
const validated = this._validateResponse(result, integrationCollectionsSchemas_1.CollectionEntitySchema);
|
|
70
|
-
return this.
|
|
70
|
+
return this._normalizeData(validated, langCode);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* Get all records belonging to the collection by collection id.
|
|
@@ -100,7 +100,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
100
100
|
}));
|
|
101
101
|
// Validate response if validation is enabled
|
|
102
102
|
const validated = this._validateResponse(result, integrationCollectionsSchemas_1.CollectionRowsResponseSchema);
|
|
103
|
-
return this.
|
|
103
|
+
return this._normalizeData(validated, langCode);
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Check for the existence of a text identifier (marker).
|
|
@@ -119,7 +119,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
119
119
|
const result = await this._fetchGet(`/marker-validation/${marker}`);
|
|
120
120
|
// Validate response if validation is enabled
|
|
121
121
|
const validated = this._validateResponse(result, integrationCollectionsSchemas_1.CollectionIsValidSchema);
|
|
122
|
-
return this.
|
|
122
|
+
return this._normalizeData(validated);
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Getting all records from the collection.
|
|
@@ -134,7 +134,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
134
134
|
const result = await this._fetchGet(`/marker/${marker}/rows?langCode=${langCode}`);
|
|
135
135
|
// Validate response if validation is enabled
|
|
136
136
|
const validated = this._validateResponse(result, integrationCollectionsSchemas_1.CollectionRowsResponseSchema);
|
|
137
|
-
return this.
|
|
137
|
+
return this._normalizeData(validated, langCode);
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Getting one record from the collection.
|
|
@@ -150,7 +150,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
150
150
|
const result = await this._fetchGet(`/marker/${marker}/rows/${id}?langCode=${langCode}`);
|
|
151
151
|
// Validate response if validation is enabled
|
|
152
152
|
const validated = this._validateResponse(result, integrationCollectionsSchemas_1.CollectionRowSchema);
|
|
153
|
-
return this.
|
|
153
|
+
return this._normalizeData(validated, langCode);
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
156
|
* Create a record in the collection.
|
|
@@ -244,6 +244,8 @@ interface ICollectionFormObject {
|
|
|
244
244
|
* @property {string | null} entityType - Type of the entity associated with the collection row. Example: "product", "order", "etc".
|
|
245
245
|
* @property {number | null} entityId - Identifier of the entity associated with the collection row. Example: 12345.
|
|
246
246
|
* @property {string | null} [attributeSetIdentifier] - Identifier of the attribute set used by the form attached to the collection row, or null if not applicable. Example: "attributeSet1" or null.
|
|
247
|
+
* @property {string | null} [langCode] - Language code the row was stored under. Example: "en_US".
|
|
248
|
+
* @property {string | null} [formIdentifier] - Text identifier of the form the row was created from; returned by the create/update row endpoints. Example: "collection_form".
|
|
247
249
|
* @property {string} total - Total count. Example: "1".
|
|
248
250
|
* @description Represents a row in a collection, containing various properties such as identifiers, dates, form data, and an optional total value.
|
|
249
251
|
*/
|
|
@@ -256,6 +258,8 @@ interface ICollectionRow {
|
|
|
256
258
|
entityType: string | null;
|
|
257
259
|
entityId: number | null;
|
|
258
260
|
attributeSetIdentifier?: string | null;
|
|
261
|
+
langCode?: string | null;
|
|
262
|
+
formIdentifier?: string | null;
|
|
259
263
|
total?: string;
|
|
260
264
|
}
|
|
261
265
|
/**
|
|
@@ -49,6 +49,8 @@ export declare const CollectionRowSchema: z.ZodObject<{
|
|
|
49
49
|
entityType: z.ZodNullable<z.ZodString>;
|
|
50
50
|
entityId: z.ZodNullable<z.ZodNumber>;
|
|
51
51
|
attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
langCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
formIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
54
|
total: z.ZodOptional<z.ZodString>;
|
|
53
55
|
}, z.core.$strip>;
|
|
54
56
|
/**
|
|
@@ -68,6 +70,8 @@ export declare const CollectionRowsResponseSchema: z.ZodObject<{
|
|
|
68
70
|
entityType: z.ZodNullable<z.ZodString>;
|
|
69
71
|
entityId: z.ZodNullable<z.ZodNumber>;
|
|
70
72
|
attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
langCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
formIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
75
|
total: z.ZodOptional<z.ZodString>;
|
|
72
76
|
}, z.core.$strip>>;
|
|
73
77
|
total: z.ZodNumber;
|
|
@@ -44,6 +44,8 @@ exports.CollectionRowSchema = zod_1.z.object({
|
|
|
44
44
|
entityType: zod_1.z.string().nullable(),
|
|
45
45
|
entityId: zod_1.z.number().nullable(),
|
|
46
46
|
attributeSetIdentifier: zod_1.z.string().nullable().optional(),
|
|
47
|
+
langCode: zod_1.z.string().nullable().optional(),
|
|
48
|
+
formIdentifier: zod_1.z.string().nullable().optional(),
|
|
47
49
|
total: zod_1.z.string().optional(),
|
|
48
50
|
});
|
|
49
51
|
/**
|
package/dist/menus/menusApi.js
CHANGED
|
@@ -34,7 +34,7 @@ class MenusApi extends asyncModules_1.default {
|
|
|
34
34
|
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
35
35
|
// Validate response if validation is enabled
|
|
36
36
|
const validated = this._validateResponse(result, menusSchemas_1.MenuEntitySchema);
|
|
37
|
-
return this.
|
|
37
|
+
return this._normalizeData(validated, langCode);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
exports.default = MenusApi;
|
|
@@ -314,9 +314,10 @@ interface IOrderProductsData {
|
|
|
314
314
|
}
|
|
315
315
|
]
|
|
316
316
|
* @property {string} currency - Currency used to pay for the order. Example: "USD".
|
|
317
|
-
* @property {
|
|
317
|
+
* @property {number} totalSum - Total order amount. Example: 150.
|
|
318
318
|
* @property {string} [createdDate] - Order creation date. Example: "2023-10-01T12:00:00Z".
|
|
319
319
|
* @property {string} [statusIdentifier] - Text identifier of order status object (if not set, default status will be assigned). Example: "status-1".
|
|
320
|
+
* @property {ILocalizeInfo} [statusLocalizeInfos] - Localized status name assigned to the created/updated order.
|
|
320
321
|
* @property {string} [couponCode] -
|
|
321
322
|
* @property {string[]} [additionalDiscountsMarkers] -
|
|
322
323
|
* @property {IOrderDiscountConfig} [discountConfig] - Resolved discount configuration applied to the order.
|
|
@@ -331,9 +332,10 @@ interface IBaseOrdersEntity {
|
|
|
331
332
|
formData: IOrdersFormData[];
|
|
332
333
|
products: IOrderProductsData[];
|
|
333
334
|
currency: string;
|
|
334
|
-
totalSum:
|
|
335
|
+
totalSum: number;
|
|
335
336
|
createdDate?: string;
|
|
336
337
|
statusIdentifier?: string;
|
|
338
|
+
statusLocalizeInfos?: ILocalizeInfo;
|
|
337
339
|
couponCode?: string;
|
|
338
340
|
additionalDiscountsMarkers?: string[];
|
|
339
341
|
discountConfig?: IOrderDiscountConfig;
|
|
@@ -567,6 +569,10 @@ interface IOrderSplit {
|
|
|
567
569
|
* @property {boolean | null} [isPartial] - Indicates that the order is partially paid; null on older orders where it was not tracked. Example: false.
|
|
568
570
|
* @property {string} [paymentStrategy] - Payment strategy of the order. Example: "once".
|
|
569
571
|
* @property {ILocalizeInfo} [statusLocalizeInfos] - Localized status name.
|
|
572
|
+
* @property {string | null} [fulfillmentStatusIdentifier] - Text identifier of the fulfillment (delivery) status; null while no fulfillment status is assigned. Example: "shipped".
|
|
573
|
+
* @property {ILocalizeInfo | null} [fulfillmentStatusLocalizeInfos] - Localized fulfillment status name; null while no fulfillment status is assigned.
|
|
574
|
+
* @property {string | null} [paymentStatusIdentifier] - Text identifier of the payment status; null while no payment status is assigned. Example: "inProgress-payment".
|
|
575
|
+
* @property {ILocalizeInfo | null} [paymentStatusLocalizeInfos] - Localized payment status name; null while no payment status is assigned.
|
|
570
576
|
* @property {IOrderDiscountConfig | null} [discountConfig] - Resolved discount configuration applied to the order (orderDiscounts, productDiscounts, coupon, settings, bonus, totals); null on older orders without a resolved discount config.
|
|
571
577
|
* @property {IOrderSplit} [split] - Split (staged) payment configuration; present on the by-id order endpoint.
|
|
572
578
|
* @description Represents an order storage object created by the user.
|
|
@@ -590,6 +596,10 @@ interface IOrderByMarkerEntity {
|
|
|
590
596
|
isPartial?: boolean | null;
|
|
591
597
|
paymentStrategy?: string;
|
|
592
598
|
statusLocalizeInfos?: ILocalizeInfo;
|
|
599
|
+
fulfillmentStatusIdentifier?: string | null;
|
|
600
|
+
fulfillmentStatusLocalizeInfos?: ILocalizeInfo | null;
|
|
601
|
+
paymentStatusIdentifier?: string | null;
|
|
602
|
+
paymentStatusLocalizeInfos?: ILocalizeInfo | null;
|
|
593
603
|
discountConfig?: IOrderDiscountConfig | null;
|
|
594
604
|
split?: IOrderSplit;
|
|
595
605
|
}
|
|
@@ -598,10 +608,14 @@ interface IOrderByMarkerEntity {
|
|
|
598
608
|
* @interface IOrderStatus
|
|
599
609
|
* @property {number} [id] - Status identifier. Example: 1.
|
|
600
610
|
* @property {ILocalizeInfo} [localizeInfos] - Localized information for the status.
|
|
601
|
-
* @property {string} [identifier] - Text identifier of the status. Example: "inProgress".
|
|
611
|
+
* @property {string} [identifier] - Text identifier of the status. Example: "inProgress-payment".
|
|
602
612
|
* @property {number} [position] - Position of the status. Example: 1.
|
|
603
613
|
* @property {boolean} [isUsed] - Whether the status is in use. Example: true.
|
|
604
614
|
* @property {boolean} [isDefault] - Whether the status is the default status. Example: true.
|
|
615
|
+
* @property {string} [axis] - Status axis (pipeline) the status belongs to. Example: "payment".
|
|
616
|
+
* @property {boolean} [isCancelFinal] - Whether the status is a final cancellation status. Example: false.
|
|
617
|
+
* @property {boolean} [isFinalSuccess] - Whether the status is a final successful status. Example: true.
|
|
618
|
+
* @property {boolean} [isMapped] - Whether the status is mapped to its axis. Example: true.
|
|
605
619
|
*/
|
|
606
620
|
interface IOrderStatus {
|
|
607
621
|
id?: number;
|
|
@@ -610,6 +624,10 @@ interface IOrderStatus {
|
|
|
610
624
|
position?: number;
|
|
611
625
|
isUsed?: boolean;
|
|
612
626
|
isDefault?: boolean;
|
|
627
|
+
axis?: string;
|
|
628
|
+
isCancelFinal?: boolean;
|
|
629
|
+
isFinalSuccess?: boolean;
|
|
630
|
+
isMapped?: boolean;
|
|
613
631
|
}
|
|
614
632
|
/**
|
|
615
633
|
* Interface representing a product in an order preview.
|