oneentry 1.0.19 → 1.0.21

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 CHANGED
@@ -18,7 +18,7 @@ To install the OneEntry Headless CMS SDK in your project, run the following comm
18
18
  ```
19
19
  npm install oneentry
20
20
  ```
21
- >
21
+ >
22
22
 
23
23
  # Usage
24
24
 
@@ -27,17 +27,17 @@ To use the OneEntry Headless CMS SDK in your project, import the defineOneEntry
27
27
  import { defineOneEntry } from 'oneentry'
28
28
 
29
29
  const {
30
- Product,
31
- Page,
32
- ProductStatus,
33
- Templates,
34
- TemplatesPreview,
35
- AttributeSet,
36
- Admins,
37
- GeneralTypes,
38
- Locales,
39
- Menus,
40
- Modules
30
+ Admins,
31
+ Forms,
32
+ FormData,
33
+ GeneralTypes,
34
+ Locales,
35
+ Menus,
36
+ Pages,
37
+ Products,
38
+ ProductStatuses,
39
+ Templates,
40
+ TemplatePreviews
41
41
  } = defineOneEntry('your-url')
42
42
  ```
43
43
  >
@@ -46,9 +46,6 @@ Modules
46
46
  ```
47
47
  const api = defineOneEntry('your-url')
48
48
  ```
49
- # Classes and Methods
50
-
51
- The OneEntry Headless CMS SDK contains two classes: ProductApi and PageApi.
52
49
 
53
50
  ## Admins
54
51
 
@@ -100,7 +97,7 @@ const value = await Forms.getAllForms()
100
97
 
101
98
  > This method retrieves all form objects from the API. It returns a Promise that resolves to an array of FormEntity objects.
102
99
 
103
- Example return:
100
+ Example return:
104
101
  ```
