oneentry 1.0.62 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,20 +27,23 @@ import { defineOneEntry } from 'oneentry'
27
27
  const {
28
28
  Admins,
29
29
  AttributesSets,
30
+ AuthProvider,
30
31
  Blocks,
32
+ Events,
31
33
  Forms,
32
34
  FormData,
33
35
  FileUploading,
34
36
  GeneralTypes,
35
37
  Locales,
36
- Markers,
37
38
  Menus,
39
+ Orders,
38
40
  Pages,
39
41
  Products,
40
42
  ProductStatuses,
41
43
  System,
42
44
  Templates,
43
- TemplatePreviews
45
+ TemplatePreviews,
46
+ Users
44
47
  } = defineOneEntry('your-url');
45
48
  ```
46
49
 
@@ -76,13 +79,14 @@ const api = defineOneEntry('your-url', {token: 'my-token', langCode:'my-langCode
76
79
  Now you can use the following links to jump to specific entries:
77
80
  - [Admins](#admins)
78
81
  - [AttributesSets](#attributessets)
82
+ - [AuthProvider](#authprovider)
79
83
  - [Blocks](#blocks)
84
+ - [Events](#events)
80
85
  - [Forms](#forms)
81
86
  - [FormData](#formdata)
82
87
  - [FileUploading](#fileuploading)
83
88
  - [GeneralTypes](#generaltypes)
84
89
  - [Locales](#locales)
85
- - [Markers](#markers)
86
90
  - [Menus](#menus)
87
91
  - [Orders](#orders)
88
92
  - [Pages](#pages)
@@ -92,6 +96,7 @@ Now you can use the following links to jump to specific entries:
92
96
  - [System](#system)
93
97
  - [Templates](#templates)
94
98
  - [TemplatePreviews](#templatepreviews)
99
+ - [Users](#users)
95
100
 
96
101
 
97
102
  ## <h2 id="admins"> Admins </h2>
@@ -331,78 +336,80 @@ example: List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extende
331
336
  ---
332
337
 
333
338
 
334
- ## <h2 id="blocks"> Blocks </h2>
339
+ ## <h2 id="authprovider"> User Auth Provider </h2>
335
340
 
336
341
  ```js
337
- const { Blocks } = defineOneEntry('your-url');
342
+ const { AuthProvider } = defineOneEntry('your-url');
338
343
  ```
339
344
 
340
- ### Blocks.getBlocks(langCode, offset, limit)
345
+ ### AuthProvider.signUp(marker, data, langCode)
346
+
341
347
 
342
348
  ```js
343
- const value = await Blocks.getBlocks('en_US', 0, 30)
349
+
350
+ const data = {
351
+ "formIdentifier": "reg",
352
+ "authData": [
353
+ {
354
+ "marker": "login",
355
+ "value": "test"
356
+ },
357
+ {
358
+ "marker": "password",
359
+ "value": "12345"
360
+ }
361
+ ],
362
+ "formData": [
363
+ {
364
+ "marker": "last_name",
365
+ "type": "string",
366
+ "value": "Username"
367
+ }
368
+ ],
369
+ "notificationData": {
370
+ "email": "test@test.com",
371
+ "phonePush": "",
372
+ "phoneSMS": "+99999999999"
373
+ }
374
+ }
375
+
376
+ const value = await AuthProvider.getBlocks('en_US', 0, 30)
344
377
  ```
345
378
 
346
- > This method return array of all blocks object.
379
+ > This method will register a new user. Returns the registered user's object.
347
380
 
348
381
  Example return:
349
382
 
350
383
  ```json
