oneentry 1.0.25 → 1.0.27

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.
Files changed (43) hide show
  1. package/README.md +506 -490
  2. package/dist/admins/adminsApi.js +3 -14
  3. package/dist/admins/adminsApi.js.map +1 -1
  4. package/dist/admins/adminsInterfaces.d.ts +7 -26
  5. package/dist/base/oneEntry.js +59 -76
  6. package/dist/base/oneEntry.js.map +1 -1
  7. package/dist/base/utils.d.ts +14 -10
  8. package/dist/base/utils.js +1 -7
  9. package/dist/base/utils.js.map +1 -1
  10. package/dist/file-uploding/fileUploadingApi.js +8 -21
  11. package/dist/file-uploding/fileUploadingApi.js.map +1 -1
  12. package/dist/forms/formsApi.js +6 -19
  13. package/dist/forms/formsApi.js.map +1 -1
  14. package/dist/forms/formsInterfaces.d.ts +3 -4
  15. package/dist/formsData/formsDataApi.d.ts +2 -2
  16. package/dist/formsData/formsDataApi.js +11 -26
  17. package/dist/formsData/formsDataApi.js.map +1 -1
  18. package/dist/general-types/GeneralTypesApi.js +3 -14
  19. package/dist/general-types/GeneralTypesApi.js.map +1 -1
  20. package/dist/locales/localesApi.js +3 -14
  21. package/dist/locales/localesApi.js.map +1 -1
  22. package/dist/locales/localesInterfaces.d.ts +2 -3
  23. package/dist/menus/menusApi.js +3 -14
  24. package/dist/menus/menusApi.js.map +1 -1
  25. package/dist/pages/pagesApi.js +27 -54
  26. package/dist/pages/pagesApi.js.map +1 -1
  27. package/dist/pages/pagesInterfaces.d.ts +7 -7
  28. package/dist/product-statuses/productStatusesApi.js +12 -29
  29. package/dist/product-statuses/productStatusesApi.js.map +1 -1
  30. package/dist/product-statuses/productStatusesInterfaces.d.ts +1 -1
  31. package/dist/products/productsApi.d.ts +4 -4
  32. package/dist/products/productsApi.js +62 -64
  33. package/dist/products/productsApi.js.map +1 -1
  34. package/dist/products/productsInterfaces.d.ts +5 -9
  35. package/dist/system/systemApi.js +6 -19
  36. package/dist/system/systemApi.js.map +1 -1
  37. package/dist/templates/templatesApi.js +6 -19
  38. package/dist/templates/templatesApi.js.map +1 -1
  39. package/dist/templates/templatesInterfaces.d.ts +5 -9
  40. package/dist/templates-preview/templatesPreviewApi.js +9 -24
  41. package/dist/templates-preview/templatesPreviewApi.js.map +1 -1
  42. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +22 -11
  43. package/package.json +1 -1
package/README.md CHANGED
@@ -14,11 +14,9 @@ To get started with OneEntry, sign up for an account at [https://account.oneentr
14
14
 
15
15
  To install the OneEntry Headless CMS SDK in your project, run the following command:
16
16
 
17
- >
18
17
  ```
19
18
  npm install oneentry
20
19
  ```
21
- >
22
20
 
23
21
  # Usage
24
22
 
@@ -37,18 +35,23 @@ const {
37
35
  Pages,
38
36
  Products,
39
37
  ProductStatuses,
38
+ System,
40
39
  Templates,
41
40
  TemplatePreviews
42
- } = defineOneEntry('your-url', 'your-token')
41
+ } = defineOneEntry('your-url')
43
42
  ```
44
- >
45
- >Or
46
- >
43
+
44
+ Or
45
+
47
46
  ```
48
- const api = defineOneEntry('your-url', 'your-token')
47
+ const api = defineOneEntry('your-url')
49
48
  ```
50
49
 
51
- >Pass your token to the function as a parameter to establish a secure connection.
50
+ >If you chose token protection to ensure connection security, just pass your token to the function as an optional parameter.
51
+
52
+ ```
53
+ const api = defineOneEntry('your-url', 'your-token')
54
+ ```
52
55
 
53
56
  ## Admins
54
57
 
@@ -56,7 +59,7 @@ const api = defineOneEntry('your-url', 'your-token')
56
59
  const { Admins } = defineOneEntry('your-url')
57
60
  ```
58
61
 
59
- ### getAdminsInfo
62
+ ### Admins.getAdminsInfo()
60
63
 
61
64
  ```
62
65
  const value = await Admins.getAdminsInfo()
@@ -66,33 +69,30 @@ const value = await Admins.getAdminsInfo()
66
69
  > This method retrieves all user objects of type admin from the API. It returns a Promise that resolves to an array of AdminEntity objects.
67
70
 
68
71
  Example return:
72
+
69
73
  ```