105
102
  [
106
103
  {
@@ -108,7 +105,7 @@ Example return:
108
105
  "attributeSetId": 0,
109
106
  "processingType": "email",
110
107
  "localizeInfos": {
111
- "ru_RU": {
108
+ "en_US": {
112
109
  "title": "My form",
113
110
  "titleForSite": "",
114
111
  "successMessage": "",
@@ -150,8 +147,8 @@ Example return:
150
147
  "attributeSetId": 0,
151
148
  "processingType": "email",
152
149
  "localizeInfos": {
153
- "ru_RU": {
154
- "title": "Моя форма",
150
+ "en_US": {
151
+ "title": "My form",
155
152
  "titleForSite": "",
156
153
  "successMessage": "",
157
154
  "unsuccessMessage": "",
@@ -175,14 +172,30 @@ Example return:
175
172
  }
176
173
  ```
177
174
 
178
- ## FormsData
175
+ ## FormData
179
176
 
180
- const { FormsData } = defineOneEntry('your-url');
177
+ const { FormData } = defineOneEntry('your-url');
181
178
 
182
179
  ### postFormsData
183
180
 
184
181
  ```
185
- const value = await FormsData.postFormsData()
182
+ const value = await FormData.postFormsData(data)
183
+ ```
184
+
185
+ >The method takes as a parameter request body
186
+
187
+ Example
188
+ ```
189
+ {
190
+ "formIdentifier": "my-form",
191
+ "formData": [
192
+ {
193
+ "marker": "name_1",
194
+ "value": "Name",
195
+ "langCode": "en_US"
196
+ }
197
+ ]
198
+ }
186
199
  ```
187
200
 
188
201
  > This method retrieves all form data objects from the API. It returns a Promise that resolves to an array of objects of type CreateFormDataDto.
@@ -197,7 +210,7 @@ Example return:
197
210
  "formData": {
198
211
  "en_US": [
199
212
  {
200
- "marker": "naimenovanie_1",
213
+ "marker": "name_1",
201
214
  "value": "Name"
202
215
  }
203
216
  ]
@@ -208,7 +221,7 @@ Example return:
208
221
  ### getFormsData
209
222
 
210
223
  ```
211
- const value = await FormsData.getFormsData()
224
+ const value = await FormData.getFormsData()
212
225
  ```
213
226
 
214
227
  > This method creates form data objects by sending a request to the API. It accepts an array of objects of type IFormsPost as the request body to provide the necessary form data. It returns a Promise that resolves to the created CreateFormDataDto objects.
@@ -224,7 +237,7 @@ Example return:
224
237
  "formData": {
225
238
  "en_US": [
226
239
  {
227
- "marker": "naimenovanie_1",
240
+ "marker": "name_1",
228
241
  "value": "Name"
229
242
  }
230
243
  ]
@@ -236,7 +249,7 @@ Example return:
236
249
  ### getFormsDataByMarker
237
250
 
238
251
  ```
239
- const value = await FormsData.getFormsDataByMarker('my-marker')
252
+ const value = await FormData.getFormsDataByMarker('my-marker')
240
253
  ```
241
254
 
242
255
  > This method retrieves a specific form data object by its marker from the API. It accepts a marker parameter as the marker of the form data. It returns a Promise that resolves to an array of objects of type FormDataEntity.
@@ -251,7 +264,7 @@ Example return:
251
264
  "formData": {
252
265
  "en_US": [
253
266
  {
254
- "marker": "naimenovanie_1",
267
+ "marker": "name_1",
255
268
  "value": "Name"
256
269
  }
257
270
  ]
@@ -280,6 +293,7 @@ Example return:
280
293
  }
281
294
  ]
282
295
  ```
296
+
283
297
  ## Locales
284
298
 
285
299
  ```
@@ -358,6 +372,62 @@ Example return:
358
372
  ```
359
373
  const { Pages } = defineOneEntry('your-url')
360
374
  ```
375
+ > In some methods, the langcode parameter can be either a string or an array of strings. It depends on which set of values will contain "attributeValues" and "localizeInfos"
376
+
377
+ Example
378
+
379
+ ```
380
+ const value = await Pages.getRootPages('en_US')
381
+
382
+ "localizeInfos": {
383
+ {
384
+ "title": "Catalog",
385
+ "content": "Content from catalog",
386
+ "menuTitle": "Catalog"
387
+ }
388
+ },
389
+ "attributeValues": {
390
+ {
391
+ "marker": {
392
+ "value": "Value",
393
+ "type": "string"
394
+ }
395
+ }
396
+ }
397
+ ```
398
+ Or
399
+ ```
400
+ const value = await Pages.getRootPages([ 'en_US', 'it_IT' ])
401
+
402
+ "localizeInfos": {
403
+ en_US: {
404
+ "title": "Catalog",
405
+ "content": "Content from catalog",
406
+ "menuTitle": "Catalog"
407
+ },
408
+ it_IT: {
409
+ "title": "Catalogo",
410
+ "content": "Contenuto dal catalogo",
411
+ "menuTitle": "Catalogo"
412
+ }
413
+ },
414
+ "attributeValues": {
415
+ en_US: {
416
+ "marker": {
417
+ "value": "Value",
418
+ "type": "string"
419
+ }
420
+ },
421
+ it_IT: {
422
+ "marker": {
423
+ "value": "Valore",
424
+ "type": "string"
425
+ }
426
+ }
427
+ }
428
+ ```
429
+
430
+
361
431
 
362
432
  ### getRootPages
363
433
 
@@ -380,7 +450,7 @@ Example return:
380
450
  "pageUrl": "string",
381
451
  "depth": 3,
382
452
  "localizeInfos": {
383
- "en_US": {
453
+ {
384
454
  "title": "Catalog",
385
455
  "content": "Content from catalog",
386
456
  "menuTitle": "Catalog"
@@ -398,7 +468,7 @@ Example return:
398
468
  ],
399
469
  "templateIdentifier": "my-template",
400
470
  "attributeValues": {
401
- "en_US": {
471
+ {
402
472
  "marker": {
403
473
  "value": "",
404
474
  "type": "string"
@@ -413,7 +483,7 @@ Example return:
413
483
  ### getCatalogPages
414
484
 
415
485
  ```
416
- const value = await Pages.getCatalogPages({langCode:'en_US', limit:20, offset:5})
486
+ const value = await Pages.getCatalogPages(langCode = 'en_US', limit = 20, offset = 5)
417
487
  ```
418
488
 
419
489
  > This method retrieves all page objects with product information as an array from the API. It accepts two optional parameters limit and offset for pagination and language code parameter. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data.
@@ -432,7 +502,7 @@ Example return:
432
502
  "pageUrl": "string",
433
503
  "depth": 3,
434
504
  "localizeInfos": {
435
- "en_US": {
505
+ {
436
506
  "title": "Catalog",
437
507
  "content": "Content from catalog",
438
508
  "menuTitle": "Catalog"
@@ -450,7 +520,7 @@ Example return:
450
520
  ],
451
521
  "templateIdentifier": "my-template",
452
522
  "attributeValues": {
453
- "en_US": {
523
+ {
454
524
  "marker": {
455
525
  "value": "",
456
526
  "type": "string"
@@ -483,7 +553,7 @@ Example return:
483
553
  "pageUrl": "string",
484
554
  "depth": 3,
485
555
  "localizeInfos": {
486
- "en_US": {
556
+ {
487
557
  "title": "Catalog",
488
558
  "content": "Content for catalog",
489
559
  "menuTitle": "Catalog"
@@ -501,7 +571,7 @@ Example return:
501
571
  ],
502
572
  "templateIdentifier": "my-template",
503
573
  "attributeValues": {
504
- "en_US": {
574
+ {
505
575
  "marker": {
506
576
  "value": "",
507
577
  "type": "string"
@@ -528,7 +598,7 @@ const value = await Pages.getPageById(1, 'en_US')
528
598
  "pageUrl": "string",
529
599
  "depth": 3,
530
600
  "localizeInfos": {
531
- "en_US": {
601
+ {
532
602
  "title": "Catalog",
533
603
  "content": "Content from catalog",
534
604
  "menuTitle": "Catalog"
@@ -546,7 +616,7 @@ const value = await Pages.getPageById(1, 'en_US')
546
616
  "templateIdentifier": "my-template",
547
617
  "attributeSetId": 7,
548
618
  "attributeValues": {
549
- "en_US": {
619
+ {
550
620
  "marker": "opisanine",
551
621
  "type": "string",
552
622
  "value": ""
@@ -571,7 +641,7 @@ Example return:
571
641
  "pageUrl": "string",
572
642
  "depth": 3,
573
643
  "localizeInfos": {
574
- "en_US": {
644
+ {
575
645
  "title": "Catalog",
576
646
  "content": "Content from catalog",
577
647
  "menuTitle": "Catalog"
@@ -589,7 +659,7 @@ Example return:
589
659
  "templateIdentifier": "my-template",
590
660
  "attributeSetId": 7,
591
661
  "attributeValues": {
592
- "en_US": {
662
+ {
593
663
  "marker": "opisanine",
594
664
  "type": "string",
595
665
  "value": ""
@@ -599,6 +669,85 @@ Example return:
599
669
  }
600
670
  ```
601
671
 
672
+ ### getChildPagesByParentUrl
673
+
674
+ ```
675
+ const value = await Pages.getChildPagesByParentUrl('shop', 'en_US')
676
+ ```
677
+ > Getting child pages with information about products in the form of an array. Returns all created pages as an array of AdminIndexedPageDto objects or an empty array [] (if there is no data) for the selected parent.
678
+
679
+ Example return:
680
+ ```
681
+ {
682
+ "id": 1764,
683
+ "parentId": 0,
684
+ "config": {
685
+ "rowsPerPage": 1,
686
+ "productsPerRow": 1
687
+ },
688
+ "pageUrl": "string",
689
+ "depth": 3,
690
+ "localizeInfos": {
691
+ "en_US": {
692
+ "title": "Catalog",
693
+ "content": "Content for catalog",
694
+ "menuTitle": "Catalog"
695
+ }
696
+ },
697
+ "isVisible": true,
698
+ "products": 0,
699
+ "attributeSetId": 7,
700
+ "isSync": true,
701
+ "isEdit": true,
702
+ "userEditId": 0,
703
+ "position": 0,
704
+ "generalTypeId": 2,
705
+ "templateId": 0,
706
+ "attributesSets": {
707
+ "id7": 7,
708
+ "string_id18": ""
709
+ },
710
+ "childrenCount": 0,
711
+ "showChildren": true,
712
+ "version": 10
713
+ }
714
+ ```
715
+
716
+ ### getFormsByPageUrl
717
+ ```
718
+ const value = await Pages.getFormsByPageUrl('shop', 'en_US')
719
+ ```
720
+ > Get PositionFormDto objects for a related form by url. Returns an array of PositionFormDto objects.
721
+ ```
722
+ {
723
+ "id": 1764,
724
+ "updatedDate": "2023-11-12T12:51:45.623Z",
725
+ "version": 10,
726
+ "identifier": "marker",
727
+ "attributesSets": {
728
+ "string_id19": "",
729
+ "string_id18": ""
730
+ },
731
+ "attributeSetId": 0,
732
+ "processingType": "db",
733
+ "localizeInfos": {
734
+ "en_US": {
735
+ "title": "My form",
736
+ "titleForSite": "",
737
+ "successMessage": "",
738
+ "unsuccessMessage": "",
739
+ "urlAddress": "",
740
+ "database": "0",
741
+ "script": "0"
742
+ }
743
+ },
744
+ "processingData": {},
745
+ "position": 0,
746
+ "positionId": 12
747
+ }
748
+ ```
749
+
750
+
602
751
  ### getConfigPageByUrl
603
752
 
604
753
  ```
@@ -628,7 +777,7 @@ Example return:
628
777
  {
629
778
  "id": 1764,
630
779
  "localizeInfos": {
631
- "en_US": {
780
+ {
632
781
  "title": "Product"
633
782
  }
634
783
  },
@@ -653,7 +802,7 @@ Example return:
653
802
  "templateIdentifier": "my-template",
654
803
  "shortDescTemplateIdentifier": "my-template-short",
655
804
  "attributeValues": {
656
- "en_US": {
805
+ {
657
806
  "marker": {
658
807
  "value": "",
659
808
  "type": "string"
@@ -681,32 +830,87 @@ This module accepts a set of user parameters called userQuery. If the parameters
681
830
  conditionValue: null,
682
831
  conditionMarker: null,
683
832
  attributeMarker: null,
684
- langCode: 'en_US',
685
833
  sortOrder: 'DESC',
686
834
  sortKey: 'id'
687
835
  }
688
836
  ```
689
837
  "conditionMarker" by which values are filtered (not set by default), possible values:
690
838
  > 'in' - Contains,
691
- >
839
+ >
692
840
  > 'nin' - Does not contain,
693
- >
841
+ >
694
842
  > 'eq' - Equal,
695
- >
843
+ >
696
844
  > 'neq' - Not equal,
697
- >
845
+ >
698
846
  > 'mth' - Greater than,
699
- >
847
+ >
700
848
  > 'lth' - Less than,
701
- >
849
+ >
702
850
  > 'exs' - Exists,
703
- >
851
+ >
704
852
  > 'nexs' - Does not exist
705
853
 
854
+ In some methods, the langcode parameter (default 'en_US') can be either a string or an array of strings. It depends on which set of values will contain "attributeValues" and "localizeInfos"
855
+
856
+ Example
857
+
858
+ ```
859
+ const value = await Products.getProducts('en_US')
860
+
861
+ "localizeInfos": {
862
+ {
863
+ "title": "Catalog",
864
+ "content": "Content from catalog",
865
+ "menuTitle": "Catalog"
866
+ }
867
+ },
868
+ "attributeValues": {
869
+ {
870
+ "marker": {
871
+ "value": "Value",
872
+ "type": "string"
873
+ }
874
+ }
875
+ }
876
+ ```
877
+ Or
878
+ ```
879
+ const value = await Products.getProducts([ 'en_US', 'it_IT' ])
880
+
881
+ "localizeInfos": {
882
+ en_US: {
883
+ "title": "Catalog",
884
+ "content": "Content from catalog",
885
+ "menuTitle": "Catalog"
886
+ },
887
+ it_IT: {
888
+ "title": "Catalogo",
889
+ "content": "Contenuto dal catalogo",
890
+ "menuTitle": "Catalogo"
891
+ }
892
+ },
893
+ "attributeValues": {
894
+ en_US: {
895
+ "marker": {
896
+ "value": "Value",
897
+ "type": "string"
898
+ }
899
+ },
900
+ it_IT: {
901
+ "marker": {
902
+ "value": "Valore",
903
+ "type": "string"
904
+ }
905
+ }
906
+ }
907
+ ```
908
+
909
+
706
910
  ### getProducts
707
911
 
708
912
  ```
709
- const value = await Products.getProducts()
913
+ const value = await Products.getProducts('en_US')
710
914
  ```
711
915
 
712
916
  > This method searches for product page objects with pagination and filtering based on the provided query parameters (userQuery). It returns a Promise that resolves to a list of products (IProduct[]).
@@ -716,7 +920,7 @@ Example return:
716
920
  {
717
921
  "id": 1764,
718
922
  "localizeInfos": {
719
- "en_US": {
923
+ {
720
924
  "title": "Product"
721
925
  }
722
926
  },
@@ -741,7 +945,7 @@ Example return:
741
945
  "templateIdentifier": "my-template",
742
946
  "shortDescTemplateIdentifier": "my-template-short",
743
947
  "attributeValues": {
744
- "en_US": {
948
+ {
745
949
  "marker": {
746
950
  "value": "",
747
951
  "type": "string"
@@ -754,7 +958,7 @@ Example return:
754
958
  ### getProductsEmptyPage
755
959
 
756
960
  ```
757
- const value = await Products.getProductsEmptyPage()
961
+ const value = await Products.getProductsEmptyPage('en_US')
758
962
  ```
759
963
 
760
964
  > This method searches for product page 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.
@@ -765,7 +969,7 @@ Example return:
765
969
  {
766
970
  "id": 1764,
767
971
  "localizeInfos": {
768
- "en_US": {
972
+ {
769
973
  "title": "Product"
770
974
  }
771
975
  },
@@ -790,7 +994,7 @@ Example return:
790
994
  "templateIdentifier": "my-template",
791
995
  "shortDescTemplateIdentifier": "my-template-short",
792
996
  "attributeValues": {
793
- "en_US": {
997
+ {
794
998
  "marker": {
795
999
  "value": "",
796
1000
  "type": "string"
@@ -804,7 +1008,7 @@ Example return:
804
1008
  ### getProductsPageById
805
1009
 
806
1010
  ```
807
- const value = await Products.getProductsPageById(1)
1011
+ const value = await Products.getProductsPageById(1, 'en_US')
808
1012
  ```
809
1013
 
810
1014
  > This method searches for all product page objects with pagination for the selected category based on the page identifier (id). It accepts an optional userQuery parameter to set query parameters for the search. The query parameters include limit, offset, statusMarker, conditionValue, conditionMarker, attributeMarker, sortOrder, and sortKey. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
@@ -814,7 +1018,7 @@ Example return:
814
1018
  {
815
1019
  "id": 1764,
816
1020
  "localizeInfos": {
817
- "en_US": {
1021
+ {
818
1022
  "title": "Product"
819
1023
  }
820
1024
  },
@@ -839,7 +1043,7 @@ Example return:
839
1043
  "templateIdentifier": "my-template",
840
1044
  "shortDescTemplateIdentifier": "my-template-short",
841
1045
  "attributeValues": {
842
- "en_US": {
1046
+ {
843
1047
  "marker": {
844
1048
  "value": "",
845
1049
  "type": "string"
@@ -853,7 +1057,7 @@ Example return:
853
1057
  ### getProductsPageByUrl
854
1058
 
855
1059
  ```
856
- const value = await Products.getProductsPageByUrl('cup')
1060
+ const value = await Products.getProductsPageByUrl('cup', 'en_US')
857
1061
  ```
858
1062
 
859
1063
  > This method searches for all product page objects with pagination for the selected category based on the page URL (url). It accepts an optional userQuery parameter to set query parameters for the search. The query parameters include limit, offset, statusMarker, conditionValue, conditionMarker, attributeMarker, sortOrder, and sortKey. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
@@ -863,7 +1067,7 @@ Example return:
863
1067
  {
864
1068
  "id": 1764,
865
1069
  "localizeInfos": {
866
- "en_US": {
1070
+ {
867
1071
  "title": "Product"
868
1072
  }
869
1073
  },
@@ -888,7 +1092,7 @@ Example return:
888
1092
  "templateIdentifier": "my-template",
889
1093
  "shortDescTemplateIdentifier": "my-template-short",
890
1094
  "attributeValues": {
891
- "en_US": {
1095
+ {
892
1096
  "marker": {
893
1097
  "value": "",
894
1098
  "type": "string"
@@ -902,7 +1106,7 @@ Example return:
902
1106
  ### getRelatedProductsById
903
1107
 
904
1108
  ```
905
- const value = await Products.getRelatedProductsById(1)
1109
+ const value = await Products.getRelatedProductsById(1, ''en_US'', {limit:20, offset:1})
906
1110
  ```
907
1111
 
908
1112
  > This method retrieves all related product page objects for a specific product based on its identifier (id) from the API. It accepts an optional userQuery parameter for additional query parameters such as limit, offset, sortOrder, and sortKey. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
@@ -912,7 +1116,7 @@ Example return:
912
1116
  {
913
1117
  "id": 1764,
914
1118
  "localizeInfos": {
915
- "en_US": {
1119
+ {
916
1120
  "title": "Product"
917
1121
  }
918
1122
  },
@@ -937,7 +1141,7 @@ Example return:
937
1141
  "templateIdentifier": "my-template",
938
1142
  "shortDescTemplateIdentifier": "my-template-short",
939
1143
  "attributeValues": {
940
- "en_US": {
1144
+ {
941
1145
  "marker": {
942
1146
  "value": "",
943
1147
  "type": "string"
@@ -950,7 +1154,7 @@ Example return:
950
1154
  ### getProductById
951
1155
 
952
1156
  ```
953
- const value = await Products.getProductById(1)
1157
+ const value = await Products.getProductById(1, 'en_US')
954
1158
  ```
955
1159
 
956
1160
  > This method retrieves a single product object based on its identifier (id) from the API. It returns a Promise that resolves to a ContentIndexedProductDto object for the product.
@@ -960,7 +1164,7 @@ Example return:
960
1164
  {
961
1165
  "id": 1764,
962
1166
  "localizeInfos": {
963
- "en_US": {
1167
+ {
964
1168
  "title": "Product"
965
1169
  }
966
1170
  },
@@ -985,7 +1189,7 @@ Example return:
985
1189
  "templateIdentifier": "my-template",
986
1190
  "shortDescTemplateIdentifier": "my-template-short",
987
1191
  "attributeValues": {
988
- "en_US": {
1192
+ {
989
1193
  "marker": {
990
1194
  "value": "",
991
1195
  "type": "string"
@@ -1026,7 +1230,7 @@ Example return:
1026
1230
  {
1027
1231
  "id": 1764,
1028
1232
  "localizeInfos": {
1029
- "en_US": {
1233
+ {
1030
1234
  "title": "Product"
1031
1235
  }
1032
1236
  },
@@ -1051,7 +1255,7 @@ Example return:
1051
1255
  "templateIdentifier": "my-template",
1052
1256
  "shortDescTemplateIdentifier": "my-template-short",
1053
1257
  "attributeValues": {
1054
- "en_US": {
1258
+ {
1055
1259
  "marker": {
1056
1260
  "value": "",
1057
1261
  "type": "string"
@@ -1064,7 +1268,7 @@ Example return:
1064
1268
  ### searchProduct
1065
1269
 
1066
1270
  ```
1067
- const value = await Products.searchProduct('cup')
1271
+ const value = await Products.searchProduct('cup', 'en_US')
1068
1272
  ```
1069
1273
 
1070
1274
  > This method performs a quick search for product page objects based on a text query name. The search is performed on the title field of the localizeInfos object, taking the specified lang language code into consideration. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
@@ -1075,7 +1279,7 @@ Example return:
1075
1279
  {
1076
1280
  "id": 1764,
1077
1281
  "localizeInfos": {
1078
- "en_US": {
1282
+ {
1079
1283
  "title": "Product"
1080
1284
  }
1081
1285
  },
@@ -1100,7 +1304,7 @@ Example return:
1100
1304
  "templateIdentifier": "my-template",
1101
1305
  "shortDescTemplateIdentifier": "my-template-short",
1102
1306
  "attributeValues": {
1103
- "en_US": {
1307
+ {
1104
1308
  "marker": {
1105
1309
  "value": "",
1106
1310
  "type": "string"
@@ -1112,16 +1316,16 @@ Example return:
1112
1316
  ]
1113
1317
  ```
1114
1318
 
1115
- ## ProductStatus
1319
+ ## ProductStatuses
1116
1320
 
1117
1321
  ```
1118
- const { ProductStatus } = defineOneEntry('your-url');
1322
+ const { ProductStatuses } = defineOneEntry('your-url');
1119
1323
  ```
1120
1324
 
1121
1325
  ### getProductStatuses
1122
1326
 
1123
1327
  ```
1124
- const value = await ProductStatus.getProductStatuses()
1328
+ const value = await ProductStatuses.getProductStatuses()
1125
1329
  ```
1126
1330
 
1127
1331
  > This method searches for all product status objects from the API. It returns a Promise that resolves to an array of product status objects.
@@ -1145,7 +1349,7 @@ Example return:
1145
1349
  ### getProductStatusesById
1146
1350
 
1147
1351
  ```
1148
- const value = await ProductStatus.getProductStatusesById(1)
1352
+ const value = await ProductStatuses.getProductStatusesById(1)
1149
1353
  ```
1150
1354
 
1151
1355
  > This method searches for a product status object based on its identifier (id) from the API. It returns a Promise that resolves to a product status object.
@@ -1167,7 +1371,7 @@ Example return:
1167
1371
  ### getProductsByStatusMarker
1168
1372
 
1169
1373
  ```
1170
- const value = await ProductStatus.getProductsByStatusMarker('marker')
1374
+ const value = await ProductStatuses.getProductsByStatusMarker('marker')
1171
1375
  ```
1172
1376
 
1173
1377
  > This method searches for a product status object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a product status object.
@@ -1189,7 +1393,7 @@ Example return:
1189
1393
  ### validateMarker
1190
1394
 
1191
1395
  ```
1192
- const value = await ProductStatus.validateMarker('marker')
1396
+ const value = await ProductStatuses.validateMarker('marker')
1193
1397
  ```
1194
1398
 
1195
1399
  > This method checks the existence of a textual identifier (marker). It takes a marker parameter as input, representing the product marker to validate. It returns a Promise that resolves to true if the textual identifier (marker) exists or false if it doesn't.
@@ -1222,7 +1426,7 @@ Example return:
1222
1426
  "generalTypeId": 2,
1223
1427
  "generalTypeName": "forProductPreview",
1224
1428
  "localizeInfos": {
1225
- "ru_RU": {
1429
+ "en_US": {
1226
1430
  "title": "Product"
1227
1431
  }
1228
1432
  },
@@ -1257,7 +1461,7 @@ Example return:
1257
1461
  "generalTypeId": 2,
1258
1462
  "generalTypeName": "forCatalogProducts",
1259
1463
  "localizeInfos": {
1260
- "ru_RU": {
1464
+ "en_US": {
1261
1465
  "title": "Product"
1262
1466
  }
1263
1467
  },
@@ -1275,16 +1479,16 @@ Example return:
1275
1479
  ]
1276
1480
  ```
1277
1481
 
1278
- ## TemplatesPreview
1482
+ ## TemplatePreviews
1279
1483
 
1280
1484
  ```
1281
- const { TemplatesPreview } = defineOneEntry('your-url')
1485
+ const { TemplatePreviews } = defineOneEntry('your-url')
1282
1486
  ```
1283
1487
 
1284
1488
  ### getTemplatesPreview
1285
1489
 
1286
1490
  ```
1287
- const value = await TemplatesPreview.getTemplatesPreview()
1491
+ const value = await TemplatePreviews.getTemplatesPreview()
1288
1492
  ```
1289
1493
 
1290
1494
  > This method retrieves all template objects from the API. It returns a Promise that resolves to an array of TemplatePreviewsEntity template objects.
@@ -1320,7 +1524,7 @@ Example return:
1320
1524
  ### getTemplatesPreviewById
1321
1525
 
1322
1526
  ```
1323
- const value = await TemplatesPreview.getTemplatesPreviewById(1)
1527
+ const value = await TemplatePreviews.getTemplatesPreviewById(1)
1324
1528
  ```
1325
1529
 
1326
1530
  > This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a TemplatePreviewsEntity object.
@@ -1355,7 +1559,7 @@ Example return:
1355
1559
  ### getTemplatesPreviewByMarker
1356
1560
 
1357
1561
  ```
1358
- const value = await TemplatesPreview.getTemplatesPreviewByMarker('marker')
1562
+ const value = await TemplatePreviews.getTemplatesPreviewByMarker('marker')
1359
1563
  ```
1360
1564
 
1361
1565
  > This method retrieves a single template object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a TemplatePreviewsEntity object.