351
- [
352
- {
353
- "id": 4,
354
- "localizeInfos": {
355
- "title": "Name"
356
- },
357
- "version": 0,
358
- "position": 3,
359
- "identifier": "product",
360
- "type": "forProductBlock",
361
- "templateIdentifier": null,
362
- "isVisible": true,
363
- "attributeValues": {
364
- "attr": {
365
- "type": "string",
366
- "value": "",
367
- "position": 0,
368
- "isProductPreview": false
369
- }
370
- },
371
- "countElementsPerRow": 3,
372
- "products": [
384
+ {
385
+ "id": 1764,
386
+ "updatedDate": "2024-05-23T12:43:00.169Z",
387
+ "version": 10,
388
+ "identifier": "catalog",
389
+ "isActive": false,
390
+ "authProviderId": 1,
391
+ "formData": {
392
+ "en_US": [
373
393
  {
374
- "id": 446,
375
- "localizeInfos": {
376
- "title": "new product 3"
377
- },
378
- "relatedIds": [1, 2],
379
- "statusId": null,
380
- "attributeSetId": 11,
381
- "position": 3,
382
- "templateIdentifier": null,
383
- "shortDescTemplateIdentifier": null,
384
- "price": 543,
385
- "sku": "ggg",
386
- "isSync": true,
387
- "attributeValues": {
388
- "sku": {
389
- "type": "string",
390
- "value": "ggg",
391
- "position": 0,
392
- "isProductPreview": false
393
- },
394
- "images": {
395
- "type": "groupOfImages",
396
- "value": {},
397
- "position": 3,
398
- "isProductPreview": false
399
- }
400
- },
401
- "isVisible": true
394
+ "marker": "login",
395
+ "value": "test"
396
+ },
397
+ {
398
+ "marker": "f-name",
399
+ "value": "Second name"
402
400
  }
403
401
  ]
402
+ },
403
+ "notificationData": {
404
+ "email": "test@test.com",
405
+ "phonePush": "",
406
+ "phoneSMS": "+9999999999"
407
+ },
408
+ "systemCode": {
409
+ "value": "90ВDCX",
410
+ "expiredDate": "2024-05-07T21:02:00.000Z"
404
411
  }
405
- ]
412
+ }
406
413
  ```
407
414
 
408
415
  <details>
@@ -412,17 +419,8 @@ Example return:
412
419
  *object identifier*
413
420
  example: 1764 <br>
414
421
 
415
- **attributeSetId:** number <br>
416
- *identifier for the used attribute set* <br>
417
- example: 7 <br>
418
-
419
- **localizeInfos:** CommonLocalizeInfos <br>
420
- *block name with localization* <br>
421
- example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
422
-
423
- **customSettings:** BlockCustomSettings <br>
424
- *custom settings for different block types* <br>
425
- example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ] } <br>
422
+ **updatedDate:** string <br>
423
+ *object modification date* <br>
426
424
 
427
425
  **version:** number <br>
428
426
  *object version number* <br>
@@ -433,376 +431,425 @@ example: 10 <br>
433
431
  example: catalog <br>
434
432
  default: marker <br>
435
433
 
436
- **position:** number <br>
437
- *position number (for sorting)* <br>
438
- example: 192 <br>
434
+ **attributeSetId:** number <br>
435
+ *identifier for the used attribute set* <br>
436
+ example: 7 <br>
439
437
 
440
- **attributeValues:** Record<string, string> <br>
441
- *array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
442
- example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
438
+ **formData:** FormDataLangType <br>
439
+ *Data submitted by the form* <br>
440
+ example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
443
441
 
444
- **type:** string <br>
445
- *block type* <br>
446
- example: forNewsPage <br>
442
+ **notificationData:** UserNotificationDataType <br>
443
+ *data for notifying the user* <br>
444
+ example: OrderedMap { "email": "test@test.ru", "phonePush": "", "phoneSMS": "+79991234567" } <br>
447
445
 
448
- **templateIdentifier:** string <br>
449
- *template marker used by the block (can be null)* <br>
450
- Enum:
451
- [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
452
- example: null <br>
446
+ **systemCode:** string <br>
447
+ *system code for performing official actions (password reset, activation)* <br>
448
+ example: OrderedMap { "value": "90ВDCX", "expiredDate": "2024-05-07T21:02:00.000Z" } <br>
449
+
450
+ **formIdentifier:** string <br>
451
+ *the text identifier of the authorization provider's form* <br>
452
+ example: reg_form <br>
453
+
454
+ **authData:** FormAuthDataType <br>
455
+ *authorization data taken from the form linked to the authorization provider* <br>
456
+ example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ] <br>
457
+
458
+ **authProviderId:** number <br>
459
+ *ID of the authorization provider* <br>
460
+ example: 1 <br>
453
461
 
454
462
  </details>
455
- ---
456
463
 
457
464
 
458
- ### Blocks.getBlockByMarker(marker, langCode)
465
+ ### AuthProvider.generateCode(marker, userIdentifier)
466
+
459
467
 
460
468
  ```js
461
- const value = await Blocks.getBlockByMarker('my-marker', 'en_US')
469
+ const value = await AuthProvider.generateCode('email', 'test@trer.com')
462
470
  ```
463
471
 
464
- > This method return one blocks object by marker.
472
+ > This method receives a code to activate the user. Returns the object with the code.
465
473
 
466
474
  Example return:
467
475
 
468
476
  ```json
469
477
  {
470
- "id": 1,
471
- "localizeInfos": {
472
- "title": "Block"
473
- },
474
- "version": 0,
475
- "position": 1,
476
- "identifier": "block",
477
- "type": "forTextBlock",
478
- "templateIdentifier": null,
479
- "isVisible": true,
480
- "attributeValues": {}
478
+ "code": "90ВDCX",
479
+ "expiredDate": "2024-05-07T21:02:00.000Z"
481
480
  }
482
481
  ```
483
482
 
484
483
  <details>
485
484
  <summary>Schema</summary>
486
485
 
487
- **id:** number <br>
488
- *object identifier*
489
- example: 1764 <br>
486
+ **code:** string <br>
487
+ *code for performing official actions (password reset, activation)*
488
+ example: 90ВDCX <br>
490
489
 
491
- **attributeSetId:** number <br>
492
- *identifier for the used attribute set* <br>
493
- example: 7 <br>
490
+ **expiredDate:** string <br>
491
+ *object modification date* <br>
494
492
 
495
- **localizeInfos:** CommonLocalizeInfos <br>
496
- *block name with localization* <br>
497
- example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
493
+ **expiredDate:** string <br>
494
+ *the time and date until which the code is valid* <br>
495
+ example: 2024-05-07T21:02:00.000Z <br>
496
+ </details>
498
497
 
499
- **customSettings:** BlockCustomSettings <br>
500
- *custom settings for different block types* <br>
501
- example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ] } <br>
502
498
 
503
- **version:** number <br>
504
- *object version number* <br>
505
- example: 10 <br>
499
+ ### AuthProvider.activateUser(marker, userIdentifier, code)
506
500
 
507
- **identifier:** string <br>
508
- *textual identifier for the field record* <br>
509
- example: catalog <br>
510
- default: marker <br>
501
+ ```js
502
+ const value = await AuthProvider.activateUser('email', 'test@trer.com', 'WTGC9E')
503
+ ```
511
504
 
512
- **position:** number <br>
513
- *position number (for sorting)* <br>
514
- example: 192 <br>
505
+ > This method activates the user by code. If successful, it will return true.
515
506
 
516
- **attributeValues:** Record<string, string> <br>
517
- *array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
518
- example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
507
+ Example return:
519
508
 
520
- **type:** string <br>
521
- *block type* <br>
522
- example: forNewsPage <br>
509
+ ```json
510
+ true
511
+ ```
523
512
 
524
- **templateIdentifier:** string <br>
525
- *template marker used by the block (can be null)* <br>
526
- Enum:
527
- [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
528
- example: null <br>
513
+ ### AuthProvider.auth(marker, login, password)
514
+
515
+ ```js
516
+ const value = await AuthProvider.auth('email', 'test@trer.com', '123456')
517
+ ```
518
+
519
+ > This method performs user authorization. Returns an object with a set of tokens.
520
+
521
+ Example return:
522
+
523
+ ```json
524
+ {
525
+ "userIdentifier": "test@test.ru",
526
+ "authProviderIdentifier": "email",
527
+ "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiYXV0aFByb3ZpZGVySWRlbnRpZmllciI6ImVtYWlsIiwidXNlcklkZW50aWZpZXIiOiJ0ZXN0QHRlc3QucnUiLCJ1c2VyQWdlbnQiOiJQb3N0bWFuUnVudGltZS83LjM3LjMiLCJpYXQiOjE3MTQ1NTc2NzAsImV4cCI6MTcxNDU2MTI3MH0.vm74Ha-S37462CAF3QiDpO9b0OhlJFNDMKq4eEyoaB8",
528
+ "refreshToken": "1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9"
529
+ }
530
+ ```
531
+ <details>
532
+ <summary>Schema</summary>
533
+
534
+ **userIdentifier:** string <br>
535
+ *user identifier*
536
+ example: test@test.ru <br>
537
+
538
+ **authProviderIdentifier:** string <br>
539
+ *auth provider identifier* <br>
540
+ example: email <br>
541
+
542
+ **accessToken:** string <br>
543
+ *access token* <br>
544
+ example:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiYXV0aFByb3ZpZGVySWRlbnRpZmllciI6ImVtYWlsIiwidXNlcklkZW50aWZpZXIiOiJ0ZXN0QHRlc3QucnUiLCJ1c2VyQWdlbnQiOiJQb3N0bWFuUnVudGltZS83LjM3LjMiLCJpYXQiOjE3MTQ1NTc2NzAsImV4cCI6MTcxNDU2MTI3MH0.vm74Ha-S37462CAF3QiDpO9b0OhlJFNDMKq4eEyoaB8 <br>
545
+
546
+ **refreshToken:** string <br>
547
+ *refresh token* <br>
548
+ example: 1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9 <br>
529
549
 
530
550
  </details>
531
- ---
532
551
 
533
- ### Blocks.getSimilarProducts(marker, langCode, offset, limit)
534
552
 
553
+ ### AuthProvider.refresh(marker, token)
535
554
 
536
555
  ```js
537
- const value = await Blocks.getSimilarProducts('my-marker', 'en_US')
556
+ const value = await AuthProvider.refresh('email', '1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9')
538
557
  ```
539
558
 
540
- > This method return array of similar products from block by block marker.
559
+ > This method updates the user's token. Returns an object with a set of tokens.
541
560
 
542
561
  Example return:
543
562
 
544
563
  ```json
545
- [
546
- {
547
- "id": 2,
548
- "localizeInfos": {
549
- "title": "Box"
550
- },
551
- "relatedIds": [],
552
- "statusId": 2,
553
- "attributeSetId": 5,
554
- "position": 1,
555
- "templateIdentifier": null,
556
- "shortDescTemplateIdentifier": null,
557
- "price": 150,
558
- "sku": null,
559
- "isSync": true,
560
- "attributeValues": {
561
- "price": {
562
- "type": "integer",
563
- "value": "150",
564
- "position": 1,
565
- "isProductPreview": false
566
- },
567
- "product-name": {
568
- "type": "string",
569
- "value": "Box text",
570
- "position": 0,
571
- "isProductPreview": false
572
- }
573
- },
574
- "isVisible": true
575
- }
576
- ]
564
+ {
565
+ "userIdentifier": "test@test.ru",
566
+ "authProviderIdentifier": "email",
567
+ "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiYXV0aFByb3ZpZGVySWRlbnRpZmllciI6ImVtYWlsIiwidXNlcklkZW50aWZpZXIiOiJ0ZXN0QHRlc3QucnUiLCJ1c2VyQWdlbnQiOiJQb3N0bWFuUnVudGltZS83LjM3LjMiLCJpYXQiOjE3MTQ1NTc2NzAsImV4cCI6MTcxNDU2MTI3MH0.vm74Ha-S37462CAF3QiDpO9b0OhlJFNDMKq4eEyoaB8",
568
+ "refreshToken": "1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9"
569
+ }
577
570
  ```
571
+ <details>
572
+ <summary>Schema</summary>
573
+
574
+ **userIdentifier:** string <br>
575
+ *user identifier*
576
+ example: test@test.ru <br>
578
577
 
578
+ **authProviderIdentifier:** string <br>
579
+ *auth provider identifier* <br>
580
+ example: email <br>
579
581
 
582
+ **accessToken:** string <br>
583
+ *access token* <br>
584
+ example:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiYXV0aFByb3ZpZGVySWRlbnRpZmllciI6ImVtYWlsIiwidXNlcklkZW50aWZpZXIiOiJ0ZXN0QHRlc3QucnUiLCJ1c2VyQWdlbnQiOiJQb3N0bWFuUnVudGltZS83LjM3LjMiLCJpYXQiOjE3MTQ1NTc2NzAsImV4cCI6MTcxNDU2MTI3MH0.vm74Ha-S37462CAF3QiDpO9b0OhlJFNDMKq4eEyoaB8 <br>
580
585
 
581
- ### Blocks.getProductsByBlockMarker(marker, langCode, offset, limit)
586
+ **refreshToken:** string <br>
587
+ *refresh token* <br>
588
+ example: 1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9 <br>
589
+
590
+ </details>
591
+
592
+
593
+ ### AuthProvider.logout(marker, token)
582
594
 
583
595
  ```js
584
- const value = await Blocks.getProductsByBlockMarker('my-marker', 'en_US')
596
+ const value = await AuthProvider.logout('email', '1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9')
585
597
  ```
586
598
 
587
- > This method return array of products from block by block marker.
599
+ > This method performs a user logout. If successful, it will return true.
588
600
 
589
601
  Example return:
590
602
 
591
603
  ```json
592
- [
593
- {
594
- "id": 446,
595
- "localizeInfos": {
596
- "title": "new product 3"
597
- },
598
- "relatedIds": [1, 2],
599
- "statusId": null,
600
- "position": 3,
601
- "templateIdentifier": null,
602
- "shortDescTemplateIdentifier": null,
603
- "price": 543,
604
- "sku": "ggg",
605
- "isSync": true,
606
- "attributeValues": {
607
- "sku": {
608
- "type": "string",
609
- "value": "ggg",
610
- "position": 0,
611
- "isProductPreview": false
612
- },
613
- "images": {
614
- "type": "groupOfImages",
615
- "value": {},
616
- "position": 3,
617
- "isProductPreview": false
618
- }
619
- },
620
- "isVisible": true
621
- }
622
- ]
604
+ true
623
605
  ```
624
606
 
625
-
626
- ## <h2 id="fileuploading"> FileUploading </h2>
607
+ ### AuthProvider.changePassword(marker, userIdentifier, code, newPassword, repeatPassword)
627
608
 
628
609
  ```js
629
- const { FileUploading } = defineOneEntry('your-url');
610
+ const value = await AuthProvider.changePassword('email', 'test@test.com', 'EW32RF', 654321, 654321)
630
611
  ```
631
612
 
632
- ### FileUploading.upload(data, fileQuery)
613
+ > This method changes the password of an authorized user. If successful, it will return true.
633
614
 
634
- ```js
635
- const query = {
636
- type:"page",
637
- entity:"editor",
638
- id:3787,
639
- width:0,
640
- height:0,
641
- compress:true,
642
- }
615
+ Example return:
643
616
 
644
- const value = await FileUploading.upload(data, query)
617
+ ```json
618
+ true
645
619
  ```
646
620
 
647
- > This method uploads a file to a cloud file storage. Pass to the date the value obtained from input type "file".
648
- > Data is file object (or array), learn more - [File Object](https://developer.mozilla.org/en-US/docs/Web/API/File)
621
+
622
+ ### AuthProvider.getAuthProviders(langCode, offset, limit)
623
+
624
+ ```js
625
+ const value = await AuthProvider.getAuthProviders()
626
+ ```
627
+
628
+ > This method gets all the objects of the authorization providers.
649
629
 
650
630
  Example return:
651
631
 
652
632
  ```json
653
633
  [
654
634
  {
655
- "filename": "string",
656
- "downloadLink": "string",
657
- "size": 0
635
+ "id": 1764,
636
+ "localizeInfos": {
637
+ "title": "My block"
638
+ },
639
+ "version": 10,
640
+ "identifier": "catalog",
641
+ "isActive": false,
642
+ "isCheckCode": false,
643
+ "type": "email",
644
+ "formIdentifier": null
658
645
  }
659
646
  ]
660
647
  ```
661
-
662
648
  <details>
663
649
  <summary>Schema</summary>
664
650
 
665
- **filename:** string <br>
666
- *filename with relative path* <br>
651
+ **id:** number <br>
652
+ *object identifier*
653
+ example: 1764 <br>
667
654
 
668
- **downloadLink:** string <br>
669
- *link for downloading the file* <br>
655
+ **localizeInfos:** CommonLocalizeInfos <br>
656
+ *block name with localization* <br>
657
+ example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
670
658
 
671
- **size** number <br>
672
- *size of the file in bytes* <br>
659
+ **version:** number <br>
660
+ *object version number* <br>
661
+ example: 10 <br>
673
662
 
674
- </details>
663
+ **identifier:** string <br>
664
+ *textual identifier for the field record* <br>
665
+ example: catalog <br>
666
+ default: marker <br>
675
667
 
676
- ### FileUploading.delete(filename, fileQuery)
668
+ **isActive:** boolean <br>
669
+ *Flag of usage* <br>
670
+ example: false <br>
677
671
 
678
- ```js
679
- const query = {
680
- type:"page",
681
- entity:"editor",
682
- id:3787
683
- }
672
+ **isCheckCode:** boolean <br>
673
+ *a sign of user activation via a code* <br>
674
+ example: false <br>
684
675
 
676
+ **type:** string <br>
677
+ *type of providere* <br>
678
+ example: email <br>
685
679
 
686
- const value = await FileUploading.delete("file.png", query)
687
- ```
680
+ **formIdentifier:** string <br>
681
+ *the marker of the form used by the provider (may be null)* <br>
682
+ example: email <br>
688
683
 
689
- > This void method delete a file from the cloud file storage.
684
+ </details>
690
685
 
691
- ### FileUploading.getFile(id, type, entity, filename)
686
+
687
+ ### AuthProvider.getMarker(marker, langCode)
692
688
 
693
689
  ```js
694
- const value = await FileUploading.getFile(123, 'page', 'editor', 'file.png')
690
+ const value = await AuthProvider.getMarker('email')
695
691
  ```
696
692
 
697
- > This method return file object by parameters.
693
+ > Getting a single token authorization provider object.
698
694
 
699
695
  Example return:
700
696
 
701
697
  ```json
702
698
  {
703
- "file": "string"
699
+ "id": 1764,
700
+ "localizeInfos": {
701
+ "en_US": {
702
+ "title": "My block"
703
+ }
704
+ },
705
+ "version": 10,
706
+ "identifier": "catalog",
707
+ "isActive": false,
708
+ "isCheckCode": false,
709
+ "type": "email",
710
+ "formIdentifier": null
704
711
  }
705
712
  ```
713
+ <details>
714
+ <summary>Schema</summary>
706
715
 
707
- ---
716
+ **id:** number <br>
717
+ *object identifier*
718
+ example: 1764 <br>
719
+
720
+ **localizeInfos:** CommonLocalizeInfos <br>
721
+ *block name with localization* <br>
722
+ example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
708
723
 
724
+ **version:** number <br>
725
+ *object version number* <br>
726
+ example: 10 <br>
709
727
 
728
+ **identifier:** string <br>
729
+ *textual identifier for the field record* <br>
730
+ example: catalog <br>
731
+ default: marker <br>
732
+
733
+ **isActive:** boolean <br>
734
+ *Flag of usage* <br>
735
+ example: false <br>
736
+
737
+ **isCheckCode:** boolean <br>
738
+ *a sign of user activation via a code* <br>
739
+ example: false <br>
740
+
741
+ **type:** string <br>
742
+ *type of providere* <br>
743
+ example: email <br>
744
+
745
+ **formIdentifier:** string <br>
746
+ *the marker of the form used by the provider (may be null)* <br>
747
+ example: email <br>
748
+
749
+ </details>
750
+
751
+ ---
710
752
 
711
- ## <h2 id="forms"> Forms </h2>
712
753
 
754
+ ## <h2 id="blocks"> Blocks </h2>
713
755
 
714
756
  ```js
715
- const { Forms } = defineOneEntry('your-url');
757
+ const { Blocks } = defineOneEntry('your-url');
716
758
  ```
717
759
 
718
- ### Forms.getAllForms(langCode, offset, limit)
760
+ ### Blocks.getBlocks(langCode, offset, limit)
719
761
 
720
762
  ```js
721
- const value = await Forms.getAllForms('en_US', 0, 30)
763
+ const value = await Blocks.getBlocks('en_US', 0, 30)
722
764
  ```
723
765
 
724
- > This method retrieves all form objects from the API. It returns a Promise that resolves to an array of FormEntity objects.
766
+ > This method return array of all blocks object.
725
767
 
726
768
  Example return:
727
769
 
728
770
  ```json
729
771
  [
730
772
  {
731
- "id": 1764,
732
- "attributeSetId": 0,
733
- "processingType": "email",
773
+ "id": 4,
734
774
  "localizeInfos": {
735
- "title": "My Form",
736
- "titleForSite": "",
737
- "successMessage": "",
738
- "unsuccessMessage": "",
739
- "urlAddress": "",
740
- "database": "0",
741
- "script": "0"
775
+ "title": "Name"
742
776
  },
743
- "processingData": "Unknown Type: ProcessingData",
744
- "version": 10,
745
- "identifier": "catalog",
746
- "position": 192,
747
- "attributes": [
777
+ "version": 0,
778
+ "position": 3,
779
+ "identifier": "product",
780
+ "type": "forProductBlock",
781
+ "templateIdentifier": null,
782
+ "isVisible": true,
783
+ "attributeValues": {
784
+ "attr": {
785
+ "type": "string",
786
+ "value": "",
787
+ "position": 0,
788
+ "isProductPreview": false
789
+ }
790
+ },
791
+ "countElementsPerRow": 3,
792
+ "products": [
748
793
  {
749
- "type": "list",
750
- "marker": "l1",
751
- "position": 2,
752
- "listTitles": [
753
- {
754
- "title": "red",
755
- "value": 1,
756
- "position": 1,
757
- "extendedValue": null,
758
- "extendedValueType": null
794
+ "id": 446,
795
+ "localizeInfos": {
796
+ "title": "new product 3"
797
+ },
798
+ "relatedIds": [1, 2],
799
+ "statusId": null,
800
+ "attributeSetId": 11,
801
+ "position": 3,
802
+ "templateIdentifier": null,
803
+ "shortDescTemplateIdentifier": null,
804
+ "price": 543,
805
+ "sku": "ggg",
806
+ "isSync": true,
807
+ "attributeValues": {
808
+ "sku": {
809
+ "type": "string",
810
+ "value": "ggg",
811
+ "position": 0,
812
+ "isProductPreview": false
759
813
  },
760
- {
761
- "title": "yellow",
762
- "value": 2,
763
- "position": 2,
764
- "extendedValue": null,
765
- "extendedValueType": null
814
+ "images": {
815
+ "type": "groupOfImages",
816
+ "value": {},
817
+ "position": 3,
818
+ "isProductPreview": false
766
819
  }
767
- ],
768
- "validators": {},
769
- "localizeInfos": {
770
- "title": "l1"
771
- }
820
+ },
821
+ "isVisible": true
772
822
  }
773
823
  ]
774
824
  }
775
825
  ]
776
826
  ```
827
+
777
828
  <details>
778
829
  <summary>Schema</summary>
779
830
 
780
831
  **id:** number <br>
781
- *object identifier* <br>
832
+ *object identifier*
782
833
  example: 1764 <br>
783
834
 
784
- **attributeSetId:** number <br>
785
- *identifier of the attribute set used* <br>
786
-
787
- **processingType:** string <br>
788
- *form processing type* <br>
789
- example: email <br>
835
+ **attributeSetId:** number <br>
836
+ *identifier for the used attribute set* <br>
837
+ example: 7 <br>
790
838
 
791
- **localizeInfos:** FormLocalizeInfos <br>
792
- *form name with localization* <br>
793
- Enum:
794
- [ db, email, script ]
795
- example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } } <br>
839
+ **localizeInfos:** CommonLocalizeInfos <br>
840
+ *block name with localization* <br>
841
+ example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
796
842
 
797
- **processingData:** ProcessingData <br>
798
- *form data* <br>
843
+ **customSettings:** BlockCustomSettings <br>
844
+ *custom settings for different block types* <br>
845
+ example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ] } <br>
799
846
 
800
847
  **version:** number <br>
801
848
  *object version number* <br>
802
849
  example: 10 <br>
803
850
 
804
851
  **identifier:** string <br>
805
- *textual identifier for the record field* <br>
852
+ *textual identifier for the field record* <br>
806
853
  example: catalog <br>
807
854
  default: marker <br>
808
855
 
@@ -810,99 +857,75 @@ default: marker <br>
810
857
  *position number (for sorting)* <br>
811
858
  example: 192 <br>
812
859
 
813
- **attributes:** <br>
814
- *array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
815
- 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" } } ] <br>
860
+ **attributeValues:** Record<string, string> <br>
861
+ *array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
862
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
863
+
864
+ **type:** string <br>
865
+ *block type* <br>
866
+ example: forNewsPage <br>
867
+
868
+ **templateIdentifier:** string <br>
869
+ *template marker used by the block (can be null)* <br>
870
+ Enum:
871
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
872
+ example: null <br>
816
873
 
817
874
  </details>
875
+ ---
818
876
 
819
877
 
