oneentry 1.0.46 → 1.0.48

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 ADDED
@@ -0,0 +1,3643 @@
1
+ # OneEntry SDK
2
+
3
+ OneEntry Headless CMS SDK is an SDK that provides an easy way to interact with the OneEntry Headless CMS API.
4
+
5
+ ## Official Site
6
+
7
+ Visit the official OneEntry website at [https://oneentry.cloud](https://oneentry.cloud) to learn more about the OneEntry Headless CMS.
8
+
9
+ ## Sign Up
10
+
11
+ To get started with OneEntry, sign up for an account at [https://account.oneentry.cloud/authentication/register](https://account.oneentry.cloud/authentication/register).
12
+
13
+ # Installation
14
+
15
+ To install the OneEntry Headless CMS SDK in your project, run the following command:
16
+
17
+ ```
18
+ npm install oneentry
19
+ ```
20
+
21
+ # Usage
22
+
23
+ To use the OneEntry Headless CMS SDK in your project, import the defineOneEntry function:
24
+ ```js
25
+ import { defineOneEntry } from 'oneentry'
26
+
27
+ const {
28
+ Admins,
29
+ AttributesSets,
30
+ Blocks,
31
+ Forms,
32
+ FormData,
33
+ FileUploading,
34
+ GeneralTypes,
35
+ Locales,
36
+ Markers,
37
+ Menus,
38
+ Pages,
39
+ Products,
40
+ ProductstatusesSpec,
41
+ System,
42
+ Templates,
43
+ TemplatePreviews
44
+ } = defineOneEntry('your-url')
45
+ ```
46
+
47
+ Or
48
+
49
+ ```js
50
+ const api = defineOneEntry('your-url')
51
+ ```
52
+
53
+ The second parameter of the function takes a configuration object with the keys "token" and "langCode".
54
+ Set the token key if your project secure "Security API Token"
55
+
56
+ Set the "langCode" to set the default language. By specifying this parameter once, you don't have to pass the langCode to the methods ONEENTRY API. If you have not passed the default language, it will be set "en_US"
57
+
58
+ >If you chose token protection to ensure connection security, just pass your token to the function as an optional parameter.
59
+
60
+ You can get a token as follows
61
+ 1) Log in to your personal account
62
+ 2) Go to the "Projects" tab and select a project
63
+ 3) Go to the "Access" tab
64
+ 4) Set the switch to "Security API Token"
65
+ 5) Log in to the project, go to the settings section and open the token tab
66
+ 6) Get and copy the token of your project
67
+
68
+ Also, you can connect a tls certificate to secure your project. In this case, do not transfer the "token" at all.
69
+ [Learn more about security](https://oneentry.ru/instructions.html#START)
70
+
71
+
72
+ ```js
73
+ const api = defineOneEntry('your-url', {token: 'my-token', langCode:'my-langCode'})
74
+ ```
75
+ Now you can use the following links to jump to specific entries:
76
+ - [Admins](#admins)
77
+ - [AttributesSets](#attributessets)
78
+ - [Blocks](#blocks)
79
+ - [Forms](#forms)
80
+ - [FormData](#formdata)
81
+ - [FileUploading](#fileuploading)
82
+ - [GeneralTypes](#generaltypes)
83
+ - [Locales](#locales)
84
+ - [Markers](#markers)
85
+ - [Menus](#menus)
86
+ - [Pages](#pages)
87
+ - [Products](#products)
88
+ - [ProductstatusesSpec](#productstatuses)
89
+ - [System](#system)
90
+ - [Templates](#templates)
91
+ - [TemplatePreviews](#templatepreviews)
92
+
93
+
94
+ ## <h2 id="admins"> Admins </h2>
95
+
96
+
97
+ ```js
98
+ const { Admins } = defineOneEntry('your-url')
99
+ ```
100
+
101
+ ### Admins.getAdminsInfo(langCode, offset, limit)
102
+
103
+
104
+ ```js
105
+ const value = await Admins.getAdminsInfo('en_US', 0, 30)
106
+ ```
107
+
108
+
109
+ > This method retrieves all user objects of type admin from the API. It returns a Promise that resolves to an array of AdminEntity objects.
110
+
111
+
112
+ Example return:
113
+
114
+ ```json
115
+ [
116
+ {
117
+ "id": 1764,
118
+ "identifier": "admin1",
119
+ "attributeSetId": 7,
120
+ "isSync": false,
121
+ "attributeValues": {
122
+ "marker": {
123
+ "value": "",
124
+ "type": "string"
125
+ }
126
+ },
127
+ "position": 192
128
+ }
129
+ ]
130
+ ```
131
+ <details>
132
+ <summary>Schema</summary>
133
+
134
+ **id:** number <br>
135
+ *object identifier*
136
+ example: 1764 <br>
137
+
138
+ **identifier:** string <br>
139
+ *textual identifier for the record field* <br>
140
+ example: admin1 <br>
141
+ default: admin1 <br>
142
+
143
+ **attributeSetId:** number <br>
144
+ *Attribute set identifier* <br>
145
+ example: 7
146
+
147
+ **isSync** boolean <br>
148
+ *Page indexing flag (true or false)* <br>
149
+ example: false
150
+
151
+ **attributeValues:** Record<string, string> <br>
152
+ *Array of attribute values from the index (presented as a pair of user attribute identifier: attribute value)* <br>
153
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
154
+
155
+ **position:** number <br>
156
+ *Position number (for sorting)* <br>
157
+ example: 192
158
+
159
+ </details>
160
+
161
+ ---
162
+
163
+
164
+
165
+ ## <h2 id="attributessets"> AttributesSets </h2>
166
+
167
+ ```js
168
+ const { AttributesSets } = defineOneEntry('your-url');
169
+ ```
170
+
171
+ ### AttributesSets.getAttributesByMarker(marker, langCode)
172
+
173
+ ```js
174
+ const value = await AttributesSets.getAttributesByMarker('my-marker', 'en_US')
175
+ ```
176
+
177
+ > This method return all attributes with data from the attribute sets.
178
+
179
+
180
+ Example return:
181
+
182
+
183
+ ```json
184
+ [
185
+ {
186
+ "type": "list",
187
+ "marker": "list1",
188
+ "position": 192,
189
+ "validators": {
190
+ "requiredValidator": {
191
+ "strict": true
192
+ },
193
+ "defaultValueValidator": {
194
+ "fieldDefaultValue": 11
195
+ }
196
+ },
197
+ "localizeInfos": {
198
+ "title": "My attribute"
199
+ },
200
+ "listTitles": [
201
+ {
202
+ "title": "red",
203
+ "value": 1,
204
+ "position": 1,
205
+ "extendedValue": null,
206
+ "extendedValueType": null
207
+ },
208
+ {
209
+ "title": "yellow",
210
+ "value": 2,
211
+ "position": 2,
212
+ "extendedValue": null,
213
+ "extendedValueType": null
214
+ }
215
+ ]
216
+ }
217
+ ]
218
+ ```
219
+
220
+ <details>
221
+ <summary>Schema</summary>
222
+
223
+ **type:** string <br>
224
+ *attribute type* <br>
225
+ example: list <br>
226
+
227
+ **marker:** string <br>
228
+ *textual identifier of the attribute (marker)* <br>
229
+ Enum:
230
+ [ string, text, textWithHeader, integer, real, float, dateTime, date, time, file, image, groupOfImages, radioButton, list, button ]
231
+ example: list1
232
+
233
+ **position:** number <br>
234
+ *position number for sorting* <br>
235
+ example: 192 <br>
236
+
237
+ **validators:** Record<string, any> <br>
238
+ *set of validators for validation* <br>
239
+ example: OrderedMap { "requiredValidator": OrderedMap { "strict": true }, "defaultValueValidator": OrderedMap { "fieldDefaultValue": 11 } }
240
+
241
+ **localizeInfos:** Record<string, any> <br>
242
+ *localization data for the set (name)* <br>
243
+ example: OrderedMap { "title": "My attribute" } <br>
244
+
245
+ **listTitles** Record<string, any> <br>
246
+ *array of values (with extended data) for list and radioButton attributes* <br>
247
+ example: List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } ]
248
+
249
+ </details>
250
+
251
+
252
+ ### AttributesSets.getSingleAttributeByMarkerSet(attributeMarker, setMarker, langCode)
253
+
254
+ ```js
255
+ const value = await AttributesSets.getSingleAttributeByMarkerSet('list1', 'list1', 'en_US')
256
+ ```
257
+
258
+ > This method return a single attribute with data from the attribute sets.
259
+
260
+
261
+ Example return:
262
+
263
+ ```json
264
+ {
265
+ "type": "list",
266
+ "marker": "list1",
267
+ "position": 192,
268
+ "validators": {
269
+ "requiredValidator": {
270
+ "strict": true
271
+ },
272
+ "defaultValueValidator": {
273
+ "fieldDefaultValue": 11
274
+ }
275
+ },
276
+ "localizeInfos": {
277
+ "title": "My attribute"
278
+ },
279
+ "listTitles": [
280
+ {
281
+ "title": "red",
282
+ "value": 1,
283
+ "position": 1,
284
+ "extendedValue": null,
285
+ "extendedValueType": null
286
+ },
287
+ {
288
+ "title": "yellow",
289
+ "value": 2,
290
+ "position": 2,
291
+ "extendedValue": null,
292
+ "extendedValueType": null
293
+ }
294
+ ]
295
+ }
296
+ ```
297
+ <details>
298
+ <summary>Schema</summary>
299
+
300
+ **type:** string <br>
301
+ *attribute type* <br>
302
+ example: list <br>
303
+
304
+ **marker:** string <br>
305
+ *textual identifier of the attribute (marker)* <br>
306
+ Enum:
307
+ [ string, text, textWithHeader, integer, real, float, dateTime, date, time, file, image, groupOfImages, radioButton, list, button ]
308
+ example: list1
309
+
310
+ **position:** number <br>
311
+ *position number for sorting* <br>
312
+ example: 192 <br>
313
+
314
+ **validators:** Record<string, any> <br>
315
+ *set of validators for validation* <br>
316
+ example: OrderedMap { "requiredValidator": OrderedMap { "strict": true }, "defaultValueValidator": OrderedMap { "fieldDefaultValue": 11 } }
317
+
318
+ **localizeInfos:** Record<string, any> <br>
319
+ *localization data for the set (name)* <br>
320
+ example: OrderedMap { "title": "My attribute" } <br>
321
+
322
+ **listTitles** Record<string, any> <br>
323
+ *array of values (with extended data) for list and radioButton attributes* <br>
324
+ example: List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } ]
325
+
326
+ </details>
327
+
328
+ ---
329
+
330
+
331
+ ## <h2 id="blocks"> Blocks </h2>
332
+
333
+ ```js
334
+ const { Blocks } = defineOneEntry('your-url');
335
+ ```
336
+
337
+ ### Blocks.getBlockByMarker(marker, langCode)
338
+
339
+ ```js
340
+ const value = await Blocks.getBlockByMarker('my-marker', 'en_US')
341
+ ```
342
+
343
+ > This method return one blocks object by marker.
344
+
345
+ Example return:
346
+
347
+ ```json
348
+ {
349
+ "id": 1764,
350
+ "attributeSetId": 7,
351
+ "localizeInfos": {
352
+ "title": "My block"
353
+ },
354
+ "customSettings": {
355
+ "sliderDelay": 0,
356
+ "sliderDelayType": "",
357
+ "productQuantity": 4,
358
+ "productSortType": "By_ID",
359
+ "productSortOrder": "Descending",
360
+ "productCountElementsPerRow": 10,
361
+ "similarProductRules": [
362
+ {
363
+ "property": "Descending",
364
+ "includes": "",
365
+ "keywords": "",
366
+ "strict": ""
367
+ }
368
+ ]
369
+ },
370
+ "version": 10,
371
+ "identifier": "catalog",
372
+ "position": 192,
373
+ "attributeValues": {
374
+ "marker": {
375
+ "value": "",
376
+ "type": "string"
377
+ }
378
+ },
379
+ "type": "forNewsPage",
380
+ "templateIdentifier": null
381
+ }
382
+ ```
383
+
384
+ <details>
385
+ <summary>Schema</summary>
386
+
387
+ **id:** number <br>
388
+ *object identifier*
389
+ example: 1764 <br>
390
+
391
+ **attributeSetId:** number <br>
392
+ *identifier for the used attribute set* <br>
393
+ example: 7
394
+
395
+ **localizeInfos:** CommonLocalizeInfos <br>
396
+ *block name with localization* <br>
397
+ example: OrderedMap { "en_US": OrderedMap { "title": "My block" } }
398
+
399
+ **customSettings:** BlockCustomSettings <br>
400
+ *custom settings for different block types* <br>
401
+ example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ] }
402
+
403
+ **version:** number <br>
404
+ *object version number* <br>
405
+ example: 10
406
+
407
+ **identifier:** string <br>
408
+ *textual identifier for the field record* <br>
409
+ example: catalog <br>
410
+ default: marker
411
+
412
+ **position:** number <br>
413
+ *position number (for sorting)* <br>
414
+ example: 192
415
+
416
+ **attributeValues:** Record<string, string> <br>
417
+ *array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
418
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
419
+
420
+ **type:** string <br>
421
+ *block type* <br>
422
+ example: forNewsPage
423
+
424
+ **templateIdentifier:** string <br>
425
+ *template marker used by the block (can be null)* <br>
426
+ Enum:
427
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
428
+ example: null
429
+
430
+ </details>
431
+ ---
432
+
433
+
434
+
435
+ ## <h2 id="fileuploading"> FileUploading </h2>
436
+
437
+ const { FileUploading } = defineOneEntry('your-url');
438
+
439
+ ### FileUploading.upload(data, fileQuery)
440
+
441
+ ```js
442
+ const query = {
443
+ type:"page",
444
+ entity:"editor",
445
+ id:3787,
446
+ width:0,
447
+ height:0,
448
+ compress:true,
449
+ }
450
+
451
+ const value = await FileUploading.upload(data, query)
452
+ ```
453
+
454
+ > This method uploads a file to a cloud file storage. Pass to the date the value obtained from input type "file".
455
+ > Data is file object (or array), learn more - [File Object](https://developer.mozilla.org/en-US/docs/Web/API/File)
456
+
457
+ Example return:
458
+
459
+ ```json
460
+ [
461
+ {
462
+ "filename": "string",
463
+ "downloadLink": "string",
464
+ "size": 0
465
+ }
466
+ ]
467
+ ```
468
+
469
+ <details>
470
+ <summary>Schema</summary>
471
+
472
+ **filename:** string <br>
473
+ *filename with relative path*
474
+
475
+ **downloadLink:** string <br>
476
+ *link for downloading the file*
477
+
478
+ **size** number <br>
479
+ *size of the file in bytes*
480
+
481
+ </details>
482
+
483
+ ### FileUploading.delete(filename, fileQuery)
484
+
485
+ ```js
486
+ const query = {
487
+ type:"page",
488
+ entity:"editor",
489
+ id:3787
490
+ }
491
+
492
+
493
+ const value = await FileUploading.delete("file.png", query)
494
+ ```
495
+
496
+ > This void method delete a file from the cloud file storage.
497
+
498
+ ### FileUploading.getFile(id, type, entity, filename)
499
+
500
+ ```js
501
+ const value = await FileUploading.getFile(123, 'page', 'editor', 'file.png')
502
+ ```
503
+
504
+ > This method return file object by parameters.
505
+
506
+ Example return:
507
+
508
+ ```json
509
+ {
510
+ "file": "string"
511
+ }
512
+ ```
513
+
514
+ ---
515
+
516
+
517
+
518
+ ## <h2 id="forms"> Forms </h2>
519
+
520
+
521
+ const { Forms } = defineOneEntry('your-url');
522
+
523
+ ### Forms.getAllForms(langCode, offset, limit)
524
+
525
+ ```js
526
+ const value = await Forms.getAllForms('en_US', 0, 30)
527
+ ```
528
+
529
+ > This method retrieves all form objects from the API. It returns a Promise that resolves to an array of FormEntity objects.
530
+
531
+ Example return:
532
+
533
+ ```json
534
+ [
535
+ {
536
+ "id": 1764,
537
+ "attributeSetId": 0,
538
+ "processingType": "email",
539
+ "localizeInfos": {
540
+ "title": "My Form",
541
+ "titleForSite": "",
542
+ "successMessage": "",
543
+ "unsuccessMessage": "",
544
+ "urlAddress": "",
545
+ "database": "0",
546
+ "script": "0"
547
+ },
548
+ "processingData": "Unknown Type: ProcessingData",
549
+ "version": 10,
550
+ "identifier": "catalog",
551
+ "position": 192,
552
+ "attributes": [
553
+ {
554
+ "type": "list",
555
+ "marker": "l1",
556
+ "position": 2,
557
+ "listTitles": [
558
+ {
559
+ "title": "red",
560
+ "value": 1,
561
+ "position": 1,
562
+ "extendedValue": null,
563
+ "extendedValueType": null
564
+ },
565
+ {
566
+ "title": "yellow",
567
+ "value": 2,
568
+ "position": 2,
569
+ "extendedValue": null,
570
+ "extendedValueType": null
571
+ }
572
+ ],
573
+ "validators": {},
574
+ "localizeInfos": {
575
+ "title": "l1"
576
+ }
577
+ }
578
+ ]
579
+ }
580
+ ]
581
+ ```
582
+ <details>
583
+ <summary>Schema</summary>
584
+
585
+ **id:** number <br>
586
+ *object identifier* <br>
587
+ example: 1764
588
+
589
+ **attributeSetId:** number <br>
590
+ *identifier of the attribute set used* <br>
591
+
592
+ **processingType:** string <br>
593
+ *form processing type* <br>
594
+ example: email
595
+
596
+ **localizeInfos:** FormLocalizeInfos <br>
597
+ *form name with localization* <br>
598
+ Enum:
599
+ [ db, email, script ]
600
+ example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } }
601
+
602
+ **processingData:** ProcessingData <br>
603
+ *form data*
604
+
605
+ **version:** number <br>
606
+ *object version number* <br>
607
+ example: 10
608
+
609
+ **identifier:** string <br>
610
+ *textual identifier for the record field* <br>
611
+ example: catalog
612
+ default: marker
613
+
614
+ **position:** number <br>
615
+ *position number (for sorting)* <br>
616
+ example: 192
617
+
618
+ **attributes:** <br>
619
+ *array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
620
+ example: List [ OrderedMap { "type": "list", "marker": "l1", "position": 2, "listTitles": List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } ], "validators": OrderedMap {}, "localizeInfos": OrderedMap { "title": "l1" } } ]
621
+
622
+ </details>
623
+
624
+
625
+ ### Forms.getFormByMarker(marker, langCode)
626
+
627
+ ```js
628
+ const value = await Forms.getFormByMarker('My form', 'en_US')
629
+ ```
630
+
631
+ > This method retrieves a single form object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a FormEntity object.
632
+
633
+ Example return:
634
+
635
+ ```json
636
+ {
637
+ "id": 1764,
638
+ "attributeSetId": 0,
639
+ "processingType": "email",
640
+ "localizeInfos": {
641
+ "title": "My Form",
642
+ "titleForSite": "",
643
+ "successMessage": "",
644
+ "unsuccessMessage": "",
645
+ "urlAddress": "",
646
+ "database": "0",
647
+ "script": "0"
648
+ },
649
+ "processingData": "Unknown Type: ProcessingData",
650
+ "version": 10,
651
+ "identifier": "catalog",
652
+ "position": 192,
653
+ "attributes": [
654
+ {
655
+ "type": "list",
656
+ "marker": "l1",
657
+ "position": 2,
658
+ "listTitles": [
659
+ {
660
+ "title": "red",
661
+ "value": 1,
662
+ "position": 1,
663
+ "extendedValue": null,
664
+ "extendedValueType": null
665
+ },
666
+ {
667
+ "title": "yellow",
668
+ "value": 2,
669
+ "position": 2,
670
+ "extendedValue": null,
671
+ "extendedValueType": null
672
+ }
673
+ ],
674
+ "validators": {},
675
+ "localizeInfos": {
676
+ "title": "l1"
677
+ }
678
+ }
679
+ ]
680
+ }
681
+ ```
682
+ <details>
683
+ <summary>Schema</summary>
684
+
685
+ **id:** number <br>
686
+ *object identifier* <br>
687
+ example: 1764
688
+
689
+ **attributeSetId:** number <br>
690
+ *identifier of the attribute set used* <br>
691
+
692
+ **processingType:** string <br>
693
+ *form processing type* <br>
694
+ example: email
695
+
696
+ **localizeInfos:** FormLocalizeInfos <br>
697
+ *form name with localization* <br>
698
+ Enum:
699
+ [ db, email, script ]
700
+ example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } }
701
+
702
+ **processingData:** ProcessingData <br>
703
+ *form data*
704
+
705
+ **version:** number <br>
706
+ *object version number* <br>
707
+ example: 10
708
+
709
+ **identifier:** string <br>
710
+ *textual identifier for the record field* <br>
711
+ example: catalog
712
+ default: marker
713
+
714
+ **position:** number <br>
715
+ *position number (for sorting)* <br>
716
+ example: 192
717
+
718
+ **attributes:** <br>
719
+ *array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
720
+ example: List [ OrderedMap { "type": "list", "marker": "l1", "position": 2, "listTitles": List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } ], "validators": OrderedMap {}, "localizeInfos": OrderedMap { "title": "l1" } } ]
721
+
722
+ </details>
723
+
724
+ ---
725
+
726
+
727
+ ## <h2 id="formdata"> FormData </h2>
728
+
729
+ const { FormData } = defineOneEntry('your-url');
730
+
731
+ ### FormData.postFormsData(data)
732
+
733
+ ```js
734
+ const value = await FormData.postFormsData(data)
735
+ ```
736
+
737
+ > This method retrieves all form data objects from the API. It returns a Promise that resolves to an array of objects of type CreateFormDataDto.
738
+
739
+ Example return:
740
+
741
+ ```json
742
+ {
743
+ "id": 1764,
744
+ "formIdentifier": "my-form",
745
+ "time": "2023-02-12 10:56",
746
+ "formData": {
747
+ "marker": "name_1",
748
+ "value": "Name"
749
+ }
750
+ }
751
+ ```
752
+ <details>
753
+ <summary>Schema</summary>
754
+
755
+ **id:** number <br>
756
+ *object identifier* <br>
757
+ example: 1764
758
+
759
+ **formIdentifier:** string <br>
760
+ *Text identifier of the form object (marker)* <br>
761
+ example: my-form
762
+
763
+ **time:** Date <br>
764
+ *Date and time of form modification* <br>
765
+ example: 2023-02-12 10:56
766
+
767
+ **formData:** FormDataLangType <br>
768
+ *Data submitted by the form* <br>
769
+ example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] }
770
+
771
+ </details>
772
+
773
+ ### FormData.getFormsData(langCode, offset, limit)
774
+
775
+ ```js
776
+ const value = await FormData.getFormsData('en_US', 0, 30)
777
+ ```
778
+
779
+ > 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.
780
+
781
+ Example return:
782
+
783
+ ```json
784
+ {
785
+ "id": 1764,
786
+ "formIdentifier": "my-form",
787
+ "time": "2023-02-12 10:56",
788
+ "formData": {
789
+ "marker": "name_1",
790
+ "value": "Name"
791
+ },
792
+ "attributeSetIdentifier": "test-form"
793
+ }
794
+ ```
795
+
796
+ <details>
797
+ <summary>Schema</summary>
798
+
799
+ **id:** number <br>
800
+ *object identifier* <br>
801
+ example: 1764
802
+
803
+ **formIdentifier:** string <br>
804
+ *Text identifier of the form object (marker)* <br>
805
+ example: my-form
806
+
807
+ **time:** Date <br>
808
+ *Date and time of form modification* <br>
809
+ example: 2023-02-12 10:56
810
+
811
+ **formData:** FormDataLangType <br>
812
+ *Data submitted by the form* <br>
813
+ example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] }
814
+
815
+ **attributeSetIdentifier:** string
816
+ *text identifier (marker) of the used attribute set*
817
+ example: test-form
818
+
819
+ </details>
820
+
821
+
822
+ ### FormData.getFormsDataByMarker(marker, langCode, offset, limit)
823
+
824
+ ```js
825
+ const value = await FormData.getFormsDataByMarker('my-marker', 'en_US', 0, 30)
826
+ ```
827
+
828
+ > 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.
829
+
830
+ Example return:
831
+
832
+ ```json
833
+ {
834
+ "id": 1764,
835
+ "formIdentifier": "my-form",
836
+ "time": "2023-02-12 10:56",
837
+ "formData": {
838
+ "marker": "name_1",
839
+ "value": "Name"
840
+ },
841
+ "attributeSetIdentifier": "test-form"
842
+ }
843
+ ```
844
+
845
+ <details>
846
+ <summary>Schema</summary>
847
+
848
+ **id:** number <br>
849
+ *object identifier* <br>
850
+ example: 1764
851
+
852
+ **formIdentifier:** string <br>
853
+ *Text identifier of the form object (marker)* <br>
854
+ example: my-form
855
+
856
+ **time:** Date <br>
857
+ *Date and time of form modification* <br>
858
+ example: 2023-02-12 10:56
859
+
860
+ **formData:** FormDataLangType <br>
861
+ *Data submitted by the form* <br>
862
+ example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] }
863
+
864
+ **attributeSetIdentifier:** string
865
+ *text identifier (marker) of the used attribute set*
866
+ example: test-form
867
+
868
+ </details>
869
+
870
+ ---
871
+
872
+
873
+ ## <h2 id="generaltypes"> GeneralTypes </h2>
874
+
875
+ const { GeneralTypes } = defineOneEntry('your-url');
876
+
877
+ ### GeneralTypes.getAllTypes()
878
+
879
+ ```js
880
+ const value = await GeneralTypes.getAllTypes()
881
+ ```
882
+
883
+ > This method retrieves all objects of type GeneralTypeEntity from the API. It returns a Promise that resolves to an array of GeneralTypeEntity objects.
884
+
885
+ Example return:
886
+
887
+ ```json
888
+ [
889
+ {
890
+ "id": 1,
891
+ "type": "forNewsPage"
892
+ }
893
+ ]
894
+ ```
895
+ <details>
896
+ <summary>Schema</summary>
897
+
898
+ **id:** number <br>
899
+ *object identifier* <br>
900
+ example: 1764
901
+
902
+ **type:** string <br>
903
+ *type value* <br>
904
+ example: forNewsPage <br>
905
+ Enum:
906
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
907
+
908
+ </details>
909
+ ---
910
+
911
+
912
+ ## <h2 id="locales"> Locales </h2>
913
+
914
+ ```js
915
+ const { Locales } = defineOneEntry('your-url')
916
+ ```
917
+
918
+ ### Locales.getLocales()
919
+
920
+ ```js
921
+ const value = await Locales.getLocales()
922
+ ```
923
+
924
+ > This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.
925
+
926
+ Example return:
927
+
928
+ ```json
929
+ [
930
+ {
931
+ "id": 1764,
932
+ "shortCode": "en",
933
+ "code": "en_US",
934
+ "name": "Bengali",
935
+ "nativeName": "বাংলা",
936
+ "isActive": false,
937
+ "image": "🇦🇨",
938
+ "position": 1
939
+ }
940
+ ]
941
+ ```
942
+
943
+ <details>
944
+ <summary>Schema</summary>
945
+
946
+ **id:** number <br>
947
+ *object identifier* <br>
948
+ example: 1764
949
+
950
+ **shortCode:** string <br>
951
+ *language code (short)* <br>
952
+ example: en
953
+
954
+ **code:** string <br>
955
+ *language code with country code* <br>
956
+ example: en_US
957
+
958
+ **name** string <br>
959
+ *Language name (in English)* <br>
960
+ example: Bengali
961
+
962
+ **nativeName** string <br>
963
+ *Language name (in native language)* <br>
964
+ example: বাংলা
965
+
966
+ **isActive:** boolean <br>
967
+ *Flag of usage* <br>
968
+ example: false
969
+
970
+ **image:** string
971
+ *Graphic image of the language (under development)*
972
+ example: 🇦🇨
973
+
974
+ **position:** {
975
+ description:position number
976
+ }
977
+ </details>
978
+ ---
979
+
980
+
981
+
982
+ ## <h2 id="markers"> Markers </h2>
983
+
984
+
985
+ ```js
986
+ const { Markers } = defineOneEntry('your-url')
987
+ ```
988
+
989
+ ### Markers.getMarkers(offset, limit)
990
+
991
+ ```js
992
+ const value = await Markers.getMarkers(0, 30)
993
+ ```
994
+
995
+ >This method return an array of all objects MarkerEntity.
996
+
997
+ Example return:
998
+
999
+ ```json
1000
+ [
1001
+ {
1002
+ "id": 17,
1003
+ "updatedDate": "2023-12-18T08:53:37.422Z",
1004
+ "version": 10,
1005
+ "identifier": "catalog",
1006
+ "name": "string",
1007
+ "marker": "string",
1008
+ "localizeInfos": {
1009
+ "title": "My marker"
1010
+ }
1011
+ }
1012
+ ]
1013
+ ```
1014
+
1015
+ <details>
1016
+ <summary>Schema</summary>
1017
+
1018
+ **id:** number <br>
1019
+ *object identifier* <br>
1020
+ example: 1764
1021
+
1022
+ **updatedDate:** string($date-time) <br>
1023
+ *object modification date* <br>
1024
+
1025
+ **version:** number <br>
1026
+ *version number of the object change* <br>
1027
+ example: 10
1028
+
1029
+ **identifier?:** string <br>
1030
+ *textual identifier for a record field* <br>
1031
+ example: catalog
1032
+
1033
+ **name?:** string <br>
1034
+ *name*
1035
+
1036
+ **marker?:** string <br>
1037
+ *textual identifier*
1038
+
1039
+ **localizeInfos:** CommonLocalizeInfos <br>
1040
+ *localized marker name* <br>
1041
+ example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } }
1042
+ </details>
1043
+
1044
+
1045
+ ### Markers.getMarkerById(id)
1046
+
1047
+ ```js
1048
+ const value = await Markers.getMarkerById(1)
1049
+ ```
1050
+
1051
+ >This method return one object of MarkerEntity by id.
1052
+
1053
+ Example return:
1054
+
1055
+ ```json
1056
+ {
1057
+ "id": 17,
1058
+ "updatedDate": "2023-12-18T08:55:22.581Z",
1059
+ "version": 10,
1060
+ "identifier": "catalog",
1061
+ "name": "string",
1062
+ "marker": "string",
1063
+ "localizeInfos": {
1064
+ "title": "My marker"
1065
+ }
1066
+ }
1067
+ ```
1068
+
1069
+ <details>
1070
+ <summary>Schema</summary>
1071
+
1072
+ **id:** number <br>
1073
+ *object identifier* <br>
1074
+ example: 1764
1075
+
1076
+ **updatedDate:** string($date-time) <br>
1077
+ *object modification date* <br>
1078
+
1079
+ **version:** number <br>
1080
+ *version number of the object change* <br>
1081
+ example: 10
1082
+
1083
+ **identifier?:** string <br>
1084
+ *textual identifier for a record field* <br>
1085
+ example: catalog
1086
+
1087
+ **name?:** string <br>
1088
+ *name*
1089
+
1090
+ **marker?:** string <br>
1091
+ *textual identifier*
1092
+
1093
+ **localizeInfos:** CommonLocalizeInfos <br>
1094
+ *localized marker name* <br>
1095
+ example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } }
1096
+ </details>
1097
+
1098
+ ### Markers.getMarkerByMarker(marker)
1099
+
1100
+ ```js
1101
+ const value = await Markers.getMarkerByMarker('my-marker')
1102
+ ```
1103
+
1104
+ >This method return one object of MarkerEntity by marker.
1105
+
1106
+ Example return:
1107
+
1108
+ ```json
1109
+ {
1110
+ "id": 17,
1111
+ "updatedDate": "2023-12-18T08:59:42.006Z",
1112
+ "version": 10,
1113
+ "identifier": "catalog",
1114
+ "name": "string",
1115
+ "marker": "string",
1116
+ "localizeInfos": {
1117
+ "title": "My marker"
1118
+ }
1119
+ }
1120
+ ```
1121
+
1122
+ <details>
1123
+ <summary>Schema</summary>
1124
+
1125
+ **id:** number <br>
1126
+ *object identifier* <br>
1127
+ example: 1764
1128
+
1129
+ **updatedDate:** string($date-time) <br>
1130
+ *object modification date* <br>
1131
+
1132
+ **version:** number <br>
1133
+ *version number of the object change* <br>
1134
+ example: 10
1135
+
1136
+ **identifier?:** string <br>
1137
+ *textual identifier for a record field* <br>
1138
+ example: catalog
1139
+
1140
+ **name?:** string <br>
1141
+ *name*
1142
+
1143
+ **marker?:** string <br>
1144
+ *textual identifier*
1145
+
1146
+ **localizeInfos:** CommonLocalizeInfos <br>
1147
+ *localized marker name* <br>
1148
+ example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } }
1149
+ </details>
1150
+
1151
+ ---
1152
+
1153
+ ## <h2 id="menus"> Menus </h2>
1154
+
1155
+
1156
+ ```js
1157
+ const { Menus } = defineOneEntry('your-url')
1158
+ ```
1159
+
1160
+ ### Menus.getMenusByMarker(marker)
1161
+
1162
+ ```js
1163
+ const value = await Menus.getMenusByMarker('my-marker')
1164
+ ```
1165
+
1166
+ > This method retrieves a single menu object based on its marker (marker) from the API. It returns a Promise that resolves to a single menu object as a ContentMenuDto object with included pages.
1167
+
1168
+ Example return:
1169
+
1170
+ ```json
1171
+ {
1172
+ "id": 1764,
1173
+ "identifier": "catalog",
1174
+ "localizeInfos": {
1175
+ "title": "Main Menu"
1176
+ },
1177
+ "pages": [
1178
+ {
1179
+ "id": 11,
1180
+ "pageUrl": "122",
1181
+ "localizeInfos": {
1182
+ "en_US": {
1183
+ "title": "12",
1184
+ "content": "",
1185
+ "menuTitle": "12"
1186
+ }
1187
+ },
1188
+ "position": 0,
1189
+ "parentId": null
1190
+ }
1191
+ ]
1192
+ }
1193
+ ```
1194
+
1195
+ <details>
1196
+ <summary>Schema</summary>
1197
+
1198
+ **id:** number <br>
1199
+ *object identifier* <br>
1200
+ example: 1764
1201
+
1202
+ **identifier:** string <br>
1203
+ *textual identifier for a record field* <br>
1204
+ example: catalog
1205
+
1206
+ **localizeInfos** Record<string, any> <br>
1207
+ *json object description of the menu item with the language "en_US" (for example)* <br>
1208
+ example: OrderedMap { "en_US": OrderedMap { "title": "Main Menu" } }
1209
+
1210
+ **pages:**
1211
+ *data of the pages included in the menu*
1212
+ example: List [ OrderedMap { "id": 11, "pageUrl": "122", "localizeInfos": OrderedMap { "en_US": OrderedMap { "title": "12", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "12" } }, "position": 0, "parentId": null } ]
1213
+ </details>
1214
+
1215
+ ---
1216
+
1217
+ ## <h2 id="pages"> Pages </h2>
1218
+
1219
+ ```js
1220
+ const { Pages } = defineOneEntry('your-url')
1221
+ ```
1222
+
1223
+ ### Pages.getRootPages(langCode)
1224
+
1225
+ ```js
1226
+ const value = await Pages.getRootPages('en_US')
1227
+ ```
1228
+
1229
+ > 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.
1230
+
1231
+ Example return:
1232
+
1233
+ ```json
1234
+ [
1235
+ {
1236
+ "id": 1764,
1237
+ "parentId": null,
1238
+ "config": {
1239
+ "rowsPerPage": 1,
1240
+ "productsPerRow": 1
1241
+ },
1242
+ "pageUrl": "string",
1243
+ "depth": 3,
1244
+ "localizeInfos": {
1245
+ "title": "Catalog",
1246
+ "content": "Content for catalog",
1247
+ "menuTitle": "Catalog"
1248
+ },
1249
+ "isVisible": true,
1250
+ "products": 0,
1251
+ "attributeSetId": 7,
1252
+ "isSync": false,
1253
+ "templateIdentifier": "my-template",
1254
+ "attributeValues": {
1255
+ "marker": {
1256
+ "value": "",
1257
+ "type": "string"
1258
+ }
1259
+ },
1260
+ "position": 192,
1261
+ "type": "forNewsPage",
1262
+ "childrenCount": 0
1263
+ }
1264
+ ]
1265
+ ```
1266
+
1267
+ <details>
1268
+ <summary>Schema</summary>
1269
+
1270
+ **id:** number <br>
1271
+ *object identifier* <br>
1272
+ example: 1764
1273
+
1274
+ **parentId** number <br>
1275
+ *parent page identifier, if null, it is a top-level page* <br>
1276
+ example: null
1277
+
1278
+ **config** Record<string, number> <br>
1279
+ *output settings for catalog pages* <br>
1280
+ example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 }
1281
+
1282
+ **pageUrl** string <br>
1283
+ *unique page URL*
1284
+
1285
+ **depth** number <br>
1286
+ *page nesting depth relative to parentId* <br>
1287
+ example: 3
1288
+
1289
+ **localizeInfos:** Record<string, any> <br>
1290
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
1291
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
1292
+
1293
+ **isVisible:** boolean <br>
1294
+ *Page visibility flag* <br>
1295
+ example: true
1296
+
1297
+ **products** number <br>
1298
+ *Number of products linked to the page* <br>
1299
+ example: 0
1300
+
1301
+ **attributeSetId:** number <br>
1302
+ *attribute set identifier* <br>
1303
+ example: 7
1304
+
1305
+ **forms** <br>
1306
+ *Array of FormEntity object identifier values linked to the page (optional)*
1307
+
1308
+
1309
+ **blocks** <br>
1310
+ *Array of BlockEntity object identifier values linked to the page (optional)*
1311
+
1312
+
1313
+ **isSync:** boolean <br>
1314
+ *indicator of page indexing (true or false)* <br>
1315
+ example: false
1316
+
1317
+ **templateIdentifier:** string <br>
1318
+ *Custom identifier of the linked template* <br>
1319
+ example: my-template
1320
+
1321
+ **attributeValues:** Record<string, string> <br>
1322
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
1323
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
1324
+
1325
+ **position:** number <br>
1326
+ *position number for sorting (optional)* <br>
1327
+ example: 192
1328
+
1329
+ **type:** string <br>
1330
+ *Page type* <br>
1331
+ example: forNewsPage
1332
+ Enum:
1333
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
1334
+
1335
+
1336
+ **childrenCount:** number <br>
1337
+ *number of nested pages* <br>
1338
+ example: 0
1339
+
1340
+ </details>
1341
+
1342
+ ### Pages.getCatalogPages(langCode, limit, offset)
1343
+
1344
+ ```js
1345
+ const value = await Pages.getCatalogPages('en_US', 0, 30)
1346
+ ```
1347
+
1348
+ > 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.
1349
+
1350
+ Example return:
1351
+
1352
+ ```json
1353
+ [
1354
+ {
1355
+ "id": 1764,
1356
+ "parentId": null,
1357
+ "config": {
1358
+ "rowsPerPage": 1,
1359
+ "productsPerRow": 1
1360
+ },
1361
+ "pageUrl": "string",
1362
+ "depth": 3,
1363
+ "localizeInfos": {
1364
+ "title": "Catalog",
1365
+ "content": "Content for catalog",
1366
+ "menuTitle": "Catalog"
1367
+ },
1368
+ "isVisible": true,
1369
+ "products": 0,
1370
+ "attributeSetId": 7,
1371
+ "isSync": false,
1372
+ "templateIdentifier": "my-template",
1373
+ "attributeValues": {
1374
+ "marker": {
1375
+ "value": "",
1376
+ "type": "string"
1377
+ }
1378
+ },
1379
+ "position": 192,
1380
+ "type": "forNewsPage",
1381
+ "childrenCount": 0
1382
+ }
1383
+ ]
1384
+ ```
1385
+ <details>
1386
+ <summary>Schema</summary>
1387
+
1388
+ **id:** number <br>
1389
+ *object identifier* <br>
1390
+ example: 1764
1391
+
1392
+ **parentId** number <br>
1393
+ *parent page identifier, if null, it is a top-level page* <br>
1394
+ example: null
1395
+
1396
+ **config** Record<string, number> <br>
1397
+ *output settings for catalog pages* <br>
1398
+ example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 }
1399
+
1400
+ **pageUrl** string <br>
1401
+ *unique page URL*
1402
+
1403
+ **depth** number <br>
1404
+ *page nesting depth relative to parentId* <br>
1405
+ example: 3
1406
+
1407
+ **localizeInfos:** Record<string, any> <br>
1408
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
1409
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
1410
+
1411
+ **isVisible:** boolean <br>
1412
+ *Page visibility flag* <br>
1413
+ example: true
1414
+
1415
+ **products** number <br>
1416
+ *Number of products linked to the page* <br>
1417
+ example: 0
1418
+
1419
+ **attributeSetId:** number <br>
1420
+ *attribute set identifier* <br>
1421
+ example: 7
1422
+
1423
+ **forms** <br>
1424
+ *Array of FormEntity object identifier values linked to the page (optional)*
1425
+
1426
+
1427
+ **blocks** <br>
1428
+ *Array of BlockEntity object identifier values linked to the page (optional)*
1429
+
1430
+
1431
+ **isSync:** boolean <br>
1432
+ *indicator of page indexing (true or false)* <br>
1433
+ example: false
1434
+
1435
+ **templateIdentifier:** string <br>
1436
+ *Custom identifier of the linked template* <br>
1437
+ example: my-template
1438
+
1439
+ **attributeValues:** Record<string, string> <br>
1440
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
1441
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
1442
+
1443
+ **position:** number <br>
1444
+ *position number for sorting (optional)* <br>
1445
+ example: 192
1446
+
1447
+ **type:** string <br>
1448
+ *Page type* <br>
1449
+ example: forNewsPage
1450
+ Enum:
1451
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
1452
+
1453
+
1454
+ **childrenCount:** number <br>
1455
+ *number of nested pages* <br>
1456
+ example: 0
1457
+
1458
+ </details>
1459
+
1460
+ ### Pages.getPages(langCode)
1461
+
1462
+ ```js
1463
+ const value = await Pages.getPages('en_US')
1464
+ ```
1465
+
1466
+ > 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.
1467
+
1468
+ Example return:
1469
+
1470
+ ```json
1471
+ [
1472
+ {
1473
+ "id": 1764,
1474
+ "parentId": null,
1475
+ "config": {
1476
+ "rowsPerPage": 1,
1477
+ "productsPerRow": 1
1478
+ },
1479
+ "pageUrl": "string",
1480
+ "depth": 3,
1481
+ "localizeInfos": {
1482
+ "title": "Catalog",
1483
+ "content": "Content for catalog",
1484
+ "menuTitle": "Catalog"
1485
+ },
1486
+ "isVisible": true,
1487
+ "products": 0,
1488
+ "attributeSetId": 7,
1489
+ "isSync": false,
1490
+ "templateIdentifier": "my-template",
1491
+ "attributeValues": {
1492
+ "marker": {
1493
+ "value": "",
1494
+ "type": "string"
1495
+ }
1496
+ },
1497
+ "position": 192,
1498
+ "type": "forNewsPage",
1499
+ "childrenCount": 0
1500
+ }
1501
+ ]
1502
+ ```
1503
+ <details>
1504
+ <summary>Schema</summary>
1505
+
1506
+ **id:** number <br>
1507
+ *object identifier* <br>
1508
+ example: 1764
1509
+
1510
+ **parentId** number <br>
1511
+ *parent page identifier, if null, it is a top-level page* <br>
1512
+ example: null
1513
+
1514
+ **config** Record<string, number> <br>
1515
+ *output settings for catalog pages* <br>
1516
+ example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 }
1517
+
1518
+ **pageUrl** string <br>
1519
+ *unique page URL*
1520
+
1521
+ **depth** number <br>
1522
+ *page nesting depth relative to parentId* <br>
1523
+ example: 3
1524
+
1525
+ **localizeInfos:** Record<string, any> <br>
1526
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
1527
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
1528
+
1529
+ **isVisible:** boolean <br>
1530
+ *Page visibility flag* <br>
1531
+ example: true
1532
+
1533
+ **products** number <br>
1534
+ *Number of products linked to the page* <br>
1535
+ example: 0
1536
+
1537
+ **attributeSetId:** number <br>
1538
+ *attribute set identifier* <br>
1539
+ example: 7
1540
+
1541
+ **forms** <br>
1542
+ *Array of FormEntity object identifier values linked to the page (optional)*
1543
+
1544
+
1545
+ **blocks** <br>
1546
+ *Array of BlockEntity object identifier values linked to the page (optional)*
1547
+
1548
+
1549
+ **isSync:** boolean <br>
1550
+ *indicator of page indexing (true or false)* <br>
1551
+ example: false
1552
+
1553
+ **templateIdentifier:** string <br>
1554
+ *Custom identifier of the linked template* <br>
1555
+ example: my-template
1556
+
1557
+ **attributeValues:** Record<string, string> <br>
1558
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
1559
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
1560
+
1561
+ **position:** number <br>
1562
+ *position number for sorting (optional)* <br>
1563
+ example: 192
1564
+
1565
+ **type:** string <br>
1566
+ *Page type* <br>
1567
+ example: forNewsPage
1568
+ Enum:
1569
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
1570
+
1571
+
1572
+ **childrenCount:** number <br>
1573
+ *number of nested pages* <br>
1574
+ example: 0
1575
+
1576
+ </details>
1577
+
1578
+ ### Pages.getPageById(id, langCode)
1579
+
1580
+ ```js
1581
+ const value = await Pages.getPageById(1, 'en_US')
1582
+ ```
1583
+
1584
+ > This method retrieves a single page object based on its identifier (id) 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.
1585
+
1586
+ Example return:
1587
+
1588
+ ```json
1589
+ {
1590
+ "id": 1764,
1591
+ "parentId": null,
1592
+ "pageUrl": "string",
1593
+ "depth": 3,
1594
+ "localizeInfos": {
1595
+ "title": "Catalog",
1596
+ "content": "Content for catalog",
1597
+ "menuTitle": "Catalog"
1598
+ },
1599
+ "isVisible": true,
1600
+ "position": 192,
1601
+ "type": "forNewsPage",
1602
+ "templateIdentifier": "my-template",
1603
+ "attributeSetId": 7,
1604
+ "attributeValues": {
1605
+ "marker": "description",
1606
+ "type": "string",
1607
+ "value": ""
1608
+ },
1609
+ "isSync": false,
1610
+ "products": 0
1611
+ }
1612
+ ```
1613
+ <details>
1614
+ <summary>Schema</summary>
1615
+
1616
+ **id:** number <br>
1617
+ *object identifier* <br>
1618
+ example: 1764
1619
+
1620
+ **parentId** number <br>
1621
+ *parent page identifier, if null, it is a top-level page* <br>
1622
+ example: null
1623
+
1624
+ **pageUrl** string <br>
1625
+ *unique page URL*
1626
+
1627
+ **depth** number <br>
1628
+ *page nesting depth relative to parentId* <br>
1629
+ example: 3
1630
+
1631
+ **localizeInfos:** Record<string, any> <br>
1632
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
1633
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
1634
+
1635
+ **isVisible:** boolean <br>
1636
+ *Page visibility flag* <br>
1637
+ example: true
1638
+
1639
+ **position:** number <br>
1640
+ *position number (for sorting)* <br>
1641
+ example: 192
1642
+
1643
+ **type** string <br>
1644
+ *page type:* <br>
1645
+ example: forNewsPage <br>
1646
+ Enum:
1647
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
1648
+
1649
+
1650
+ **templateIdentifier:** string <br>
1651
+ *custom identifier of the associated template* <br>
1652
+ example: my-template
1653
+
1654
+ **attributeSetId:** number <br>
1655
+ *attribute set identifier* <br>
1656
+ example: 7
1657
+
1658
+ **forms** <br>
1659
+ *Array of FormEntity object identifier values linked to the page (optional)*
1660
+
1661
+
1662
+ **blocks** <br>
1663
+ *Array of BlockEntity object identifier values linked to the page (optional)*
1664
+
1665
+
1666
+ **isSync:** boolean <br>
1667
+ *indicator of page indexing (true or false)* <br>
1668
+ example: false
1669
+
1670
+ **products** number <br>
1671
+ *number of products associated with the page* <br>
1672
+ example: 0
1673
+
1674
+ </details>
1675
+
1676
+ ### Pages.getPageByUrl(url, langCode)
1677
+
1678
+ ```js
1679
+ const value = await Pages.getPageByUrl('shop', 'en_US')
1680
+ ```
1681
+
1682
+ > 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.
1683
+
1684
+ Example return:
1685
+
1686
+ ```json
1687
+ {
1688
+ "id": 1764,
1689
+ "parentId": null,
1690
+ "pageUrl": "string",
1691
+ "depth": 3,
1692
+ "localizeInfos": {
1693
+ "title": "Catalog",
1694
+ "content": "Content for catalog",
1695
+ "menuTitle": "Catalog"
1696
+ },
1697
+ "isVisible": true,
1698
+ "position": 192,
1699
+ "type": "forNewsPage",
1700
+ "templateIdentifier": "my-template",
1701
+ "attributeSetId": 7,
1702
+ "attributeValues": {
1703
+ "marker": "description",
1704
+ "type": "string",
1705
+ "value": ""
1706
+ },
1707
+ "isSync": false,
1708
+ "products": 0
1709
+ }
1710
+ ```
1711
+ <details>
1712
+ <summary>Schema</summary>
1713
+
1714
+ **id:** number <br>
1715
+ *object identifier* <br>
1716
+ example: 1764
1717
+
1718
+ **parentId** number <br>
1719
+ *parent page identifier, if null, it is a top-level page* <br>
1720
+ example: null
1721
+
1722
+ **pageUrl** string <br>
1723
+ *unique page URL*
1724
+
1725
+ **depth** number <br>
1726
+ *page nesting depth relative to parentId* <br>
1727
+ example: 3
1728
+
1729
+ **localizeInfos:** Record<string, any> <br>
1730
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
1731
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
1732
+
1733
+ **isVisible:** boolean <br>
1734
+ *Page visibility flag* <br>
1735
+ example: true
1736
+
1737
+ **position:** number <br>
1738
+ *position number (for sorting)* <br>
1739
+ example: 192
1740
+
1741
+ **type** string <br>
1742
+ *page type:* <br>
1743
+ example: forNewsPage <br>
1744
+ Enum:
1745
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
1746
+
1747
+
1748
+ **templateIdentifier:** string <br>
1749
+ *custom identifier of the associated template* <br>
1750
+ example: my-template
1751
+
1752
+ **attributeSetId:** number <br>
1753
+ *attribute set identifier* <br>
1754
+ example: 7
1755
+
1756
+ **forms** <br>
1757
+ *Array of FormEntity object identifier values linked to the page (optional)*
1758
+
1759
+
1760
+ **blocks** <br>
1761
+ *Array of BlockEntity object identifier values linked to the page (optional)*
1762
+
1763
+
1764
+ **isSync:** boolean <br>
1765
+ *indicator of page indexing (true or false)* <br>
1766
+ example: false
1767
+
1768
+ **products** number <br>
1769
+ *number of products associated with the page* <br>
1770
+ example: 0
1771
+
1772
+ </details>
1773
+
1774
+
1775
+ ### Pages.getChildPagesByParentUrl(url, langCode)
1776
+
1777
+ ```js
1778
+ const value = await Pages.getChildPagesByParentUrl('shop', 'en_US')
1779
+ ```
1780
+
1781
+ > 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.
1782
+
1783
+ Example return:
1784
+
1785
+ ```json
1786
+ [
1787
+ {
1788
+ "id": 1764,
1789
+ "parentId": null,
1790
+ "config": {
1791
+ "rowsPerPage": 1,
1792
+ "productsPerRow": 1
1793
+ },
1794
+ "pageUrl": "string",
1795
+ "depth": 3,
1796
+ "localizeInfos": {
1797
+ "title": "Catalog",
1798
+ "plainContent": "Content for catalog",
1799
+ "htmlContent": "<b>Content for catalog</b>",
1800
+ "menuTitle": "Catalog"
1801
+ },
1802
+ "isVisible": true,
1803
+ "products": 0,
1804
+ "attributeSetId": 7,
1805
+ "forms": [
1806
+ null
1807
+ ],
1808
+ "blocks": [
1809
+ null
1810
+ ],
1811
+ "isSync": false,
1812
+ "templateIdentifier": "my-template",
1813
+ "attributeValues": {
1814
+ "marker": {
1815
+ "value": "",
1816
+ "type": "string"
1817
+ }
1818
+ },
1819
+ "position": 192,
1820
+ "type": "forNewsPage",
1821
+ "childrenCount": 0
1822
+ }
1823
+ ]
1824
+ ```
1825
+
1826
+ <details>
1827
+ <summary>Schema</summary>
1828
+
1829
+ **id:** number <br>
1830
+ *object identifier* <br>
1831
+ example: 1764
1832
+
1833
+ **parentId** number <br>
1834
+ *parent page identifier, if null, it is a top-level page* <br>
1835
+ example: null
1836
+
1837
+ **config** Record<string, number> <br>
1838
+ *output settings for catalog pages* <br>
1839
+ example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 }
1840
+
1841
+ **pageUrl** string <br>
1842
+ *unique page URL*
1843
+
1844
+ **depth** number <br>
1845
+ *page nesting depth relative to parentId* <br>
1846
+ example: 3
1847
+
1848
+ **localizeInfos:** Record<string, any> <br>
1849
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
1850
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
1851
+
1852
+ **isVisible:** boolean <br>
1853
+ *Page visibility flag* <br>
1854
+ example: true
1855
+
1856
+ **products** number <br>
1857
+ *Number of products linked to the page* <br>
1858
+ example: 0
1859
+
1860
+ **attributeSetId:** number <br>
1861
+ *attribute set identifier* <br>
1862
+ example: 7
1863
+
1864
+ **forms** <br>
1865
+ *Array of FormEntity object identifier values linked to the page (optional)*
1866
+
1867
+
1868
+ **blocks** <br>
1869
+ *Array of BlockEntity object identifier values linked to the page (optional)*
1870
+
1871
+
1872
+ **isSync:** boolean <br>
1873
+ *indicator of page indexing (true or false)* <br>
1874
+ example: false
1875
+
1876
+ **templateIdentifier:** string <br>
1877
+ *Custom identifier of the linked template* <br>
1878
+ example: my-template
1879
+
1880
+ **attributeValues:** Record<string, string> <br>
1881
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
1882
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
1883
+
1884
+ **position:** number <br>
1885
+ *position number for sorting (optional)* <br>
1886
+ example: 192
1887
+
1888
+ **type:** string <br>
1889
+ *Page type* <br>
1890
+ example: forNewsPage
1891
+ Enum:
1892
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
1893
+
1894
+
1895
+ **childrenCount:** number <br>
1896
+ *number of nested pages* <br>
1897
+ example: 0
1898
+
1899
+ </details>
1900
+
1901
+
1902
+ ### Pages.getBlocksByPageUrl(url, langCode)
1903
+
1904
+ ```js
1905
+ const value = await Pages.getFormsByPageUrl('shop', 'en_US')
1906
+ ```
1907
+
1908
+ > Get PositionBlock objects for a related form by url. Returns an array of PositionBlock objects.
1909
+
1910
+ Example return:
1911
+
1912
+ ```json
1913
+ [
1914
+ {
1915
+ "id": 1764,
1916
+ "version": 10,
1917
+ "identifier": "catalog",
1918
+ "attributeSetId": 0,
1919
+ "localizeInfos": {
1920
+ "title": "My block"
1921
+ },
1922
+ "customSettings": {
1923
+ "sliderDelay": 0,
1924
+ "sliderDelayType": "",
1925
+ "productQuantity": 4,
1926
+ "productSortType": "By_ID",
1927
+ "productSortOrder": "Descending",
1928
+ "productCountElementsPerRow": 10,
1929
+ "similarProductRules": [
1930
+ {
1931
+ "property": "Descending",
1932
+ "includes": "",
1933
+ "keywords": "",
1934
+ "strict": ""
1935
+ }
1936
+ ]
1937
+ },
1938
+ "position": 0,
1939
+ "isSync": false,
1940
+ "attributeValues": {
1941
+ "marker": {
1942
+ "value": "",
1943
+ "type": "string"
1944
+ }
1945
+ },
1946
+ "type": "forNewsPage",
1947
+ "templateIdentifier": null
1948
+ }
1949
+ ]
1950
+ ```
1951
+
1952
+ <details>
1953
+ <summary>Schema</summary>
1954
+
1955
+ **id:** number <br>
1956
+ *object identifier* <br>
1957
+ example: 1764
1958
+
1959
+ **version** number <br>
1960
+ *object version number* <br>
1961
+ example: 10
1962
+
1963
+ **identifier:** string <br>
1964
+ *text identifier for the record field* <br>
1965
+ example: catalog
1966
+
1967
+ **attributeSetId:** number <br>
1968
+ *attribute set identifier* <br>
1969
+ example: 7
1970
+
1971
+ **localizeInfos:** Record<string, any> <br>
1972
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
1973
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
1974
+
1975
+ **customSettings:** BlockCustomSettings <br>
1976
+ *custom settings for different types of blocks* <br>
1977
+ example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ] }
1978
+
1979
+ **isSync:** boolean <br>
1980
+ *indicator of page indexing (true or false)* <br>
1981
+ example: false
1982
+
1983
+ **attributeValues:** Record<string, string> <br>
1984
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
1985
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
1986
+
1987
+ **position:** number <br>
1988
+ *position number for sorting (optional)* <br>
1989
+ example: 192
1990
+
1991
+ **type:** string <br>
1992
+ *Page type* <br>
1993
+ example: forNewsPage
1994
+ Enum:
1995
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]
1996
+
1997
+ **templateIdentifier:** string <br>
1998
+ *marker of the template used by the block (can be null)* <br>
1999
+ example: null
2000
+
2001
+ </details>
2002
+
2003
+
2004
+ ### Pages.getFormsByPageUrl(url, langCode)
2005
+
2006
+ ```js
2007
+ const value = await Pages.getFormsByPageUrl('shop', 'en_US')
2008
+ ```
2009
+
2010
+ > Get PositionForm objects for a related form by url. Returns an array of PositionForm objects.
2011
+
2012
+ Example return:
2013
+
2014
+ ```json
2015
+ [
2016
+ {
2017
+ "id": 1764,
2018
+ "version": 10,
2019
+ "identifier": "catalog",
2020
+ "attributeSetId": 0,
2021
+ "processingType": "email",
2022
+ "localizeInfos": {
2023
+ "title": "My form",
2024
+ "titleForSite": "",
2025
+ "successMessage": "",
2026
+ "unsuccessMessage": "",
2027
+ "urlAddress": "",
2028
+ "database": "0",
2029
+ "script": "0"
2030
+ },
2031
+ "processingData": {},
2032
+ "position": 0,
2033
+ "attributes": [
2034
+ {
2035
+ "type": "list",
2036
+ "marker": "l1",
2037
+ "position": 2,
2038
+ "listTitles": [
2039
+ {
2040
+ "title": "red",
2041
+ "value": 1,
2042
+ "position": 1,
2043
+ "extendedValue": null,
2044
+ "extendedValueType": null
2045
+ },
2046
+ {
2047
+ "title": "yellow",
2048
+ "value": 2,
2049
+ "position": 2,
2050
+ "extendedValue": null,
2051
+ "extendedValueType": null
2052
+ }
2053
+ ],
2054
+ "validators": {},
2055
+ "localizeInfos": {
2056
+ "title": "l1"
2057
+ }
2058
+ }
2059
+ ]
2060
+ }
2061
+ ]
2062
+ ```
2063
+
2064
+ <details>
2065
+ <summary>Schema</summary>
2066
+
2067
+ **id:** number <br>
2068
+ *object identifier* <br>
2069
+ example: 1764
2070
+
2071
+ **version** number <br>
2072
+ *object version number* <br>
2073
+ example: 10
2074
+
2075
+ **identifier:** string <br>
2076
+ *text identifier for the record field* <br>
2077
+ example: catalog
2078
+
2079
+ **attributeSetId:** number <br>
2080
+ *attribute set identifier* <br>
2081
+ example: 7
2082
+
2083
+ **processingType:** string <br>
2084
+ *form processing type* <br>
2085
+ example: email
2086
+ Enum:
2087
+ [ db, email, script ]
2088
+
2089
+ **localizeInfos:** Record<string, any> <br>
2090
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2091
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2092
+
2093
+ **processingData:** <br>
2094
+ *form data*
2095
+
2096
+
2097
+ **attributes:** Record<string, string> <br>
2098
+ *array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
2099
+ example: List [ OrderedMap { "type": "list", "marker": "l1", "position": 2, "listTitles": List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } ], "validators": OrderedMap {}, "localizeInfos": OrderedMap { "title": "l1" } } ]
2100
+
2101
+ **position:** number <br>
2102
+ *position number for sorting (optional)* <br>
2103
+ example: 192
2104
+
2105
+ </details>
2106
+
2107
+ ### Pages.getConfigPageByUrl(url)
2108
+
2109
+ ```js
2110
+ const value = await Pages.getConfigPageByUrl('shop')
2111
+ ```
2112
+
2113
+ > 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.
2114
+
2115
+ Example return:
2116
+
2117
+ ```json
2118
+ {
2119
+ "rowsPerPage": 10,
2120
+ "productsPerRow": 10
2121
+ }
2122
+ ```
2123
+ <details>
2124
+ <summary>Schema</summary>
2125
+
2126
+ **rowsPerPage:** number
2127
+ *Number of rows per page*
2128
+ example: 10
2129
+
2130
+ **productsPerRow** number
2131
+ *Number of products per row*
2132
+ example: 10
2133
+
2134
+ </details>
2135
+
2136
+
2137
+ ### Pages.searchPage(name, langCode)
2138
+
2139
+ ```js
2140
+ const value = await Pages.searchPage('cup', 'en_US')
2141
+ ```
2142
+
2143
+ > 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.
2144
+
2145
+ Example return:
2146
+
2147
+ ```json
2148
+ [
2149
+ {
2150
+ "id": 1764,
2151
+ "parentId": null,
2152
+ "pageUrl": "string",
2153
+ "depth": 3,
2154
+ "localizeInfos": {
2155
+ "title": "Catalog",
2156
+ "content": "Content for catalog",
2157
+ "menuTitle": "Catalog"
2158
+ },
2159
+ "isVisible": true,
2160
+ "position": 192,
2161
+ "type": "forNewsPage",
2162
+ "templateIdentifier": "my-template",
2163
+ "attributeSetId": 7,
2164
+ "attributeValues": {
2165
+ "marker": "description",
2166
+ "type": "string",
2167
+ "value": ""
2168
+ },
2169
+ "isSync": false,
2170
+ "products": 0
2171
+ }
2172
+ ]
2173
+ ```
2174
+
2175
+ ---
2176
+
2177
+
2178
+ ## <h2 id="products"> Products </h2>
2179
+
2180
+
2181
+ ```js
2182
+ const { Products } = defineOneEntry('your-url')
2183
+ ```
2184
+
2185
+ >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.
2186
+
2187
+ Parameters:
2188
+
2189
+ ```js
2190
+ const userQuery = {
2191
+ offset: 0,
2192
+ limit: 30,
2193
+ statusMarker: null,
2194
+ conditionValue: null,
2195
+ conditionMarker: null,
2196
+ attributeMarker: null,
2197
+ sortOrder: 'DESC',
2198
+ sortKey: 'id'
2199
+ }
2200
+ ```
2201
+
2202
+ "conditionMarker" by which values are filtered (not set by default), possible values:
2203
+ > 'in' - Contains,
2204
+ >
2205
+ > 'nin' - Does not contain,
2206
+ >
2207
+ > 'eq' - Equal,
2208
+ >
2209
+ > 'neq' - Not equal,
2210
+ >
2211
+ > 'mth' - Greater than,
2212
+ >
2213
+ > 'lth' - Less than,
2214
+ >
2215
+ > 'exs' - Exists,
2216
+ >
2217
+ > 'nexs' - Does not exist
2218
+
2219
+
2220
+ ### Products.getProducts(langCode, userQuery)
2221
+
2222
+ ```js
2223
+ const value = await Products.getProducts('en_US', userQuery)
2224
+ ```
2225
+
2226
+ > 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[]).
2227
+
2228
+ Example return:
2229
+
2230
+ ```json
2231
+ [
2232
+ {
2233
+ "id": 1764,
2234
+ "localizeInfos": {
2235
+ "title": "Product"
2236
+ },
2237
+ "isVisible": true,
2238
+ "statusId": 1,
2239
+ "relatedIds": [
2240
+ 1,
2241
+ 2,
2242
+ 3
2243
+ ],
2244
+ "attributeSetId": 7,
2245
+ "isSync": true,
2246
+ "price": 0,
2247
+ "templateIdentifier": "my-template",
2248
+ "shortDescTemplateIdentifier": "my-template-short",
2249
+ "attributeValues": {
2250
+ "marker": {
2251
+ "value": "",
2252
+ "type": "string"
2253
+ }
2254
+ },
2255
+ "position": 1
2256
+ }
2257
+ ]
2258
+ ```
2259
+
2260
+ <details>
2261
+ <summary>Schema</summary>
2262
+
2263
+ **id:** number <br>
2264
+ *object identifier* <br>
2265
+ example: 1764
2266
+
2267
+ **localizeInfos:** Record<string, any> <br>
2268
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2269
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2270
+
2271
+ **isVisible:** boolean <br>
2272
+ *Page visibility flag* <br>
2273
+ example: true
2274
+
2275
+ **position:** number <br>
2276
+ *position number (for sorting)* <br>
2277
+ example: 192
2278
+
2279
+ **templateIdentifier:** string <br>
2280
+ *custom identifier of the associated template* <br>
2281
+ example: my-template
2282
+
2283
+ **attributeSetId:** number <br>
2284
+ *attribute set identifier* <br>
2285
+ example: 7
2286
+
2287
+ **isSync:** boolean <br>
2288
+ *indicator of page indexing (true or false)* <br>
2289
+ example: false
2290
+
2291
+ **attributeValues:** Record<string, string> <br>
2292
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
2293
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
2294
+
2295
+ **statusId:** number <br>
2296
+ *status identifiers of the product page (can be null)* <br>
2297
+ example: 1
2298
+
2299
+ **relatedIds:** array <br>
2300
+ *identifiers of related product pages* <br>
2301
+ example: List [ 1, 2, 3 ]
2302
+
2303
+ **price:** number <br>
2304
+ *price value of the product page taken from the index* <br>
2305
+ example: 0
2306
+
2307
+ **templateIdentifier** string
2308
+ *custom identifier of the associated template*
2309
+ example: my-template
2310
+
2311
+ **shortDescTemplateIdentifier** string <br>
2312
+ *custom identifier of the associated template for short description* <br>
2313
+ example: my-template-short
2314
+
2315
+ </details>
2316
+
2317
+
2318
+ ### Products.getProductsEmptyPage(langCode, userQuery)
2319
+
2320
+ ```js
2321
+ const value = await Products.getProductsEmptyPage('en_US', userQuery)
2322
+ ```
2323
+
2324
+ > 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.
2325
+
2326
+ Example return:
2327
+
2328
+ ```json
2329
+ [
2330
+ {
2331
+ "id": 1764,
2332
+ "localizeInfos": {
2333
+ "title": "Product"
2334
+ },
2335
+ "isVisible": true,
2336
+ "statusId": 1,
2337
+ "relatedIds": [
2338
+ 1,
2339
+ 2,
2340
+ 3
2341
+ ],
2342
+ "attributeSetId": 7,
2343
+ "isSync": true,
2344
+ "price": 0,
2345
+ "templateIdentifier": "my-template",
2346
+ "shortDescTemplateIdentifier": "my-template-short",
2347
+ "attributeValues": {
2348
+ "marker": {
2349
+ "value": "",
2350
+ "type": "string"
2351
+ }
2352
+ },
2353
+ "position": 1
2354
+ }
2355
+ ]
2356
+ ```
2357
+ <details>
2358
+ <summary>Schema</summary>
2359
+
2360
+ **id:** number <br>
2361
+ *object identifier* <br>
2362
+ example: 1764
2363
+
2364
+ **localizeInfos:** Record<string, any> <br>
2365
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2366
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2367
+
2368
+ **isVisible:** boolean <br>
2369
+ *Page visibility flag* <br>
2370
+ example: true
2371
+
2372
+ **position:** number <br>
2373
+ *position number (for sorting)* <br>
2374
+ example: 192
2375
+
2376
+ **templateIdentifier:** string <br>
2377
+ *custom identifier of the associated template* <br>
2378
+ example: my-template
2379
+
2380
+ **attributeSetId:** number <br>
2381
+ *attribute set identifier* <br>
2382
+ example: 7
2383
+
2384
+ **isSync:** boolean <br>
2385
+ *indicator of page indexing (true or false)* <br>
2386
+ example: false
2387
+
2388
+ **attributeValues:** Record<string, string> <br>
2389
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
2390
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
2391
+
2392
+ **statusId:** number <br>
2393
+ *status identifiers of the product page (can be null)* <br>
2394
+ example: 1
2395
+
2396
+ **relatedIds:** array <br>
2397
+ *identifiers of related product pages* <br>
2398
+ example: List [ 1, 2, 3 ]
2399
+
2400
+ **price:** number <br>
2401
+ *price value of the product page taken from the index* <br>
2402
+ example: 0
2403
+
2404
+ **templateIdentifier** string
2405
+ *custom identifier of the associated template*
2406
+ example: my-template
2407
+
2408
+ **shortDescTemplateIdentifier** string <br>
2409
+ *custom identifier of the associated template for short description* <br>
2410
+ example: my-template-short
2411
+
2412
+ </details>
2413
+
2414
+
2415
+ ### Products.getProductsPageById(id, langCode, userQuery)
2416
+
2417
+ ```js
2418
+ const value = await Products.getProductsPageById(1, 'en_US', userQuery)
2419
+ ```
2420
+
2421
+ > 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.
2422
+
2423
+ Example return:
2424
+
2425
+ ```json
2426
+ {
2427
+ "id": 1764,
2428
+ "localizeInfos": {
2429
+ "title": "Product"
2430
+ },
2431
+ "isVisible": true,
2432
+ "statusId": 1,
2433
+ "relatedIds": [
2434
+ 1,
2435
+ 2,
2436
+ 3
2437
+ ],
2438
+ "productPages": [
2439
+ {
2440
+ "id": 8997,
2441
+ "pageId": 1176,
2442
+ "productId": 8872
2443
+ }
2444
+ ],
2445
+ "attributeSetId": 7,
2446
+ "version": 10,
2447
+ "isSync": 0,
2448
+ "price": 0,
2449
+ "templateIdentifier": "my-template",
2450
+ "shortDescTemplateIdentifier": "my-template-short",
2451
+ "attributeValues": {
2452
+ "marker": {
2453
+ "value": "",
2454
+ "type": "string"
2455
+ }
2456
+ },
2457
+ "position": 1
2458
+ }
2459
+ ```
2460
+ <details>
2461
+ <summary>Schema</summary>
2462
+
2463
+ **id:** number <br>
2464
+ *object identifier* <br>
2465
+ example: 1764
2466
+
2467
+ **localizeInfos:** Record<string, any> <br>
2468
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2469
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2470
+
2471
+ **isVisible:** boolean <br>
2472
+ *Page visibility flag* <br>
2473
+ example: true
2474
+
2475
+ **position:** number <br>
2476
+ *position number (for sorting)* <br>
2477
+ example: 192
2478
+
2479
+ **templateIdentifier:** string <br>
2480
+ *custom identifier of the associated template* <br>
2481
+ example: my-template
2482
+
2483
+ **attributeSetId:** number <br>
2484
+ *attribute set identifier* <br>
2485
+ example: 7
2486
+
2487
+ **isSync:** boolean <br>
2488
+ *indicator of page indexing (true or false)* <br>
2489
+ example: false
2490
+
2491
+ **attributeValues:** Record<string, string> <br>
2492
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
2493
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
2494
+
2495
+ **statusId:** number <br>
2496
+ *status identifiers of the product page (can be null)* <br>
2497
+ example: 1
2498
+
2499
+ **relatedIds:** array <br>
2500
+ *identifiers of related product pages* <br>
2501
+ example: List [ 1, 2, 3 ]
2502
+
2503
+ **price:** number <br>
2504
+ *price value of the product page taken from the index* <br>
2505
+ example: 0
2506
+
2507
+ **templateIdentifier** string
2508
+ *custom identifier of the associated template*
2509
+ example: my-template
2510
+
2511
+ **shortDescTemplateIdentifier** string <br>
2512
+ *custom identifier of the associated template for short description* <br>
2513
+ example: my-template-short
2514
+
2515
+ </details>
2516
+
2517
+ ### Products.getProductsPageByUrl(url, langCode, userQuery)
2518
+
2519
+ ```js
2520
+ const value = await Products.getProductsPageByUrl('cup', 'en_US', userQuery)
2521
+ ```
2522
+
2523
+ > 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.
2524
+
2525
+ Example return:
2526
+
2527
+ ```json
2528
+ {
2529
+ "id": 1764,
2530
+ "localizeInfos": {
2531
+ "title": "Product"
2532
+ },
2533
+ "isVisible": true,
2534
+ "statusId": 1,
2535
+ "relatedIds": [
2536
+ 1,
2537
+ 2,
2538
+ 3
2539
+ ],
2540
+ "productPages": [
2541
+ {
2542
+ "id": 8997,
2543
+ "pageId": 1176,
2544
+ "productId": 8872
2545
+ }
2546
+ ],
2547
+ "attributeSetId": 7,
2548
+ "version": 10,
2549
+ "isSync": 0,
2550
+ "price": 0,
2551
+ "templateIdentifier": "my-template",
2552
+ "shortDescTemplateIdentifier": "my-template-short",
2553
+ "attributeValues": {
2554
+ "marker": {
2555
+ "value": "",
2556
+ "type": "string"
2557
+ }
2558
+ },
2559
+ "position": 1
2560
+ }
2561
+ ```
2562
+ <details>
2563
+ <summary>Schema</summary>
2564
+
2565
+ **id:** number <br>
2566
+ *object identifier* <br>
2567
+ example: 1764
2568
+
2569
+ **localizeInfos:** Record<string, any> <br>
2570
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2571
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2572
+
2573
+ **isVisible:** boolean <br>
2574
+ *Page visibility flag* <br>
2575
+ example: true
2576
+
2577
+ **position:** number <br>
2578
+ *position number (for sorting)* <br>
2579
+ example: 192
2580
+
2581
+ **templateIdentifier:** string <br>
2582
+ *custom identifier of the associated template* <br>
2583
+ example: my-template
2584
+
2585
+ **attributeSetId:** number <br>
2586
+ *attribute set identifier* <br>
2587
+ example: 7
2588
+
2589
+ **isSync:** boolean <br>
2590
+ *indicator of page indexing (true or false)* <br>
2591
+ example: false
2592
+
2593
+ **attributeValues:** Record<string, string> <br>
2594
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
2595
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
2596
+
2597
+ **statusId:** number <br>
2598
+ *status identifiers of the product page (can be null)* <br>
2599
+ example: 1
2600
+
2601
+ **relatedIds:** array <br>
2602
+ *identifiers of related product pages* <br>
2603
+ example: List [ 1, 2, 3 ]
2604
+
2605
+ **price:** number <br>
2606
+ *price value of the product page taken from the index* <br>
2607
+ example: 0
2608
+
2609
+ **templateIdentifier** string
2610
+ *custom identifier of the associated template*
2611
+ example: my-template
2612
+
2613
+ **shortDescTemplateIdentifier** string <br>
2614
+ *custom identifier of the associated template for short description* <br>
2615
+ example: my-template-short
2616
+
2617
+ </details>
2618
+
2619
+ ### Products.getRelatedProductsById(id, langCode, userQuery)
2620
+
2621
+ ```js
2622
+ const value = await Products.getRelatedProductsById(1, 'en_US', {limit:20, offset:1})
2623
+ ```
2624
+
2625
+ > 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.
2626
+
2627
+ Example return:
2628
+
2629
+ ```json
2630
+ {
2631
+ "id": 1764,
2632
+ "localizeInfos": {
2633
+ "title": "Product"
2634
+ },
2635
+ "isVisible": true,
2636
+ "statusId": 1,
2637
+ "relatedIds": [
2638
+ 1,
2639
+ 2,
2640
+ 3
2641
+ ],
2642
+ "attributeSetId": 7,
2643
+ "isSync": true,
2644
+ "price": 0,
2645
+ "templateIdentifier": "my-template",
2646
+ "shortDescTemplateIdentifier": "my-template-short",
2647
+ "attributeValues": {
2648
+ "marker": {
2649
+ "value": "",
2650
+ "type": "string"
2651
+ }
2652
+ },
2653
+ "position": 1
2654
+ }
2655
+ ```
2656
+ <details>
2657
+ <summary>Schema</summary>
2658
+
2659
+ **id:** number <br>
2660
+ *object identifier* <br>
2661
+ example: 1764
2662
+
2663
+ **localizeInfos:** Record<string, any> <br>
2664
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2665
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2666
+
2667
+ **isVisible:** boolean <br>
2668
+ *Page visibility flag* <br>
2669
+ example: true
2670
+
2671
+ **position:** number <br>
2672
+ *position number (for sorting)* <br>
2673
+ example: 192
2674
+
2675
+ **templateIdentifier:** string <br>
2676
+ *custom identifier of the associated template* <br>
2677
+ example: my-template
2678
+
2679
+ **attributeSetId:** number <br>
2680
+ *attribute set identifier* <br>
2681
+ example: 7
2682
+
2683
+ **isSync:** boolean <br>
2684
+ *indicator of page indexing (true or false)* <br>
2685
+ example: false
2686
+
2687
+ **attributeValues:** Record<string, string> <br>
2688
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
2689
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
2690
+
2691
+ **statusId:** number <br>
2692
+ *status identifiers of the product page (can be null)* <br>
2693
+ example: 1
2694
+
2695
+ **relatedIds:** array <br>
2696
+ *identifiers of related product pages* <br>
2697
+ example: List [ 1, 2, 3 ]
2698
+
2699
+ **price:** number <br>
2700
+ *price value of the product page taken from the index* <br>
2701
+ example: 0
2702
+
2703
+ **templateIdentifier** string
2704
+ *custom identifier of the associated template*
2705
+ example: my-template
2706
+
2707
+ **shortDescTemplateIdentifier** string <br>
2708
+ *custom identifier of the associated template for short description* <br>
2709
+ example: my-template-short
2710
+
2711
+ </details>
2712
+
2713
+ ### Products.getProductById(id, langCode)
2714
+
2715
+ ```js
2716
+ const value = await Products.getProductById(1, 'en_US')
2717
+ ```
2718
+
2719
+ > 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.
2720
+
2721
+ Example return:
2722
+
2723
+ ```json
2724
+ {
2725
+ "id": 1764,
2726
+ "localizeInfos": {
2727
+ "title": "Product"
2728
+ },
2729
+ "isVisible": true,
2730
+ "statusId": 1,
2731
+ "relatedIds": [
2732
+ 1,
2733
+ 2,
2734
+ 3
2735
+ ],
2736
+ "attributeSetId": 7,
2737
+ "isSync": true,
2738
+ "price": 0,
2739
+ "templateIdentifier": "my-template",
2740
+ "shortDescTemplateIdentifier": "my-template-short",
2741
+ "attributeValues": {
2742
+ "marker": {
2743
+ "value": "",
2744
+ "type": "string"
2745
+ }
2746
+ },
2747
+ "position": 1
2748
+ }
2749
+ ```
2750
+ <details>
2751
+ <summary>Schema</summary>
2752
+
2753
+ **id:** number <br>
2754
+ *object identifier* <br>
2755
+ example: 1764
2756
+
2757
+ **localizeInfos:** Record<string, any> <br>
2758
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2759
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2760
+
2761
+ **isVisible:** boolean <br>
2762
+ *Page visibility flag* <br>
2763
+ example: true
2764
+
2765
+ **position:** number <br>
2766
+ *position number (for sorting)* <br>
2767
+ example: 192
2768
+
2769
+ **templateIdentifier:** string <br>
2770
+ *custom identifier of the associated template* <br>
2771
+ example: my-template
2772
+
2773
+ **attributeSetId:** number <br>
2774
+ *attribute set identifier* <br>
2775
+ example: 7
2776
+
2777
+ **isSync:** boolean <br>
2778
+ *indicator of page indexing (true or false)* <br>
2779
+ example: false
2780
+
2781
+ **attributeValues:** Record<string, string> <br>
2782
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
2783
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
2784
+
2785
+ **statusId:** number <br>
2786
+ *status identifiers of the product page (can be null)* <br>
2787
+ example: 1
2788
+
2789
+ **relatedIds:** array <br>
2790
+ *identifiers of related product pages* <br>
2791
+ example: List [ 1, 2, 3 ]
2792
+
2793
+ **price:** number <br>
2794
+ *price value of the product page taken from the index* <br>
2795
+ example: 0
2796
+
2797
+ **templateIdentifier** string
2798
+ *custom identifier of the associated template*
2799
+ example: my-template
2800
+
2801
+ **shortDescTemplateIdentifier** string <br>
2802
+ *custom identifier of the associated template for short description* <br>
2803
+ example: my-template-short
2804
+
2805
+ </details>
2806
+
2807
+
2808
+ ### Products.filterProduct(data, langCode, userQuery)
2809
+
2810
+ ```js
2811
+ const data = {
2812
+ attributeMarker: "price",
2813
+ conditionMarker: "lth",
2814
+ conditionValue: "200",
2815
+ }
2816
+
2817
+ const value = await Products.filterProduct(data, 'en_US', userQuery)
2818
+ ```
2819
+
2820
+ Example body:
2821
+
2822
+ ```js
2823
+ [
2824
+ {
2825
+ "attributeMarker": "price",
2826
+ "conditionMarker": "mth",
2827
+ "conditionValue": 1,
2828
+ "pageId": 0
2829
+ },
2830
+ {
2831
+ "attributeMarker": "price",
2832
+ "conditionMarker": "lth",
2833
+ "conditionValue": 3,
2834
+ "pageId": 0
2835
+ }
2836
+ ]
2837
+ ```
2838
+
2839
+ > 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}.
2840
+
2841
+ Example return:
2842
+
2843
+ ```json
2844
+ {
2845
+ "id": 1764,
2846
+ "localizeInfos": {
2847
+ "title": "Product"
2848
+ },
2849
+ "isVisible": true,
2850
+ "statusId": 1,
2851
+ "relatedIds": [
2852
+ 1,
2853
+ 2,
2854
+ 3
2855
+ ],
2856
+ "productPages": [
2857
+ {
2858
+ "id": 8997,
2859
+ "pageId": 1176,
2860
+ "productId": 8872
2861
+ }
2862
+ ],
2863
+ "attributeSetId": 7,
2864
+ "version": 10,
2865
+ "isSync": 0,
2866
+ "price": 0,
2867
+ "templateIdentifier": "my-template",
2868
+ "shortDescTemplateIdentifier": "my-template-short",
2869
+ "attributeValues": {
2870
+ "marker": {
2871
+ "value": "",
2872
+ "type": "string"
2873
+ }
2874
+ },
2875
+ "position": 1
2876
+ }
2877
+ ```
2878
+ <details>
2879
+ <summary>Schema</summary>
2880
+
2881
+ **id:** number <br>
2882
+ *object identifier* <br>
2883
+ example: 1764
2884
+
2885
+ **localizeInfos:** Record<string, any> <br>
2886
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2887
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2888
+
2889
+ **isVisible:** boolean <br>
2890
+ *Page visibility flag* <br>
2891
+ example: true
2892
+
2893
+ **position:** number <br>
2894
+ *position number (for sorting)* <br>
2895
+ example: 192
2896
+
2897
+ **templateIdentifier:** string <br>
2898
+ *custom identifier of the associated template* <br>
2899
+ example: my-template
2900
+
2901
+ **attributeSetId:** number <br>
2902
+ *attribute set identifier* <br>
2903
+ example: 7
2904
+
2905
+ **isSync:** boolean <br>
2906
+ *indicator of page indexing (true or false)* <br>
2907
+ example: false
2908
+
2909
+ **attributeValues:** Record<string, string> <br>
2910
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
2911
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
2912
+
2913
+ **statusId:** number <br>
2914
+ *status identifiers of the product page (can be null)* <br>
2915
+ example: 1
2916
+
2917
+ **relatedIds:** array <br>
2918
+ *identifiers of related product pages* <br>
2919
+ example: List [ 1, 2, 3 ]
2920
+
2921
+ **price:** number <br>
2922
+ *price value of the product page taken from the index* <br>
2923
+ example: 0
2924
+
2925
+ **templateIdentifier** string
2926
+ *custom identifier of the associated template*
2927
+ example: my-template
2928
+
2929
+ **shortDescTemplateIdentifier** string <br>
2930
+ *custom identifier of the associated template for short description* <br>
2931
+ example: my-template-short
2932
+
2933
+ </details>
2934
+
2935
+ ### Products.searchProduct(name, langCode)
2936
+
2937
+ ```js
2938
+ const value = await Products.searchProduct('cup', 'en_US')
2939
+ ```
2940
+
2941
+ > 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.
2942
+
2943
+ Example return:
2944
+
2945
+ ```json
2946
+ [
2947
+ {
2948
+ "id": 1764,
2949
+ "localizeInfos": {
2950
+ "title": "Product"
2951
+ },
2952
+ "isVisible": true,
2953
+ "statusId": 1,
2954
+ "relatedIds": [
2955
+ 1,
2956
+ 2,
2957
+ 3
2958
+ ],
2959
+ "productPages": [
2960
+ {
2961
+ "id": 8997,
2962
+ "pageId": 1176,
2963
+ "productId": 8872
2964
+ }
2965
+ ],
2966
+ "attributeSetId": 7,
2967
+ "version": 10,
2968
+ "isSync": 0,
2969
+ "price": 0,
2970
+ "templateIdentifier": "my-template",
2971
+ "shortDescTemplateIdentifier": "my-template-short",
2972
+ "attributeValues": {
2973
+ "marker": {
2974
+ "value": "",
2975
+ "type": "string"
2976
+ }
2977
+ },
2978
+ "position": 1
2979
+ }
2980
+ ]
2981
+ ```
2982
+ <details>
2983
+ <summary>Schema</summary>
2984
+
2985
+ **id:** number <br>
2986
+ *object identifier* <br>
2987
+ example: 1764
2988
+
2989
+ **localizeInfos:** Record<string, any> <br>
2990
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
2991
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
2992
+
2993
+ **isVisible:** boolean <br>
2994
+ *Page visibility flag* <br>
2995
+ example: true
2996
+
2997
+ **position:** number <br>
2998
+ *position number (for sorting)* <br>
2999
+ example: 192
3000
+
3001
+ **templateIdentifier:** string <br>
3002
+ *custom identifier of the associated template* <br>
3003
+ example: my-template
3004
+
3005
+ **attributeSetId:** number <br>
3006
+ *attribute set identifier* <br>
3007
+ example: 7
3008
+
3009
+ **isSync:** boolean <br>
3010
+ *indicator of page indexing (true or false)* <br>
3011
+ example: false
3012
+
3013
+ **attributeValues:** Record<string, string> <br>
3014
+ *Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
3015
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }
3016
+
3017
+ **statusId:** number <br>
3018
+ *status identifiers of the product page (can be null)* <br>
3019
+ example: 1
3020
+
3021
+ **relatedIds:** array <br>
3022
+ *identifiers of related product pages* <br>
3023
+ example: List [ 1, 2, 3 ]
3024
+
3025
+ **price:** number <br>
3026
+ *price value of the product page taken from the index* <br>
3027
+ example: 0
3028
+
3029
+ **templateIdentifier** string
3030
+ *custom identifier of the associated template*
3031
+ example: my-template
3032
+
3033
+ **shortDescTemplateIdentifier** string <br>
3034
+ *custom identifier of the associated template for short description* <br>
3035
+ example: my-template-short
3036
+
3037
+ </details>
3038
+
3039
+ ---
3040
+
3041
+
3042
+ ## <h2 id="productstatuses"> ProductstatusesSpec </h2>
3043
+
3044
+
3045
+ ```js
3046
+ const { ProductstatusesSpec } = defineOneEntry('your-url');
3047
+ ```
3048
+
3049
+ ### ProductstatusesSpec.getProductStatuses()
3050
+
3051
+ ```js
3052
+ const value = await ProductstatusesSpec.getProductStatuses()
3053
+ ```
3054
+
3055
+ > This method searches for all product status objects from the API. It returns a Promise that resolves to an array of product status objects.
3056
+
3057
+ Example return:
3058
+
3059
+ ```json
3060
+ [
3061
+ {
3062
+ "id": 1764,
3063
+ "updatedDate": "2023-11-20T22:14:19.438Z",
3064
+ "version": 10,
3065
+ "identifier": "catalog",
3066
+ "localizeInfos": {
3067
+ "title": "Status 1"
3068
+ }
3069
+ }
3070
+ ]
3071
+ ```
3072
+ <details>
3073
+ <summary>Schema</summary>
3074
+
3075
+ **id:** number <br>
3076
+ *object identifier* <br>
3077
+ example: 1764
3078
+
3079
+ **updatedDate:** string($date-time) <br>
3080
+ *object's date of modification* <br>
3081
+
3082
+ **version** number <br>
3083
+ *object's version number of modification* <br>
3084
+ example: 10
3085
+
3086
+ **identifier:** string <br>
3087
+ *textual identifier for a field in the record* <br>
3088
+ example: catalog
3089
+
3090
+ **localizeInfos:** Record<string, any> <br>
3091
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3092
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
3093
+
3094
+ </details>
3095
+
3096
+ ### ProductstatusesSpec.getProductStatusesById(id)
3097
+
3098
+ ```js
3099
+ const value = await ProductstatusesSpec.getProductStatusesById(1)
3100
+ ```
3101
+
3102
+ > 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.
3103
+
3104
+ Example return:
3105
+
3106
+ ```json
3107
+ {
3108
+ "id": 1764,
3109
+ "updatedDate": "2023-09-25T13:36:05.907Z",
3110
+ "version": 10,
3111
+ "identifier": "catalog",
3112
+ "localizeInfos": {
3113
+ "title": "Status 1"
3114
+ }
3115
+ }
3116
+ ```
3117
+ <details>
3118
+ <summary>Schema</summary>
3119
+
3120
+ **id:** number <br>
3121
+ *object identifier* <br>
3122
+ example: 1764
3123
+
3124
+ **updatedDate:** string($date-time) <br>
3125
+ *object's date of modification* <br>
3126
+
3127
+ **version** number <br>
3128
+ *object's version number of modification* <br>
3129
+ example: 10
3130
+
3131
+ **identifier:** string <br>
3132
+ *textual identifier for a field in the record* <br>
3133
+ example: catalog
3134
+
3135
+ **localizeInfos:** Record<string, any> <br>
3136
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3137
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
3138
+
3139
+ </details>
3140
+
3141
+ ### ProductstatusesSpec.getProductsByStatusMarker(marker)
3142
+
3143
+ ```js
3144
+ const value = await ProductstatusesSpec.getProductsByStatusMarker('my-marker')
3145
+ ```
3146
+
3147
+ > 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.
3148
+
3149
+ Example return:
3150
+
3151
+ ```json
3152
+ {
3153
+ "id": 1764,
3154
+ "updatedDate": "2023-09-25T13:39:19.384Z",
3155
+ "version": 10,
3156
+ "identifier": "catalog",
3157
+ "localizeInfos": {
3158
+ "title": "Status 1"
3159
+ }
3160
+ }
3161
+ ```
3162
+ <details>
3163
+ <summary>Schema</summary>
3164
+
3165
+ **id:** number <br>
3166
+ *object identifier* <br>
3167
+ example: 1764
3168
+
3169
+ **updatedDate:** string($date-time) <br>
3170
+ *object's date of modification* <br>
3171
+
3172
+ **version** number <br>
3173
+ *object's version number of modification* <br>
3174
+ example: 10
3175
+
3176
+ **identifier:** string <br>
3177
+ *textual identifier for a field in the record* <br>
3178
+ example: catalog
3179
+
3180
+ **localizeInfos:** Record<string, any> <br>
3181
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3182
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
3183
+
3184
+ </details>
3185
+
3186
+ ### ProductstatusesSpec.validateMarker(marker)
3187
+
3188
+ ```js
3189
+ const value = await ProductstatusesSpec.validateMarker('marker')
3190
+ ```
3191
+
3192
+ > 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.
3193
+
3194
+ Example return:
3195
+
3196
+ ```json
3197
+ true
3198
+ ```
3199
+
3200
+ ---
3201
+
3202
+
3203
+ ## <h2 id="system"> System </h2>
3204
+
3205
+
3206
+ ```js
3207
+ const { System } = defineOneEntry('your-url')
3208
+ ```
3209
+
3210
+ ### System.test404()
3211
+
3212
+ ```js
3213
+ const value = await System.test404()
3214
+ ```
3215
+
3216
+ > This method allows you to redirect to the error page.
3217
+
3218
+ ### System.test500()
3219
+
3220
+ ```js
3221
+ const value = await System.test500()
3222
+ ```
3223
+
3224
+ > This method allows you to redirect to the error page.
3225
+
3226
+
3227
+ ## <h2 id="templates"> Templates </h2>
3228
+
3229
+
3230
+ ```js
3231
+ const { Templates } = defineOneEntry('your-url')
3232
+ ```
3233
+
3234
+ ### Templates.getAllTemplates()
3235
+
3236
+ ```js
3237
+ const value = await Templates.getAllTemplates()
3238
+ ```
3239
+
3240
+ > 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.
3241
+
3242
+ Example return:
3243
+
3244
+ ```json
3245
+ [
3246
+ {
3247
+ "id": 1764,
3248
+ "updatedDate": "2023-12-05T12:47:02.859Z",
3249
+ "version": 10,
3250
+ "identifier": "marker",
3251
+ "generalType": {
3252
+ "id": 4,
3253
+ "type": "forCatalogPages"
3254
+ },
3255
+ "generalTypeId": 4,
3256
+ "localizeInfos": {
3257
+ "title": "Page template"
3258
+ },
3259
+ "position": 0,
3260
+ "positionId": 12,
3261
+ "generalTypeName": "forProductPreview"
3262
+ }
3263
+ ]
3264
+ ```
3265
+ <details>
3266
+ <summary>Schema</summary>
3267
+
3268
+ **id:** number <br>
3269
+ *object identifier* <br>
3270
+ example: 1764
3271
+
3272
+ **updatedDate:** string($date-time) <br>
3273
+ *object's date of modification* <br>
3274
+
3275
+ **version** number <br>
3276
+ *object's version number of modification* <br>
3277
+ example: 10
3278
+
3279
+ **identifier:** string <br>
3280
+ *textual identifier for a field in the record* <br>
3281
+ example: catalog
3282
+
3283
+ **generalType:**: object <br>
3284
+ *object type* <br>
3285
+ example: OrderedMap { "id": 4, "type": "forCatalogPages" }
3286
+
3287
+ **generalTypeId:** number
3288
+ *type identifier*
3289
+ example: 4
3290
+
3291
+ **localizeInfos:** Record<string, any> <br>
3292
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3293
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
3294
+
3295
+ **position** object <br>
3296
+ *position number* <br>
3297
+ example: 0
3298
+
3299
+
3300
+ **positionId:** number <br>
3301
+ *position object identifier* <br>
3302
+ example: 12
3303
+
3304
+ **generalTypeName** string <br>
3305
+ *example: forProductPreview* <br>
3306
+ general type name
3307
+
3308
+ </details>
3309
+
3310
+ ### Templates.getTemplateByType(type)
3311
+
3312
+ ```js
3313
+ const value = await Templates.getTemplateByType('forCatalogProducts')
3314
+ ```
3315
+
3316
+ > 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.
3317
+
3318
+ Example return:
3319
+
3320
+ ```json
3321
+ [
3322
+ {
3323
+ "id": 1764,
3324
+ "updatedDate": "2023-12-05T12:45:13.566Z",
3325
+ "version": 10,
3326
+ "identifier": "marker",
3327
+ "generalType": {
3328
+ "id": 4,
3329
+ "type": "forCatalogPages"
3330
+ },
3331
+ "generalTypeId": 4,
3332
+ "localizeInfos": {
3333
+ "title": "Page template"
3334
+ },
3335
+ "position": 0,
3336
+ "positionId": 12,
3337
+ "generalTypeName": "forProductPreview"
3338
+ }
3339
+ ]
3340
+ ```
3341
+ <details>
3342
+ <summary>Schema</summary>
3343
+
3344
+ **id:** number <br>
3345
+ *object identifier* <br>
3346
+ example: 1764
3347
+
3348
+ **updatedDate:** string($date-time) <br>
3349
+ *object's date of modification* <br>
3350
+
3351
+ **version** number <br>
3352
+ *object's version number of modification* <br>
3353
+ example: 10
3354
+
3355
+ **identifier:** string <br>
3356
+ *textual identifier for a field in the record* <br>
3357
+ example: catalog
3358
+
3359
+ **generalType:**: object <br>
3360
+ *object type* <br>
3361
+ example: OrderedMap { "id": 4, "type": "forCatalogPages" }
3362
+
3363
+ **generalTypeId:** number
3364
+ *type identifier*
3365
+ example: 4
3366
+
3367
+ **localizeInfos:** Record<string, any> <br>
3368
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3369
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
3370
+
3371
+ **position** object <br>
3372
+ *position number* <br>
3373
+ example: 0
3374
+
3375
+
3376
+ **positionId:** number <br>
3377
+ *position object identifier* <br>
3378
+ example: 12
3379
+
3380
+ **generalTypeName** string <br>
3381
+ *example: forProductPreview* <br>
3382
+ general type name
3383
+
3384
+ </details>
3385
+
3386
+ ---
3387
+
3388
+
3389
+ ## <h2 id="templatepreviews"> TemplatePreviews </h2>
3390
+
3391
+
3392
+ ```js
3393
+ const { TemplatePreviews } = defineOneEntry('your-url')
3394
+ ```
3395
+
3396
+ ### TemplatePreviews.getTemplatePreviews()
3397
+
3398
+ ```js
3399
+ const value = await TemplatePreviews.getTemplatePreviews()
3400
+ ```
3401
+
3402
+ > This method retrieves all template objects from the API. It returns a Promise that resolves to an array of TemplatePreviewsEntity template objects.
3403
+
3404
+ Example return:
3405
+
3406
+ ```json
3407
+ [
3408
+ {
3409
+ "id": 1764,
3410
+ "updatedDate": "2023-12-05T12:44:55.663Z",
3411
+ "version": 10,
3412
+ "identifier": "marker",
3413
+ "proportion": {
3414
+ "horizontal": {
3415
+ "height": 200,
3416
+ "weight": 10,
3417
+ "marker": "horizontal",
3418
+ "title": "Horizontal",
3419
+ "alignmentType": "left"
3420
+ },
3421
+ "vertical": {
3422
+ "height": 10,
3423
+ "weight": 200,
3424
+ "marker": "vertical",
3425
+ "title": "Vertical",
3426
+ "alignmentType": "left"
3427
+ },
3428
+ "square": {
3429
+ "marker": "square",
3430
+ "title": "Square",
3431
+ "slide": 3,
3432
+ "alignmentType": "center"
3433
+ }
3434
+ },
3435
+ "localizeInfos": {
3436
+ "title": "Page Template"
3437
+ },
3438
+ "position": 0
3439
+ }
3440
+ ]
3441
+ ```
3442
+ <details>
3443
+ <summary>Schema</summary>
3444
+
3445
+ **id:** number <br>
3446
+ *object identifier* <br>
3447
+ example: 1764
3448
+
3449
+ **updatedDate:** string($date-time) <br>
3450
+ *object's date of modification* <br>
3451
+
3452
+ **version** number <br>
3453
+ *object's version number of modification* <br>
3454
+ example: 10
3455
+
3456
+ **identifier:** string <br>
3457
+ *textual identifier for a field in the record* <br>
3458
+ example: catalog
3459
+
3460
+ **proportion** ITemplateProportionType <br>
3461
+ *template proportion parameters* <br>
3462
+ example: OrderedMap { "horizontal": OrderedMap { "height": 200, "weight": 10, "marker": "horizontal", "title": "Horizontal", "alignmentType": "left" }, "vertical": OrderedMap { "height": 10, "weight": 200, "marker": "vertical", "title": "Vertical", "alignmentType": "left" }, "square": OrderedMap { "marker": "square", "title": "Square", "slide": 3, "alignmentType": "center" } }
3463
+
3464
+ **localizeInfos:** Record<string, any> <br>
3465
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3466
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
3467
+
3468
+ **position** object <br>
3469
+ *position number* <br>
3470
+ example: 0
3471
+
3472
+
3473
+ **positionId:** number <br>
3474
+ *position object identifier* <br>
3475
+ example: 12
3476
+
3477
+ </details>
3478
+
3479
+
3480
+ ### TemplatePreviews.getTemplatesPreviewById(id)
3481
+
3482
+ ```js
3483
+ const value = await TemplatePreviews.getTemplatePreviewById(1)
3484
+ ```
3485
+
3486
+ > 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.
3487
+
3488
+ Example return:
3489
+
3490
+ ```json
3491
+ {
3492
+ "id": 1764,
3493
+ "updatedDate": "2023-12-05T12:44:37.348Z",
3494
+ "version": 10,
3495
+ "identifier": "marker",
3496
+ "proportion": {
3497
+ "horizontal": {
3498
+ "height": 200,
3499
+ "weight": 10,
3500
+ "marker": "horizontal",
3501
+ "title": "Horizontal",
3502
+ "alignmentType": "left"
3503
+ },
3504
+ "vertical": {
3505
+ "height": 10,
3506
+ "weight": 200,
3507
+ "marker": "vertical",
3508
+ "title": "Vertical",
3509
+ "alignmentType": "left"
3510
+ },
3511
+ "square": {
3512
+ "marker": "square",
3513
+ "title": "Square",
3514
+ "slide": 3,
3515
+ "alignmentType": "center"
3516
+ }
3517
+ },
3518
+ "localizeInfos": {
3519
+ "title": "Page Template"
3520
+ },
3521
+ "position": 0
3522
+ }
3523
+ ```
3524
+ <details>
3525
+ <summary>Schema</summary>
3526
+
3527
+ **id:** number <br>
3528
+ *object identifier* <br>
3529
+ example: 1764
3530
+
3531
+ **updatedDate:** string($date-time) <br>
3532
+ *object's date of modification* <br>
3533
+
3534
+ **version** number <br>
3535
+ *object's version number of modification* <br>
3536
+ example: 10
3537
+
3538
+ **identifier:** string <br>
3539
+ *textual identifier for a field in the record* <br>
3540
+ example: catalog
3541
+
3542
+ **proportion** ITemplateProportionType <br>
3543
+ *template proportion parameters* <br>
3544
+ example: OrderedMap { "horizontal": OrderedMap { "height": 200, "weight": 10, "marker": "horizontal", "title": "Horizontal", "alignmentType": "left" }, "vertical": OrderedMap { "height": 10, "weight": 200, "marker": "vertical", "title": "Vertical", "alignmentType": "left" }, "square": OrderedMap { "marker": "square", "title": "Square", "slide": 3, "alignmentType": "center" } }
3545
+
3546
+ **localizeInfos:** Record<string, any> <br>
3547
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3548
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
3549
+
3550
+ **position** object <br>
3551
+ *position number* <br>
3552
+ example: 0
3553
+
3554
+
3555
+ **positionId:** number <br>
3556
+ *position object identifier* <br>
3557
+ example: 12
3558
+
3559
+ </details>
3560
+
3561
+ ### TemplatePreviews.getTemplatesPreviewByMarker(marker)
3562
+
3563
+ ```js
3564
+ const value = await TemplatePreviews.getTemplatePreviewByMarker('my-marker')
3565
+ ```
3566
+
3567
+ > 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.
3568
+
3569
+ Example return:
3570
+
3571
+ ```json
3572
+ {
3573
+ "id": 1764,
3574
+ "updatedDate": "2023-12-05T12:44:20.008Z",
3575
+ "version": 10,
3576
+ "identifier": "marker",
3577
+ "proportion": {
3578
+ "horizontal": {
3579
+ "height": 200,
3580
+ "weight": 10,
3581
+ "marker": "horizontal",
3582
+ "title": "Horizontal",
3583
+ "alignmentType": "left"
3584
+ },
3585
+ "vertical": {
3586
+ "height": 10,
3587
+ "weight": 200,
3588
+ "marker": "vertical",
3589
+ "title": "Vertical",
3590
+ "alignmentType": "left"
3591
+ },
3592
+ "square": {
3593
+ "marker": "square",
3594
+ "title": "Square",
3595
+ "slide": 3,
3596
+ "alignmentType": "center"
3597
+ }
3598
+ },
3599
+ "localizeInfos": {
3600
+ "title": "Page Template"
3601
+ },
3602
+ "position": 0
3603
+ }
3604
+ ```
3605
+ <details>
3606
+ <summary>Schema</summary>
3607
+
3608
+ **id:** number <br>
3609
+ *object identifier* <br>
3610
+ example: 1764
3611
+
3612
+ **updatedDate:** string($date-time) <br>
3613
+ *object's date of modification* <br>
3614
+
3615
+ **version** number <br>
3616
+ *object's version number of modification* <br>
3617
+ example: 10
3618
+
3619
+ **identifier:** string <br>
3620
+ *textual identifier for a field in the record* <br>
3621
+ example: catalog
3622
+
3623
+ **proportion** ITemplateProportionType <br>
3624
+ *template proportion parameters* <br>
3625
+ example: OrderedMap { "horizontal": OrderedMap { "height": 200, "weight": 10, "marker": "horizontal", "title": "Horizontal", "alignmentType": "left" }, "vertical": OrderedMap { "height": 10, "weight": 200, "marker": "vertical", "title": "Vertical", "alignmentType": "left" }, "square": OrderedMap { "marker": "square", "title": "Square", "slide": 3, "alignmentType": "center" } }
3626
+
3627
+ **localizeInfos:** Record<string, any> <br>
3628
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3629
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } }
3630
+
3631
+ **position** object <br>
3632
+ *position number* <br>
3633
+ example: 0
3634
+
3635
+
3636
+ **positionId:** number <br>
3637
+ *position object identifier* <br>
3638
+ example: 12
3639
+
3640
+ </details>
3641
+ ---
3642
+
3643
+