oneentry 1.0.9 → 1.0.10
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 +0 -169
- package/dist/products/productsApi.js +1 -1
- package/dist/products/productsApi.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,6 @@ Page,
|
|
|
24
24
|
ProductStatus,
|
|
25
25
|
Templates,
|
|
26
26
|
TemplatesPreview,
|
|
27
|
-
Markers,
|
|
28
27
|
AttributeSet,
|
|
29
28
|
Admins,
|
|
30
29
|
GeneralTypes,
|
|
@@ -477,84 +476,7 @@ Example return:
|
|
|
477
476
|
}
|
|
478
477
|
]
|
|
479
478
|
```
|
|
480
|
-
## MarkersApi
|
|
481
479
|
|
|
482
|
-
```
|
|
483
|
-
const { Markers } = defineOneEntry('your-url')
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
### getMarker
|
|
487
|
-
|
|
488
|
-
```
|
|
489
|
-
const value = await Markers.getMarker('marker')
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
> This method retrieves a single marker object based on its marker identifier (marker) from the API. It returns a Promise that resolves to the marker object of type MarkerEntity.
|
|
493
|
-
|
|
494
|
-
Example return:
|
|
495
|
-
```
|
|
496
|
-
{
|
|
497
|
-
"id": 17,
|
|
498
|
-
"updatedDate": "2023-09-23T12:30:08.153Z",
|
|
499
|
-
"version": 10,
|
|
500
|
-
"identifier": "catalog",
|
|
501
|
-
"name": "string",
|
|
502
|
-
"marker": "string",
|
|
503
|
-
"localizeInfos": {
|
|
504
|
-
"ru_RU": {
|
|
505
|
-
"title": "Мой маркер"
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
```
|
|
510
|
-
### getMarkers
|
|
511
|
-
|
|
512
|
-
```
|
|
513
|
-
const value = await Markers.getMarkers({limit:20, offset:5})
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
> This method retrieves all marker objects from the API. It accepts two optional parameters limit (default 30) and offset (default 0) that allow you to limit the selection of records and offset the records selection, respectively. It returns a Promise that resolves to an object of type ItemsWithTotal, where items is an array of MarkerEntity objects and total is the total number of markers found.
|
|
517
|
-
|
|
518
|
-
Example return:
|
|
519
|
-
```
|
|
520
|
-
{
|
|
521
|
-
"id": 17,
|
|
522
|
-
"updatedDate": "2023-09-23T12:31:19.409Z",
|
|
523
|
-
"version": 10,
|
|
524
|
-
"identifier": "catalog",
|
|
525
|
-
"name": "string",
|
|
526
|
-
"marker": "string",
|
|
527
|
-
"localizeInfos": {
|
|
528
|
-
"ru_RU": {
|
|
529
|
-
"title": "Мой маркер"
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
```
|
|
534
|
-
### getMarkersById
|
|
535
|
-
|
|
536
|
-
```
|
|
537
|
-
const value = await Markers.getMarkersById(1)
|
|
538
|
-
```
|
|
539
|
-
|
|
540
|
-
> This method retrieves a single marker object based on its identifier (id) from the API. It returns a Promise that resolves to the marker object of type MarkerEntity.
|
|
541
|
-
|
|
542
|
-
Example return:
|
|
543
|
-
```
|
|
544
|
-
{
|
|
545
|
-
"id": 17,
|
|
546
|
-
"updatedDate": "2023-09-23T12:32:47.591Z",
|
|
547
|
-
"version": 10,
|
|
548
|
-
"identifier": "catalog",
|
|
549
|
-
"name": "string",
|
|
550
|
-
"marker": "string",
|
|
551
|
-
"localizeInfos": {
|
|
552
|
-
"ru_RU": {
|
|
553
|
-
"title": "Мой маркер"
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
```
|
|
558
480
|
## MenusApi
|
|
559
481
|
|
|
560
482
|
```
|
|
@@ -885,57 +807,7 @@ Example return:
|
|
|
885
807
|
"products": 0
|
|
886
808
|
}
|
|
887
809
|
```
|
|
888
|
-
### getChildPagesByParentUrl
|
|
889
|
-
|
|
890
|
-
```
|
|
891
|
-
const value = await Pages.getChildPagesByParentUrl('shop', 'en_US')
|
|
892
|
-
```
|
|
893
810
|
|
|
894
|
-
> This method retrieves child pages object with information as an array based on the parent page's URL (url). It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data for the selected parent. Get required language parameter.
|
|
895
|
-
|
|
896
|
-
Example return:
|
|
897
|
-
```
|
|
898
|
-
[
|
|
899
|
-
{
|
|
900
|
-
"id": 1764,
|
|
901
|
-
"parentId": null,
|
|
902
|
-
"config": {
|
|
903
|
-
"rowsPerPage": 1,
|
|
904
|
-
"productsPerRow": 1
|
|
905
|
-
},
|
|
906
|
-
"pageUrl": "string",
|
|
907
|
-
"depth": 3,
|
|
908
|
-
"localizeInfos": {
|
|
909
|
-
"ru_RU": {
|
|
910
|
-
"title": "Каталог",
|
|
911
|
-
"content": "Контент для каталога",
|
|
912
|
-
"menuTitle": "Каталог"
|
|
913
|
-
}
|
|
914
|
-
},
|
|
915
|
-
"isVisible": true,
|
|
916
|
-
"isEditorDisabled": false,
|
|
917
|
-
"products": 0,
|
|
918
|
-
"attributeSetId": 7,
|
|
919
|
-
"forms": [
|
|
920
|
-
null
|
|
921
|
-
],
|
|
922
|
-
"blocks": [
|
|
923
|
-
null
|
|
924
|
-
],
|
|
925
|
-
"templateIdentifier": "my-template",
|
|
926
|
-
"attributeValues": {
|
|
927
|
-
"en_US": {
|
|
928
|
-
"marker": {
|
|
929
|
-
"value": "",
|
|
930
|
-
"type": "string"
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
},
|
|
934
|
-
"position": 192,
|
|
935
|
-
"type": "forNewsPage"
|
|
936
|
-
}
|
|
937
|
-
]
|
|
938
|
-
```
|
|
939
811
|
### getConfigPageByUrl
|
|
940
812
|
|
|
941
813
|
```
|
|
@@ -1543,47 +1415,6 @@ true
|
|
|
1543
1415
|
const { Templates } = defineOneEntry('your-url')
|
|
1544
1416
|
```
|
|
1545
1417
|
|
|
1546
|
-
### getTemplates
|
|
1547
|
-
|
|
1548
|
-
```
|
|
1549
|
-
const value = await Templates.getTemplates()
|
|
1550
|
-
```
|
|
1551
|
-
|
|
1552
|
-
> This method retrieves all template objects of a specific type from the API. It returns a Promise that resolves to an array of template objects.
|
|
1553
|
-
|
|
1554
|
-
Example return:
|
|
1555
|
-
```
|
|
1556
|
-
[
|
|
1557
|
-
{
|
|
1558
|
-
"id": 1764,
|
|
1559
|
-
"updatedDate": "2023-09-25T13:47:05.811Z",
|
|
1560
|
-
"version": 10,
|
|
1561
|
-
"identifier": "catalog",
|
|
1562
|
-
"attributesSets": {
|
|
1563
|
-
"string_id19": "",
|
|
1564
|
-
"string_id18": ""
|
|
1565
|
-
},
|
|
1566
|
-
"attributeSetId": 0,
|
|
1567
|
-
"generalType": {
|
|
1568
|
-
"id": 4,
|
|
1569
|
-
"type": "forCatalogPages"
|
|
1570
|
-
},
|
|
1571
|
-
"generalTypeId": 4,
|
|
1572
|
-
"localizeInfos": {
|
|
1573
|
-
"ru_RU": {
|
|
1574
|
-
"title": "Шаблон страниц"
|
|
1575
|
-
}
|
|
1576
|
-
},
|
|
1577
|
-
"position": {
|
|
1578
|
-
"id": 12,
|
|
1579
|
-
"objectId": 1,
|
|
1580
|
-
"objectType": "module",
|
|
1581
|
-
"position": "0|hzzzzz:"
|
|
1582
|
-
},
|
|
1583
|
-
"positionId": "0|hzzzzz:"
|
|
1584
|
-
}
|
|
1585
|
-
]
|
|
1586
|
-
```
|
|
1587
1418
|
### getAllTemplates
|
|
1588
1419
|
|
|
1589
1420
|
```
|
|
@@ -247,7 +247,7 @@ class ProductApi extends oneEntry_1.default {
|
|
|
247
247
|
*/
|
|
248
248
|
searchProduct(name, langCode = 'en_US') {
|
|
249
249
|
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
-
const searchProducts = yield this._fetchGet(`/quick/search?
|
|
250
|
+
const searchProducts = yield this._fetchGet(`/quick/search?lang=${langCode}&name=${name}`);
|
|
251
251
|
const productsList = [];
|
|
252
252
|
yield Promise.all(searchProducts.map((product) => __awaiter(this, void 0, void 0, function* () {
|
|
253
253
|
yield this.getProductById(product.id).then((result) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productsApi.js","sourceRoot":"","sources":["../../src/products/productsApi.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,+CAAuC;AAEvC;;GAEG;AACH,MAAqB,UAAW,SAAQ,kBAAQ;IAC5C,YAAY,GAAU;QAClB,KAAK,CAAC,GAAG,CAAC,CAAA;QAIN,kBAAa,GAAkB;YACnC,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,EAAE;YACT,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;YACpB,eAAe,EAAE,IAAI;YACrB,eAAe,EAAE,IAAI;YACrB,QAAQ,EAAE,OAAO;YACjB,SAAS,EAAE,MAAM;YACjB,OAAO,EAAE,IAAI;SAChB,CAAA;QAbG,IAAI,CAAC,IAAI,IAAI,uBAAuB,CAAA;IACxC,CAAC;IAcD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACU,WAAW,CAAC,SAA0B;;YAC/C,MAAM,KAAK,mCAAsB,IAAI,CAAC,aAAa,GAAK,SAAS,CAAC,CAAA;YAElE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAA;YACzF,OAAO,MAAM,CAAC,KAAK,CAAA;QACvB,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACU,oBAAoB,CAAC,SAAyB;;YACvD,MAAM,KAAK,mCAAsB,IAAI,CAAC,aAAa,GAAK,SAAS,CAAC,CAAA;YAElE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAA;YACtF,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACU,mBAAmB,CAAC,EAAS,EAA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