820
- ### Forms.getFormByMarker(marker, langCode)
878
+ ### Blocks.getBlockByMarker(marker, langCode)
821
879
 
822
880
  ```js
823
- const value = await Forms.getFormByMarker('My form', 'en_US')
881
+ const value = await Blocks.getBlockByMarker('my-marker', 'en_US')
824
882
  ```
825
883
 
826
- > 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.
884
+ > This method return one blocks object by marker.
827
885
 
828
886
  Example return:
829
887
 
830
888
  ```json
831
889
  {
832
- "id": 1764,
833
- "attributeSetId": 0,
834
- "processingType": "email",
890
+ "id": 1,
835
891
  "localizeInfos": {
836
- "title": "My Form",
837
- "titleForSite": "",
838
- "successMessage": "",
839
- "unsuccessMessage": "",
840
- "urlAddress": "",
841
- "database": "0",
842
- "script": "0"
892
+ "title": "Block"
843
893
  },
844
- "processingData": "Unknown Type: ProcessingData",
845
- "version": 10,
846
- "identifier": "catalog",
847
- "position": 192,
848
- "attributes": [
849
- {
850
- "type": "list",
851
- "marker": "l1",
852
- "position": 2,
853
- "listTitles": [
854
- {
855
- "title": "red",
856
- "value": 1,
857
- "position": 1,
858
- "extendedValue": null,
859
- "extendedValueType": null
860
- },
861
- {
862
- "title": "yellow",
863
- "value": 2,
864
- "position": 2,
865
- "extendedValue": null,
866
- "extendedValueType": null
867
- }
868
- ],
869
- "validators": {},
870
- "localizeInfos": {
871
- "title": "l1"
872
- }
873
- }
874
- ]
894
+ "version": 0,
895
+ "position": 1,
896
+ "identifier": "block",
897
+ "type": "forTextBlock",
898
+ "templateIdentifier": null,
899
+ "isVisible": true,
900
+ "attributeValues": {}
875
901
  }
876
902
  ```
903
+
877
904
  <details>
878
905
  <summary>Schema</summary>
879
906
 
880
907
  **id:** number <br>
881
- *object identifier* <br>
908
+ *object identifier*
882
909
  example: 1764 <br>
883
910
 
884
- **attributeSetId:** number <br>
885
- *identifier of the attribute set used* <br>
886
-
887
- **processingType:** string <br>
888
- *form processing type* <br>
889
- example: email <br>
911
+ **attributeSetId:** number <br>
912
+ *identifier for the used attribute set* <br>
913
+ example: 7 <br>
890
914
 
891
- **localizeInfos:** FormLocalizeInfos <br>
892
- *form name with localization* <br>
893
- Enum:
894
- [ db, email, script ]
895
- example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } } <br>
915
+ **localizeInfos:** CommonLocalizeInfos <br>
916
+ *block name with localization* <br>
917
+ example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
896
918
 
897
- **processingData:** ProcessingData <br>
898
- *form data* <br>
919
+ **customSettings:** BlockCustomSettings <br>
920
+ *custom settings for different block types* <br>
921
+ example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ] } <br>
899
922
 
900
923
  **version:** number <br>
901
924
  *object version number* <br>
902
925
  example: 10 <br>
903
926
 
904
927
  **identifier:** string <br>
905
- *textual identifier for the record field* <br>
928
+ *textual identifier for the field record* <br>
906
929
  example: catalog <br>
907
930
  default: marker <br>
908
931
 
@@ -910,317 +933,315 @@ default: marker <br>
910
933
  *position number (for sorting)* <br>
911
934
  example: 192 <br>
912
935
 
913
- **attributes:** <br>
914
- *array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
915
- 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" } } ] <br>
936
+ **attributeValues:** Record<string, string> <br>
937
+ *array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
938
+ example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
916
939
 
917
- </details>
940
+ **type:** string <br>
941
+ *block type* <br>
942
+ example: forNewsPage <br>
918
943
 
944
+ **templateIdentifier:** string <br>
945
+ *template marker used by the block (can be null)* <br>
946
+ Enum:
947
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
948
+ example: null <br>
949
+
950
+ </details>
919
951
  ---
920
952
 
953
+ ### Blocks.getSimilarProducts(marker, langCode, offset, limit)
921
954
 
922
- ## <h2 id="formdata"> FormData </h2>
923
955
 
924
956
  ```js
925
- const { FormData } = defineOneEntry('your-url');
957
+ const value = await Blocks.getSimilarProducts('my-marker', 'en_US')
926
958
  ```
927
959
 
928
- ### FormData.postFormsData(data, langCode)
960
+ > This method return array of similar products from block by block marker.
929
961
 
930
- ```js
931
- const body = {
932
- formIdentifier: 'test',
933
- formData: {
934
- marker: 'test',
935
- value: 'Test',
936
- },
937
- }
962
+ Example return:
938
963
 
939
- const value = await FormData.postFormsData(body)
964
+ ```json
965
+ [
966
+ {
967
+ "id": 2,
968
+ "localizeInfos": {
969
+ "title": "Box"
970
+ },
971
+ "relatedIds": [],
972
+ "statusId": 2,
973
+ "attributeSetId": 5,
974
+ "position": 1,
975
+ "templateIdentifier": null,
976
+ "shortDescTemplateIdentifier": null,
977
+ "price": 150,
978
+ "sku": null,
979
+ "isSync": true,
980
+ "attributeValues": {
981
+ "price": {
982
+ "type": "integer",
983
+ "value": "150",
984
+ "position": 1,
985
+ "isProductPreview": false
986
+ },
987
+ "product-name": {
988
+ "type": "string",
989
+ "value": "Box text",
990
+ "position": 0,
991
+ "isProductPreview": false
992
+ }
993
+ },
994
+ "isVisible": true
995
+ }
996
+ ]
940
997
  ```
941
998
 
942
- > This method retrieves all form data objects from the API. It returns a Promise that resolves to an array of objects of type CreateFormData. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
943
999
 
944
1000
 
1001
+ ### Blocks.getProductsByBlockMarker(marker, langCode, offset, limit)
1002
+
1003
+ ```js
1004
+ const value = await Blocks.getProductsByBlockMarker('my-marker', 'en_US')
1005
+ ```
1006
+
1007
+ > This method return array of products from block by block marker.
945
1008
 
946
1009
  Example return:
947
1010
 
948
1011
  ```json
949
- {
950
- "id": 1764,
951
- "formIdentifier": "my-form",
952
- "time": "2023-02-12 10:56",
953
- "formData": {
954
- "marker": "name_1",
955
- "value": "Name"
1012
+ [
1013
+ {
1014
+ "id": 446,
1015
+ "localizeInfos": {
1016
+ "title": "new product 3"
1017
+ },
1018
+ "relatedIds": [1, 2],
1019
+ "statusId": null,
1020
+ "position": 3,
1021
+ "templateIdentifier": null,
1022
+ "shortDescTemplateIdentifier": null,
1023
+ "price": 543,
1024
+ "sku": "ggg",
1025
+ "isSync": true,
1026
+ "attributeValues": {
1027
+ "sku": {
1028
+ "type": "string",
1029
+ "value": "ggg",
1030
+ "position": 0,
1031
+ "isProductPreview": false
1032
+ },
1033
+ "images": {
1034
+ "type": "groupOfImages",
1035
+ "value": {},
1036
+ "position": 3,
1037
+ "isProductPreview": false
1038
+ }
1039
+ },
1040
+ "isVisible": true
956
1041
  }
957
- }
1042
+ ]
958
1043
  ```
959
- <details>
960
- <summary>Schema</summary>
961
1044
 
962
- **id:** number <br>
963
- *object identifier* <br>
964
- example: 1764 <br>
1045
+ ### Blocks.searchBlock(name, langCode)
965
1046
 
966
- **formIdentifier:** string <br>
967
- *Text identifier of the form object (marker)* <br>
968
- example: my-form <br>
1047
+ ```js
1048
+ const value = await Blocks.searchBlock('my-marker', 'en_US')
1049
+ ```
969
1050
 
970
- **time:** Date <br>
971
- *Date and time of form modification* <br>
972
- example: 2023-02-12 10:56 <br>
1051
+ > Quick search for block objects with limited output.
973
1052
 
974
- **formData:** FormDataLangType <br>
975
- *Data submitted by the form* <br>
976
- example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
1053
+ Example return:
977
1054
 
978
- </details>
1055
+ ```json
1056
+ [
1057
+ {
1058
+ "id": 1,
1059
+ "name": "my block",
1060
+ "identifier": "my-block"
1061
+ }
1062
+ ]
1063
+ ```
979
1064
 
980
- ### FormData.getFormsData(langCode, offset, limit)
1065
+
1066
+ ---
1067
+
1068
+ ## <h2 id="events"> Events </h2>
981
1069
 
982
1070
  ```js
983
- const value = await FormData.getFormsData('en_US', 0, 30)
1071
+ const { Events } = defineOneEntry('your-url');
984
1072
  ```
985
1073
 
986
- > 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.
987
-
988
- Example return:
1074
+ ### Events.subscribeByMarker(marker, userId, productId)
989
1075
 
990
- ```json
991
- {
992
- "id": 1764,
993
- "formIdentifier": "my-form",
994
- "time": "2023-02-12 10:56",
995
- "formData": {
996
- "marker": "name_1",
997
- "value": "Name"
998
- },
999
- "attributeSetIdentifier": "test-form"
1000
- }
1076
+ ```js
1077
+ const value = await Events.subscribeByMarker('test_event', 1, 1)
1001
1078
  ```
1002
1079
 
1003
- <details>
1004
- <summary>Schema</summary>
1080
+ > This method unsubscribes to the product event. Returns nothing if the unsubscription was successful.
1005
1081
 
1006
- **id:** number <br>
1007
- *object identifier* <br>
1008
- example: 1764 <br>
1009
1082
 
1010
- **formIdentifier:** string <br>
1011
- *Text identifier of the form object (marker)* <br>
1012
- example: my-form <br>
1013
-
1014
- **time:** Date <br>
1015
- *Date and time of form modification* <br>
1016
- example: 2023-02-12 10:56 <br>
1017
-
1018
- **formData:** FormDataLangType <br>
1019
- *Data submitted by the form* <br>
1020
- example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
1021
-
1022
- **attributeSetIdentifier:** string <br>
1023
- *text identifier (marker) of the used attribute set* <br>
1024
- example: test-form <br>
1025
-
1026
- </details>
1027
-
1028
-
1029
- ### FormData.getFormsDataByMarker(marker, langCode, offset, limit)
1083
+ ### Events.unsubscribeByMarker(marker, userId, productId)
1030
1084
 
1031
1085
  ```js
1032
- const value = await FormData.getFormsDataByMarker('my-marker', 'en_US', 0, 30)
1033
- ```
1034
-
1035
- > 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.
1036
-
1037
- Example return:
1038
-
1039
- ```json
1040
- {
1041
- "id": 1764,
1042
- "formIdentifier": "my-form",
1043
- "time": "2023-02-12 10:56",
1044
- "formData": {
1045
- "marker": "name_1",
1046
- "value": "Name"
1047
- },
1048
- "attributeSetIdentifier": "test-form"
1049
- }
1086
+ const value = await Events.subscribeByMarker('test_event', 1, 1)
1050
1087
  ```
1051
1088
 
1052
- <details>
1053
- <summary>Schema</summary>
1054
-
1055
- **id:** number <br>
1056
- *object identifier* <br>
1057
- example: 1764 <br>
1058
-
1059
- **formIdentifier:** string <br>
1060
- *Text identifier of the form object (marker)* <br>
1061
- example: my-form <br>
1062
-
1063
- **time:** Date <br>
1064
- *Date and time of form modification* <br>
1065
- example: 2023-02-12 10:56 <br>
1066
-
1067
- **formData:** FormDataLangType <br>
1068
- *Data submitted by the form* <br>
1069
- example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
1070
-
1071
- **attributeSetIdentifier:** string <br>
1072
- *text identifier (marker) of the used attribute set* <br>
1073
- example: test-form <br>
1074
-
1075
- </details>
1089
+ > This method subscribes to the product event. Returns nothing if the subscription was successful.
1076
1090
 
1077
1091
  ---
1078
1092
 
1079
1093
 
1080
- ## <h2 id="generaltypes"> GeneralTypes </h2>
1094
+ ## <h2 id="fileuploading"> FileUploading </h2>
1081
1095
 
1082
1096
  ```js
1083
- const { GeneralTypes } = defineOneEntry('your-url');
1097
+ const { FileUploading } = defineOneEntry('your-url');
1084
1098
  ```
1085
1099
 
1086
- ### GeneralTypes.getAllTypes()
1100
+ ### FileUploading.upload(data, fileQuery)
1087
1101
 
1088
1102
  ```js
1089
- const value = await GeneralTypes.getAllTypes()
1103
+ const query = {
1104
+ type:"page",
1105
+ entity:"editor",
1106
+ id:3787,
1107
+ width:0,
1108
+ height:0,
1109
+ compress:true,
1110
+ }
1111
+
1112
+ const value = await FileUploading.upload(data, query)
1090
1113
  ```
1091
1114
 
1092
- > This method retrieves all objects of type GeneralTypeEntity from the API. It returns a Promise that resolves to an array of GeneralTypeEntity objects.
1115
+ > This method uploads a file to a cloud file storage. Pass to the date the value obtained from input type "file".
1116
+ > Data is file object (or array), learn more - [File Object](https://developer.mozilla.org/en-US/docs/Web/API/File)
1093
1117
 
1094
1118
  Example return:
1095
1119
 
1096
1120
  ```json
1097
1121
  [
1098
1122
  {
1099
- "id": 1,
1100
- "type": "forNewsPage"
1123
+ "filename": "string",
1124
+ "downloadLink": "string",
1125
+ "size": 0
1101
1126
  }
1102
1127
  ]
1103
1128
  ```
1129
+
1104
1130
  <details>
1105
1131
  <summary>Schema</summary>
1106
1132
 
1107
- **id:** number <br>
1108
- *object identifier* <br>
1109
- example: 1764 <br>
1133
+ **filename:** string <br>
1134
+ *filename with relative path* <br>
1110
1135
 
1111
- **type:** string <br>
1112
- *type value* <br>
1113
- example: forNewsPage <br>
1114
- Enum:
1115
- [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
1136
+ **downloadLink:** string <br>
1137
+ *link for downloading the file* <br>
1116
1138
 
1117
- </details>
1118
- ---
1139
+ **size** number <br>
1140
+ *size of the file in bytes* <br>
1119
1141
 
1142
+ </details>
1120
1143
 
1121
- ## <h2 id="locales"> Locales </h2>
1144
+ ### FileUploading.delete(filename, fileQuery)
1122
1145
 
1123
1146
  ```js
1124
- const { Locales } = defineOneEntry('your-url');
1147
+ const query = {
1148
+ type:"page",
1149
+ entity:"editor",
1150
+ id:3787
1151
+ }
1152
+
1153
+
1154
+ const value = await FileUploading.delete("file.png", query)
1125
1155
  ```
1126
1156
 
1127
- ### Locales.getLocales()
1157
+ > This void method delete a file from the cloud file storage.
1158
+
1159
+ ### FileUploading.getFile(id, type, entity, filename)
1128
1160
 
1129
1161
  ```js
1130
- const value = await Locales.getLocales()
1162
+ const value = await FileUploading.getFile(123, 'page', 'editor', 'file.png')
1131
1163
  ```
1132
1164
 
1133
- > This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.
1165
+ > This method return file object by parameters.
1134
1166
 
1135
1167
  Example return:
1136
1168
 
1137
1169
  ```json
1138
- [
1139
- {
1140
- "id": 1764,
1141
- "shortCode": "en",
1142
- "code": "en_US",
1143
- "name": "Bengali",
1144
- "nativeName": "বাংলা",
1145
- "isActive": false,
1146
- "image": "🇦🇨",
1147
- "position": 1
1148
- }
1149
- ]
1170
+ {
1171
+ "file": "string"
1172
+ }
1150
1173
  ```
1151
1174
 
1152
- <details>
1153
- <summary>Schema</summary>
1154
-
1155
- **id:** number <br>
1156
- *object identifier* <br>
1157
- example: 1764 <br>
1158
-
1159
- **shortCode:** string <br>
1160
- *language code (short)* <br>
1161
- example: en <br>
1162
-
1163
- **code:** string <br>
1164
- *language code with country code* <br>
1165
- example: en_US <br>
1166
-
1167
- **name** string <br>
1168
- *Language name (in English)* <br>
1169
- example: Bengali <br>
1170
-
1171
- **nativeName** string <br>
1172
- *Language name (in native language)* <br>
1173
- example: বাংলা <br>
1174
-
1175
- **isActive:** boolean <br>
1176
- *Flag of usage* <br>
1177
- example: false <br>
1178
-
1179
- **image:** string <br>
1180
- *Graphic image of the language (under development)* <br>
1181
- example: 🇦🇨 <br>
1182
-
1183
- **position:** {
1184
- description:position number
1185
- } <br>
1186
- </details>
1187
1175
  ---
1188
1176
 
1189
1177
 
1190
1178
 
1191
- ## <h2 id="markers"> Markers </h2>
1179
+ ## <h2 id="forms"> Forms </h2>
1192
1180
 
1193
1181
 
1194
1182
  ```js
1195
- const { Markers } = defineOneEntry('your-url');
1183
+ const { Forms } = defineOneEntry('your-url');
1196
1184
  ```
1197
1185
 
1198
- ### Markers.getMarkers(offset, limit)
1186
+ ### Forms.getAllForms(langCode, offset, limit)
1199
1187
 
1200
1188
  ```js
1201
- const value = await Markers.getMarkers(0, 30)
1189
+ const value = await Forms.getAllForms('en_US', 0, 30)
1202
1190
  ```
1203
1191
 
1204
- >This method return an array of all objects MarkerEntity.
1192
+ > This method retrieves all form objects from the API. It returns a Promise that resolves to an array of FormEntity objects.
1205
1193
 
1206
1194
  Example return:
1207
1195
 
1208
1196
  ```json
1209
1197
  [
1210
1198
  {
1211
- "id": 17,
1212
- "updatedDate": "2023-12-18T08:53:37.422Z",
1199
+ "id": 1764,
1200
+ "attributeSetId": 0,
1201
+ "processingType": "email",
1202
+ "localizeInfos": {
1203
+ "title": "My Form",
1204
+ "titleForSite": "",
1205
+ "successMessage": "",
1206
+ "unsuccessMessage": "",
1207
+ "urlAddress": "",
1208
+ "database": "0",
1209
+ "script": "0"
1210
+ },
1211
+ "processingData": "Unknown Type: ProcessingData",
1213
1212
  "version": 10,
1214
1213
  "identifier": "catalog",
1215
- "name": "string",
1216
- "marker": "string",
1217
- "localizeInfos": {
1218
- "title": "My marker"
1219
- }
1214
+ "position": 192,
1215
+ "attributes": [
1216
+ {
1217
+ "type": "list",
1218
+ "marker": "l1",
1219
+ "position": 2,
1220
+ "listTitles": [
1221
+ {
1222
+ "title": "red",
1223
+ "value": 1,
1224
+ "position": 1,
1225
+ "extendedValue": null,
1226
+ "extendedValueType": null
1227
+ },
1228
+ {
1229
+ "title": "yellow",
1230
+ "value": 2,
1231
+ "position": 2,
1232
+ "extendedValue": null,
1233
+ "extendedValueType": null
1234
+ }
1235
+ ],
1236
+ "validators": {},
1237
+ "localizeInfos": {
1238
+ "title": "l1"
1239
+ }
1240
+ }
1241
+ ]
1220
1242
  }
1221
1243
  ]
1222
1244
  ```
1223
-
1224
1245
  <details>
1225
1246
  <summary>Schema</summary>
1226
1247
 
@@ -1228,53 +1249,99 @@ Example return:
1228
1249
  *object identifier* <br>
1229
1250
  example: 1764 <br>
1230
1251
 
1231
- **updatedDate:** string($date-time) <br>
1232
- *object modification date* <br>
1252
+ **attributeSetId:** number <br>
1253
+ *identifier of the attribute set used* <br>
1254
+
1255
+ **processingType:** string <br>
1256
+ *form processing type* <br>
1257
+ example: email <br>
1258
+
1259
+ **localizeInfos:** FormLocalizeInfos <br>
1260
+ *form name with localization* <br>
1261
+ Enum:
1262
+ [ db, email, script ]
1263
+ example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } } <br>
1264
+
1265
+ **processingData:** ProcessingData <br>
1266
+ *form data* <br>
1233
1267
 
1234
1268
  **version:** number <br>
1235
- *version number of the object change* <br>
1269
+ *object version number* <br>
1236
1270
  example: 10 <br>
1237
1271
 
1238
- **identifier?:** string <br>
1239
- *textual identifier for a record field* <br>
1272
+ **identifier:** string <br>
1273
+ *textual identifier for the record field* <br>
1240
1274
  example: catalog <br>
1275
+ default: marker <br>
1241
1276
 
1242
- **name?:** string <br>
1243
- *name* <br>
1277
+ **position:** number <br>
1278
+ *position number (for sorting)* <br>
1279
+ example: 192 <br>
1244
1280
 
1245
- **marker?:** string <br>
1246
- *textual identifier* <br>
1281
+ **attributes:** <br>
1282
+ *array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
1283
+ 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" } } ] <br>
1247
1284
 
1248
- **localizeInfos:** CommonLocalizeInfos <br>
1249
- *localized marker name* <br>
1250
- example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } } <br>
1251
1285
  </details>