70
- [
71
- {
72
- "id": 1764,
73
- "identifier": "admin1",
74
- "attributeSetId": 7,
75
- "isSync": false,
76
- "login": "meteor",
77
- "email": "meteor@mydomen.com",
78
- "attributeValues": {
79
- "en_US": {
80
- "marker": {
81
- "value": "",
82
- "type": "string"
83
- }
74
+ {
75
+ "id": 1764,
76
+ "identifier": "admin1",
77
+ "attributeSetId": 7,
78
+ "isSync": false,
79
+ "attributeValues": {
80
+ "en_US": {
81
+ "marker": {
82
+ "value": "",
83
+ "type": "string"
84
84
  }
85
- },
86
- "position": 192
87
- }
88
- ]
85
+ }
86
+ },
87
+ "position": 192
88
+ }
89
89
  ```
90
90
 
91
91
  ## FileUploading
92
92
 
93
93
  const { FileUploading } = defineOneEntry('your-url');
94
94
 
95
- ### upload
95
+ ### FileUploading.upload()
96
96
 
97
97
  ```
98
98
  const query = {
@@ -108,8 +108,10 @@ const value = await FileUploading.upload(data, query)
108
108
  ```
109
109
 
110
110
  > This method uploads a file to a cloud file storage. Pass to the date the value obtained from input type "file".
111
+ > Data is file object (or array), learn more - [File Object](https://developer.mozilla.org/en-US/docs/Web/API/File)
111
112
 
112
113
  Example return:
114
+
113
115
  ```
114
116
  {
115
117
  "filename": "string",
@@ -118,7 +120,7 @@ Example return:
118
120
  }
119
121
  ```
120
122
 
121
- ### delete
123
+ ### FileUploading.delete()
122
124
 
123
125
  ```
124
126
  const query = {
@@ -133,12 +135,11 @@ const value = await FileUploading.delete("file.png", query)
133
135
 
134
136
  > This void method delete a file from the cloud file storage.
135
137
 
136
-
137
138
  ## Forms
138
139
 
139
140
  const { Forms } = defineOneEntry('your-url');
140
141
 
141
- ### getAllForms
142
+ ### Forms.getAllForms()
142
143
 
143
144
  ```
144
145
  const value = await Forms.getAllForms()
@@ -147,6 +148,7 @@ const value = await Forms.getAllForms()
147
148
  > This method retrieves all form objects from the API. It returns a Promise that resolves to an array of FormEntity objects.
148
149
 
149
150
  Example return:
151
+
150
152
  ```
151
153
  [
152
154
  {
@@ -180,7 +182,7 @@ Example return:
180
182
  ]
181
183
  ```
182
184
 
183
- ### getFormByMarker
185
+ ### Forms.getFormByMarker()
184
186
 
185
187
  ```
186
188
  const value = await Forms.getFormByMarker('My form')
@@ -225,33 +227,12 @@ Example return:
225
227
 
226
228
  const { FormData } = defineOneEntry('your-url');
227
229
 
228
- ### postFormsData
230
+ ### FormData.postFormsData()
229
231
 
230
232
  ```
231
233
  const value = await FormData.postFormsData(data)
232
234
  ```
233
235
 
234
- >The method takes as a parameter request body
235
-
236
- Example body:
237
- ```
238
- {
239
- "formIdentifier": "feedback",
240
- "formData": {
241
- "en_US": [
242
- {
243
- "marker": "name",
244
- "value": "alex"
245
- },
246
- {
247
- "marker": "phone",
248
- "value": "111"
249
- }
250
- ]
251
- }
252
- }
253
- ```
254
-
255
236
  > This method retrieves all form data objects from the API. It returns a Promise that resolves to an array of objects of type CreateFormDataDto.
256
237
 
257
238
  Example return:
@@ -272,7 +253,7 @@ Example return:
272
253
  }
273
254
  ```
274
255
 
275
- ### getFormsData
256
+ ### FormData.getFormsData()
276
257
 
277
258
  ```
278
259
  const value = await FormData.getFormsData()
@@ -284,23 +265,23 @@ Example return:
284
265
 
285
266
  ```
286
267
  [
287
- {
288
- "id": 1764,
289
- "formIdentifier": "my-form",
290
- "time": "2023-02-12 10:56",
291
- "formData": {
292
- "en_US": [
293
- {
294
- "marker": "name_1",
295
- "value": "Name"
296
- }
297
- ]
268
+ {
269
+ "id": 1764,
270
+ "formIdentifier": "my-form",
271
+ "time": "2023-02-12 10:56",
272
+ "formData": {
273
+ "en_US": [
274
+ {
275
+ "marker": "naimenovanie_1",
276
+ "value": "Name"
277
+ }
278
+ ]
279
+ }
298
280
  }
299
- }
300
281
  ]
301
282
  ```
302
283
 
303
- ### getFormsDataByMarker
284
+ ### FormData.getFormsDataByMarker()
304
285
 
305
286
  ```
306
287
  const value = await FormData.getFormsDataByMarker('my-marker')
@@ -330,7 +311,7 @@ Example return:
330
311
 
331
312
  const { GeneralTypes } = defineOneEntry('your-url');
332
313
 
333
- ### getAllTypes
314
+ ### GeneralTypes.getAllTypes()
334
315
 
335
316
  ```
336
317
  const value = await GeneralTypes.getAllTypes()
@@ -339,6 +320,7 @@ const value = await GeneralTypes.getAllTypes()
339
320
  > This method retrieves all objects of type GeneralTypeEntity from the API. It returns a Promise that resolves to an array of GeneralTypeEntity objects.
340
321
 
341
322
  Example return:
323
+
342
324
  ```
343
325
  [
344
326
  {
@@ -354,7 +336,7 @@ Example return:
354
336
  const { Locales } = defineOneEntry('your-url')
355
337
  ```
356
338
 
357
- ### getLocales
339
+ ### Locales.getLocales()
358
340
 
359
341
  ```
360
342
  const value = await Locales.getLocales()
@@ -363,18 +345,19 @@ const value = await Locales.getLocales()
363
345
  > This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.
364
346
 
365
347
  Example return:
348
+
366
349
  ```
367
350
  [
368
- {
369
- "id": 1764,
370
- "shortCode": "en",
371
- "code": "en_US",
372
- "name": "Bengali",
373
- "nativeName": "বাংলা",
374
- "isActive": false,
375
- "image": "🇦🇨",
376
- "position": 1
377
- }
351
+ {
352
+ "id": 1764,
353
+ "shortCode": "en",
354
+ "code": "en_US",
355
+ "name": "Bengali",
356
+ "nativeName": "বাংলা",
357
+ "isActive": false,
358
+ "image": "🇦🇨",
359
+ "position": 1
360
+ }
378
361
  ]
379
362
  ```
380
363
 
@@ -384,7 +367,7 @@ Example return:
384
367
  const { Menus } = defineOneEntry('your-url')
385
368
  ```
386
369
 
387
- ### getMenusByMarker
370
+ ### Menus.getMenusByMarker()
388
371
 
389
372
  ```
390
373
  const value = await Menus.getMenusByMarker('marker')
@@ -400,7 +383,7 @@ Example return:
400
383
  "identifier": "catalog",
401
384
  "localizeInfos": {
402
385
  "en_US": {
403
- "title": "Main menu"
386
+ "title": "Main Menu"
404
387
  }
405
388
  },
406
389
  "pages": [
@@ -426,6 +409,7 @@ Example return:
426
409
  ```
427
410
  const { Pages } = defineOneEntry('your-url')
428
411
  ```
412
+
429
413
  > 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"
430
414
 
431
415
  Example:
@@ -449,7 +433,9 @@ Example:
449
433
  }
450
434
  }
451
435
  ```
436
+
452
437
  Or
438
+
453
439
  ```
454
440
  const value = await Pages.getRootPages([ 'en_US', 'it_IT' ])
455
441
 
@@ -481,9 +467,7 @@ const value = await Pages.getRootPages([ 'en_US', 'it_IT' ])
481
467
  }
482
468
  ```
483
469
 
484
-
485
-
486
- ### getRootPages
470
+ ### Pages.getRootPages()
487
471
 
488
472
  ```
489
473
  const value = await Pages.getRootPages('en_US')
@@ -492,49 +476,46 @@ const value = await Pages.getRootPages('en_US')
492
476
  > This method retrieves all top-level page objects from the API. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data. Get required language parameter.
493
477
 
494
478
  Example return:
479
+
495
480
  ```
496
481
  [
497
482
  {
498
- "id": 1764,
499
- "parentId": null,
500
- "config": {
501
- "rowsPerPage": 1,
502
- "productsPerRow": 1
503
- },
504
- "pageUrl": "string",
505
- "depth": 3,
506
- "localizeInfos": {
507
- {
508
- "title": "Catalog",
509
- "content": "Content from catalog",
510
- "menuTitle": "Catalog"
511
- }
512
- },
513
- "isVisible": true,
514
- "isEditorDisabled": false,
515
- "products": 0,
516
- "attributeSetId": 7,
517
- "forms": [
518
- null
519
- ],
520
- "blocks": [
521
- null
522
- ],
523
- "templateIdentifier": "my-template",
524
- "attributeValues": {
525
- {
526
- "marker": {
527
- "value": "",
528
- "type": "string"
483
+ "id": 1764,
484
+ "parentId": null,
485
+ "config": {
486
+ "rowsPerPage": 1,
487
+ "productsPerRow": 1
488
+ },
489
+ "pageUrl": "string",
490
+ "depth": 3,
491
+ "localizeInfos": {
492
+ "en_US": {
493
+ "title": "Catalog",
494
+ "content": "Content for catalog",
495
+ "menuTitle": "Catalog"
529
496
  }
530
- }
531
- },
532
- "position": 192,
533
- "type": "forNewsPage"
497
+ },
498
+ "isVisible": true,
499
+ "products": 0,
500
+ "attributeSetId": 7,
501
+ "isSync": false,
502
+ "templateIdentifier": "my-template",
503
+ "attributeValues": {
504
+ "en_US": {
505
+ "marker": {
506
+ "value": "",
507
+ "type": "string"
508
+ }
509
+ }
510
+ },
511
+ "position": 192,
512
+ "type": "forNewsPage",
513
+ "childrenCount": 0
534
514
  }
535
515
  ]
536
516
  ```
537
- ### getCatalogPages
517
+
518
+ ### Pages.getCatalogPages()
538
519
 
539
520
  ```
540
521
  const value = await Pages.getCatalogPages(langCode = 'en_US', limit = 20, offset = 5)
@@ -547,46 +528,42 @@ Example return:
547
528
  ```
548
529
  [
549
530
  {
550
- "id": 1764,
551
- "parentId": null,
552
- "config": {
553
- "rowsPerPage": 1,
554
- "productsPerRow": 1
555
- },
556
- "pageUrl": "string",
557
- "depth": 3,
558
- "localizeInfos": {
559
- {
560
- "title": "Catalog",
561
- "content": "Content from catalog",
562
- "menuTitle": "Catalog"
563
- }
564
- },
565
- "isVisible": true,
566
- "isEditorDisabled": false,
567
- "products": 0,
568
- "attributeSetId": 7,
569
- "forms": [
570
- null
571
- ],
572
- "blocks": [
573
- null
574
- ],
575
- "templateIdentifier": "my-template",
576
- "attributeValues": {
577
- {
578
- "marker": {
579
- "value": "",
580
- "type": "string"
531
+ "id": 1764,
532
+ "parentId": null,
533
+ "config": {
534
+ "rowsPerPage": 1,
535
+ "productsPerRow": 1
536
+ },
537
+ "pageUrl": "string",
538
+ "depth": 3,
539
+ "localizeInfos": {
540
+ "en_US": {
541
+ "title": "Catalog",
542
+ "content": "Content for catalog",
543
+ "menuTitle": "Catalog"
581
544
  }
582
- }
583
- },
584
- "position": 192,
585
- "type": "forNewsPage"
545
+ },
546
+ "isVisible": true,
547
+ "products": 0,
548
+ "attributeSetId": 7,
549
+ "isSync": false,
550
+ "templateIdentifier": "my-template",
551
+ "attributeValues": {
552
+ "en_US": {
553
+ "marker": {
554
+ "value": "",
555
+ "type": "string"
556
+ }
557
+ }
558
+ },
559
+ "position": 192,
560
+ "type": "forNewsPage",
561
+ "childrenCount": 0
586
562
  }
587
563
  ]
588
564
  ```
589
- ### getPages
565
+
566
+ ### Pages.getPages()
590
567
 
591
568
  ```
592
569
  const value = await Pages.getPages('en_US')
@@ -595,49 +572,46 @@ const value = await Pages.getPages('en_US')
595
572
  > This method retrieves all created pages as an array from the API. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data. Get required language parameter.
596
573
 
597
574
  Example return:
575
+
598
576
  ```
599
577
  [
600
578
  {
601
- "id": 1764,
602
- "parentId": null,
603
- "config": {
604
- "rowsPerPage": 1,
605
- "productsPerRow": 1
606
- },
607
- "pageUrl": "string",
608
- "depth": 3,
609
- "localizeInfos": {
610
- {
611
- "title": "Catalog",
612
- "content": "Content for catalog",
613
- "menuTitle": "Catalog"
614
- }
615
- },
616
- "isVisible": true,
617
- "isEditorDisabled": false,
618
- "products": 0,
619
- "attributeSetId": 7,
620
- "forms": [
621
- null
622
- ],
623
- "blocks": [
624
- null
625
- ],
626
- "templateIdentifier": "my-template",
627
- "attributeValues": {
628
- {
629
- "marker": {
630
- "value": "",
631
- "type": "string"
579
+ "id": 1764,
580
+ "parentId": null,
581
+ "config": {
582
+ "rowsPerPage": 1,
583
+ "productsPerRow": 1
584
+ },
585
+ "pageUrl": "string",
586
+ "depth": 3,
587
+ "localizeInfos": {
588
+ "en_US": {
589
+ "title": "Catalog",
590
+ "content": "Content for catalog",
591
+ "menuTitle": "Catalog"
632
592
  }
633
- }
634
- },
635
- "position": 192,
636
- "type": "forNewsPage"
593
+ },
594
+ "isVisible": true,
595
+ "products": 0,
596
+ "attributeSetId": 7,
597
+ "isSync": false,
598
+ "templateIdentifier": "my-template",
599
+ "attributeValues": {
600
+ "en_US": {
601
+ "marker": {
602
+ "value": "",
603
+ "type": "string"
604
+ }
605
+ }
606
+ },
607
+ "position": 192,
608
+ "type": "forNewsPage",
609
+ "childrenCount": 0
637
610
  }
638
611
  ]
639
612
  ```
640
- ### getPageById
613
+
614
+ ### Pages.getPageById()
641
615
 
642
616
  ```
643
617
  const value = await Pages.getPageById(1, 'en_US')
@@ -654,42 +628,39 @@ Example return:
654
628
  "pageUrl": "string",
655
629
  "depth": 3,
656
630
  "localizeInfos": {
657
- {
631
+ "en_US": {
658
632
  "title": "Catalog",
659
- "content": "Content from catalog",
633
+ "content": "Content for catalog",
660
634
  "menuTitle": "Catalog"
661
635
  }
662
636
  },
663
637
  "isVisible": true,
664
- "forms": [
665
- null
666
- ],
667
- "blocks": [
668
- null
669
- ],
670
638
  "position": 192,
671
639
  "type": "forNewsPage",
672
640
  "templateIdentifier": "my-template",
673
641
  "attributeSetId": 7,
674
642
  "attributeValues": {
675
- {
676
- "marker": "opisanine",
643
+ "en_US": {
644
+ "marker": "description",
677
645
  "type": "string",
678
646
  "value": ""
679
647
  }
680
648
  },
649
+ "isSync": false,
681
650
  "products": 0
682
651
  }
683
652
  ```
684
- ### getPageByUrl
653
+
654
+ ### Pages.getPageByUrl()
685
655
 
686
656
  ```
687
- const value = await Pages.getPageById('shop', 'en_US')
657
+ const value = await Pages.getPageByUrl('shop', 'en_US')
688
658
  ```
689
659
 
690
660
  > This method retrieves a single page object based on its URL (url) from the API. It returns a Promise that resolves to the page object, with the specific DTO depending on the type of page being returned. Get required language parameter.
691
661
 
692
662
  Example return:
663
+
693
664
  ```
694
665
  {
695
666
  "id": 1764,
@@ -697,97 +668,88 @@ Example return:
697
668
  "pageUrl": "string",
698
669
  "depth": 3,
699
670
  "localizeInfos": {
700
- {
671
+ "en_US": {
701
672
  "title": "Catalog",
702
- "content": "Content from catalog",
673
+ "content": "Content for catalog",
703
674
  "menuTitle": "Catalog"
704
675
  }
705
676
  },
706
677
  "isVisible": true,
707
- "forms": [
708
- null
709
- ],
710
- "blocks": [
711
- null
712
- ],
713
678
  "position": 192,
714
679
  "type": "forNewsPage",
715
680
  "templateIdentifier": "my-template",
716
681
  "attributeSetId": 7,
717
682
  "attributeValues": {
718
- {
719
- "marker": "opisanine",
683
+ "en_US": {
684
+ "marker": "description",
720
685
  "type": "string",
721
686
  "value": ""
722
687
  }
723
688
  },
689
+ "isSync": false,
724
690
  "products": 0
725
691
  }
726
692
  ```
727
693
 
728
- ### getChildPagesByParentUrl
694
+ ### Pages.getChildPagesByParentUrl()
729
695
 
730
696
  ```
731
697
  const value = await Pages.getChildPagesByParentUrl('shop', 'en_US')
732
698
  ```
699
+
733
700
  > 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.
734
701
 
735
702
  Example return:
703
+
736
704
  ```
737
- {
738
- "id": 1764,
739
- "parentId": 0,
740
- "config": {
741
- "rowsPerPage": 1,
742
- "productsPerRow": 1
743
- },
744
- "pageUrl": "string",
745
- "depth": 3,
746
- "localizeInfos": {
747
- "en_US": {
748
- "title": "Catalog",
749
- "content": "Content for catalog",
750
- "menuTitle": "Catalog"
705
+ [
706
+ {
707
+ "id": 1764,
708
+ "parentId": null,
709
+ "pageUrl": "string",
710
+ "depth": 3,
711
+ "localizeInfos": {
712
+ "en_US": {
713
+ "title": "Catalog",
714
+ "content": "Content for catalog",
715
+ "menuTitle": "Catalog"
716
+ }
717
+ },
718
+ "isVisible": true,
719
+ "position": 192,
720
+ "type": "forNewsPage",
721
+ "templateIdentifier": "my-template",
722
+ "attributeSetId": 7,
723
+ "attributeValues": {
724
+ "en_US": {
725
+ "marker": "description",
726
+ "type": "string",
727
+ "value": ""
728
+ }
729
+ },
730
+ "isSync": false,
731
+ "products": 0
751
732
  }
752
- },
753
- "isVisible": true,
754
- "products": 0,
755
- "attributeSetId": 7,
756
- "isSync": true,
757
- "isEdit": true,
758
- "userEditId": 0,
759
- "position": 0,
760
- "generalTypeId": 2,
761
- "templateId": 0,
762
- "attributesSets": {
763
- "id7": 7,
764
- "string_id18": ""
765
- },
766
- "childrenCount": 0,
767
- "showChildren": true,
768
- "version": 10
769
- }
733
+ ]
770
734
  ```
771
735
 
772
- ### getFormsByPageUrl
736
+ ### Pages.getFormsByPageUrl()
737
+
773
738
  ```
774
739
  const value = await Pages.getFormsByPageUrl('shop', 'en_US')
775
740
  ```
741
+
776
742
  > Get PositionFormDto objects for a related form by url. Returns an array of PositionFormDto objects.
777
743
 
778
744
  Example return:
745
+
779
746
  ```
780
747
  {
781
748
  "id": 1764,
782
- "updatedDate": "2023-11-12T12:51:45.623Z",
783
749
  "version": 10,
784
- "identifier": "marker",
785
- "attributesSets": {
786
- "string_id19": "",
787
- "string_id18": ""
788
- },
750
+ "identifier": "catalog",
789
751
  "attributeSetId": 0,
790
- "processingType": "db",
752
+ "processingType": "email",
791
753
  "localizeInfos": {
792
754
  "en_US": {
793
755
  "title": "My form",
@@ -801,12 +763,19 @@ Example return:
801
763
  },
802
764
  "processingData": {},
803
765
  "position": 0,
804
- "positionId": 12
766
+ "isSync": false,
767
+ "attributeValues": {
768
+ "en_US": {
769
+ "marker": {
770
+ "value": "",
771
+ "type": "string"
772
+ }
773
+ }
774
+ }
805
775
  }
806
776
  ```
807
777
 
808
-
809
- ### getConfigPageByUrl
778
+ ### Pages.getConfigPageByUrl()
810
779
 
811
780
  ```
812
781
  const value = await Pages.getConfigPageByUrl('shop')
@@ -815,13 +784,15 @@ const value = await Pages.getConfigPageByUrl('shop')
815
784
  > This method retrieves the settings for a specific page based on its URL (url). It returns a Promise that resolves to a ConfigPageDto object with page display settings.
816
785
 
817
786
  Example return:
787
+
818
788
  ```
819
789
  {
820
790
  "rowsPerPage": 10,
821
791
  "productsPerRow": 10
822
792
  }
823
793
  ```
824
- ### searchPage
794
+
795
+ ### Pages.searchPage()
825
796
 
826
797
  ```
827
798
  const value = await Pages.searchPage('cup', 'en_US')
@@ -830,45 +801,36 @@ const value = await Pages.searchPage('cup', 'en_US')
830
801
  > This method performs a quick search for page objects based on a text query (name). It returns a Promise that resolves to a ContentIndexedPageDto objects or an empty array []. Get required language parameter.
831
802
 
832
803
  Example return:
804
+
833
805
  ```
834
806
  [
835
807
  {
836
- "id": 1764,
837
- "localizeInfos": {
838
- {
839
- "title": "Product"
840
- }
841
- },
842
- "isVisible": true,
843
- "statusId": 1,
844
- "relatedIds": [
845
- 1,
846
- 2,
847
- 3
848
- ],
849
- "productPages": [
850
- {
851
- "id": 8997,
852
- "pageId": 1176,
853
- "productId": 8872
854
- }
855
- ],
856
- "attributeSetId": 7,
857
- "version": 10,
858
- "isSync": 0,
859
- "price": 0,
860
- "templateIdentifier": "my-template",
861
- "shortDescTemplateIdentifier": "my-template-short",
862
- "attributeValues": {
863
- {
864
- "marker": {
865
- "value": "",
866
- "type": "string"
867
- }
808
+ "id": 1764,
809
+ "parentId": null,
810
+ "pageUrl": "string",
811
+ "depth": 3,
812
+ "localizeInfos": {
813
+ "en_US": {
814
+ "title": "Catalog",
815
+ "content": "Content for catalog",
816
+ "menuTitle": "Catalog"
817
+ }
818
+ },
819
+ "isVisible": true,
820
+ "position": 192,
821
+ "type": "forNewsPage",
822
+ "templateIdentifier": "my-template",
823
+ "attributeSetId": 7,
824
+ "attributeValues": {
825
+ "en_US": {
826
+ "marker": "description",
827
+ "type": "string",
828
+ "value": ""
829
+ }
830
+ },
831
+ "isSync": false,
832
+ "products": 0
868
833
  }
869
- },
870
- "position": 1
871
- }
872
834
  ]
873
835
  ```
874
836
 
@@ -878,7 +840,7 @@ Example return:
878
840
  const { Products } = defineOneEntry('your-url')
879
841
  ```
880
842
 
881
- This module accepts a set of user parameters called userQuery. If the parameters are not passed to the method, the default value will be applied.
843
+ >This module accepts a set of user parameters called userQuery. If the parameters are not passed to the method, the default value will be applied.
882
844
 
883
845
  Parameters:
884
846
 
@@ -935,7 +897,9 @@ Example
935
897
  }
936
898
  }
937
899
  ```
900
+
938
901
  Or
902
+
939
903
  ```
940
904
  const value = await Products.getProducts([ 'en_US', 'it_IT' ])
941
905
 
@@ -967,8 +931,7 @@ const value = await Products.getProducts([ 'en_US', 'it_IT' ])
967
931
  }
968
932
  ```
969
933
 
970
-
971
- ### getProducts
934
+ ### Products.getProducts()
972
935
 
973
936
  ```
974
937
  const value = await Products.getProducts('en_US')
@@ -977,46 +940,42 @@ const value = await Products.getProducts('en_US')
977
940
  > 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[]).
978
941
 
979
942
  Example return:
943
+
980
944
  ```
981
- {
982
- "id": 1764,
983
- "localizeInfos": {
984
- {
985
- "title": "Product"
986
- }
987
- },
988
- "isVisible": true,
989
- "statusId": 1,
990
- "relatedIds": [
991
- 1,
992
- 2,
993
- 3
994
- ],
995
- "productPages": [
996
- {
997
- "id": 8997,
998
- "pageId": 1176,
999
- "productId": 8872
1000
- }
1001
- ],
1002
- "attributeSetId": 7,
1003
- "version": 10,
1004
- "isSync": 0,
1005
- "price": 0,
1006
- "templateIdentifier": "my-template",
1007
- "shortDescTemplateIdentifier": "my-template-short",
1008
- "attributeValues": {
945
+ [
1009
946
  {
1010
- "marker": {
1011
- "value": "",
1012
- "type": "string"
1013
- }
947
+ "id": 1764,
948
+ "localizeInfos": {
949
+ "en_US": {
950
+ "title": "Product"
951
+ }
952
+ },
953
+ "isVisible": true,
954
+ "statusId": 1,
955
+ "relatedIds": [
956
+ 1,
957
+ 2,
958
+ 3
959
+ ],
960
+ "attributeSetId": 7,
961
+ "isSync": true,
962
+ "price": 0,
963
+ "templateIdentifier": "my-template",
964
+ "shortDescTemplateIdentifier": "my-template-short",
965
+ "attributeValues": {
966
+ "en_US": {
967
+ "marker": {
968
+ "value": "",
969
+ "type": "string"
970
+ }
971
+ }
972
+ },
973
+ "position": 1
1014
974
  }
1015
- },
1016
- "position": 1
1017
- }
975
+ ]
1018
976
  ```
1019
- ### getProductsEmptyPage
977
+
978
+ ### Products.getProductsEmptyPage()
1020
979
 
1021
980
  ```
1022
981
  const value = await Products.getProductsEmptyPage('en_US')
@@ -1027,46 +986,40 @@ const value = await Products.getProductsEmptyPage('en_US')
1027
986
  Example return:
1028
987
 
1029
988
  ```
1030
- {
1031
- "id": 1764,
1032
- "localizeInfos": {
1033
- {
1034
- "title": "Product"
1035
- }
1036
- },
1037
- "isVisible": true,
1038
- "statusId": 1,
1039
- "relatedIds": [
1040
- 1,
1041
- 2,
1042
- 3
1043
- ],
1044
- "productPages": [
1045
- {
1046
- "id": 8997,
1047
- "pageId": 1176,
1048
- "productId": 8872
1049
- }
1050
- ],
1051
- "attributeSetId": 7,
1052
- "version": 10,
1053
- "isSync": 0,
1054
- "price": 0,
1055
- "templateIdentifier": "my-template",
1056
- "shortDescTemplateIdentifier": "my-template-short",
1057
- "attributeValues": {
989
+ [
1058
990
  {
1059
- "marker": {
1060
- "value": "",
1061
- "type": "string"
1062
- }
991
+ "id": 1764,
992
+ "localizeInfos": {
993
+ "en_US": {
994
+ "title": "Product"
995
+ }
996
+ },
997
+ "isVisible": true,
998
+ "statusId": 1,
999
+ "relatedIds": [
1000
+ 1,
1001
+ 2,
1002
+ 3
1003
+ ],
1004
+ "attributeSetId": 7,
1005
+ "isSync": true,
1006
+ "price": 0,
1007
+ "templateIdentifier": "my-template",
1008
+ "shortDescTemplateIdentifier": "my-template-short",
1009
+ "attributeValues": {
1010
+ "en_US": {
1011
+ "marker": {
1012
+ "value": "",
1013
+ "type": "string"
1014
+ }
1015
+ }
1016
+ },
1017
+ "position": 1
1063
1018
  }
1064
- },
1065
- "position": 1
1066
- }
1019
+ ]
1067
1020
  ```
1068
1021
 
1069
- ### getProductsPageById
1022
+ ### Products.getProductsPageById()
1070
1023
 
1071
1024
  ```
1072
1025
  const value = await Products.getProductsPageById(1, 'en_US')
@@ -1075,6 +1028,7 @@ const value = await Products.getProductsPageById(1, 'en_US')
1075
1028
  > 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.
1076
1029
 
1077
1030
  Example return:
1031
+
1078
1032
  ```
1079
1033
  {
1080
1034
  "id": 1764,
@@ -1115,7 +1069,7 @@ Example return:
1115
1069
  }
1116
1070
  ```
1117
1071
 
1118
- ### getProductsPageByUrl
1072
+ ### Products.getProductsPageByUrl()
1119
1073
 
1120
1074
  ```
1121
1075
  const value = await Products.getProductsPageByUrl('cup', 'en_US')
@@ -1124,6 +1078,7 @@ const value = await Products.getProductsPageByUrl('cup', 'en_US')
1124
1078
  > 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.
1125
1079
 
1126
1080
  Example return:
1081
+
1127
1082
  ```
1128
1083
  {
1129
1084
  "id": 1764,
@@ -1164,7 +1119,7 @@ Example return:
1164
1119
  }
1165
1120
  ```
1166
1121
 
1167
- ### getRelatedProductsById
1122
+ ### Products.getRelatedProductsById()
1168
1123
 
1169
1124
  ```
1170
1125
  const value = await Products.getRelatedProductsById(1, ''en_US'', {limit:20, offset:1})
@@ -1173,11 +1128,12 @@ const value = await Products.getRelatedProductsById(1, ''en_US'', {limit:20, off
1173
1128
  > 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.
1174
1129
 
1175
1130
  Example return:
1131
+
1176
1132
  ```
1177
1133
  {
1178
1134
  "id": 1764,
1179
1135
  "localizeInfos": {
1180
- {
1136
+ "en_US": {
1181
1137
  "title": "Product"
1182
1138
  }
1183
1139
  },
@@ -1188,21 +1144,13 @@ Example return:
1188
1144
  2,
1189
1145
  3
1190
1146
  ],
1191
- "productPages": [
1192
- {
1193
- "id": 8997,
1194
- "pageId": 1176,
1195
- "productId": 8872
1196
- }
1197
- ],
1198
1147
  "attributeSetId": 7,
1199
- "version": 10,
1200
- "isSync": 0,
1148
+ "isSync": true,
1201
1149
  "price": 0,
1202
1150
  "templateIdentifier": "my-template",
1203
1151
  "shortDescTemplateIdentifier": "my-template-short",
1204
1152
  "attributeValues": {
1205
- {
1153
+ "en_US": {
1206
1154
  "marker": {
1207
1155
  "value": "",
1208
1156
  "type": "string"
@@ -1212,7 +1160,8 @@ Example return:
1212
1160
  "position": 1
1213
1161
  }
1214
1162
  ```
1215
- ### getProductById
1163
+
1164
+ ### Products.getProductById()
1216
1165
 
1217
1166
  ```
1218
1167
  const value = await Products.getProductById(1, 'en_US')
@@ -1221,11 +1170,12 @@ const value = await Products.getProductById(1, 'en_US')
1221
1170
  > 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.
1222
1171
 
1223
1172
  Example return:
1173
+
1224
1174
  ```
1225
1175
  {
1226
1176
  "id": 1764,
1227
1177
  "localizeInfos": {
1228
- {
1178
+ "en_US": {
1229
1179
  "title": "Product"
1230
1180
  }
1231
1181
  },
@@ -1236,21 +1186,13 @@ Example return:
1236
1186
  2,
1237
1187
  3
1238
1188
  ],
1239
- "productPages": [
1240
- {
1241
- "id": 8997,
1242
- "pageId": 1176,
1243
- "productId": 8872
1244
- }
1245
- ],
1246
1189
  "attributeSetId": 7,
1247
- "version": 10,
1248
- "isSync": 0,
1190
+ "isSync": true,
1249
1191
  "price": 0,
1250
1192
  "templateIdentifier": "my-template",
1251
1193
  "shortDescTemplateIdentifier": "my-template-short",
1252
1194
  "attributeValues": {
1253
- {
1195
+ "en_US": {
1254
1196
  "marker": {
1255
1197
  "value": "",
1256
1198
  "type": "string"
@@ -1259,14 +1201,17 @@ Example return:
1259
1201
  },
1260
1202
  "position": 1
1261
1203
  }
1204
+
1262
1205
  ```
1263
- ### filterProduct
1206
+
1207
+ ### Products.filterProduct()
1264
1208
 
1265
1209
  ```
1266
1210
  const value = await Products.filterProduct({conditionValue:1})
1267
1211
  ```
1268
1212
 
1269
1213
  Example body:
1214
+
1270
1215
  ```
1271
1216
  [
1272
1217
  {
@@ -1287,6 +1232,7 @@ Example body:
1287
1232
  > 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}.
1288
1233
 
1289
1234
  Example return:
1235
+
1290
1236
  ```
1291
1237
  {
1292
1238
  "id": 1764,
@@ -1326,7 +1272,8 @@ Example return:
1326
1272
  "position": 1
1327
1273
  }
1328
1274
  ```
1329
- ### searchProduct
1275
+
1276
+ ### Products.searchProduct()
1330
1277
 
1331
1278
  ```
1332
1279
  const value = await Products.searchProduct('cup', 'en_US')
@@ -1335,6 +1282,7 @@ const value = await Products.searchProduct('cup', 'en_US')
1335
1282
  > 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.
1336
1283
 
1337
1284
  Example return:
1285
+
1338
1286
  ```
1339
1287
  [
1340
1288
  {
@@ -1383,7 +1331,7 @@ Example return:
1383
1331
  const { ProductStatuses } = defineOneEntry('your-url');
1384
1332
  ```
1385
1333
 
1386
- ### getProductStatuses
1334
+ ### ProductStatuses.getProductStatuses()
1387
1335
 
1388
1336
  ```
1389
1337
  const value = await ProductStatuses.getProductStatuses()
@@ -1392,22 +1340,24 @@ const value = await ProductStatuses.getProductStatuses()
1392
1340
  > This method searches for all product status objects from the API. It returns a Promise that resolves to an array of product status objects.
1393
1341
 
1394
1342
  Example return:
1343
+
1395
1344
  ```
1396
1345
  [
1397
1346
  {
1398
- "id": 1764,
1399
- "updatedDate": "2023-09-25T13:36:05.903Z",
1400
- "version": 10,
1401
- "identifier": "catalog",
1402
- "localizeInfos": {
1403
- "en_US": {
1404
- "title": "Status 1"
1347
+ "id": 1764,
1348
+ "updatedDate": "2023-11-20T22:14:19.438Z",
1349
+ "version": 10,
1350
+ "identifier": "catalog",
1351
+ "localizeInfos": {
1352
+ "en_US": {
1353
+ "title": "Status 1"
1354
+ }
1405
1355
  }
1406
- }
1407
1356
  }
1408
1357
  ]
1409
1358
  ```
1410
- ### getProductStatusesById
1359
+
1360
+ ### ProductStatuses.getProductStatusesById()
1411
1361
 
1412
1362
  ```
1413
1363
  const value = await ProductStatuses.getProductStatusesById(1)
@@ -1416,6 +1366,7 @@ const value = await ProductStatuses.getProductStatusesById(1)
1416
1366
  > 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.
1417
1367
 
1418
1368
  Example return:
1369
+
1419
1370
  ```
1420
1371
  {
1421
1372
  "id": 1764,
@@ -1429,7 +1380,8 @@ Example return:
1429
1380
  }
1430
1381
  }
1431
1382
  ```
1432
- ### getProductsByStatusMarker
1383
+
1384
+ ### ProductStatuses.getProductsByStatusMarker()
1433
1385
 
1434
1386
  ```
1435
1387
  const value = await ProductStatuses.getProductsByStatusMarker('marker')
@@ -1438,6 +1390,7 @@ const value = await ProductStatuses.getProductsByStatusMarker('marker')
1438
1390
  > 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.
1439
1391
 
1440
1392
  Example return:
1393
+
1441
1394
  ```
1442
1395
  {
1443
1396
  "id": 1764,
@@ -1451,7 +1404,8 @@ Example return:
1451
1404
  }
1452
1405
  }
1453
1406
  ```
1454
- ### validateMarker
1407
+
1408
+ ### ProductStatuses.validateMarker()
1455
1409
 
1456
1410
  ```
1457
1411
  const value = await ProductStatuses.validateMarker('marker')
@@ -1460,16 +1414,41 @@ const value = await ProductStatuses.validateMarker('marker')
1460
1414
  > 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.
1461
1415
 
1462
1416
  Example return:
1417
+
1463
1418
  ```
1464
1419
  true
1465
1420
  ```
1421
+
1422
+ ## System
1423
+
1424
+ ```
1425
+ const { System } = defineOneEntry('your-url')
1426
+ ```
1427
+
1428
+ ### System.test404()
1429
+
1430
+ ```
1431
+ const value = await System.test404()
1432
+ ```
1433
+
1434
+ > This method allows you to redirect to the error page.
1435
+
1436
+ ### System.test500()
1437
+
1438
+ ```
1439
+ const value = await System.test500()
1440
+ ```
1441
+
1442
+ > This method allows you to redirect to the error page.
1443
+
1444
+
1466
1445
  ## Templates
1467
1446
 
1468
1447
  ```
1469
1448
  const { Templates } = defineOneEntry('your-url')
1470
1449
  ```
1471
1450
 
1472
- ### getAllTemplates
1451
+ ### Templates.getAllTemplates()
1473
1452
 
1474
1453
  ```
1475
1454
  const value = await Templates.getAllTemplates()
@@ -1478,33 +1457,32 @@ const value = await Templates.getAllTemplates()
1478
1457
  > This method retrieves all template objects grouped by types from the API. It returns a Promise that resolves to an object GroupedTemplatesObject, which contains an array of template objects.
1479
1458
 
1480
1459
  Example return:
1460
+
1481
1461
  ```
1482
1462
  [
1483
1463
  {
1484
- "id": 1764,
1485
- "identifier": "admin1",
1486
- "attributeSetId": 7,
1487
- "generalTypeId": 2,
1488
- "generalTypeName": "forProductPreview",
1489
- "localizeInfos": {
1490
- "en_US": {
1491
- "title": "Product"
1492
- }
1493
- },
1494
- "isSync": false,
1495
- "attributeValues": {
1496
- "en_US": {
1497
- "marker": {
1498
- "value": "",
1499
- "type": "string"
1464
+ "id": 1764,
1465
+ "updatedDate": "2023-11-20T22:16:17.531Z",
1466
+ "version": 10,
1467
+ "identifier": "marker",
1468
+ "generalType": {
1469
+ "id": 4,
1470
+ "type": "forCatalogPages"
1471
+ },
1472
+ "generalTypeId": 4,
1473
+ "localizeInfos": {
1474
+ "en_US": {
1475
+ "title": "Page template"
1500
1476
  }
1501
- }
1502
- },
1503
- "position": 192
1477
+ },
1478
+ "position": 0,
1479
+ "positionId": 12,
1480
+ "generalTypeName": "forProductPreview"
1504
1481
  }
1505
1482
  ]
1506
1483
  ```
1507
- ### getTemplateByType
1484
+
1485
+ ### Templates.getTemplateByType()
1508
1486
 
1509
1487
  ```
1510
1488
  const value = await Templates.getTemplateByType('forCatalogProducts')
@@ -1513,6 +1491,7 @@ const value = await Templates.getTemplateByType('forCatalogProducts')
1513
1491
  > This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a template object.
1514
1492
 
1515
1493
  Example return:
1494
+
1516
1495
  ```
1517
1496
  [
1518
1497
  {
@@ -1555,34 +1534,47 @@ const value = await TemplatePreviews.getTemplatesPreview()
1555
1534
  > This method retrieves all template objects from the API. It returns a Promise that resolves to an array of TemplatePreviewsEntity template objects.
1556
1535
 
1557
1536
  Example return:
1537
+
1558
1538
  ```
1559
1539
  [
1560
1540
  {
1561
- "id": 1764,
1562
- "updatedDate": "2023-09-25T13:50:39.310Z",
1563
- "version": 10,
1564
- "identifier": "catalog",
1565
- "attributesSets": {
1566
- "string_id19": "",
1567
- "string_id18": ""
1568
- },
1569
- "attributeSetId": 0,
1570
- "localizeInfos": {
1571
- "en_US": {
1572
- "title": "Page tamplate"
1573
- }
1574
- },
1575
- "position": {
1576
- "id": 12,
1577
- "objectId": 1,
1578
- "objectType": "module",
1579
- "position": 1
1580
- },
1581
- "positionId": 1
1541
+ "id": 1764,
1542
+ "updatedDate": "2023-11-20T22:18:25.344Z",
1543
+ "version": 10,
1544
+ "identifier": "marker",
1545
+ "proportion": {
1546
+ "horizontal": {
1547
+ "height": 200,
1548
+ "weight": 10,
1549
+ "marker": "horizontal",
1550
+ "title": "Horizontal",
1551
+ "alignmentType": "left"
1552
+ },
1553
+ "vertical": {
1554
+ "height": 10,
1555
+ "weight": 200,
1556
+ "marker": "vertical",
1557
+ "title": "Vertical",
1558
+ "alignmentType": "left"
1559
+ },
1560
+ "square": {
1561
+ "marker": "square",
1562
+ "title": "Square",
1563
+ "slide": 3,
1564
+ "alignmentType": "center"
1565
+ }
1566
+ },
1567
+ "localizeInfos": {
1568
+ "en_US": {
1569
+ "title": "Page Template"
1570
+ }
1571
+ },
1572
+ "position": 0
1582
1573
  }
1583
1574
  ]
1584
1575
  ```
1585
- ### getTemplatesPreviewById
1576
+
1577
+ ### TemplatePreviews.getTemplatesPreviewById()
1586
1578
 
1587
1579
  ```
1588
1580
  const value = await TemplatePreviews.getTemplatesPreviewById(1)
@@ -1593,31 +1585,44 @@ const value = await TemplatePreviews.getTemplatesPreviewById(1)
1593
1585
  Example return:
1594
1586
 
1595
1587
  ```
1596
- {
1597
- "id": 1764,
1598
- "updatedDate": "2023-09-25T13:51:18.920Z",
1599
- "version": 10,
1600
- "identifier": "catalog",
1601
- "attributesSets": {
1602
- "string_id19": "",
1603
- "string_id18": ""
1604
- },
1605
- "attributeSetId": 0,
1606
- "localizeInfos": {
1607
- "en_US": {
1608
- "title": "Page template"
1609
- }
1610
- },
1611
- "position": {
1612
- "id": 12,
1613
- "objectId": 1,
1614
- "objectType": "module",
1615
- "position": 1
1616
- },
1617
- "positionId": 1
1618
- }
1588
+ {
1589
+ "id": 1764,
1590
+ "updatedDate": "2023-11-20T22:18:25.344Z",
1591
+ "version": 10,
1592
+ "identifier": "marker",
1593
+ "proportion": {
1594
+ "horizontal": {
1595
+ "height": 200,
1596
+ "weight": 10,
1597
+ "marker": "horizontal",
1598
+ "title": "Horizontal",
1599
+ "alignmentType": "left"
1600
+ },
1601
+ "vertical": {
1602
+ "height": 10,
1603
+ "weight": 200,
1604
+ "marker": "vertical",
1605
+ "title": "Vertical",
1606
+ "alignmentType": "left"
1607
+ },
1608
+ "square": {
1609
+ "marker": "square",
1610
+ "title": "Square",
1611
+ "slide": 3,
1612
+ "alignmentType": "center"
1613
+ }
1614
+ },
1615
+ "localizeInfos": {
1616
+ "en_US": {
1617
+ "title": "Page Template"
1618
+ }
1619
+ },
1620
+ "position": 0
1621
+ }
1622
+
1619
1623
  ```
1620
- ### getTemplatesPreviewByMarker
1624
+
1625
+ ### TemplatePreviews.getTemplatesPreviewByMarker()
1621
1626
 
1622
1627
  ```
1623
1628
  const value = await TemplatePreviews.getTemplatesPreviewByMarker('marker')
@@ -1630,25 +1635,36 @@ Example return:
1630
1635
  ```
1631
1636
  {
1632
1637
  "id": 1764,
1633
- "updatedDate": "2023-09-25T13:51:59.232Z",
1638
+ "updatedDate": "2023-11-20T22:18:25.344Z",
1634
1639
  "version": 10,
1635
- "identifier": "catalog",
1636
- "attributesSets": {
1637
- "string_id19": "",
1638
- "string_id18": ""
1640
+ "identifier": "marker",
1641
+ "proportion": {
1642
+ "horizontal": {
1643
+ "height": 200,
1644
+ "weight": 10,
1645
+ "marker": "horizontal",
1646
+ "title": "Horizontal",
1647
+ "alignmentType": "left"
1648
+ },
1649
+ "vertical": {
1650
+ "height": 10,
1651
+ "weight": 200,
1652
+ "marker": "vertical",
1653
+ "title": "Vertical",
1654
+ "alignmentType": "left"
1655
+ },
1656
+ "square": {
1657
+ "marker": "square",
1658
+ "title": "Square",
1659
+ "slide": 3,
1660
+ "alignmentType": "center"
1661
+ }
1639
1662
  },
1640
- "attributeSetId": 0,
1641
1663
  "localizeInfos": {
1642
1664
  "en_US": {
1643
- "title": "Page template"
1665
+ "title": "Page Template"
1644
1666
  }
1645
1667
  },
1646
- "position": {
1647
- "id": 12,
1648
- "objectId": 1,
1649
- "objectType": "module",
1650
- "position": 1
1651
- },
1652
- "positionId": 1
1668
+ "position": 0
1653
1669
  }
1654
1670
  ```