oneentry 1.0.152 → 1.0.154
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 +49 -0
- package/dist/admins/adminsApi.d.ts +2 -1
- package/dist/admins/adminsApi.js +2 -1
- package/dist/admins/adminsInterfaces.d.ts +1 -1
- package/dist/attribute-sets/attributeSetsApi.d.ts +4 -0
- package/dist/attribute-sets/attributeSetsApi.js +4 -0
- package/dist/auth-provider/authProviderApi.d.ts +14 -1
- package/dist/auth-provider/authProviderApi.js +14 -1
- package/dist/base/asyncModules.d.ts +21 -2
- package/dist/base/asyncModules.js +74 -225
- package/dist/base/stateModule.d.ts +4 -13
- package/dist/base/stateModule.js +12 -96
- package/dist/base/syncModules.d.ts +4 -0
- package/dist/base/syncModules.js +5 -1
- package/dist/blocks/blocksApi.d.ts +54 -11
- package/dist/blocks/blocksApi.js +90 -73
- package/dist/blocks/blocksInterfaces.d.ts +18 -9
- package/dist/discounts/discountsApi.d.ts +5 -0
- package/dist/discounts/discountsApi.js +5 -0
- package/dist/events/eventsApi.d.ts +7 -0
- package/dist/events/eventsApi.js +11 -28
- package/dist/file-uploading/fileUploadingApi.d.ts +4 -1
- package/dist/file-uploading/fileUploadingApi.js +4 -1
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +1 -1
- package/dist/filters/filtersApi.d.ts +1 -0
- package/dist/filters/filtersApi.js +1 -0
- package/dist/forms/formsApi.d.ts +2 -0
- package/dist/forms/formsApi.js +2 -0
- package/dist/forms-data/formsDataApi.d.ts +5 -0
- package/dist/forms-data/formsDataApi.js +5 -0
- package/dist/general-types/generalTypesApi.d.ts +1 -0
- package/dist/general-types/generalTypesApi.js +1 -0
- package/dist/index.js +12 -0
- package/dist/integration-collections/integrationCollectionsApi.d.ts +10 -1
- package/dist/integration-collections/integrationCollectionsApi.js +10 -1
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +1 -1
- package/dist/locales/localesApi.d.ts +1 -0
- package/dist/locales/localesApi.js +1 -0
- package/dist/menus/menusApi.d.ts +1 -0
- package/dist/menus/menusApi.js +1 -0
- package/dist/orders/ordersApi.d.ts +25 -1
- package/dist/orders/ordersApi.js +36 -12
- package/dist/orders/ordersInterfaces.d.ts +5 -2
- package/dist/pages/pagesApi.d.ts +9 -0
- package/dist/pages/pagesApi.js +35 -39
- package/dist/pages/pagesInterfaces.d.ts +5 -0
- package/dist/payments/paymentsApi.d.ts +6 -0
- package/dist/payments/paymentsApi.js +6 -0
- package/dist/product-statuses/productStatusesApi.d.ts +3 -0
- package/dist/product-statuses/productStatusesApi.js +3 -0
- package/dist/products/productsApi.d.ts +39 -64
- package/dist/products/productsApi.js +33 -61
- package/dist/products/productsInterfaces.d.ts +76 -72
- package/dist/sitemap/sitemapApi.d.ts +2 -0
- package/dist/sitemap/sitemapApi.js +2 -0
- package/dist/subscriptions/subscriptionsApi.d.ts +5 -0
- package/dist/subscriptions/subscriptionsApi.js +7 -14
- package/dist/system/systemApi.d.ts +3 -0
- package/dist/system/systemApi.js +3 -0
- package/dist/templates/templatesApi.d.ts +3 -0
- package/dist/templates/templatesApi.js +3 -0
- package/dist/templates-preview/templatesPreviewApi.d.ts +2 -0
- package/dist/templates-preview/templatesPreviewApi.js +2 -0
- package/dist/user-activity/userActivityApi.d.ts +1 -0
- package/dist/user-activity/userActivityApi.js +1 -0
- package/dist/users/usersApi.d.ts +14 -0
- package/dist/users/usersApi.js +14 -0
- package/dist/web-socket/wsApi.d.ts +1 -1
- package/dist/web-socket/wsApi.js +1 -1
- package/package.json +4 -1
|
@@ -35,163 +35,135 @@ interface IProductsApi {
|
|
|
35
35
|
}
|
|
36
36
|
]
|
|
37
37
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {IProductsQueryBase} [userQuery] - Optional set query parameters.
|
|
39
39
|
* @example
|
|
40
40
|
{
|
|
41
41
|
"limit": 30,
|
|
42
42
|
"offset": 0,
|
|
43
43
|
"sortOrder": "DESC",
|
|
44
44
|
"sortKey": "id",
|
|
45
|
-
"
|
|
46
|
-
"statusMarker": "in_stock",
|
|
47
|
-
"conditionValue": "new",
|
|
48
|
-
"conditionMarker": "equals",
|
|
49
|
-
"attributeMarker": "color"
|
|
45
|
+
"signPrice": "orders"
|
|
50
46
|
}
|
|
51
47
|
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
52
48
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
53
49
|
*/
|
|
54
|
-
getProducts(body?: IFilterParams[], langCode?: string, userQuery?:
|
|
50
|
+
getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQueryBase): Promise<IProductsResponse | IError>;
|
|
55
51
|
/**
|
|
56
52
|
* Search for all product page objects with pagination that do not have a category.
|
|
57
53
|
* @handleName getProductsEmptyPage
|
|
58
54
|
* @param body
|
|
59
55
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
60
|
-
* @param {
|
|
56
|
+
* @param {IProductsQueryBase} [userQuery] - Optional set query parameters.
|
|
61
57
|
* @example
|
|
62
58
|
{
|
|
63
59
|
"limit": 30,
|
|
64
60
|
"offset": 0,
|
|
65
61
|
"sortOrder": "DESC",
|
|
66
62
|
"sortKey": "id",
|
|
67
|
-
"
|
|
68
|
-
"statusMarker": "in_stock",
|
|
69
|
-
"conditionValue": "new",
|
|
70
|
-
"conditionMarker": "equals",
|
|
71
|
-
"attributeMarker": "color"
|
|
63
|
+
"signPrice": "orders"
|
|
72
64
|
}
|
|
73
65
|
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
74
66
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
75
67
|
* @description This method searches for all product page objects with pagination that do not have a category.
|
|
76
68
|
*/
|
|
77
|
-
getProductsEmptyPage(body?: object, langCode?: string, userQuery?:
|
|
69
|
+
getProductsEmptyPage(body?: object, langCode?: string, userQuery?: IProductsQueryBase): Promise<IAggregatedProductGroup[] | IError>;
|
|
78
70
|
/**
|
|
79
71
|
* Search for all products with pagination for the selected category.
|
|
80
72
|
* @handleName getProductsByPageId
|
|
81
73
|
* @param {number} id - Page id. Example: 12345.
|
|
82
74
|
* @param {IFilterParams[]} [body] - Request body. Default: [].
|
|
83
75
|
* @param {string} [langCode] - Language code. Default "en_US".
|
|
84
|
-
* @param {
|
|
76
|
+
* @param {IProductsQueryBase} [userQuery] - Optional set query parameters.
|
|
85
77
|
* @example
|
|
86
78
|
{
|
|
87
79
|
"limit": 30,
|
|
88
80
|
"offset": 0,
|
|
89
81
|
"sortOrder": "DESC",
|
|
90
82
|
"sortKey": "id",
|
|
91
|
-
"
|
|
92
|
-
"statusMarker": "in_stock",
|
|
93
|
-
"conditionValue": "new",
|
|
94
|
-
"conditionMarker": "equals",
|
|
95
|
-
"attributeMarker": "color"
|
|
83
|
+
"signPrice": "orders"
|
|
96
84
|
}
|
|
97
85
|
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
98
86
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
99
87
|
* @description This method searches for all products with pagination for the selected category.
|
|
100
88
|
*/
|
|
101
|
-
getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?:
|
|
89
|
+
getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQueryBase): Promise<IProductsResponse | IError>;
|
|
102
90
|
/**
|
|
103
91
|
* Search for information about products and prices for the selected category.
|
|
104
92
|
* @handleName getProductsPriceByPageUrl
|
|
105
93
|
* @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
|
|
106
94
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
107
|
-
* @param {
|
|
95
|
+
* @param {IProductsPriceQuery} [userQuery] - Optional set query parameters.
|
|
108
96
|
* @example
|
|
109
97
|
{
|
|
110
98
|
"limit": 30,
|
|
111
99
|
"offset": 0,
|
|
112
100
|
"sortOrder": "DESC",
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"statusMarker": "in_stock",
|
|
116
|
-
"conditionValue": "new",
|
|
117
|
-
"conditionMarker": "equals",
|
|
118
|
-
"attributeMarker": "color"
|
|
101
|
+
"signPrice": "orders",
|
|
102
|
+
"statusMarker": "in_stock"
|
|
119
103
|
}
|
|
120
104
|
* @returns {IProductsInfo} Array with ProductInformation objects.
|
|
121
105
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
122
106
|
* @description This method searches for information about products prices for the selected category.
|
|
123
107
|
*/
|
|
124
|
-
getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?:
|
|
108
|
+
getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?: IProductsPriceQuery): Promise<IProductsInfo | IError>;
|
|
125
109
|
/**
|
|
126
110
|
* Search for all products with pagination for the selected category.
|
|
127
111
|
* @handleName getProductsByPageUrl
|
|
128
112
|
* @param {string} url - Page url. Example: "23-laminat-floorwood-maxima".
|
|
129
113
|
* @param {IFilterParams[]} [body] - Request body. Default: [].
|
|
130
114
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
131
|
-
* @param {
|
|
115
|
+
* @param {IProductsQueryBase} [userQuery] - Optional set query parameters.
|
|
132
116
|
* @example
|
|
133
117
|
{
|
|
134
118
|
"limit": 30,
|
|
135
119
|
"offset": 0,
|
|
136
120
|
"sortOrder": "DESC",
|
|
137
121
|
"sortKey": "id",
|
|
138
|
-
"
|
|
139
|
-
"statusMarker": "in_stock",
|
|
140
|
-
"conditionValue": "new",
|
|
141
|
-
"conditionMarker": "equals",
|
|
142
|
-
"attributeMarker": "color"
|
|
122
|
+
"signPrice": "orders"
|
|
143
123
|
}
|
|
144
124
|
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
145
125
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
146
126
|
* @description This method searches for all products with pagination for the selected category.
|
|
147
127
|
*/
|
|
148
|
-
getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?:
|
|
128
|
+
getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQueryBase): Promise<IProductsResponse | IError>;
|
|
149
129
|
/**
|
|
150
130
|
* Find all related product page objects.
|
|
151
131
|
* @handleName getRelatedProductsById
|
|
152
132
|
* @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
|
|
153
133
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
154
|
-
* @param {
|
|
134
|
+
* @param {IProductsRelatedQuery} [userQuery] - Optional set query parameters.
|
|
155
135
|
* @example
|
|
156
136
|
{
|
|
157
137
|
"limit": 30,
|
|
158
138
|
"offset": 0,
|
|
159
139
|
"sortOrder": "DESC",
|
|
160
140
|
"sortKey": "id",
|
|
161
|
-
"
|
|
141
|
+
"signPrice": "orders",
|
|
162
142
|
"statusMarker": "in_stock",
|
|
163
|
-
"
|
|
164
|
-
"conditionMarker": "equals",
|
|
165
|
-
"attributeMarker": "color"
|
|
143
|
+
"templateMarker": "template_12345"
|
|
166
144
|
}
|
|
167
145
|
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
168
146
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
169
147
|
* @description This method finds all related product page objects for the selected product page.
|
|
170
148
|
*/
|
|
171
|
-
getRelatedProductsById(id: number, langCode?: string, userQuery?:
|
|
149
|
+
getRelatedProductsById(id: number, langCode?: string, userQuery?: IProductsRelatedQuery): Promise<IProductsResponse | IError>;
|
|
172
150
|
/**
|
|
173
151
|
* Find products by its ids.
|
|
174
152
|
* @handleName getProductsByIds
|
|
175
153
|
* @param {string} ids - Product page identifiers for which to find relationships. Example: "12345,67890".
|
|
176
154
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
177
|
-
* @param {
|
|
155
|
+
* @param {IProductsByIdsQuery} [userQuery] - Optional set query parameters.
|
|
178
156
|
* @example
|
|
179
157
|
{
|
|
180
158
|
"limit": 30,
|
|
181
159
|
"offset": 0,
|
|
182
|
-
"
|
|
183
|
-
"sortKey": "id",
|
|
184
|
-
"statusId": 123,
|
|
185
|
-
"statusMarker": "in_stock",
|
|
186
|
-
"conditionValue": "new",
|
|
187
|
-
"conditionMarker": "equals",
|
|
188
|
-
"attributeMarker": "color"
|
|
160
|
+
"signPrice": "orders"
|
|
189
161
|
}
|
|
190
162
|
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
191
163
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
192
164
|
* @description This method finds products by its ids.
|
|
193
165
|
*/
|
|
194
|
-
getProductsByIds(ids: string, langCode?: string, userQuery?:
|
|
166
|
+
getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsByIdsQuery): Promise<IProductsEntity[] | IError>;
|
|
195
167
|
/**
|
|
196
168
|
* Retrieve one product object.
|
|
197
169
|
* @handleName getProductById
|
|
@@ -257,7 +229,7 @@ interface IProductsApi {
|
|
|
257
229
|
/**
|
|
258
230
|
* Getting the number of products on a catalog page by page ID.
|
|
259
231
|
* @handleName getProductsCountByPageId
|
|
260
|
-
* @param {string} id - Page id. Example: 12345.
|
|
232
|
+
* @param {string} id - Page id. Example: "12345".
|
|
261
233
|
* @param {object[]} body - Body parameters for filter. Deault: [].
|
|
262
234
|
* @example
|
|
263
235
|
[
|
|
@@ -334,40 +306,68 @@ interface IProductsApi {
|
|
|
334
306
|
getProductsByVectorSearch(body: IVectorSearchProducts, langCode?: string, offset?: number, limit?: number): Promise<IProductsEntity[] | IError>;
|
|
335
307
|
}
|
|
336
308
|
/**
|
|
337
|
-
* @interface
|
|
309
|
+
* @interface IProductsQueryBase
|
|
338
310
|
* @property {number} offset - Parameter for pagination. Default: 0.
|
|
339
311
|
* @property {number} limit - Parameter for pagination. Default: 30.
|
|
340
312
|
* @property {string} sortOrder - Sort order "DESC" | "ASC". Default: "DESC".
|
|
341
313
|
* @property {string} sortKey - Field for sorting (default - null). Possible values: "id", "position", "title", "date", "price". Default: null.
|
|
342
|
-
* @property {string} [signPrice] -
|
|
343
|
-
* @
|
|
344
|
-
* @
|
|
345
|
-
* @property {string | null} [conditionValue] - The value that is being searched for, default null. Example: "new".
|
|
346
|
-
* @property {string | null} [attributeMarker] - The text identifier of the indexed attribute by which values are filtered, default null. Example: "color".
|
|
347
|
-
* @property {string | null} [conditionMarker] - Marker of the filter condition by which the values are filtered, default null. Example: "equals".
|
|
348
|
-
* @property {string} [langCode] - Language code. Default: "en_US".
|
|
349
|
-
* @property {string} [ids] - Comma-separated list of product ids — used by `getProductsByIds`. Example: "1,2,3".
|
|
350
|
-
* @description This interface defines the structure of a query for retrieving products, including pagination, sorting, and filtering parameters.
|
|
314
|
+
* @property {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
|
|
315
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/products/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
316
|
+
* @description Base query parameters shared by the product listing endpoints (getProducts, getProductsEmptyPage, getProductsByPageId, getProductsByPageUrl): pagination, sorting and price fixing.
|
|
351
317
|
*/
|
|
352
|
-
interface
|
|
318
|
+
interface IProductsQueryBase {
|
|
353
319
|
offset?: number;
|
|
354
320
|
limit?: number;
|
|
355
|
-
langCode?: string;
|
|
356
|
-
ids?: string;
|
|
357
321
|
sortOrder?: 'DESC' | 'ASC' | null;
|
|
358
322
|
sortKey?: 'id' | 'position' | 'title' | 'date' | 'price' | null;
|
|
359
323
|
signPrice?: string;
|
|
360
|
-
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* @interface IProductsRelatedQuery
|
|
327
|
+
* @augments IProductsQueryBase
|
|
328
|
+
* @property {string | null} [statusMarker] - Product page status marker, default null. Example: "in_stock".
|
|
329
|
+
* @property {string | null} [templateMarker] - Product page template marker, default null. Example: "template_12345".
|
|
330
|
+
* @description Query parameters for getRelatedProductsById: the base query plus product page status and template markers.
|
|
331
|
+
*/
|
|
332
|
+
interface IProductsRelatedQuery extends IProductsQueryBase {
|
|
361
333
|
statusMarker?: string | null;
|
|
362
|
-
|
|
363
|
-
attributeMarker?: string | null;
|
|
364
|
-
conditionMarker?: 'in' /** in - Contains */ | 'nin' /** nin - Does not contain */ | 'eq' /** 'eq' - Equal */ | 'neq' /** 'neq' - Not equal */ | 'mth' /** 'mth' - Greater than */ | 'lth' /** 'lth' - Less than */ | 'exs' /** 'exs' - Exists */ | 'nexs' /** 'nexs' - Does not exist */ | null;
|
|
334
|
+
templateMarker?: string | null;
|
|
365
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Query parameters for getProductsPriceByPageUrl: the base query without
|
|
338
|
+
* `sortKey`, plus the product page status marker.
|
|
339
|
+
* @typedef {object} IProductsPriceQuery
|
|
340
|
+
* @property {number} [offset] - Parameter for pagination. Default: 0.
|
|
341
|
+
* @property {number} [limit] - Parameter for pagination. Default: 30.
|
|
342
|
+
* @property {string} [sortOrder] - Sort order "DESC" | "ASC". Default: "DESC".
|
|
343
|
+
* @property {string} [signPrice] - Order storage marker for price fixing.
|
|
344
|
+
* @property {string | null} [statusMarker] - Product page status marker, default null. Example: "in_stock".
|
|
345
|
+
*/
|
|
346
|
+
type IProductsPriceQuery = Omit<IProductsQueryBase, 'sortKey'> & {
|
|
347
|
+
statusMarker?: string | null;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* Query parameters for getProductsByIds: only price fixing — `ids` is passed
|
|
351
|
+
* as a dedicated method argument.
|
|
352
|
+
* @typedef {object} IProductsByIdsQuery
|
|
353
|
+
* @property {string} [signPrice] - Order storage marker for price fixing.
|
|
354
|
+
*/
|
|
355
|
+
type IProductsByIdsQuery = Pick<IProductsQueryBase, 'signPrice'>;
|
|
356
|
+
/**
|
|
357
|
+
* Query parameters for retrieving products.
|
|
358
|
+
* @deprecated Use the per-method query types instead — IProductsQueryBase
|
|
359
|
+
* (getProducts / getProductsEmptyPage / getProductsByPageId / getProductsByPageUrl),
|
|
360
|
+
* IProductsRelatedQuery (getRelatedProductsById), IProductsPriceQuery
|
|
361
|
+
* (getProductsPriceByPageUrl) or IProductsByIdsQuery (getProductsByIds).
|
|
362
|
+
* Kept as an alias of the base query for backward compatibility.
|
|
363
|
+
* @typedef {IProductsQueryBase} IProductsQuery
|
|
364
|
+
*/
|
|
365
|
+
type IProductsQuery = IProductsQueryBase;
|
|
366
366
|
/**
|
|
367
367
|
* @interface IFilterParams
|
|
368
368
|
* @property {string | null} attributeMarker - The text identifier of the indexed attribute by which values are filtered. Default: null. Example: "color".
|
|
369
369
|
* @property {string | null} [conditionMarker] - Id of the filter condition by which the values are filtered. Default: null. Example: "equals".
|
|
370
|
-
* @property {number | null} conditionValue - The value that is being searched for, default null. Example: "new".
|
|
370
|
+
* @property {number | string | null} conditionValue - The value that is being searched for, default null. Example: "new".
|
|
371
371
|
* @property {string | null} [pageUrl] - Url of the category page object. Example: ["23-laminat-floorwood-maxima"].
|
|
372
372
|
* @property {string[] | null} [pageUrls] - Url of the category page object. Example: ["23-laminat-floorwood-maxima"].
|
|
373
373
|
* @property {string | null} [statusMarker] - Text identifier of the product page status (default not set). Example: "in_stock".
|
|
@@ -470,7 +470,8 @@ interface IProductPageRef {
|
|
|
470
470
|
* @property {Record<string, unknown>} [discountConfig] - Discount configuration object. Example: {}.
|
|
471
471
|
* @property {string | null} [templateIdentifier] - User id of the linked template. Example: "template_12345".
|
|
472
472
|
* @property {string | null} [shortDescTemplateIdentifier] - User id of the linked template for a short description. Example: "short_desc_template_12345".
|
|
473
|
-
* @property {string} [signedPrice] -
|
|
473
|
+
* @property {string} [signedPrice] - The signed price of the product is obtained along with the product data when `signPrice` is set. Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
474
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/#Fixed-product-price-signedPrice Fixed product price} documentation.
|
|
474
475
|
* @property {IProductPageRef[]} [productPages] - Array of product page references linking the product to its pages.
|
|
475
476
|
* @example
|
|
476
477
|
[
|
|
@@ -575,11 +576,14 @@ interface IProductsInfo {
|
|
|
575
576
|
* @interface IProductInfo
|
|
576
577
|
* @property {number} id - The unique identifier of the product. Example: 12345.
|
|
577
578
|
* @property {number} price - The price of the product. Example: 150.00.
|
|
579
|
+
* @property {string} [signedPrice] - The signed (fixed) price of the product, returned when `signPrice` is set. Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...".
|
|
580
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/#Fixed-product-price-signedPrice Fixed product price} documentation.
|
|
578
581
|
* @description This interface defines the structure of a product information object, including its identifier and price.
|
|
579
582
|
*/
|
|
580
583
|
interface IProductInfo {
|
|
581
584
|
id: number;
|
|
582
585
|
price: number;
|
|
586
|
+
signedPrice?: string;
|
|
583
587
|
}
|
|
584
588
|
/**
|
|
585
589
|
* @interface IProductBlock
|
|
@@ -696,4 +700,4 @@ interface IVectorSearchProducts {
|
|
|
696
700
|
maxHits?: number;
|
|
697
701
|
debug?: boolean;
|
|
698
702
|
}
|
|
699
|
-
export type { IAggregatedProductGroup, IFilterParams, IProductBlock, IProductInfo, IProductsApi, IProductsCount, IProductsEntity, IProductsInfo, IProductsQuery, IProductsResponse, IVectorSearchProducts, };
|
|
703
|
+
export type { IAggregatedProductGroup, IFilterParams, IProductBlock, IProductInfo, IProductsApi, IProductsByIdsQuery, IProductsCount, IProductsEntity, IProductsInfo, IProductsPriceQuery, IProductsQuery, IProductsQueryBase, IProductsRelatedQuery, IProductsResponse, IVectorSearchProducts, };
|
|
@@ -22,6 +22,7 @@ export default class SitemapApi extends AsyncModules implements ISitemapApi {
|
|
|
22
22
|
* @handleName getSitemap
|
|
23
23
|
* @returns {Promise<string[] | IError>} Returns an array of sitemap URLs.
|
|
24
24
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
25
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/sitemap/getSitemap getSitemap} documentation.
|
|
25
26
|
*/
|
|
26
27
|
getSitemap(): Promise<string[] | IError>;
|
|
27
28
|
/**
|
|
@@ -30,6 +31,7 @@ export default class SitemapApi extends AsyncModules implements ISitemapApi {
|
|
|
30
31
|
* @param {ISitemapQuery} body - Sitemap body params (e.g. `{ baseUrls: { en_US: "https://…" } }`).
|
|
31
32
|
* @returns {Promise<string[] | IError>} Returns an array of generated sitemap URLs.
|
|
32
33
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
34
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/sitemap/updateSitemap updateSitemap} documentation.
|
|
33
35
|
*/
|
|
34
36
|
updateSitemap(body: ISitemapQuery): Promise<string[] | IError>;
|
|
35
37
|
}
|
|
@@ -25,6 +25,7 @@ class SitemapApi extends asyncModules_1.default {
|
|
|
25
25
|
* @handleName getSitemap
|
|
26
26
|
* @returns {Promise<string[] | IError>} Returns an array of sitemap URLs.
|
|
27
27
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
28
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/sitemap/getSitemap getSitemap} documentation.
|
|
28
29
|
*/
|
|
29
30
|
async getSitemap() {
|
|
30
31
|
const data = await this._fetchGet(`/`);
|
|
@@ -36,6 +37,7 @@ class SitemapApi extends asyncModules_1.default {
|
|
|
36
37
|
* @param {ISitemapQuery} body - Sitemap body params (e.g. `{ baseUrls: { en_US: "https://…" } }`).
|
|
37
38
|
* @returns {Promise<string[] | IError>} Returns an array of generated sitemap URLs.
|
|
38
39
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
40
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/sitemap/updateSitemap updateSitemap} documentation.
|
|
39
41
|
*/
|
|
40
42
|
async updateSitemap(body) {
|
|
41
43
|
const data = await this._fetchPost(`/`, body);
|
|
@@ -26,6 +26,7 @@ export default class SubscriptionsApi extends AsyncModules implements ISubscript
|
|
|
26
26
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
27
27
|
* @description This method requires user authorization.
|
|
28
28
|
* @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}.
|
|
29
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/subscribe subscribe} documentation.
|
|
29
30
|
*/
|
|
30
31
|
subscribe(body: ISubscribe): Promise<ICreatedSubscription | IError>;
|
|
31
32
|
/**
|
|
@@ -36,6 +37,7 @@ export default class SubscriptionsApi extends AsyncModules implements ISubscript
|
|
|
36
37
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
37
38
|
* @description This method requires user authorization.
|
|
38
39
|
* @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}.
|
|
40
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/cancelSubscription cancelSubscription} documentation.
|
|
39
41
|
*/
|
|
40
42
|
cancelSubscription(body: ICancelSubscription): Promise<boolean | IError>;
|
|
41
43
|
/**
|
|
@@ -45,6 +47,7 @@ export default class SubscriptionsApi extends AsyncModules implements ISubscript
|
|
|
45
47
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
46
48
|
* @description This method requires user authorization.
|
|
47
49
|
* @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}.
|
|
50
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/getAllSubscriptions getAllSubscriptions} documentation.
|
|
48
51
|
*/
|
|
49
52
|
getAllSubscriptions(): Promise<string[] | IError>;
|
|
50
53
|
/**
|
|
@@ -54,6 +57,7 @@ export default class SubscriptionsApi extends AsyncModules implements ISubscript
|
|
|
54
57
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
55
58
|
* @description This method requires user authorization.
|
|
56
59
|
* @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}.
|
|
60
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/getActiveSubscriptions getActiveSubscriptions} documentation.
|
|
57
61
|
*/
|
|
58
62
|
getActiveSubscriptions(): Promise<string[] | IError>;
|
|
59
63
|
/**
|
|
@@ -64,6 +68,7 @@ export default class SubscriptionsApi extends AsyncModules implements ISubscript
|
|
|
64
68
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
65
69
|
* @description This method requires user authorization.
|
|
66
70
|
* @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}.
|
|
71
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/recoverSubscriptions recoverSubscriptions} documentation.
|
|
67
72
|
*/
|
|
68
73
|
recoverSubscriptions(body: ICancelSubscription): Promise<boolean | IError>;
|
|
69
74
|
}
|
|
@@ -30,6 +30,7 @@ class SubscriptionsApi extends asyncModules_1.default {
|
|
|
30
30
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
31
31
|
* @description This method requires user authorization.
|
|
32
32
|
* @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}.
|
|
33
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/subscribe subscribe} documentation.
|
|
33
34
|
*/
|
|
34
35
|
async subscribe(body) {
|
|
35
36
|
const data = await this._fetchPost(``, body);
|
|
@@ -44,15 +45,10 @@ class SubscriptionsApi extends asyncModules_1.default {
|
|
|
44
45
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
45
46
|
* @description This method requires user authorization.
|
|
46
47
|
* @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}.
|
|
48
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/cancelSubscription cancelSubscription} documentation.
|
|
47
49
|
*/
|
|
48
50
|
async cancelSubscription(body) {
|
|
49
|
-
|
|
50
|
-
await this._fetchDelete(``, body);
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
return e;
|
|
55
|
-
}
|
|
51
|
+
return this._fetchBoolean(() => this._fetchDelete(``, body));
|
|
56
52
|
}
|
|
57
53
|
/**
|
|
58
54
|
* Get all available subscription markers.
|
|
@@ -61,6 +57,7 @@ class SubscriptionsApi extends asyncModules_1.default {
|
|
|
61
57
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
62
58
|
* @description This method requires user authorization.
|
|
63
59
|
* @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}.
|
|
60
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/getAllSubscriptions getAllSubscriptions} documentation.
|
|
64
61
|
*/
|
|
65
62
|
async getAllSubscriptions() {
|
|
66
63
|
const data = await this._fetchGet(``);
|
|
@@ -74,6 +71,7 @@ class SubscriptionsApi extends asyncModules_1.default {
|
|
|
74
71
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
75
72
|
* @description This method requires user authorization.
|
|
76
73
|
* @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}.
|
|
74
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/getActiveSubscriptions getActiveSubscriptions} documentation.
|
|
77
75
|
*/
|
|
78
76
|
async getActiveSubscriptions() {
|
|
79
77
|
const data = await this._fetchGet(`/active`);
|
|
@@ -88,15 +86,10 @@ class SubscriptionsApi extends asyncModules_1.default {
|
|
|
88
86
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
89
87
|
* @description This method requires user authorization.
|
|
90
88
|
* @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}.
|
|
89
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/subscriptions/recoverSubscriptions recoverSubscriptions} documentation.
|
|
91
90
|
*/
|
|
92
91
|
async recoverSubscriptions(body) {
|
|
93
|
-
|
|
94
|
-
await this._fetchPost(`/recover`, body);
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
catch (e) {
|
|
98
|
-
return e;
|
|
99
|
-
}
|
|
92
|
+
return this._fetchBoolean(() => this._fetchPost(`/recover`, body));
|
|
100
93
|
}
|
|
101
94
|
}
|
|
102
95
|
exports.default = SubscriptionsApi;
|
|
@@ -22,6 +22,7 @@ export default class SystemApi extends AsyncModules implements ISystemApi {
|
|
|
22
22
|
* @returns {Promise<unknown | IError>} The response from the server after fetching data from the '/test404' endpoint.
|
|
23
23
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
24
24
|
* @description This method is used to test the 404 error handling by sending a GET request to a specific endpoint.
|
|
25
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/system/test404 test404} documentation.
|
|
25
26
|
*/
|
|
26
27
|
test404(): Promise<unknown | IError>;
|
|
27
28
|
/**
|
|
@@ -30,6 +31,7 @@ export default class SystemApi extends AsyncModules implements ISystemApi {
|
|
|
30
31
|
* @returns {Promise<unknown | IError>} The response from the server after fetching data from the '/test500' endpoint.
|
|
31
32
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
32
33
|
* @description This method is used to test the 500 error handling by sending a GET request to a specific endpoint.
|
|
34
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/system/test500 test500} documentation.
|
|
33
35
|
*/
|
|
34
36
|
test500(): Promise<unknown | IError>;
|
|
35
37
|
/**
|
|
@@ -38,6 +40,7 @@ export default class SystemApi extends AsyncModules implements ISystemApi {
|
|
|
38
40
|
* @returns {Promise<unknown | IError>} Return object with date and count.
|
|
39
41
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
40
42
|
* @description Getting the number of requests to API.
|
|
43
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/system/getApiStat getApiStat} documentation.
|
|
41
44
|
*/
|
|
42
45
|
getApiStat(): Promise<unknown>;
|
|
43
46
|
}
|
package/dist/system/systemApi.js
CHANGED
|
@@ -25,6 +25,7 @@ class SystemApi extends asyncModules_1.default {
|
|
|
25
25
|
* @returns {Promise<unknown | IError>} The response from the server after fetching data from the '/test404' endpoint.
|
|
26
26
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
27
27
|
* @description This method is used to test the 404 error handling by sending a GET request to a specific endpoint.
|
|
28
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/system/test404 test404} documentation.
|
|
28
29
|
*/
|
|
29
30
|
async test404() {
|
|
30
31
|
const result = await this._fetchGet('/test404');
|
|
@@ -36,6 +37,7 @@ class SystemApi extends asyncModules_1.default {
|
|
|
36
37
|
* @returns {Promise<unknown | IError>} The response from the server after fetching data from the '/test500' endpoint.
|
|
37
38
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
38
39
|
* @description This method is used to test the 500 error handling by sending a GET request to a specific endpoint.
|
|
40
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/system/test500 test500} documentation.
|
|
39
41
|
*/
|
|
40
42
|
async test500() {
|
|
41
43
|
const result = await this._fetchGet('/test500');
|
|
@@ -47,6 +49,7 @@ class SystemApi extends asyncModules_1.default {
|
|
|
47
49
|
* @returns {Promise<unknown | IError>} Return object with date and count.
|
|
48
50
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
49
51
|
* @description Getting the number of requests to API.
|
|
52
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/system/getApiStat getApiStat} documentation.
|
|
50
53
|
*/
|
|
51
54
|
async getApiStat() {
|
|
52
55
|
const result = await this._fetchGet('/api-stat');
|
|
@@ -25,6 +25,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
25
25
|
* @returns {Promise<Record<BlockType, ITemplateEntity[]> | IError>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
26
26
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
27
27
|
* @description This function is designed to fetch organized template objects in groups based on their types.
|
|
28
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getAllTemplates getAllTemplates} documentation.
|
|
28
29
|
*/
|
|
29
30
|
getAllTemplates(langCode?: string): Promise<Record<BlockType, ITemplateEntity[]> | IError>;
|
|
30
31
|
/**
|
|
@@ -35,6 +36,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
35
36
|
* @returns {Promise<ITemplateEntity[] | IError>} Returns a TemplateEntity object.
|
|
36
37
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
37
38
|
* @description Fetch template objects that belong to a specific type, with an optional filter by language.
|
|
39
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByType getTemplateByType} documentation.
|
|
38
40
|
*/
|
|
39
41
|
getTemplateByType(type: BlockType, langCode?: string): Promise<ITemplateEntity[] | IError>;
|
|
40
42
|
/**
|
|
@@ -45,6 +47,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
45
47
|
* @returns {Promise<ITemplateEntity | IError>} Returns a TemplateEntity object
|
|
46
48
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
47
49
|
* @description Fetch a specific template object based on its unique marker.
|
|
50
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByMarker getTemplateByMarker} documentation.
|
|
48
51
|
*/
|
|
49
52
|
getTemplateByMarker(marker: string, langCode?: string): Promise<ITemplateEntity | IError>;
|
|
50
53
|
}
|
|
@@ -29,6 +29,7 @@ class TemplatesPreviewApi extends asyncModules_1.default {
|
|
|
29
29
|
* @returns {Promise<Record<BlockType, ITemplateEntity[]> | IError>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
30
30
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
31
31
|
* @description This function is designed to fetch organized template objects in groups based on their types.
|
|
32
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getAllTemplates getAllTemplates} documentation.
|
|
32
33
|
*/
|
|
33
34
|
async getAllTemplates(langCode = this.state.lang) {
|
|
34
35
|
const response = await this._fetchGet(`/all?langCode=${langCode}`);
|
|
@@ -54,6 +55,7 @@ class TemplatesPreviewApi extends asyncModules_1.default {
|
|
|
54
55
|
* @returns {Promise<ITemplateEntity[] | IError>} Returns a TemplateEntity object.
|
|
55
56
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
56
57
|
* @description Fetch template objects that belong to a specific type, with an optional filter by language.
|
|
58
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByType getTemplateByType} documentation.
|
|
57
59
|
*/
|
|
58
60
|
async getTemplateByType(type, langCode = this.state.lang) {
|
|
59
61
|
const result = await this._fetchGet(`?type=${type}&langCode=${langCode}`);
|
|
@@ -69,6 +71,7 @@ class TemplatesPreviewApi extends asyncModules_1.default {
|
|
|
69
71
|
* @returns {Promise<ITemplateEntity | IError>} Returns a TemplateEntity object
|
|
70
72
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
71
73
|
* @description Fetch a specific template object based on its unique marker.
|
|
74
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByMarker getTemplateByMarker} documentation.
|
|
72
75
|
*/
|
|
73
76
|
async getTemplateByMarker(marker, langCode = this.state.lang) {
|
|
74
77
|
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
@@ -23,6 +23,7 @@ export default class TemplatePreviewsApi extends AsyncModules implements ITempla
|
|
|
23
23
|
* @returns {Promise<ITemplatesPreviewEntity[] | IError>} - Returns all TemplatePreviewsEntity template objects.
|
|
24
24
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
25
25
|
* @description This method is used to fetch all available template objects.
|
|
26
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates-preview/getTemplatePreviews getTemplatePreviews} documentation.
|
|
26
27
|
*/
|
|
27
28
|
getTemplatePreviews(langCode?: string): Promise<ITemplatesPreviewEntity[] | IError>;
|
|
28
29
|
/**
|
|
@@ -33,6 +34,7 @@ export default class TemplatePreviewsApi extends AsyncModules implements ITempla
|
|
|
33
34
|
* @returns {Promise<ITemplatesPreviewEntity | IError>} - A promise that resolves to a TemplatePreviewsEntity object representing the template.
|
|
34
35
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
35
36
|
* @description This method is used to fetch a specific template object based on the provided marker.
|
|
37
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates-preview/getTemplatePreviewByMarker getTemplatePreviewByMarker} documentation.
|
|
36
38
|
*/
|
|
37
39
|
getTemplatePreviewByMarker(marker: string, langCode?: string): Promise<ITemplatesPreviewEntity | IError>;
|
|
38
40
|
}
|
|
@@ -27,6 +27,7 @@ class TemplatePreviewsApi extends asyncModules_1.default {
|
|
|
27
27
|
* @returns {Promise<ITemplatesPreviewEntity[] | IError>} - Returns all TemplatePreviewsEntity template objects.
|
|
28
28
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
29
29
|
* @description This method is used to fetch all available template objects.
|
|
30
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates-preview/getTemplatePreviews getTemplatePreviews} documentation.
|
|
30
31
|
*/
|
|
31
32
|
async getTemplatePreviews(langCode = this.state.lang) {
|
|
32
33
|
const result = await this._fetchGet(`?langCode=${langCode}`);
|
|
@@ -42,6 +43,7 @@ class TemplatePreviewsApi extends asyncModules_1.default {
|
|
|
42
43
|
* @returns {Promise<ITemplatesPreviewEntity | IError>} - A promise that resolves to a TemplatePreviewsEntity object representing the template.
|
|
43
44
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
44
45
|
* @description This method is used to fetch a specific template object based on the provided marker.
|
|
46
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/templates-preview/getTemplatePreviewByMarker getTemplatePreviewByMarker} documentation.
|
|
45
47
|
*/
|
|
46
48
|
async getTemplatePreviewByMarker(marker, langCode = this.state.lang) {
|
|
47
49
|
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
@@ -25,6 +25,7 @@ export default class UserActivityApi extends AsyncModules implements IUserActivi
|
|
|
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.
|
|
28
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/user-activity/trackUserActivity trackUserActivity} documentation.
|
|
28
29
|
*/
|
|
29
30
|
trackUserActivity(body: ITrackActivity): Promise<boolean | IError>;
|
|
30
31
|
}
|
|
@@ -28,6 +28,7 @@ class UserActivityApi extends asyncModules_1.default {
|
|
|
28
28
|
* @returns {Promise<boolean | IError>} Returns true if the event was recorded, or an error object if there was an issue.
|
|
29
29
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
30
30
|
* @description Records an activity event for the current authorized user or guest.
|
|
31
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/user-activity/trackUserActivity trackUserActivity} documentation.
|
|
31
32
|
*/
|
|
32
33
|
async trackUserActivity(body) {
|
|
33
34
|
try {
|