1252
1286
 
1253
1287
 
1254
- ### Markers.getMarkerById(id)
1288
+ ### Forms.getFormByMarker(marker, langCode)
1255
1289
 
1256
1290
  ```js
1257
- const value = await Markers.getMarkerById(1)
1291
+ const value = await Forms.getFormByMarker('My form', 'en_US')
1258
1292
  ```
1259
1293
 
1260
- >This method return one object of MarkerEntity by id.
1294
+ > 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.
1261
1295
 
1262
1296
  Example return:
1263
1297
 
1264
1298
  ```json
1265
1299
  {
1266
- "id": 17,
1267
- "updatedDate": "2023-12-18T08:55:22.581Z",
1300
+ "id": 1764,
1301
+ "attributeSetId": 0,
1302
+ "processingType": "email",
1303
+ "localizeInfos": {
1304
+ "title": "My Form",
1305
+ "titleForSite": "",
1306
+ "successMessage": "",
1307
+ "unsuccessMessage": "",
1308
+ "urlAddress": "",
1309
+ "database": "0",
1310
+ "script": "0"
1311
+ },
1312
+ "processingData": "Unknown Type: ProcessingData",
1268
1313
  "version": 10,
1269
1314
  "identifier": "catalog",
1270
- "name": "string",
1271
- "marker": "string",
1272
- "localizeInfos": {
1273
- "title": "My marker"
1274
- }
1315
+ "position": 192,
1316
+ "attributes": [
1317
+ {
1318
+ "type": "list",
1319
+ "marker": "l1",
1320
+ "position": 2,
1321
+ "listTitles": [
1322
+ {
1323
+ "title": "red",
1324
+ "value": 1,
1325
+ "position": 1,
1326
+ "extendedValue": null,
1327
+ "extendedValueType": null
1328
+ },
1329
+ {
1330
+ "title": "yellow",
1331
+ "value": 2,
1332
+ "position": 2,
1333
+ "extendedValue": null,
1334
+ "extendedValueType": null
1335
+ }
1336
+ ],
1337
+ "validators": {},
1338
+ "localizeInfos": {
1339
+ "title": "l1"
1340
+ }
1341
+ }
1342
+ ]
1275
1343
  }
1276
1344
  ```
1277
-
1278
1345
  <details>
1279
1346
  <summary>Schema</summary>
1280
1347
 
@@ -1282,177 +1349,855 @@ Example return:
1282
1349
  *object identifier* <br>
1283
1350
  example: 1764 <br>
1284
1351
 
1285
- **updatedDate:** string($date-time) <br>
1286
- *object modification date* <br>
1352
+ **attributeSetId:** number <br>
1353
+ *identifier of the attribute set used* <br>
1354
+
1355
+ **processingType:** string <br>
1356
+ *form processing type* <br>
1357
+ example: email <br>
1358
+
1359
+ **localizeInfos:** FormLocalizeInfos <br>
1360
+ *form name with localization* <br>
1361
+ Enum:
1362
+ [ db, email, script ]
1363
+ example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } } <br>
1364
+
1365
+ **processingData:** ProcessingData <br>
1366
+ *form data* <br>
1287
1367
 
1288
1368
  **version:** number <br>
1289
- *version number of the object change* <br>
1369
+ *object version number* <br>
1290
1370
  example: 10 <br>
1291
1371
 
1292
- **identifier?:** string <br>
1293
- *textual identifier for a record field* <br>
1372
+ **identifier:** string <br>
1373
+ *textual identifier for the record field* <br>
1294
1374
  example: catalog <br>
1375
+ default: marker <br>
1295
1376
 
1296
- **name?:** string <br>
1297
- *name* <br>
1377
+ **position:** number <br>
1378
+ *position number (for sorting)* <br>
1379
+ example: 192 <br>
1298
1380
 
1299
- **marker?:** string <br>
1300
- *textual identifier* <br>
1381
+ **attributes:** <br>
1382
+ *array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
1383
+ 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" } } ] <br>
1301
1384
 
1302
- **localizeInfos:** CommonLocalizeInfos <br>
1303
- *localized marker name* <br>
1304
- example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } } <br>
1305
1385
  </details>
1306
1386
 
1307
- ### Markers.getMarkerByMarker(marker)
1387
+ ---
1388
+
1389
+
1390
+ ## <h2 id="formdata"> FormData </h2>
1308
1391
 
1309
1392
  ```js
1310
- const value = await Markers.getMarkerByMarker('my-marker')
1393
+ const { FormData } = defineOneEntry('your-url');
1311
1394
  ```
1312
1395
 
1313
- >This method return one object of MarkerEntity by marker.
1396
+ Methods with a post request accept as the request body an object with the form data field, which corresponds to the type of information being sent.
1397
+ The following are examples of form data objects for different data types.
1314
1398
 
1315
- Example return:
1399
+ ---
1400
+ Example with a simple type attribute "string", "number", "float"
1401
+ ```json
1402
+ {
1403
+ "marker": "last_name",
1404
+ "type": "string",
1405
+ "value": "Username"
1406
+ }
1407
+ ```
1316
1408
 
1409
+ ---
1410
+ Example with a simple type attribute "date", "dateTime", "time"
1317
1411
  ```json
1318
1412
  {
1319
- "id": 17,
1320
- "updatedDate": "2023-12-18T08:59:42.006Z",
1321
- "version": 10,
1322
- "identifier": "catalog",
1323
- "name": "string",
1324
- "marker": "string",
1325
- "localizeInfos": {
1326
- "title": "My marker"
1413
+ "marker": "birthday",
1414
+ "type": "date",
1415
+ "value": {
1416
+ "fullDate": "2024-05-07T21:02:00.000Z",
1417
+ "formattedValue": "08-05-2024 00:02",
1418
+ "formatString": "DD-MM-YYYY HH:mm"
1327
1419
  }
1328
1420
  }
1329
1421
  ```
1330
1422
 
1331
- <details>
1332
- <summary>Schema</summary>
1423
+ ---
1424
+ Example with a simple type attribute "text"
1425
+ ```json
1426
+ {
1427
+ "marker": "about",
1428
+ "type": "text",
1429
+ "value": {
1430
+ "htmlValue": "<p>Hello world</p>",
1431
+ "plainValue": "",
1432
+ "params": {
1433
+ "isEditorDisabled": false,
1434
+ "isImageCompressed": true
1435
+ }
1436
+ }
1437
+ }
1438
+ ```
1333
1439
 
1334
- **id:** number <br>
1335
- *object identifier* <br>
1336
- example: 1764 <br>
1440
+ ---
1441
+ Example with a simple type attribute "text"
1442
+ ```json
1443
+ {
1444
+ "marker": "about",
1445
+ "type": "text",
1446
+ "value": {
1447
+ "htmlValue": "<p>Hello world</p>",
1448
+ "plainValue": "",
1449
+ "params": {
1450
+ "isEditorDisabled": false,
1451
+ "isImageCompressed": true
1452
+ }
1453
+ }
1454
+ }
1455
+ ```
1337
1456
 
1338
- **updatedDate:** string($date-time) <br>
1339
- *object modification date* <br>
1457
+ ---
1458
+ Example with a simple type attribute "textWithHeader"
1459
+ ```json
1460
+ {
1461
+ "marker": "about",
1462
+ "type": "textWithHeader",
1463
+ "value": {
1464
+ "header": "Headline",
1465
+ "htmlValue": "<p>Hello World</p>",
1466
+ "plainValue": "",
1467
+ "params": {
1468
+ "isEditorDisabled": false,
1469
+ "isImageCompressed": true
1470
+ }
1471
+ }
1472
+ }
1473
+ ```
1340
1474
 
