oneentry 1.0.66 → 1.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +303 -242
- package/dist/_cjs/admins/adminsApi.d.ts +1 -1
- package/dist/admins/adminsApi.d.ts +6 -4
- package/dist/admins/adminsApi.js +6 -6
- package/dist/attribute-sets/attributeSetsApi.d.ts +6 -4
- package/dist/attribute-sets/attributeSetsApi.js +7 -7
- package/dist/auth-provider/authProviderApi.d.ts +6 -4
- package/dist/auth-provider/authProviderApi.js +14 -10
- package/dist/auth-provider/authProvidersInterfaces.d.ts +2 -2
- package/dist/base/asyncModules.d.ts +16 -0
- package/dist/base/asyncModules.js +164 -0
- package/dist/base/modules.d.ts +14 -0
- package/dist/base/modules.js +173 -0
- package/dist/base/oneEntry.d.ts +0 -23
- package/dist/base/oneEntry.js +74 -236
- package/dist/base/stateModule.d.ts +10 -0
- package/dist/base/stateModule.js +13 -0
- package/dist/base/syncModules.d.ts +14 -0
- package/dist/base/syncModules.js +72 -0
- package/dist/blocks/blocksApi.d.ts +9 -6
- package/dist/blocks/blocksApi.js +17 -16
- package/dist/blocks/blocksInterfaces.d.ts +3 -2
- package/dist/events/eventsApi.d.ts +6 -4
- package/dist/events/eventsApi.js +5 -5
- package/dist/file-uploding/fileUploadingApi.d.ts +6 -4
- package/dist/file-uploding/fileUploadingApi.js +6 -6
- package/dist/forms/formsApi.d.ts +7 -5
- package/dist/forms/formsApi.js +8 -8
- package/dist/formsData/formsDataApi.d.ts +8 -6
- package/dist/formsData/formsDataApi.js +10 -10
- package/dist/general-types/typesApi.d.ts +6 -4
- package/dist/general-types/typesApi.js +5 -5
- package/dist/index.js +22 -20
- package/dist/locales/localesApi.d.ts +6 -4
- package/dist/locales/localesApi.js +5 -5
- package/dist/menus/menusApi.d.ts +7 -5
- package/dist/menus/menusApi.js +7 -7
- package/dist/orders/ordersApi.d.ts +6 -4
- package/dist/orders/ordersApi.js +10 -10
- package/dist/pages/pagesApi.d.ts +6 -4
- package/dist/pages/pagesApi.js +16 -19
- package/dist/payments/paymentsApi.d.ts +6 -10
- package/dist/payments/paymentsApi.js +5 -14
- package/dist/payments/paymentsInterfaces.d.ts +0 -2
- package/dist/product-statuses/productStatusesApi.d.ts +6 -4
- package/dist/product-statuses/productStatusesApi.js +8 -8
- package/dist/products/productsApi.d.ts +107 -52
- package/dist/products/productsApi.js +119 -65
- package/dist/products/productsInterfaces.d.ts +16 -8
- package/dist/system/systemApi.d.ts +6 -4
- package/dist/system/systemApi.js +5 -5
- package/dist/templates/templatesApi.d.ts +9 -6
- package/dist/templates/templatesApi.js +9 -9
- package/dist/templates/templatesInterfaces.d.ts +2 -1
- package/dist/templates-preview/templatesPreviewApi.d.ts +8 -6
- package/dist/templates-preview/templatesPreviewApi.js +10 -10
- package/dist/users/usersApi.d.ts +6 -4
- package/dist/users/usersApi.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AsyncModules SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AsyncModules Headless CMS SDK is an SDK that provides an easy way to interact with the AsyncModules Headless CMS API.
|
|
4
4
|
|
|
5
5
|
## Official Site
|
|
6
6
|
|
|
7
|
-
Visit the official
|
|
7
|
+
Visit the official AsyncModules website at [https://oneentry.cloud](https://oneentry.cloud) to learn more about the AsyncModules Headless CMS.
|
|
8
8
|
|
|
9
9
|
## Sign Up
|
|
10
10
|
|
|
11
|
-
To get started with
|
|
11
|
+
To get started with AsyncModules, sign up for an account at [https://account.oneentry.cloud/authentication/register](https://account.oneentry.cloud/authentication/register).
|
|
12
12
|
|
|
13
13
|
# Installation
|
|
14
14
|
|
|
15
|
-
To install the
|
|
15
|
+
To install the AsyncModules Headless CMS SDK in your project, run the following command:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
npm install oneentry
|
|
@@ -20,7 +20,7 @@ npm install oneentry
|
|
|
20
20
|
|
|
21
21
|
# Usage
|
|
22
22
|
|
|
23
|
-
To use the
|
|
23
|
+
To use the AsyncModules Headless CMS SDK in your project, import the defineOneEntry function:
|
|
24
24
|
```js
|
|
25
25
|
import { defineOneEntry } from 'oneentry'
|
|
26
26
|
|
|
@@ -773,13 +773,13 @@ example: email <br>
|
|
|
773
773
|
const { Blocks } = defineOneEntry('your-url');
|
|
774
774
|
```
|
|
775
775
|
|
|
776
|
-
### Blocks.getBlocks(langCode, offset, limit)
|
|
776
|
+
### Blocks.getBlocks(type, langCode, offset, limit)
|
|
777
777
|
|
|
778
778
|
```js
|
|
779
|
-
const value = await Blocks.getBlocks(
|
|
779
|
+
const value = await Blocks.getBlocks()
|
|
780
780
|
```
|
|
781
781
|
|
|
782
|
-
> This method return array of all blocks object.
|
|
782
|
+
> This method return array of all blocks object. Available values of type : forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, forOrder, service
|
|
783
783
|
|
|
784
784
|
Example return:
|
|
785
785
|
|
|
@@ -3872,13 +3872,33 @@ const userQuery = {
|
|
|
3872
3872
|
> 'nexs' - Does not exist
|
|
3873
3873
|
|
|
3874
3874
|
|
|
3875
|
-
### Products.getProducts(langCode, userQuery)
|
|
3875
|
+
### Products.getProducts(body, langCode, userQuery)
|
|
3876
3876
|
|
|
3877
3877
|
```js
|
|
3878
|
-
const
|
|
3878
|
+
const body = [
|
|
3879
|
+
{
|
|
3880
|
+
"attributeMarker": "price",
|
|
3881
|
+
"conditionMarker": "mth",
|
|
3882
|
+
"statusMarker": "waiting",
|
|
3883
|
+
"conditionValue": 1,
|
|
3884
|
+
"pageUrls": [
|
|
3885
|
+
"23-laminat-floorwood-maxima"
|
|
3886
|
+
]
|
|
3887
|
+
},
|
|
3888
|
+
{
|
|
3889
|
+
"attributeMarker": "price",
|
|
3890
|
+
"conditionMarker": "lth",
|
|
3891
|
+
"conditionValue": 3,
|
|
3892
|
+
"pageUrls": [
|
|
3893
|
+
"23-laminat-floorwood-maxima"
|
|
3894
|
+
]
|
|
3895
|
+
}
|
|
3896
|
+
]
|
|
3897
|
+
|
|
3898
|
+
const value = await Products.getProducts(body)
|
|
3879
3899
|
```
|
|
3880
3900
|
|
|
3881
|
-
> This method searches for
|
|
3901
|
+
> This method searches for all products objects with pagination that do not have a category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
|
|
3882
3902
|
|
|
3883
3903
|
Example return:
|
|
3884
3904
|
|
|
@@ -3922,18 +3942,17 @@ Example return:
|
|
|
3922
3942
|
"templateIdentifier": "my-template",
|
|
3923
3943
|
"shortDescTemplateIdentifier": "my-template-short",
|
|
3924
3944
|
"attributeValues": {
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3945
|
+
"marker": {
|
|
3946
|
+
"value": "",
|
|
3947
|
+
"type": "string",
|
|
3948
|
+
"position": 1,
|
|
3949
|
+
"isProductPreview": false
|
|
3930
3950
|
}
|
|
3931
3951
|
},
|
|
3932
3952
|
"position": 1
|
|
3933
3953
|
}
|
|
3934
3954
|
]
|
|
3935
3955
|
```
|
|
3936
|
-
|
|
3937
3956
|
<details>
|
|
3938
3957
|
<summary>Schema</summary>
|
|
3939
3958
|
|
|
@@ -3969,6 +3988,10 @@ example: my-template <br>
|
|
|
3969
3988
|
*attribute set identifier* <br>
|
|
3970
3989
|
example: 7 <br>
|
|
3971
3990
|
|
|
3991
|
+
**blocks:** array <br>
|
|
3992
|
+
*product blocks* <br>
|
|
3993
|
+
example: ['product_block'] <br>
|
|
3994
|
+
|
|
3972
3995
|
**isSync:** boolean <br>
|
|
3973
3996
|
*indicator of page indexing (true or false)* <br>
|
|
3974
3997
|
example: false <br>
|
|
@@ -4139,64 +4162,86 @@ example: my-template-short <br>
|
|
|
4139
4162
|
</details>
|
|
4140
4163
|
|
|
4141
4164
|
|
|
4142
|
-
### Products.
|
|
4165
|
+
### Products.getProductsByPageId(id, body, langCode, userQuery)
|
|
4143
4166
|
|
|
4144
4167
|
```js
|
|
4145
|
-
const
|
|
4168
|
+
const body = [
|
|
4169
|
+
{
|
|
4170
|
+
"attributeMarker": "price",
|
|
4171
|
+
"conditionMarker": "mth",
|
|
4172
|
+
"statusMarker": "waiting",
|
|
4173
|
+
"conditionValue": 1,
|
|
4174
|
+
"pageUrls": [
|
|
4175
|
+
"23-laminat-floorwood-maxima"
|
|
4176
|
+
]
|
|
4177
|
+
},
|
|
4178
|
+
{
|
|
4179
|
+
"attributeMarker": "price",
|
|
4180
|
+
"conditionMarker": "lth",
|
|
4181
|
+
"conditionValue": 3,
|
|
4182
|
+
"pageUrls": [
|
|
4183
|
+
"23-laminat-floorwood-maxima"
|
|
4184
|
+
]
|
|
4185
|
+
}
|
|
4186
|
+
]
|
|
4187
|
+
|
|
4188
|
+
const value = await Products.getProductsByPageId(1764, body)
|
|
4146
4189
|
```
|
|
4147
4190
|
|
|
4148
|
-
> This method searches for all
|
|
4191
|
+
> This method searches for all products objects with pagination for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
|
|
4149
4192
|
|
|
4150
4193
|
Example return:
|
|
4151
4194
|
|
|
4152
4195
|
```json
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
"
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
"
|
|
4170
|
-
"
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
"
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
"
|
|
4192
|
-
"
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4196
|
+
[
|
|
4197
|
+
{
|
|
4198
|
+
"id": 1764,
|
|
4199
|
+
"localizeInfos": {
|
|
4200
|
+
"title": "Product"
|
|
4201
|
+
},
|
|
4202
|
+
"isVisible": true,
|
|
4203
|
+
"statusId": 1,
|
|
4204
|
+
"relatedIds": [
|
|
4205
|
+
1,
|
|
4206
|
+
2,
|
|
4207
|
+
3
|
|
4208
|
+
],
|
|
4209
|
+
"attributeSetId": 7,
|
|
4210
|
+
"isSync": true,
|
|
4211
|
+
"price": 0,
|
|
4212
|
+
"additional": {
|
|
4213
|
+
"prices": {
|
|
4214
|
+
"min": 0,
|
|
4215
|
+
"max": 100
|
|
4216
|
+
}
|
|
4217
|
+
},
|
|
4218
|
+
"blocks": [
|
|
4219
|
+
null
|
|
4220
|
+
],
|
|
4221
|
+
"sku": "0-123",
|
|
4222
|
+
"productPages": [
|
|
4223
|
+
{
|
|
4224
|
+
"id": 8997,
|
|
4225
|
+
"pageId": 1176,
|
|
4226
|
+
"productId": 8872
|
|
4227
|
+
}
|
|
4228
|
+
],
|
|
4229
|
+
"statusLocalizeInfos": {
|
|
4230
|
+
"title": "Product"
|
|
4231
|
+
},
|
|
4232
|
+
"templateIdentifier": "my-template",
|
|
4233
|
+
"shortDescTemplateIdentifier": "my-template-short",
|
|
4234
|
+
"attributeValues": {
|
|
4235
|
+
"marker": {
|
|
4236
|
+
"value": "",
|
|
4237
|
+
"type": "string",
|
|
4238
|
+
"position": 1,
|
|
4239
|
+
"isProductPreview": false
|
|
4240
|
+
}
|
|
4241
|
+
},
|
|
4242
|
+
"position": 1
|
|
4243
|
+
}
|
|
4244
|
+
]
|
|
4200
4245
|
```
|
|
4201
4246
|
<details>
|
|
4202
4247
|
<summary>Schema</summary>
|
|
@@ -4271,64 +4316,119 @@ example: my-template-short <br>
|
|
|
4271
4316
|
|
|
4272
4317
|
</details>
|
|
4273
4318
|
|
|
4274
|
-
|
|
4319
|
+
|
|
4320
|
+
### Products.getProductsPriceByPageUrl(url, userQuery)
|
|
4275
4321
|
|
|
4276
4322
|
```js
|
|
4277
|
-
const value = await Products.
|
|
4323
|
+
const value = await Products.getProductsPriceByPageUrl('catalog')
|
|
4278
4324
|
```
|
|
4279
4325
|
|
|
4280
|
-
> This method searches for
|
|
4326
|
+
> This method searches for information about products and prices for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
|
|
4281
4327
|
|
|
4282
4328
|
Example return:
|
|
4283
4329
|
|
|
4284
4330
|
```json
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
"
|
|
4289
|
-
}
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
"productPages": [
|
|
4331
|
+
[
|
|
4332
|
+
{
|
|
4333
|
+
"id": 1764,
|
|
4334
|
+
"price": 0
|
|
4335
|
+
}
|
|
4336
|
+
]
|
|
4337
|
+
```
|
|
4338
|
+
<details>
|
|
4339
|
+
<summary>Schema</summary>
|
|
4340
|
+
|
|
4341
|
+
**id:** number <br>
|
|
4342
|
+
*object identifier* <br>
|
|
4343
|
+
example: 1764 <br>
|
|
4344
|
+
|
|
4345
|
+
**price:** number <br>
|
|
4346
|
+
*price value of the product page taken from the index* <br>
|
|
4347
|
+
example: 0 <br>
|
|
4348
|
+
|
|
4349
|
+
</details>
|
|
4350
|
+
|
|
4351
|
+
|
|
4352
|
+
### Products.getProductsByPageUrl(url, body, langCode, userQuery)
|
|
4353
|
+
|
|
4354
|
+
```js
|
|
4355
|
+
const body = [
|
|
4311
4356
|
{
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
"isProductPreview": false
|
|
4357
|
+
"attributeMarker": "price",
|
|
4358
|
+
"conditionMarker": "mth",
|
|
4359
|
+
"statusMarker": "waiting",
|
|
4360
|
+
"conditionValue": 1,
|
|
4361
|
+
"pageUrls": [
|
|
4362
|
+
"23-laminat-floorwood-maxima"
|
|
4363
|
+
]
|
|
4364
|
+
},
|
|
4365
|
+
{
|
|
4366
|
+
"attributeMarker": "price",
|
|
4367
|
+
"conditionMarker": "lth",
|
|
4368
|
+
"conditionValue": 3,
|
|
4369
|
+
"pageUrls": [
|
|
4370
|
+
"23-laminat-floorwood-maxima"
|
|
4371
|
+
]
|
|
4328
4372
|
}
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4373
|
+
]
|
|
4374
|
+
|
|
4375
|
+
const value = await Products.getProductsByPageUrl('catalog', body)
|
|
4376
|
+
```
|
|
4377
|
+
|
|
4378
|
+
> This method searches for all products objects with pagination for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
|
|
4379
|
+
|
|
4380
|
+
Example return:
|
|
4381
|
+
|
|
4382
|
+
```json
|
|
4383
|
+
[
|
|
4384
|
+
{
|
|
4385
|
+
"id": 1764,
|
|
4386
|
+
"localizeInfos": {
|
|
4387
|
+
"title": "Product"
|
|
4388
|
+
},
|
|
4389
|
+
"isVisible": true,
|
|
4390
|
+
"statusId": 1,
|
|
4391
|
+
"relatedIds": [
|
|
4392
|
+
1,
|
|
4393
|
+
2,
|
|
4394
|
+
3
|
|
4395
|
+
],
|
|
4396
|
+
"attributeSetId": 7,
|
|
4397
|
+
"isSync": true,
|
|
4398
|
+
"price": 0,
|
|
4399
|
+
"additional": {
|
|
4400
|
+
"prices": {
|
|
4401
|
+
"min": 0,
|
|
4402
|
+
"max": 100
|
|
4403
|
+
}
|
|
4404
|
+
},
|
|
4405
|
+
"blocks": [
|
|
4406
|
+
null
|
|
4407
|
+
],
|
|
4408
|
+
"sku": "0-123",
|
|
4409
|
+
"productPages": [
|
|
4410
|
+
{
|
|
4411
|
+
"id": 8997,
|
|
4412
|
+
"pageId": 1176,
|
|
4413
|
+
"productId": 8872
|
|
4414
|
+
}
|
|
4415
|
+
],
|
|
4416
|
+
"statusLocalizeInfos": {
|
|
4417
|
+
"title": "Product"
|
|
4418
|
+
},
|
|
4419
|
+
"templateIdentifier": "my-template",
|
|
4420
|
+
"shortDescTemplateIdentifier": "my-template-short",
|
|
4421
|
+
"attributeValues": {
|
|
4422
|
+
"marker": {
|
|
4423
|
+
"value": "",
|
|
4424
|
+
"type": "string",
|
|
4425
|
+
"position": 1,
|
|
4426
|
+
"isProductPreview": false
|
|
4427
|
+
}
|
|
4428
|
+
},
|
|
4429
|
+
"position": 1
|
|
4430
|
+
}
|
|
4431
|
+
]
|
|
4332
4432
|
```
|
|
4333
4433
|
<details>
|
|
4334
4434
|
<summary>Schema</summary>
|
|
@@ -4345,7 +4445,6 @@ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
|
|
|
4345
4445
|
*json description of the item status object, taking into account the language* <br>
|
|
4346
4446
|
example: { "title": "Product" <br>
|
|
4347
4447
|
|
|
4348
|
-
|
|
4349
4448
|
**localizeInfos:** Record<string, any> <br>
|
|
4350
4449
|
*json description of the main page data object taking into account the language "en_US" (for example)* <br>
|
|
4351
4450
|
example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
|
|
@@ -4404,6 +4503,7 @@ example: my-template-short <br>
|
|
|
4404
4503
|
|
|
4405
4504
|
</details>
|
|
4406
4505
|
|
|
4506
|
+
|
|
4407
4507
|
### Products.getRelatedProductsById(id, langCode, userQuery)
|
|
4408
4508
|
|
|
4409
4509
|
```js
|
|
@@ -4669,162 +4769,123 @@ example: my-template-short <br>
|
|
|
4669
4769
|
</details>
|
|
4670
4770
|
|
|
4671
4771
|
|
|
4672
|
-
### Products.
|
|
4772
|
+
### Products.getProductBlockById(id)
|
|
4673
4773
|
|
|
4674
4774
|
```js
|
|
4675
|
-
|
|
4676
|
-
attributeMarker: "price",
|
|
4677
|
-
conditionMarker: "lth",
|
|
4678
|
-
conditionValue: "200",
|
|
4679
|
-
}
|
|
4680
|
-
|
|
4681
|
-
const value = await Products.filterProduct(data, 'en_US', userQuery)
|
|
4775
|
+
const value = await Products.getProductBlockById(1764)
|
|
4682
4776
|
```
|
|
4683
4777
|
|
|
4684
|
-
|
|
4778
|
+
> This method Getting a product block object by product id.
|
|
4685
4779
|
|
|
4686
|
-
|
|
4780
|
+
Example return:
|
|
4781
|
+
|
|
4782
|
+
```json
|
|
4687
4783
|
[
|
|
4688
4784
|
{
|
|
4689
|
-
"
|
|
4690
|
-
"
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
"
|
|
4696
|
-
"
|
|
4697
|
-
"
|
|
4698
|
-
"
|
|
4785
|
+
"id": 4,
|
|
4786
|
+
"localizeInfos": {
|
|
4787
|
+
"title": "Name"
|
|
4788
|
+
},
|
|
4789
|
+
"version": 0,
|
|
4790
|
+
"position": 3,
|
|
4791
|
+
"identifier": "product",
|
|
4792
|
+
"type": "forProductBlock",
|
|
4793
|
+
"templateIdentifier": null,
|
|
4794
|
+
"isVisible": true,
|
|
4795
|
+
"attributeValues": {
|
|
4796
|
+
"attr": {
|
|
4797
|
+
"type": "string",
|
|
4798
|
+
"value": "",
|
|
4799
|
+
"position": 0,
|
|
4800
|
+
"isProductPreview": false
|
|
4801
|
+
}
|
|
4802
|
+
},
|
|
4803
|
+
"countElementsPerRow": 3,
|
|
4804
|
+
"products": [
|
|
4805
|
+
{
|
|
4806
|
+
"id": 446,
|
|
4807
|
+
"localizeInfos": {
|
|
4808
|
+
"title": "new product 3"
|
|
4809
|
+
},
|
|
4810
|
+
"relatedIds": [1, 2],
|
|
4811
|
+
"statusId": null,
|
|
4812
|
+
"attributeSetId": 11,
|
|
4813
|
+
"position": 3,
|
|
4814
|
+
"templateIdentifier": null,
|
|
4815
|
+
"shortDescTemplateIdentifier": null,
|
|
4816
|
+
"price": 543,
|
|
4817
|
+
"sku": "ggg",
|
|
4818
|
+
"isSync": true,
|
|
4819
|
+
"attributeValues": {
|
|
4820
|
+
"sku": {
|
|
4821
|
+
"type": "string",
|
|
4822
|
+
"value": "ggg",
|
|
4823
|
+
"position": 0,
|
|
4824
|
+
"isProductPreview": false
|
|
4825
|
+
},
|
|
4826
|
+
"images": {
|
|
4827
|
+
"type": "groupOfImages",
|
|
4828
|
+
"value": {},
|
|
4829
|
+
"position": 3,
|
|
4830
|
+
"isProductPreview": false
|
|
4831
|
+
}
|
|
4832
|
+
},
|
|
4833
|
+
"isVisible": true
|
|
4834
|
+
}
|
|
4835
|
+
]
|
|
4699
4836
|
}
|
|
4700
4837
|
]
|
|
4701
4838
|
```
|
|
4702
4839
|
|
|
4703
|
-
> This method filters product page objects with pagination and multiple filtering based on the provided data request body. The data parameter should be an array of {attributeMarker:string,conditionMarker:string,conditionValue:number,pageId:number}.
|
|
4704
|
-
|
|
4705
|
-
Example return:
|
|
4706
|
-
|
|
4707
|
-
```json
|
|
4708
|
-
{
|
|
4709
|
-
"id": 1764,
|
|
4710
|
-
"localizeInfos": {
|
|
4711
|
-
"title": "Product"
|
|
4712
|
-
},
|
|
4713
|
-
"isVisible": true,
|
|
4714
|
-
"statusId": 1,
|
|
4715
|
-
"relatedIds": [
|
|
4716
|
-
1,
|
|
4717
|
-
2,
|
|
4718
|
-
3
|
|
4719
|
-
],
|
|
4720
|
-
"attributeSetId": 7,
|
|
4721
|
-
"isSync": true,
|
|
4722
|
-
"price": 0,
|
|
4723
|
-
"additional": {
|
|
4724
|
-
"prices": {
|
|
4725
|
-
"min": 0,
|
|
4726
|
-
"max": 100
|
|
4727
|
-
}
|
|
4728
|
-
},
|
|
4729
|
-
"blocks": [
|
|
4730
|
-
null
|
|
4731
|
-
],
|
|
4732
|
-
"sku": "0-123",
|
|
4733
|
-
"productPages": [
|
|
4734
|
-
{
|
|
4735
|
-
"id": 8997,
|
|
4736
|
-
"pageId": 1176,
|
|
4737
|
-
"productId": 8872
|
|
4738
|
-
}
|
|
4739
|
-
],
|
|
4740
|
-
"statusLocalizeInfos": {
|
|
4741
|
-
"title": "Product"
|
|
4742
|
-
},
|
|
4743
|
-
"templateIdentifier": "my-template",
|
|
4744
|
-
"shortDescTemplateIdentifier": "my-template-short",
|
|
4745
|
-
"attributeValues": {
|
|
4746
|
-
"marker": {
|
|
4747
|
-
"value": "",
|
|
4748
|
-
"type": "string",
|
|
4749
|
-
"position": 1,
|
|
4750
|
-
"isProductPreview": false
|
|
4751
|
-
}
|
|
4752
|
-
},
|
|
4753
|
-
"position": 1
|
|
4754
|
-
}
|
|
4755
|
-
```
|
|
4756
4840
|
<details>
|
|
4757
4841
|
<summary>Schema</summary>
|
|
4758
4842
|
|
|
4759
4843
|
**id:** number <br>
|
|
4760
|
-
*object identifier*
|
|
4844
|
+
*object identifier*
|
|
4761
4845
|
example: 1764 <br>
|
|
4762
4846
|
|
|
4763
|
-
**
|
|
4764
|
-
*
|
|
4765
|
-
example:
|
|
4847
|
+
**attributeSetId:** number <br>
|
|
4848
|
+
*identifier for the used attribute set* <br>
|
|
4849
|
+
example: 7 <br>
|
|
4766
4850
|
|
|
4767
|
-
**
|
|
4768
|
-
*
|
|
4769
|
-
example: {
|
|
4851
|
+
**localizeInfos:** CommonLocalizeInfos <br>
|
|
4852
|
+
*block name with localization* <br>
|
|
4853
|
+
example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
|
|
4770
4854
|
|
|
4771
|
-
**
|
|
4772
|
-
*
|
|
4773
|
-
example: OrderedMap { "
|
|
4855
|
+
**customSettings:** BlockCustomSettings <br>
|
|
4856
|
+
*custom settings for different block types* <br>
|
|
4857
|
+
example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ] } <br>
|
|
4774
4858
|
|
|
4775
|
-
**
|
|
4776
|
-
*
|
|
4777
|
-
example:
|
|
4859
|
+
**version:** number <br>
|
|
4860
|
+
*object version number* <br>
|
|
4861
|
+
example: 10 <br>
|
|
4778
4862
|
|
|
4779
|
-
**
|
|
4863
|
+
**identifier:** string <br>
|
|
4864
|
+
*textual identifier for the field record* <br>
|
|
4865
|
+
example: catalog <br>
|
|
4866
|
+
default: marker <br>
|
|
4867
|
+
|
|
4868
|
+
**position:** number <br>
|
|
4780
4869
|
*position number (for sorting)* <br>
|
|
4781
4870
|
example: 192 <br>
|
|
4782
4871
|
|
|
4783
|
-
**templateIdentifier:** string <br>
|
|
4784
|
-
*custom identifier of the associated template* <br>
|
|
4785
|
-
example: my-template <br>
|
|
4786
|
-
|
|
4787
|
-
**attributeSetId:** number <br>
|
|
4788
|
-
*attribute set identifier* <br>
|
|
4789
|
-
example: 7 <br>
|
|
4790
|
-
|
|
4791
|
-
**blocks:** array <br>
|
|
4792
|
-
*product blocks* <br>
|
|
4793
|
-
example: ['product_block'] <br>
|
|
4794
|
-
|
|
4795
|
-
**isSync:** boolean <br>
|
|
4796
|
-
*indicator of page indexing (true or false)* <br>
|
|
4797
|
-
example: false <br>
|
|
4798
|
-
|
|
4799
4872
|
**attributeValues:** Record<string, string> <br>
|
|
4800
|
-
*
|
|
4873
|
+
*array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
|
|
4801
4874
|
example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
|
|
4802
4875
|
|
|
4803
|
-
**
|
|
4804
|
-
*
|
|
4805
|
-
example:
|
|
4806
|
-
|
|
4807
|
-
**sku:** string <br>
|
|
4808
|
-
*product SKU value taken from the index* <br>
|
|
4809
|
-
example: 1 <br>
|
|
4810
|
-
|
|
4811
|
-
**relatedIds:** array <br>
|
|
4812
|
-
*identifiers of related product pages* <br>
|
|
4813
|
-
example: List [ 1, 2, 3 ] <br>
|
|
4876
|
+
**type:** string <br>
|
|
4877
|
+
*block type* <br>
|
|
4878
|
+
example: forNewsPage <br>
|
|
4814
4879
|
|
|
4815
|
-
**
|
|
4816
|
-
*
|
|
4817
|
-
|
|
4880
|
+
**templateIdentifier:** string <br>
|
|
4881
|
+
*template marker used by the block (can be null)* <br>
|
|
4882
|
+
Enum:
|
|
4883
|
+
[ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
|
|
4884
|
+
example: null <br>
|
|
4818
4885
|
|
|
4819
|
-
|
|
4820
|
-
*custom identifier of the associated template* <br>
|
|
4821
|
-
example: my-template <br>
|
|
4886
|
+
</details>
|
|
4822
4887
|
|
|
4823
|
-
**shortDescTemplateIdentifier** string <br>
|
|
4824
|
-
*custom identifier of the associated template for short description* <br>
|
|
4825
|
-
example: my-template-short <br>
|
|
4826
4888
|
|
|
4827
|
-
</details>
|
|
4828
4889
|
|
|
4829
4890
|
### Products.searchProduct(name, langCode)
|
|
4830
4891
|
|