1341
- **version:** number <br>
1342
- *version number of the object change* <br>
1343
- example: 10 <br>
1475
+ ---
1476
+ Example with a simple type attribute "image" or "groupOfImages"
1477
+ ```json
1478
+ {
1479
+ "marker": "avatar",
1480
+ "type": "image",
1481
+ "value": [
1482
+ {
1483
+ "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
1484
+ "downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
1485
+ "size": 392585,
1486
+ "previewLink": "",
1487
+ "params": {
1488
+ "isImageCompressed": true
1489
+ }
1490
+ }
1491
+ ]
1492
+ }
1493
+ ```
1344
1494
 
1345
- **identifier?:** string <br>
1346
- *textual identifier for a record field* <br>
1347
- example: catalog <br>
1495
+ ---
1496
+ Example with a simple type attribute "files"
1497
+ ```json
1498
+ {
1499
+ "marker": "picture",
1500
+ "type": "file",
1501
+ "value": [
1502
+ {
1503
+ "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
1504
+ "downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
1505
+ "size": 392585
1506
+ }
1507
+ ]
1508
+ }
1509
+ ```
1348
1510
 
1349
- **name?:** string <br>
1350
- *name* <br>
1511
+ ---
1512
+ Example with a simple type attribute "radioButton" or "list"
1513
+ ```json
1514
+ {
1515
+ "marker": "selector",
1516
+ "type": "list",
1517
+ "value": [
1518
+ {
1519
+ "title": "red",
1520
+ "value": "1",
1521
+ "extended": {
1522
+ "value": "красный",
1523
+ "type": "string"
1524
+ }
1525
+ }
1526
+ ]
1527
+ }
1528
+ ```
1351
1529
 
1352
- **marker?:** string <br>
1353
- *textual identifier* <br>
1354
1530
 
1355
- **localizeInfos:** CommonLocalizeInfos <br>
1356
- *localized marker name* <br>
1357
- example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } } <br>
1358
- </details>
1359
1531
 
1360
- ---
1532
+ ### FormData.postFormsData(data, langCode)
1361
1533
 
1362
- ## <h2 id="menus"> Menus </h2>
1534
+ ```js
1535
+ const body = {
1536
+ formIdentifier: 'test',
1537
+ formData: {
1538
+ marker: 'test',
1539
+ value: 'Test',
1540
+ },
1541
+ }
1542
+
1543
+ const value = await FormData.postFormsData(body)
1544
+ ```
1363
1545
 
1546
+ > This method retrieves all form data objects from the API. It returns a Promise that resolves to an array of objects of type CreateFormData. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
1364
1547
 
1365
- ```js
1366
- const { Menus } = defineOneEntry('your-url')
1548
+
1549
+
1550
+ Example return:
1551
+
1552
+ ```json
1553
+ {
1554
+ "id": 1764,
1555
+ "formIdentifier": "my-form",
1556
+ "time": "2023-02-12 10:56",
1557
+ "formData": {
1558
+ "marker": "name_1",
1559
+ "value": "Name"
1560
+ }
1561
+ }
1367
1562
  ```
1563
+ <details>
1564
+ <summary>Schema</summary>
1368
1565
 
1369
- ### Menus.getMenusByMarker(marker)
1566
+ **id:** number <br>
1567
+ *object identifier* <br>
1568
+ example: 1764 <br>
1569
+
1570
+ **formIdentifier:** string <br>
1571
+ *Text identifier of the form object (marker)* <br>
1572
+ example: my-form <br>
1573
+
1574
+ **time:** Date <br>
1575
+ *Date and time of form modification* <br>
1576
+ example: 2023-02-12 10:56 <br>
1577
+
1578
+ **formData:** FormDataLangType <br>
1579
+ *Data submitted by the form* <br>
1580
+ example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
1581
+
1582
+ </details>
1583
+
1584
+ ### FormData.getFormsData(langCode, offset, limit)
1370
1585
 
1371
1586
  ```js
1372
- const value = await Menus.getMenusByMarker('my-marker')
1587
+ const value = await FormData.getFormsData('en_US', 0, 30)
1373
1588
  ```
1374
1589
 
1375
- > 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.
1590
+ > 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.
1376
1591
 
1377
1592
  Example return:
1378
1593
 
1379
1594
  ```json
1380
1595
  {
1381
1596
  "id": 1764,
1382
- "identifier": "catalog",
1383
- "localizeInfos": {
1384
- "title": "Main Menu"
1597
+ "formIdentifier": "my-form",
1598
+ "time": "2023-02-12 10:56",
1599
+ "formData": {
1600
+ "marker": "name_1",
1601
+ "value": "Name"
1385
1602
  },
1386
- "pages": [
1387
- {
1388
- "id": 11,
1389
- "pageUrl": "122",
1390
- "localizeInfos": {
1391
- "title": "12",
1392
- "content": "",
1393
- "menuTitle": "12"
1394
- },
1395
- "position": 0,
1396
- "parentId": null
1397
- }
1398
- ]
1603
+ "attributeSetIdentifier": "test-form"
1399
1604
  }
1400
1605
  ```
1606
+ ---
1401
1607
 
1402
1608
  <details>
1403
1609
  <summary>Schema</summary>
1404
1610
 
1405
- **id:** number <br>
1406
- *object identifier* <br>
1407
- example: 1764 <br>
1611
+ **id:** number <br>
1612
+ *object identifier* <br>
1613
+ example: 1764 <br>
1614
+
1615
+ **formIdentifier:** string <br>
1616
+ *Text identifier of the form object (marker)* <br>
1617
+ example: my-form <br>
1618
+
1619
+ **time:** Date <br>
1620
+ *Date and time of form modification* <br>
1621
+ example: 2023-02-12 10:56 <br>
1622
+
1623
+ **formData:** FormDataLangType <br>
1624
+ *Data submitted by the form* <br>
1625
+ example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
1626
+
1627
+ **attributeSetIdentifier:** string <br>
1628
+ *text identifier (marker) of the used attribute set* <br>
1629
+ example: test-form <br>
1630
+
1631
+ </details>
1632
+
1633
+
1634
+ ### FormData.getFormsDataByMarker(marker, langCode, offset, limit)
1635
+
1636
+ ```js
1637
+ const value = await FormData.getFormsDataByMarker('my-marker', 'en_US', 0, 30)
1638
+ ```
1639
+
1640
+ > 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.
1641
+
1642
+ Example return:
1643
+
1644
+ ```json
1645
+ {
1646
+ "id": 1764,
1647
+ "formIdentifier": "my-form",
1648
+ "time": "2023-02-12 10:56",
1649
+ "formData": {
1650
+ "marker": "name_1",
1651
+ "value": "Name"
1652
+ },
1653
+ "attributeSetIdentifier": "test-form"
1654
+ }
1655
+ ```
1656
+
1657
+ <details>
1658
+ <summary>Schema</summary>
1659
+
1660
+ **id:** number <br>
1661
+ *object identifier* <br>
1662
+ example: 1764 <br>
1663
+
1664
+ **formIdentifier:** string <br>
1665
+ *Text identifier of the form object (marker)* <br>
1666
+ example: my-form <br>
1667
+
1668
+ **time:** Date <br>
1669
+ *Date and time of form modification* <br>
1670
+ example: 2023-02-12 10:56 <br>
1671
+
1672
+ **formData:** FormDataLangType <br>
1673
+ *Data submitted by the form* <br>
1674
+ example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
1675
+
1676
+ **attributeSetIdentifier:** string <br>
1677
+ *text identifier (marker) of the used attribute set* <br>
1678
+ example: test-form <br>
1679
+
1680
+ </details>
1681
+
1682
+ ---
1683
+
1684
+
1685
+ ## <h2 id="generaltypes"> GeneralTypes </h2>
1686
+
1687
+ ```js
1688
+ const { GeneralTypes } = defineOneEntry('your-url');
1689
+ ```
1690
+
1691
+ ### GeneralTypes.getAllTypes()
1692
+
1693
+ ```js
1694
+ const value = await GeneralTypes.getAllTypes()
1695
+ ```
1696
+
1697
+ > This method retrieves all objects of type GeneralTypeEntity from the API. It returns a Promise that resolves to an array of GeneralTypeEntity objects.
1698
+
1699
+ Example return:
1700
+
1701
+ ```json
1702
+ [
1703
+ {
1704
+ "id": 1,
1705
+ "type": "forNewsPage"
1706
+ }
1707
+ ]
1708
+ ```
1709
+ <details>
1710
+ <summary>Schema</summary>
1711
+
1712
+ **id:** number <br>
1713
+ *object identifier* <br>
1714
+ example: 1764 <br>
1715
+
1716
+ **type:** string <br>
1717
+ *type value* <br>
1718
+ example: forNewsPage <br>
1719
+ Enum:
1720
+ [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
1721
+
1722
+ </details>
1723
+ ---
1724
+
1725
+
1726
+ ## <h2 id="locales"> Locales </h2>
1727
+
1728
+ ```js
1729
+ const { Locales } = defineOneEntry('your-url');
1730
+ ```
1731
+
1732
+ ### Locales.getLocales()
1733
+
1734
+ ```js
1735
+ const value = await Locales.getLocales()
1736
+ ```
1737
+
1738
+ > This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.
1739
+
1740
+ Example return:
1741
+
1742
+ ```json
1743
+ [
1744
+ {
1745
+ "id": 1764,
1746
+ "shortCode": "en",
1747
+ "code": "en_US",
1748
+ "name": "Bengali",
1749
+ "nativeName": "বাংলা",
1750
+ "isActive": false,
1751
+ "image": "🇦🇨",
1752
+ "position": 1
1753
+ }
1754
+ ]
1755
+ ```
1756
+
1757
+ <details>
1758
+ <summary>Schema</summary>
1759
+
1760
+ **id:** number <br>
1761
+ *object identifier* <br>
1762
+ example: 1764 <br>
1763
+
1764
+ **shortCode:** string <br>
1765
+ *language code (short)* <br>
1766
+ example: en <br>
1767
+
1768
+ **code:** string <br>
1769
+ *language code with country code* <br>
1770
+ example: en_US <br>
1771
+
1772
+ **name** string <br>
1773
+ *Language name (in English)* <br>
1774
+ example: Bengali <br>
1775
+
1776
+ **nativeName** string <br>
1777
+ *Language name (in native language)* <br>
1778
+ example: বাংলা <br>
1779
+
1780
+ **isActive:** boolean <br>
1781
+ *Flag of usage* <br>
1782
+ example: false <br>
1783
+
1784
+ **image:** string <br>
1785
+ *Graphic image of the language (under development)* <br>
1786
+ example: 🇦🇨 <br>
1787
+
1788
+ **position:** {
1789
+ description:position number
1790
+ } <br>
1791
+ </details>
1792
+ ---
1793
+
1794
+
1795
+
1796
+ ## <h2 id="menus"> Menus </h2>
1797
+
1798
+
1799
+ ```js
1800
+ const { Menus } = defineOneEntry('your-url')
1801
+ ```
1802
+
1803
+ ### Menus.getMenusByMarker(marker)
1804
+
1805
+ ```js
1806
+ const value = await Menus.getMenusByMarker('my-marker')
1807
+ ```
1808
+
1809
+ > 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.
1810
+
1811
+ Example return:
1812
+
1813
+ ```json
1814
+ {
1815
+ "id": 1764,
1816
+ "identifier": "catalog",
1817
+ "localizeInfos": {
1818
+ "title": "Main Menu"
1819
+ },
1820
+ "pages": [
1821
+ {
1822
+ "id": 11,
1823
+ "pageUrl": "122",
1824
+ "localizeInfos": {
1825
+ "title": "12",
1826
+ "content": "",
1827
+ "menuTitle": "12"
1828
+ },
1829
+ "position": 0,
1830
+ "parentId": null
1831
+ }
1832
+ ]
1833
+ }
1834
+ ```
1835
+
1836
+ <details>
1837
+ <summary>Schema</summary>
1838
+
1839
+ **id:** number <br>
1840
+ *object identifier* <br>
1841
+ example: 1764 <br>
1842
+
1843
+ **identifier:** string <br>
1844
+ *textual identifier for a record field* <br>
1845
+ example: catalog <br>
1846
+
1847
+ **localizeInfos** Record<string, any> <br>
1848
+ *json object description of the menu item with the language "en_US" (for example)* <br>
1849
+ example: OrderedMap { "en_US": OrderedMap { "title": "Main Menu" } } <br>
1850
+
1851
+ **pages:** <br>
1852
+ *data of the pages included in the menu* <br>
1853
+ 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 } ] <br>
1854
+ </details>
1855
+
1856
+ ---
1857
+
1858
+
1859
+
1860
+ ## <h2 id="orders"> Orders </h2>
1861
+
1862
+ ```js
1863
+ const { Orders } = defineOneEntry('your-url');
1864
+ ```
1865
+
1866
+ ### Orders.getOrderByMarker(marker, langCode)
1867
+
1868
+ ```js
1869
+ const value = await Orders.getOrderByMarker('my-order', 'en_US')
1870
+ ```
1871
+
1872
+ > This method retrieves one order storage object by marker.
1873
+
1874
+ Example return:
1875
+ ```json
1876
+ {
1877
+ "id": 1764,
1878
+ "localizeInfos": {
1879
+ "title": "Order 1"
1880
+ },
1881
+ "identifier": "catalog",
1882
+ "generalTypeId": 4,
1883
+ "formIdentifier": "catalog-form",
1884
+ "paymentAccountIdentifiers": [
1885
+ {
1886
+ "identifier": "p1"
1887
+ }
1888
+ ]
1889
+ }
1890
+ ```
1891
+ <details>
1892
+ <summary>Schema</summary>
1893
+
1894
+ **id:** number <br>
1895
+ *object identifier* <br>
1896
+ example: 1764 <br>
1897
+
1898
+ **localizeInfos:** Record<string, any> <br>
1899
+ *json description of the main page data object taking into account the language "en_US" (for example)* <br>
1900
+ example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
1901
+
1902
+ **identifier** string <br>
1903
+ *textual identifier for the record field* <br>
1904
+ example: catalog <br>
1905
+
1906
+ **generalTypeId** number <br>
1907
+ *type identifier* <br>
1908
+ example: 4 <br>
1909
+
1910
+ **formIdentifier** string <br>
1911
+ *textual identifier for the form used by the order storage* <br>
1912
+ example: catalog-form <br>
1913
+
1914
+ **paymentAccountIdentifiers** Array<{identifier:string} <br>
1915
+ *array of textual identifiers of payment accounts used by the order storage* <br>
1916
+ example: [{ "identifier": "p1" }] <br>
1917
+
1918
+ </details>
1919
+
1920
+
1921
+ ### Orders.createOrder(marker, data, langCode)
1922
+
1923
+ ```js
1924
+ const body = {
1925
+ "formIdentifier": "order_form",
1926
+ "paymentAccountIdentifier": "stripe",
1927
+ "currency": "USD",
1928
+ "formData": [
1929
+ {
1930
+ "marker": "name_order",
1931
+ "value": "Alex"
1932
+ },
1933
+ {
1934
+ "marker": "phone_order",
1935
+ "value": "+19999999999"
1936
+ },
1937
+ {
1938
+ "marker": "email_order",
1939
+ "value": "example@oneentry.cloud"
1940
+ }
1941
+ ],
1942
+ "products": [
1943
+ {
1944
+ "productId": 444,
1945
+ "quantity": 1,
1946
+ "price": "0.1"
1947
+ },
1948
+ {
1949
+ "productId": 446,
1950
+ "quantity": 3,
1951
+ "price": "123"
1952
+ }
1953
+ ]
1954
+ }
1955
+
1956
+ const value = await Orders.createOrder('my-order', body)
1957
+ ```
1958
+
1959
+ > This method retrieves one order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
1960
+
1961
+ Example return:
1962
+ ```json
1963
+ {
1964
+ "id": 17,
1965
+ "statusIdentifier": "inprogress",
1966
+ "formIdentifier": "order-form",
1967
+ "paymentIdentifier": "payment-1",
1968
+ "formData": [
1969
+ {
1970
+ "marker": "name_1",
1971
+ "value": "Name"
1972
+ }
1973
+ ],
1974
+ "products": [
1975
+ {
1976
+ "id": 1,
1977
+ "title": "Floorwood Maxima Laminate, 9811 Oak Mistral",
1978
+ "sku": null,
1979
+ "price": "1.00",
1980
+ "quantity": 10,
1981
+ "previewImage": [
1982
+ {
1983
+ "filename": "files/project/page/36/image/20240322_77c83b02-4c82-4bea-80eb-3763c469b00e.jpg",
1984
+ "downloadLink": "http://my-site.com/files/project/page/36/image/20240322_77c83b02-4c82-4bea-80eb-3763c469b00e.jpg",
1985
+ "size": 296391,
1986
+ "previewLink": ""
1987
+ }
1988
+ ]
1989
+ }
1990
+ ],
1991
+ "totalSum": "12.00",
1992
+ "currency": "USD",
1993
+ "createdDate": "2023-01-01 12:12",
1994
+ "paymentAccountIdentifier": "payment-1",
1995
+ "paymentAccountLocalizeInfos": {
1996
+ "title": "Account 1"
1997
+ }
1998
+ }
1999
+ ```
2000
+ <details>
2001
+ <summary>Schema</summary>
2002
+
2003
+ **statusIdentifier:** string <br>
2004
+ *text identifier of the order status* <br>
2005
+ example: inprogress <br>
2006
+
2007
+ **formIdentifier:** string <br>
2008
+ *text identifier of the form status* <br>
2009
+ example: order-form <br>
2010
+
2011
+ **paymentIdentifier** string <br>
2012
+ *text identifier of the order payment* <br>
2013
+ example: payment-1 <br>
2014
+
2015
+ **formData** FormDataType <br>
2016
+ *data submitted by the form linked to the order store* <br>
2017
+ example: [{ "marker": "name_1", "value": "Name" } ] <br>
2018
+
2019
+ **products** Record<string, string | any>[] <br>
2020
+ *array of products added to order* <br>
2021
+
2022
+ **totalSum** string <br>
2023
+ *total order amount* <br>
2024
+ example: 12.00 <br>
2025
+
2026
+ **currency** string <br>
2027
+ *currency used to pay for the order* <br>
2028
+ example: USD <br>
2029
+
2030
+ **createdDate** string <br>
2031
+ *date when the order was created* <br>
2032
+ example: 2023-01-01 12:12 <br>
2033
+
2034
+ **price** number <br>
2035
+ *price of the product per unit (at the time of ordering)* <br>
2036
+ example: 20.00 <br>
2037
+
2038
+ **paymentAccountIdentifier** string <br>
2039
+ *textual identifier for the order payment* <br>
2040
+ example: payment-1 <br>
2041
+
2042
+ **paymentAccountLocalizeInfos** CommonLocalizeInfos <br>
2043
+ *payment account name considering localization* <br>
2044
+ example: { "title": "Account 1" } <br>
2045
+ </details>
2046
+
2047
+
2048
+ ### Orders.updateOrderByMarkerAndId(marker, data, langCode)
2049
+
2050
+ ```js
2051
+ const body = {
2052
+ "formIdentifier": "order_form",
2053
+ "paymentAccountIdentifier": "stripe",
2054
+ "currency": "USD",
2055
+ "formData": [
2056
+ {
2057
+ "marker": "name_order",
2058
+ "value": "Alex"
2059
+ },
2060
+ {
2061
+ "marker": "phone_order",
2062
+ "value": "+19999999999"
2063
+ },
2064
+ {
2065
+ "marker": "email_order",
2066
+ "value": "example@oneentry.cloud"
2067
+ }
2068
+ ],
2069
+ "products": [
2070
+ {
2071
+ "productId": 444,
2072
+ "quantity": 1,
2073
+ "price": "0.1"
2074
+ },
2075
+ {
2076
+ "productId": 446,
2077
+ "quantity": 3,
2078
+ "price": "123"
2079
+ }
2080
+ ]
2081
+ }
2082
+
2083
+ const value = await Orders.updateOrderByMarkerAndId('my-order', body)
2084
+ ```
2085
+
2086
+ > This method update one order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
2087
+
2088
+ Example return:
2089
+ ```json
2090
+ {
2091
+ "id": 17,
2092
+ "statusIdentifier": "inprogress",
2093
+ "formIdentifier": "order-form",
2094
+ "paymentIdentifier": "payment-1",
2095
+ "formData": [
2096
+ {
2097
+ "marker": "name_1",
2098
+ "value": "Name"
2099
+ }
2100
+ ],
2101
+ "products": [
2102
+ {
2103
+ "id": 1,
2104
+ "title": "Floorwood Maxima Laminate, 9811 Oak Mistral",
2105
+ "sku": null,
2106
+ "price": "1.00",
2107
+ "quantity": 10,
2108
+ "previewImage": [
2109
+ {
2110
+ "filename": "files/project/page/36/image/20240322_77c83b02-4c82-4bea-80eb-3763c469b00e.jpg",
2111
+ "downloadLink": "http://my-site.com/files/project/page/36/image/20240322_77c83b02-4c82-4bea-80eb-3763c469b00e.jpg",
2112
+ "size": 296391,
2113
+ "previewLink": ""
2114
+ }
2115
+ ]
2116
+ }
2117
+ ],
2118
+ "totalSum": "12.00",
2119
+ "currency": "USD",
2120
+ "createdDate": "2023-01-01 12:12",
2121
+ "paymentAccountIdentifier": "payment-1",
2122
+ "paymentAccountLocalizeInfos": {
2123
+ "title": "Account 1"
2124
+ }
2125
+ }
2126
+ ```
2127
+ <details>
2128
+ <summary>Schema</summary>
2129
+
2130
+ **statusIdentifier:** string <br>
2131
+ *text identifier of the order status* <br>
2132
+ example: inprogress <br>
2133
+
2134
+ **formIdentifier:** string <br>
2135
+ *text identifier of the form status* <br>
2136
+ example: order-form <br>
2137
+
2138
+ **paymentIdentifier** string <br>
2139
+ *text identifier of the order payment* <br>
2140
+ example: payment-1 <br>
2141
+
2142
+ **formData** FormDataType <br>
2143
+ *data submitted by the form linked to the order store* <br>
2144
+ example: [{ "marker": "name_1", "value": "Name" } ] <br>
1408
2145
 
1409
- **identifier:** string <br>
1410
- *textual identifier for a record field* <br>
1411
- example: catalog <br>
2146
+ **products** Record<string, string | any>[] <br>
2147
+ *array of products added to order* <br>
1412
2148
 
1413
- **localizeInfos** Record<string, any> <br>
1414
- *json object description of the menu item with the language "en_US" (for example)* <br>
1415
- example: OrderedMap { "en_US": OrderedMap { "title": "Main Menu" } } <br>
2149
+ **totalSum** string <br>
2150
+ *total order amount* <br>
2151
+ example: 12.00 <br>
1416
2152
 
1417
- **pages:** <br>
1418
- *data of the pages included in the menu* <br>
1419
- 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 } ] <br>
1420
- </details>
2153
+ **currency** string <br>
2154
+ *currency used to pay for the order* <br>
2155
+ example: USD <br>
1421
2156
 
1422
- ---
2157
+ **createdDate** string <br>
2158
+ *date when the order was created* <br>
2159
+ example: 2023-01-01 12:12 <br>
1423
2160
 
2161
+ **price** number <br>
2162
+ *price of the product per unit (at the time of ordering)* <br>
2163
+ example: 20.00 <br>
1424
2164
 
2165
+ **paymentAccountIdentifier** string <br>
2166
+ *textual identifier for the order payment* <br>
2167
+ example: payment-1 <br>
1425
2168
 
1426
- ## <h2 id="orders"> Orders </h2>
2169
+ **paymentAccountLocalizeInfos** CommonLocalizeInfos <br>
2170
+ *payment account name considering localization* <br>
2171
+ example: { "title": "Account 1" } <br>
2172
+ </details>
1427
2173
 
1428
- ```js
1429
- const { Orders } = defineOneEntry('your-url');
1430
- ```
1431
2174
 
1432
- ### Orders.getOrderByMarker(marker, langCode)
2175
+ ### Orders.getAllOrders(langCode, limit, offset)
1433
2176
 
1434
2177
  ```js
1435
- const value = await Pages.getOrderByMarker('my-order', 'en_US')
2178
+ const value = await Orders.getAllOrders()
1436
2179
  ```
1437
2180
 
1438
- > This method retrieves one order storage object by marker.
2181
+ > This method getting all the order storage objects. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
1439
2182
 
1440
2183
  Example return:
1441
2184
  ```json
1442
- {
1443
- "id": 1764,
1444
- "localizeInfos": {
1445
- "title": "Order 1"
1446
- },
1447
- "identifier": "catalog",
1448
- "generalTypeId": 4,
1449
- "formIdentifier": "catalog-form",
1450
- "paymentAccountIdentifiers": [
1451
- {
1452
- "identifier": "p1"
1453
- }
1454
- ]
1455
- }
2185
+ [
2186
+ {
2187
+ "id": 1764,
2188
+ "localizeInfos": {
2189
+ "title": "Order 1"
2190
+ },
2191
+ "identifier": "catalog",
2192
+ "generalTypeId": 4,
2193
+ "formIdentifier": "catalog-form",
2194
+ "paymentAccountIdentifiers": [
2195
+ {
2196
+ "identifier": "p1"
2197
+ }
2198
+ ]
2199
+ }
2200
+ ]
1456
2201
  ```
1457
2202
  <details>
1458
2203
  <summary>Schema</summary>
@@ -1484,47 +2229,13 @@ example: [{ "identifier": "p1" }] <br>
1484
2229
  </details>
1485
2230
 
1486
2231
 
1487
- ### Orders.createOrder(marker, data, langCode)
2232
+ ### Orders.getAllOrdersByMarker(marker, langCode)
1488
2233
 
1489
2234
  ```js
1490
- const body = {
1491
- "formIdentifier": "order_form",
1492
- "paymentAccountIdentifier": "stripe",
1493
- "currency": "USD",
1494
- "formData": {
1495
- "en_US": [
1496
- {
1497
- "marker": "name_order",
1498
- "value": "Alex"
1499
- },
1500
- {
1501
- "marker": "phone_order",
1502
- "value": "+19999999999"
1503
- },
1504
- {
1505
- "marker": "email_order",
1506
- "value": "example@oneentry.cloud"
1507
- }
1508
- ]
1509
- },
1510
- "products": [
1511
- {
1512
- "productId": 444,
1513
- "quantity": 1,
1514
- "price": "0.1"
1515
- },
1516
- {
1517
- "productId": 446,
1518
- "quantity": 3,
1519
- "price": "123"
1520
- }
1521
- ]
1522
- }
1523
-
1524
- const value = await Pages.createOrder('my-order', body)
2235
+ const value = await Orders.getAllOrdersByMarker('my-order')
1525
2236
  ```
1526
2237
 
1527
- > This method retrieves one order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
2238
+ > This method getting all order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
1528
2239
 
1529
2240
  Example return:
1530
2241
  ```json
@@ -1559,10 +2270,12 @@ Example return:
1559
2270
  "totalSum": "12.00",
1560
2271
  "currency": "USD",
1561
2272
  "createdDate": "2023-01-01 12:12",
2273
+ "price": 20,
1562
2274
  "paymentAccountIdentifier": "payment-1",
1563
2275
  "paymentAccountLocalizeInfos": {
1564
2276
  "title": "Account 1"
1565
- }
2277
+ },
2278
+ "isHistory": true
1566
2279
  }
1567
2280
  ```
1568
2281
  <details>
@@ -1610,8 +2323,13 @@ example: payment-1 <br>
1610
2323
  **paymentAccountLocalizeInfos** CommonLocalizeInfos <br>
1611
2324
  *payment account name considering localization* <br>
1612
2325
  example: { "title": "Account 1" } <br>
2326
+
2327
+ **isHistory** boolean <br>
2328
+ *indicates that the order has been saved in the order history* <br>
2329
+ example: true <br>
1613
2330
  </details>
1614
2331
 
2332
+
1615
2333
  ---
1616
2334
 
1617
2335
 
@@ -3150,32 +3868,53 @@ Example return:
3150
3868
 
3151
3869
  ```json
3152
3870
  [
3153
- {
3154
- "id": 1764,
3155
- "localizeInfos": {
3156
- "title": "Product"
3157
- },
3158
- "isVisible": true,
3159
- "statusId": 1,
3160
- "relatedIds": [
3161
- 1,
3162
- 2,
3163
- 3
3164
- ],
3165
- "attributeSetId": 7,
3166
- "isSync": true,
3167
- "price": 0,
3168
- "templateIdentifier": "my-template",
3169
- "sku": "0-123",
3170
- "shortDescTemplateIdentifier": "my-template-short",
3171
- "attributeValues": {
3871
+ {
3872
+ "id": 1764,
3873
+ "localizeInfos": {
3874
+ "title": "Product"
3875
+ },
3876
+ "isVisible": true,
3877
+ "statusId": 1,
3878
+ "relatedIds": [
3879
+ 1,
3880
+ 2,
3881
+ 3
3882
+ ],
3883
+ "attributeSetId": 7,
3884
+ "isSync": true,
3885
+ "price": 0,
3886
+ "additional": {
3887
+ "prices": {
3888
+ "min": 0,
3889
+ "max": 100
3890
+ }
3891
+ },
3892
+ "blocks": [
3893
+ null
3894
+ ],
3895
+ "sku": "0-123",
3896
+ "productPages": [
3897
+ {
3898
+ "id": 8997,
3899
+ "pageId": 1176,
3900
+ "productId": 8872
3901
+ }
3902
+ ],
3903
+ "statusLocalizeInfos": {
3904
+ "title": "Product"
3905
+ },
3906
+ "templateIdentifier": "my-template",
3907
+ "shortDescTemplateIdentifier": "my-template-short",
3908
+ "attributeValues": {
3172
3909
  "marker": {
3173
3910
  "value": "",
3174
- "type": "string"
3175
- }
3176
- },
3177
- "position": 1
3178
- }
3911
+ "type": "string",
3912
+ "position": 1,
3913
+ "isProductPreview": false
3914
+ }
3915
+ },
3916
+ "position": 1
3917
+ }
3179
3918
  ]
3180
3919
  ```
3181
3920
 
@@ -3186,6 +3925,14 @@ Example return:
3186
3925
  *object identifier* <br>
3187
3926
  example: 1764 <br>
3188
3927
 
3928
+ **additional:** Record<string, any> <br>
3929
+ *additional value from the index* <br>
3930
+ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
3931
+
3932
+ **statusLocalizeInfos:** CommonLocalizeInfos <br>
3933
+ *json description of the item status object, taking into account the language* <br>
3934
+ example: { "title": "Product" <br>
3935
+
3189
3936
  **localizeInfos:** Record<string, any> <br>
3190
3937
  *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3191
3938
  example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
@@ -3253,33 +4000,53 @@ Example return:
3253
4000
 
3254
4001
  ```json
3255
4002
  [
3256
- {
3257
- "id": 1764,
3258
- "localizeInfos": {
3259
- "title": "Product"
3260
- },
3261
- "isVisible": true,
3262
- "statusId": 1,
3263
- "relatedIds": [
3264
- 1,
3265
- 2,
3266
- 3
3267
- ],
3268
- "attributeSetId": 7,
3269
- "blocks": ["product_block"],
3270
- "isSync": true,
3271
- "price": 0,
3272
- "templateIdentifier": "my-template",
3273
- "shortDescTemplateIdentifier": "my-template-short",
3274
- "sku": "0-123",
3275
- "attributeValues": {
3276
- "marker": {
3277
- "value": "",
3278
- "type": "string"
3279
- }
3280
- },
3281
- "position": 1
3282
- }
4003
+ {
4004
+ "id": 1764,
4005
+ "localizeInfos": {
4006
+ "title": "Product"
4007
+ },
4008
+ "isVisible": true,
4009
+ "statusId": 1,
4010
+ "relatedIds": [
4011
+ 1,
4012
+ 2,
4013
+ 3
4014
+ ],
4015
+ "attributeSetId": 7,
4016
+ "isSync": true,
4017
+ "price": 0,
4018
+ "additional": {
4019
+ "prices": {
4020
+ "min": 0,
4021
+ "max": 100
4022
+ }
4023
+ },
4024
+ "blocks": [
4025
+ null
4026
+ ],
4027
+ "sku": "0-123",
4028
+ "productPages": [
4029
+ {
4030
+ "id": 8997,
4031
+ "pageId": 1176,
4032
+ "productId": 8872
4033
+ }
4034
+ ],
4035
+ "statusLocalizeInfos": {
4036
+ "title": "Product"
4037
+ },
4038
+ "templateIdentifier": "my-template",
4039
+ "shortDescTemplateIdentifier": "my-template-short",
4040
+ "attributeValues": {
4041
+ "marker": {
4042
+ "value": "",
4043
+ "type": "string",
4044
+ "position": 1,
4045
+ "isProductPreview": false
4046
+ }
4047
+ },
4048
+ "position": 1
4049
+ }
3283
4050
  ]
3284
4051
  ```
3285
4052
  <details>
@@ -3289,6 +4056,14 @@ Example return:
3289
4056
  *object identifier* <br>
3290
4057
  example: 1764 <br>
3291
4058
 
4059
+ **additional:** Record<string, any> <br>
4060
+ *additional value from the index* <br>
4061
+ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
4062
+
4063
+ **statusLocalizeInfos:** CommonLocalizeInfos <br>
4064
+ *json description of the item status object, taking into account the language* <br>
4065
+ example: { "title": "Product" <br>
4066
+
3292
4067
  **localizeInfos:** Record<string, any> <br>
3293
4068
  *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3294
4069
  example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
@@ -3371,6 +4146,19 @@ Example return:
3371
4146
  2,
3372
4147
  3
3373
4148
  ],
4149
+ "attributeSetId": 7,
4150
+ "isSync": true,
4151
+ "price": 0,
4152
+ "additional": {
4153
+ "prices": {
4154
+ "min": 0,
4155
+ "max": 100
4156
+ }
4157
+ },
4158
+ "blocks": [
4159
+ null
4160
+ ],
4161
+ "sku": "0-123",
3374
4162
  "productPages": [
3375
4163
  {
3376
4164
  "id": 8997,
@@ -3378,18 +4166,17 @@ Example return:
3378
4166
  "productId": 8872
3379
4167
  }
3380
4168
  ],
3381
- "attributeSetId": 7,
3382
- "blocks": ["product_block"],
3383
- "version": 10,
3384
- "isSync": 0,
3385
- "price": 0,
4169
+ "statusLocalizeInfos": {
4170
+ "title": "Product"
4171
+ },
3386
4172
  "templateIdentifier": "my-template",
3387
4173
  "shortDescTemplateIdentifier": "my-template-short",
3388
- "sku": "0-123",
3389
4174
  "attributeValues": {
3390
4175
  "marker": {
3391
4176
  "value": "",
3392
- "type": "string"
4177
+ "type": "string",
4178
+ "position": 1,
4179
+ "isProductPreview": false
3393
4180
  }
3394
4181
  },
3395
4182
  "position": 1
@@ -3402,6 +4189,14 @@ Example return:
3402
4189
  *object identifier* <br>
3403
4190
  example: 1764 <br>
3404
4191
 
4192
+ **additional:** Record<string, any> <br>
4193
+ *additional value from the index* <br>
4194
+ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
4195
+
4196
+ **statusLocalizeInfos:** CommonLocalizeInfos <br>
4197
+ *json description of the item status object, taking into account the language* <br>
4198
+ example: { "title": "Product" <br>
4199
+
3405
4200
  **localizeInfos:** Record<string, any> <br>
3406
4201
  *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3407
4202
  example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
@@ -3483,6 +4278,19 @@ Example return:
3483
4278
  2,
3484
4279
  3
3485
4280
  ],
4281
+ "attributeSetId": 7,
4282
+ "isSync": true,
4283
+ "price": 0,
4284
+ "additional": {
4285
+ "prices": {
4286
+ "min": 0,
4287
+ "max": 100
4288
+ }
4289
+ },
4290
+ "blocks": [
4291
+ null
4292
+ ],
4293
+ "sku": "0-123",
3486
4294
  "productPages": [
3487
4295
  {
3488
4296
  "id": 8997,
@@ -3490,18 +4298,17 @@ Example return:
3490
4298
  "productId": 8872
3491
4299
  }
3492
4300
  ],
3493
- "attributeSetId": 7,
3494
- "blocks": ["product_block"],
3495
- "version": 10,
3496
- "isSync": 0,
3497
- "price": 0,
4301
+ "statusLocalizeInfos": {
4302
+ "title": "Product"
4303
+ },
3498
4304
  "templateIdentifier": "my-template",
3499
4305
  "shortDescTemplateIdentifier": "my-template-short",
3500
- "sku": "0-123",
3501
4306
  "attributeValues": {
3502
4307
  "marker": {
3503
4308
  "value": "",
3504
- "type": "string"
4309
+ "type": "string",
4310
+ "position": 1,
4311
+ "isProductPreview": false
3505
4312
  }
3506
4313
  },
3507
4314
  "position": 1
@@ -3514,6 +4321,15 @@ Example return:
3514
4321
  *object identifier* <br>
3515
4322
  example: 1764 <br>
3516
4323
 
4324
+ **additional:** Record<string, any> <br>
4325
+ *additional value from the index* <br>
4326
+ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
4327
+
4328
+ **statusLocalizeInfos:** CommonLocalizeInfos <br>
4329
+ *json description of the item status object, taking into account the language* <br>
4330
+ example: { "title": "Product" <br>
4331
+
4332
+
3517
4333
  **localizeInfos:** Record<string, any> <br>
3518
4334
  *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3519
4335
  example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
@@ -3596,16 +4412,36 @@ Example return:
3596
4412
  3
3597
4413
  ],
3598
4414
  "attributeSetId": 7,
3599
- "blocks": ["product_block"],
3600
4415
  "isSync": true,
3601
4416
  "price": 0,
4417
+ "additional": {
4418
+ "prices": {
4419
+ "min": 0,
4420
+ "max": 100
4421
+ }
4422
+ },
4423
+ "blocks": [
4424
+ null
4425
+ ],
4426
+ "sku": "0-123",
4427
+ "productPages": [
4428
+ {
4429
+ "id": 8997,
4430
+ "pageId": 1176,
4431
+ "productId": 8872
4432
+ }
4433
+ ],
4434
+ "statusLocalizeInfos": {
4435
+ "title": "Product"
4436
+ },
3602
4437
  "templateIdentifier": "my-template",
3603
4438
  "shortDescTemplateIdentifier": "my-template-short",
3604
- "sku": "0-123",
3605
4439
  "attributeValues": {
3606
4440
  "marker": {
3607
4441
  "value": "",
3608
- "type": "string"
4442
+ "type": "string",
4443
+ "position": 1,
4444
+ "isProductPreview": false
3609
4445
  }
3610
4446
  },
3611
4447
  "position": 1
@@ -3618,6 +4454,14 @@ Example return:
3618
4454
  *object identifier* <br>
3619
4455
  example: 1764 <br>
3620
4456
 
4457
+ **additional:** Record<string, any> <br>
4458
+ *additional value from the index* <br>
4459
+ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
4460
+
4461
+ **statusLocalizeInfos:** CommonLocalizeInfos <br>
4462
+ *json description of the item status object, taking into account the language* <br>
4463
+ example: { "title": "Product" <br>
4464
+
3621
4465
  **localizeInfos:** Record<string, any> <br>
3622
4466
  *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3623
4467
  example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
@@ -3699,17 +4543,37 @@ Example return:
3699
4543
  2,
3700
4544
  3
3701
4545
  ],
3702
- "attributeSetId": 7,
3703
- "blocks": ["product_block"],
3704
- "isSync": true,
3705
- "price": 0,
4546
+ "attributeSetId": 7,
4547
+ "isSync": true,
4548
+ "price": 0,
4549
+ "additional": {
4550
+ "prices": {
4551
+ "min": 0,
4552
+ "max": 100
4553
+ }
4554
+ },
4555
+ "blocks": [
4556
+ null
4557
+ ],
4558
+ "sku": "0-123",
4559
+ "productPages": [
4560
+ {
4561
+ "id": 8997,
4562
+ "pageId": 1176,
4563
+ "productId": 8872
4564
+ }
4565
+ ],
4566
+ "statusLocalizeInfos": {
4567
+ "title": "Product"
4568
+ },
3706
4569
  "templateIdentifier": "my-template",
3707
4570
  "shortDescTemplateIdentifier": "my-template-short",
3708
- "sku": "0-123",
3709
4571
  "attributeValues": {
3710
4572
  "marker": {
3711
4573
  "value": "",
3712
- "type": "string"
4574
+ "type": "string",
4575
+ "position": 1,
4576
+ "isProductPreview": false
3713
4577
  }
3714
4578
  },
3715
4579
  "position": 1
@@ -3722,6 +4586,14 @@ Example return:
3722
4586
  *object identifier* <br>
3723
4587
  example: 1764 <br>
3724
4588
 
4589
+ **additional:** Record<string, any> <br>
4590
+ *additional value from the index* <br>
4591
+ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
4592
+
4593
+ **statusLocalizeInfos:** CommonLocalizeInfos <br>
4594
+ *json description of the item status object, taking into account the language* <br>
4595
+ example: { "title": "Product" <br>
4596
+
3725
4597
  **localizeInfos:** Record<string, any> <br>
3726
4598
  *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3727
4599
  example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
@@ -3829,6 +4701,19 @@ Example return:
3829
4701
  2,
3830
4702
  3
3831
4703
  ],
4704
+ "attributeSetId": 7,
4705
+ "isSync": true,
4706
+ "price": 0,
4707
+ "additional": {
4708
+ "prices": {
4709
+ "min": 0,
4710
+ "max": 100
4711
+ }
4712
+ },
4713
+ "blocks": [
4714
+ null
4715
+ ],
4716
+ "sku": "0-123",
3832
4717
  "productPages": [
3833
4718
  {
3834
4719
  "id": 8997,
@@ -3836,18 +4721,17 @@ Example return:
3836
4721
  "productId": 8872
3837
4722
  }
3838
4723
  ],
3839
- "attributeSetId": 7,
3840
- "blocks": ["product_block"],
3841
- "version": 10,
3842
- "isSync": 0,
3843
- "price": 0,
4724
+ "statusLocalizeInfos": {
4725
+ "title": "Product"
4726
+ },
3844
4727
  "templateIdentifier": "my-template",
3845
4728
  "shortDescTemplateIdentifier": "my-template-short",
3846
- "sku": "0-123",
3847
4729
  "attributeValues": {
3848
4730
  "marker": {
3849
4731
  "value": "",
3850
- "type": "string"
4732
+ "type": "string",
4733
+ "position": 1,
4734
+ "isProductPreview": false
3851
4735
  }
3852
4736
  },
3853
4737
  "position": 1
@@ -3860,6 +4744,14 @@ Example return:
3860
4744
  *object identifier* <br>
3861
4745
  example: 1764 <br>
3862
4746
 
4747
+ **additional:** Record<string, any> <br>
4748
+ *additional value from the index* <br>
4749
+ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
4750
+
4751
+ **statusLocalizeInfos:** CommonLocalizeInfos <br>
4752
+ *json description of the item status object, taking into account the language* <br>
4753
+ example: { "title": "Product" <br>
4754
+
3863
4755
  **localizeInfos:** Record<string, any> <br>
3864
4756
  *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3865
4757
  example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
@@ -3931,40 +4823,52 @@ Example return:
3931
4823
  ```json
3932
4824
  [
3933
4825
  {
3934
- "id": 1764,
3935
- "localizeInfos": {
3936
- "title": "Product"
3937
- },
3938
- "isVisible": true,
3939
- "statusId": 1,
3940
- "relatedIds": [
3941
- 1,
3942
- 2,
3943
- 3
3944
- ],
3945
- "productPages": [
3946
- {
3947
- "id": 8997,
3948
- "pageId": 1176,
3949
- "productId": 8872
3950
- }
3951
- ],
3952
- "attributeSetId": 7,
3953
- "blocks": ["product_block"],
3954
- "version": 10,
3955
- "isSync": 0,
3956
- "price": 0,
3957
- "templateIdentifier": "my-template",
3958
- "shortDescTemplateIdentifier": "my-template-short",
4826
+ "id": 1764,
4827
+ "localizeInfos": {
4828
+ "title": "Product"
4829
+ },
4830
+ "isVisible": true,
4831
+ "statusId": 1,
4832
+ "relatedIds": [
4833
+ 1,
4834
+ 2,
4835
+ 3
4836
+ ],
4837
+ "attributeSetId": 7,
4838
+ "isSync": true,
4839
+ "price": 0,
4840
+ "additional": {
4841
+ "prices": {
4842
+ "min": 0,
4843
+ "max": 100
4844
+ }
4845
+ },
4846
+ "blocks": [
4847
+ null
4848
+ ],
3959
4849
  "sku": "0-123",
4850
+ "productPages": [
4851
+ {
4852
+ "id": 8997,
4853
+ "pageId": 1176,
4854
+ "productId": 8872
4855
+ }
4856
+ ],
4857
+ "statusLocalizeInfos": {
4858
+ "title": "Product"
4859
+ },
4860
+ "templateIdentifier": "my-template",
4861
+ "shortDescTemplateIdentifier": "my-template-short",
3960
4862
  "attributeValues": {
3961
- "marker": {
3962
- "value": "",
3963
- "type": "string"
3964
- }
3965
- },
3966
- "position": 1
3967
- }
4863
+ "marker": {
4864
+ "value": "",
4865
+ "type": "string",
4866
+ "position": 1,
4867
+ "isProductPreview": false
4868
+ }
4869
+ },
4870
+ "position": 1
4871
+ }
3968
4872
  ]
3969
4873
  ```
3970
4874
  <details>
@@ -3974,6 +4878,14 @@ Example return:
3974
4878
  *object identifier* <br>
3975
4879
  example: 1764 <br>
3976
4880
 
4881
+ **additional:** Record<string, any> <br>
4882
+ *additional value from the index* <br>
4883
+ example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
4884
+
4885
+ **statusLocalizeInfos:** CommonLocalizeInfos <br>
4886
+ *json description of the item status object, taking into account the language* <br>
4887
+ example: { "title": "Product" <br>
4888
+
3977
4889
  **localizeInfos:** Record<string, any> <br>
3978
4890
  *json description of the main page data object taking into account the language "en_US" (for example)* <br>
3979
4891
  example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
@@ -4230,22 +5142,20 @@ Example return:
4230
5142
 
4231
5143
  ```json
4232
5144
  [
4233
- {
4234
- "id": 1764,
4235
- "updatedDate": "2023-12-05T12:47:02.859Z",
4236
- "version": 10,
4237
- "identifier": "marker",
4238
- "generalType": {
4239
- "id": 4,
4240
- "type": "forCatalogPages"
4241
- },
4242
- "generalTypeId": 4,
4243
- "localizeInfos": {
4244
- "title": "Page template"
4245
- },
4246
- "position": 0,
4247
- "positionId": 12,
4248
- "generalTypeName": "forProductPreview"
5145
+ {
5146
+ "id": 1764,
5147
+ "updatedDate": "2024-05-25T23:50:35.154Z",
5148
+ "version": 10,
5149
+ "identifier": "marker",
5150
+ "generalType": {
5151
+ "id": 4,
5152
+ "type": "forCatalogPages"
5153
+ },
5154
+ "generalTypeId": 4,
5155
+ "title": "Page template",
5156
+ "position": 0,
5157
+ "positionId": 12,
5158
+ "generalTypeName": "forProductPreview"
4249
5159
  }
4250
5160
  ]
4251
5161
  ```
@@ -4275,9 +5185,9 @@ example: OrderedMap { "id": 4, "type": "forCatalogPages" } <br>
4275
5185
  *type identifier* <br>
4276
5186
  example: 4 <br>
4277
5187
 
4278
- **localizeInfos:** Record<string, any> <br>
4279
- *json description of the main page data object taking into account the language "en_US" (for example)* <br>
4280
- example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
5188
+ **title:** string<br>
5189
+ *template name* <br>
5190
+ example: page template <br>
4281
5191
 
4282
5192
  **position** object <br>
4283
5193
  *position number* <br>
@@ -4308,7 +5218,7 @@ Example return:
4308
5218
  [
4309
5219
  {
4310
5220
  "id": 1764,
4311
- "updatedDate": "2023-12-05T12:45:13.566Z",
5221
+ "updatedDate": "2024-05-25T23:50:35.154Z",
4312
5222
  "version": 10,
4313
5223
  "identifier": "marker",
4314
5224
  "generalType": {
@@ -4316,9 +5226,7 @@ Example return:
4316
5226
  "type": "forCatalogPages"
4317
5227
  },
4318
5228
  "generalTypeId": 4,
4319
- "localizeInfos": {
4320
- "title": "Page template"
4321
- },
5229
+ "title": "Page template",
4322
5230
  "position": 0,
4323
5231
  "positionId": 12,
4324
5232
  "generalTypeName": "forProductPreview"
@@ -4351,14 +5259,87 @@ example: OrderedMap { "id": 4, "type": "forCatalogPages" } <br>
4351
5259
  *type identifier* <br>
4352
5260
  example: 4 <br>
4353
5261
 
4354
- **localizeInfos:** Record<string, any> <br>
4355
- *json description of the main page data object taking into account the language "en_US" (for example)* <br>
4356
- example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
5262
+ **title:** string<br>
5263
+ *template name* <br>
5264
+ example: page template <br>
4357
5265
 
4358
5266
  **position** object <br>
4359
5267
  *position number* <br>
4360
5268
  example: 0 <br>
4361
5269
 
5270
+ **positionId:** number <br>
5271
+ *position object identifier* <br>
5272
+ example: 12 <br>
5273
+
5274
+ **generalTypeName** string <br>
5275
+ *example: forProductPreview* <br>
5276
+ general type name <br>
5277
+
5278
+ </details>
5279
+
5280
+
5281
+ ### Templates.getTemplateById(id)
5282
+
5283
+ ```js
5284
+ const value = await Templates.getTemplateById(1)
5285
+ ```
5286
+
5287
+ > 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.
5288
+
5289
+ Example return:
5290
+
5291
+ ```json
5292
+ [
5293
+ {
5294
+ "id": 1764,
5295
+ "updatedDate": "2024-05-25T23:50:35.154Z",
5296
+ "version": 10,
5297
+ "identifier": "marker",
5298
+ "generalType": {
5299
+ "id": 4,
5300
+ "type": "forCatalogPages"
5301
+ },
5302
+ "generalTypeId": 4,
5303
+ "title": "Page template",
5304
+ "position": 0,
5305
+ "positionId": 12,
5306
+ "generalTypeName": "forProductPreview"
5307
+ }
5308
+ ]
5309
+ ```
5310
+ <details>
5311
+ <summary>Schema</summary>
5312
+
5313
+ **id:** number <br>
5314
+ *object identifier* <br>
5315
+ example: 1764 <br>
5316
+
5317
+ **updatedDate:** string($date-time) <br>
5318
+ *object's date of modification* <br>
5319
+
5320
+ **version** number <br>
5321
+ *object's version number of modification* <br>
5322
+ example: 10 <br>
5323
+
5324
+ **identifier:** string <br>
5325
+ *textual identifier for a field in the record* <br>
5326
+ example: catalog <br>
5327
+
5328
+ **generalType:**: object <br>
5329
+ *object type* <br>
5330
+ example: OrderedMap { "id": 4, "type": "forCatalogPages" } <br>
5331
+
5332
+ **generalTypeId:** number <br>
5333
+ *type identifier* <br>
5334
+ example: 4 <br>
5335
+
5336
+ **title:** string<br>
5337
+ *template name* <br>
5338
+ example: page template <br>
5339
+
5340
+ **position** object <br>
5341
+ *position number* <br>
5342
+ example: 0 <br>
4362
5343
 
4363
5344
  **positionId:** number <br>
4364
5345
  *position object identifier* <br>
@@ -4419,9 +5400,7 @@ Example return:
4419
5400
  "alignmentType": "center"
4420
5401
  }
4421
5402
  },
4422
- "localizeInfos": {
4423
- "title": "Page Template"
4424
- },
5403
+ "title": "Page Template",
4425
5404
  "position": 0
4426
5405
  }
4427
5406
  ]
@@ -4448,9 +5427,9 @@ example: catalog <br>
4448
5427
  *template proportion parameters* <br>
4449
5428
  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" } } <br>
4450
5429
 
4451
- **localizeInfos:** Record<string, any> <br>
4452
- *json description of the main page data object taking into account the language "en_US" (for example)* <br>
4453
- example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
5430
+ **title:** string<br>
5431
+ *template name* <br>
5432
+ example: page template <br>
4454
5433
 
4455
5434
  **position** object <br>
4456
5435
  *position number* <br>
@@ -4502,9 +5481,7 @@ Example return:
4502
5481
  "alignmentType": "center"
4503
5482
  }
4504
5483
  },
4505
- "localizeInfos": {
4506
- "title": "Page Template"
4507
- },
5484
+ "title": "Page Template",
4508
5485
  "position": 0
4509
5486
  }
4510
5487
  ```
@@ -4530,9 +5507,9 @@ example: catalog <br>
4530
5507
  *template proportion parameters* <br>
4531
5508
  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" } } <br>
4532
5509
 
4533
- **localizeInfos:** Record<string, any> <br>
4534
- *json description of the main page data object taking into account the language "en_US" (for example)* <br>
4535
- example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
5510
+ **title:** string<br>
5511
+ *template name* <br>
5512
+ example: page template <br>
4536
5513
 
4537
5514
  **position** object <br>
4538
5515
  *position number* <br>
@@ -4583,9 +5560,7 @@ Example return:
4583
5560
  "alignmentType": "center"
4584
5561
  }
4585
5562
  },
4586
- "localizeInfos": {
4587
- "title": "Page Template"
4588
- },
5563
+ "title": "Page Template",
4589
5564
  "position": 0
4590
5565
  }
4591
5566
  ```
@@ -4611,9 +5586,9 @@ example: catalog <br>
4611
5586
  *template proportion parameters* <br>
4612
5587
  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" } } <br>
4613
5588
 
4614
- **localizeInfos:** Record<string, any> <br>
4615
- *json description of the main page data object taking into account the language "en_US" (for example)* <br>
4616
- example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
5589
+ **title:** string<br>
5590
+ *template name* <br>
5591
+ example: page template <br>
4617
5592
 
4618
5593
  **position** object <br>
4619
5594
  *position number* <br>
@@ -4628,3 +5603,112 @@ example: 12 <br>
4628
5603
  ---
4629
5604
 
4630
5605
 
5606
+ ## <h2 id="users"> Users </h2>
5607
+
5608
+
5609
+ ```js
5610
+ const { Users } = defineOneEntry('your-url');
5611
+ ```
5612
+
5613
+ ### Users.getUser(langCode)
5614
+
5615
+ ```js
5616
+ const value = await Users.getUser()
5617
+ ```
5618
+
5619
+ > This method sends a request to get the data of an authorized user. Returns the authorized user's data object.
5620
+
5621
+ Example return:
5622
+
5623
+ ```json
5624
+ {
5625
+ "id": 1764,
5626
+ "identifier": "admin1",
5627
+ "formIdentifier": "regForm",
5628
+ "authProviderIdentifier": "email",
5629
+ "groups": [
5630
+ "group_1"
5631
+ ]
5632
+ }
5633
+ ```
5634
+ <details>
5635
+ <summary>Schema</summary>
5636
+
5637
+ **id:** number <br>
5638
+ *object identifier* <br>
5639
+ example: 1764 <br>
5640
+
5641
+ **identifier:** string <br>
5642
+ *textual identifier for a field in the record* <br>
5643
+ example: catalog <br>
5644
+
5645
+ **formIdentifier** string <br>
5646
+ *the text identifier of the form linked to the authorization provider* <br>
5647
+ example: , regForm <br>
5648
+
5649
+ **authProviderIdentifier:** string <br>
5650
+ *the text ID of the authorization provider* <br>
5651
+ example: email <br>
5652
+
5653
+ **groups** string[] <br>
5654
+ *An array of values for the text identifiers of the groups that the user belongs to* <br>
5655
+ example: List [ "group_1" ] <br>
5656
+
5657
+ </details>
5658
+
5659
+
5660
+ ### Users.getUser(langCode)
5661
+
5662
+ ```js
5663
+ const data = {
5664
+ "formIdentifier": "reg",
5665
+ "authData": [
5666
+ {
5667
+ "marker": "password",
5668
+ "value": "12345"
5669
+ }
5670
+ ],
5671
+ "formData": [
5672
+ {
5673
+ "marker": "last_name",
5674
+ "type": "string",
5675
+ "value": "Username"
5676
+ }
5677
+ ],
5678
+ "notificationData": {
5679
+ "email": "test@test.com",
5680
+ "phonePush": "",
5681
+ "phoneSMS": "+99999999999"
5682
+ }
5683
+ }
5684
+
5685
+ const value = await Users.updateUser(data, langCode)
5686
+ ```
5687
+
5688
+ > This method updates the authorized user's data object. Returns true (in case of successful update) or false (in case of unsuccessful update).
5689
+
5690
+ Example return:
5691
+
5692
+ ```json
5693
+ true
5694
+ ```
5695
+ <details>
5696
+ <summary>Schema</summary>
5697
+
5698
+ **formIdentifier** string <br>
5699
+ *the text identifier of the form linked to the authorization provider* <br>
5700
+ example: , regForm <br>
5701
+
5702
+ **formData:** FormDataLangType <br>
5703
+ *the data of the form linked to the authorization provider* <br>
5704
+ example: OrderedMap { "en_US": List [ OrderedMap { "marker": "first-name", "value": "First name" }, OrderedMap { "marker": "last-name", "value": "Second name" } ] } <br>
5705
+
5706
+ **authData** FormDataType <br>
5707
+ *Authorization data taken from the form linked to the authorization provider (used only to change the password)* <br>
5708
+ example: List [ OrderedMap { "marker": "password", "value": "12345" } ] <br>
5709
+
5710
+ **notificationData** UserNotificationDataType <br>
5711
+ *Data for notifying the user* <br>
5712
+ example: OrderedMap { "email": "test@test.com", "phonePush": "", "phoneSMS": "+9999999999" } <br>
5713
+
5714
+ </details>