oneentry 1.0.104 → 1.0.105
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 +457 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -476,11 +476,422 @@ Example return:
|
|
|
476
476
|
const { AuthProvider } = defineOneEntry('your-url');
|
|
477
477
|
```
|
|
478
478
|
|
|
479
|
-
### AuthProvider.signUp(marker,
|
|
479
|
+
### AuthProvider.signUp(marker, body, langCode)
|
|
480
|
+
|
|
481
|
+
>
|
|
482
|
+
> Method accept the body as a parameter.
|
|
483
|
+
>
|
|
484
|
+
|
|
485
|
+
Examples for body parameter with different types data:
|
|
486
|
+
|
|
487
|
+
Example with attributes of simple types formData "string", "integer", "float".
|
|
488
|
+
|
|
489
|
+
```json
|
|
490
|
+
{
|
|
491
|
+
"formIdentifier": "reg",
|
|
492
|
+
"langCode": "en_US",
|
|
493
|
+
"authData": [
|
|
494
|
+
{
|
|
495
|
+
"marker": "login",
|
|
496
|
+
"value": "test"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"marker": "password",
|
|
500
|
+
"value": "12345"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
"formData": {
|
|
504
|
+
"en_US": [
|
|
505
|
+
{
|
|
506
|
+
"marker": "last_name",
|
|
507
|
+
"type": "string",
|
|
508
|
+
"value": "Fyodor Ivanov"
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
"notificationData": {
|
|
513
|
+
"email": "test@test.zone",
|
|
514
|
+
"phonePush": [],
|
|
515
|
+
"phoneSMS": "+79991234567"
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
Example with attributes of types "date", "dateTime", "time"
|
|
521
|
+
|
|
522
|
+
```json
|
|
523
|
+
{
|
|
524
|
+
"formIdentifier": "reg",
|
|
525
|
+
"langCode": "en_US",
|
|
526
|
+
"authData": [
|
|
527
|
+
{
|
|
528
|
+
"marker": "login",
|
|
529
|
+
"value": "test"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"marker": "password",
|
|
533
|
+
"value": "12345"
|
|
534
|
+
}
|
|
535
|
+
],
|
|
536
|
+
"formData": {
|
|
537
|
+
"en_US": [
|
|
538
|
+
{
|
|
539
|
+
"marker": "birthday",
|
|
540
|
+
"type": "date",
|
|
541
|
+
"value": {
|
|
542
|
+
"fullDate": "2024-05-07T21:02:00.000Z",
|
|
543
|
+
"formattedValue": "08-05-2024 00:02",
|
|
544
|
+
"formatString": "DD-MM-YYYY HH:mm"
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
]
|
|
548
|
+
},
|
|
549
|
+
"notificationData": {
|
|
550
|
+
"email": "test@test.zone",
|
|
551
|
+
"phonePush": [],
|
|
552
|
+
"phoneSMS": "+79991234567"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
Example with attribute of type "text"
|
|
558
|
+
|
|
559
|
+
```json
|
|
560
|
+
{
|
|
561
|
+
"formIdentifier": "reg",
|
|
562
|
+
"langCode": "en_US",
|
|
563
|
+
"authData": [
|
|
564
|
+
{
|
|
565
|
+
"marker": "login",
|
|
566
|
+
"value": "test"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"marker": "password",
|
|
570
|
+
"value": "12345"
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
"formData": {
|
|
574
|
+
"en_US": [
|
|
575
|
+
{
|
|
576
|
+
"marker": "about",
|
|
577
|
+
"type": "text",
|
|
578
|
+
"value": {
|
|
579
|
+
"htmlValue": "<p>This is me</p>",
|
|
580
|
+
"plainValue": "",
|
|
581
|
+
"params": {
|
|
582
|
+
"isEditorDisabled": false,
|
|
583
|
+
"isImageCompressed": true
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"notificationData": {
|
|
590
|
+
"email": "test@test.zone",
|
|
591
|
+
"phonePush": [],
|
|
592
|
+
"phoneSMS": "+79991234567"
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
Example with attribute type "textWithHeader"
|
|
598
|
+
|
|
599
|
+
```json
|
|
600
|
+
{
|
|
601
|
+
"formIdentifier": "reg",
|
|
602
|
+
"langCode": "en_US",
|
|
603
|
+
"authData": [
|
|
604
|
+
{
|
|
605
|
+
"marker": "login",
|
|
606
|
+
"value": "test"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"marker": "password",
|
|
610
|
+
"value": "12345"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
"formData": {
|
|
614
|
+
"en_US": [
|
|
615
|
+
{
|
|
616
|
+
"marker": "about",
|
|
617
|
+
"type": "textWithHeader",
|
|
618
|
+
"value": {
|
|
619
|
+
"header": "Header",
|
|
620
|
+
"htmlValue": "<p>This is me</p>",
|
|
621
|
+
"plainValue": "",
|
|
622
|
+
"params": {
|
|
623
|
+
"isEditorDisabled": false,
|
|
624
|
+
"isImageCompressed": true
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
"notificationData": {
|
|
631
|
+
"email": "test@test.zone",
|
|
632
|
+
"phonePush": [],
|
|
633
|
+
"phoneSMS": "+79991234567"
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
Example with attributes type "image" and "groupOfImages"
|
|
639
|
+
|
|
640
|
+
```json
|
|
641
|
+
{
|
|
642
|
+
"formIdentifier": "reg",
|
|
643
|
+
"langCode": "en_US",
|
|
644
|
+
"authData": [
|
|
645
|
+
{
|
|
646
|
+
"marker": "login",
|
|
647
|
+
"value": "test"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"marker": "password",
|
|
651
|
+
"value": "12345"
|
|
652
|
+
}
|
|
653
|
+
],
|
|
654
|
+
"formData": {
|
|
655
|
+
"en_US": [
|
|
656
|
+
{
|
|
657
|
+
"marker": "avatar",
|
|
658
|
+
"type": "image",
|
|
659
|
+
"value": [
|
|
660
|
+
{
|
|
661
|
+
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
662
|
+
"downloadLink": "http://my-site.zone/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
663
|
+
"size": 392585,
|
|
664
|
+
"previewLink": "",
|
|
665
|
+
"params": {
|
|
666
|
+
"isImageCompressed": true
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
}
|
|
671
|
+
]
|
|
672
|
+
},
|
|
673
|
+
"notificationData": {
|
|
674
|
+
"email": "test@test.zone",
|
|
675
|
+
"phonePush": [],
|
|
676
|
+
"phoneSMS": "+79991234567"
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
Example with attribute type "file"
|
|
682
|
+
|
|
683
|
+
```json
|
|
684
|
+
{
|
|
685
|
+
"formIdentifier": "reg",
|
|
686
|
+
"langCode": "en_US",
|
|
687
|
+
"authData": [
|
|
688
|
+
{
|
|
689
|
+
"marker": "login",
|
|
690
|
+
"value": "test"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"marker": "password",
|
|
694
|
+
"value": "12345"
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"formData": {
|
|
698
|
+
"en_US": [
|
|
699
|
+
{
|
|
700
|
+
"marker": "picture",
|
|
701
|
+
"type": "file",
|
|
702
|
+
"value": [
|
|
703
|
+
{
|
|
704
|
+
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
705
|
+
"downloadLink": "http://my-site.zone/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
706
|
+
"size": 392585
|
|
707
|
+
}
|
|
708
|
+
]
|
|
709
|
+
}
|
|
710
|
+
]
|
|
711
|
+
},
|
|
712
|
+
"notificationData": {
|
|
713
|
+
"email": "test@test.zone",
|
|
714
|
+
"phonePush": [],
|
|
715
|
+
"phoneSMS": "+79991234567"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
Example with attributes type "radioButton" and "list"
|
|
721
|
+
|
|
722
|
+
```json
|
|
723
|
+
{
|
|
724
|
+
"formIdentifier": "reg",
|
|
725
|
+
"langCode": "en_US",
|
|
726
|
+
"authData": [
|
|
727
|
+
{
|
|
728
|
+
"marker": "login",
|
|
729
|
+
"value": "test"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"marker": "password",
|
|
733
|
+
"value": "12345"
|
|
734
|
+
}
|
|
735
|
+
],
|
|
736
|
+
"formData": {
|
|
737
|
+
"en_US": [
|
|
738
|
+
{
|
|
739
|
+
"marker": "selector",
|
|
740
|
+
"type": "list",
|
|
741
|
+
"value": [
|
|
742
|
+
{
|
|
743
|
+
"title": "red",
|
|
744
|
+
"value": "1",
|
|
745
|
+
"extended": {
|
|
746
|
+
"value": "red",
|
|
747
|
+
"type": "string"
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
]
|
|
751
|
+
}
|
|
752
|
+
]
|
|
753
|
+
},
|
|
754
|
+
"notificationData": {
|
|
755
|
+
"email": "test@test.zone",
|
|
756
|
+
"phonePush": [],
|
|
757
|
+
"phoneSMS": "+79991234567"
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
Example with attribute type "entity" (nested list)
|
|
763
|
+
|
|
764
|
+
```json
|
|
765
|
+
{
|
|
766
|
+
"formIdentifier": "reg",
|
|
767
|
+
"langCode": "en_US",
|
|
768
|
+
"authData": [
|
|
769
|
+
{
|
|
770
|
+
"marker": "login",
|
|
771
|
+
"value": "test"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"marker": "password",
|
|
775
|
+
"value": "12345"
|
|
776
|
+
}
|
|
777
|
+
],
|
|
778
|
+
"formData": {
|
|
779
|
+
"en_US": [
|
|
780
|
+
{
|
|
781
|
+
"marker": "entity-selector",
|
|
782
|
+
"type": "entity",
|
|
783
|
+
"value": [
|
|
784
|
+
{
|
|
785
|
+
"id": "1",
|
|
786
|
+
"title": "red",
|
|
787
|
+
"value": "1",
|
|
788
|
+
"parentId": "null"
|
|
789
|
+
}
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
]
|
|
793
|
+
},
|
|
794
|
+
"notificationData": {
|
|
795
|
+
"email": "test@test.zone",
|
|
796
|
+
"phonePush": [],
|
|
797
|
+
"phoneSMS": "+79991234567"
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
Example with one push identifier
|
|
803
|
+
|
|
804
|
+
```json
|
|
805
|
+
{
|
|
806
|
+
"formIdentifier": "reg",
|
|
807
|
+
"langCode": "en_US",
|
|
808
|
+
"authData": [
|
|
809
|
+
{
|
|
810
|
+
"marker": "login",
|
|
811
|
+
"value": "test"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"marker": "password",
|
|
815
|
+
"value": "12345"
|
|
816
|
+
}
|
|
817
|
+
],
|
|
818
|
+
"formData": {
|
|
819
|
+
"en_US": [
|
|
820
|
+
{
|
|
821
|
+
"marker": "selector",
|
|
822
|
+
"type": "list",
|
|
823
|
+
"value": [
|
|
824
|
+
{
|
|
825
|
+
"title": "red",
|
|
826
|
+
"value": "1",
|
|
827
|
+
"extended": {
|
|
828
|
+
"value": "red",
|
|
829
|
+
"type": "string"
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
]
|
|
835
|
+
},
|
|
836
|
+
"notificationData": {
|
|
837
|
+
"email": "test@test.zone",
|
|
838
|
+
"phonePush": [
|
|
839
|
+
"7DD987F846400079F4B03C058365A4869047B4A0."
|
|
840
|
+
],
|
|
841
|
+
"phoneSMS": "+79991234567"
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
Example with multiple push identifiers
|
|
847
|
+
|
|
848
|
+
```json
|
|
849
|
+
{
|
|
850
|
+
"formIdentifier": "reg",
|
|
851
|
+
"langCode": "en_US",
|
|
852
|
+
"authData": [
|
|
853
|
+
{
|
|
854
|
+
"marker": "login",
|
|
855
|
+
"value": "test"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"marker": "password",
|
|
859
|
+
"value": "12345"
|
|
860
|
+
}
|
|
861
|
+
],
|
|
862
|
+
"formData": {
|
|
863
|
+
"en_US": [
|
|
864
|
+
{
|
|
865
|
+
"marker": "selector",
|
|
866
|
+
"type": "list",
|
|
867
|
+
"value": [
|
|
868
|
+
{
|
|
869
|
+
"title": "red",
|
|
870
|
+
"value": "1",
|
|
871
|
+
"extended": {
|
|
872
|
+
"value": "red",
|
|
873
|
+
"type": "string"
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
]
|
|
877
|
+
}
|
|
878
|
+
]
|
|
879
|
+
},
|
|
880
|
+
"notificationData": {
|
|
881
|
+
"email": "test@test.zone",
|
|
882
|
+
"phonePush": [
|
|
883
|
+
"7DD987F846400079F4B03C058365A4869047B4A0",
|
|
884
|
+
"7DD987F846400079F4B03C058365A4869047B4A0",
|
|
885
|
+
"7DD987F846400079F4B03C058365A4869047B4A0."
|
|
886
|
+
],
|
|
887
|
+
"phoneSMS": "+79991234567"
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
```
|
|
480
891
|
|
|
481
892
|
```js
|
|
482
893
|
|
|
483
|
-
const
|
|
894
|
+
const body = {
|
|
484
895
|
"formIdentifier": "reg",
|
|
485
896
|
"authData": [
|
|
486
897
|
{
|
|
@@ -506,7 +917,7 @@ const data = {
|
|
|
506
917
|
}
|
|
507
918
|
}
|
|
508
919
|
|
|
509
|
-
const value = await AuthProvider.signUp('email',
|
|
920
|
+
const value = await AuthProvider.signUp('email', body)
|
|
510
921
|
```
|
|
511
922
|
|
|
512
923
|
><details>
|
|
@@ -678,16 +1089,16 @@ true
|
|
|
678
1089
|
|
|
679
1090
|
```js
|
|
680
1091
|
const data = {
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
1092
|
+
authData: [
|
|
1093
|
+
{
|
|
1094
|
+
marker: "login",
|
|
1095
|
+
value: "example@oneentry.cloud"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
marker: "password",
|
|
1099
|
+
value: "12345"
|
|
1100
|
+
}
|
|
1101
|
+
]
|
|
691
1102
|
}
|
|
692
1103
|
|
|
693
1104
|
const value = await AuthProvider.auth('email', data)
|
|
@@ -1593,6 +2004,7 @@ Example with a simple type attribute "date", "dateTime", "time"
|
|
|
1593
2004
|
```
|
|
1594
2005
|
|
|
1595
2006
|
---
|
|
2007
|
+
|
|
1596
2008
|
Example with a simple type attribute "text"
|
|
1597
2009
|
|
|
1598
2010
|
```json
|
|
@@ -1611,6 +2023,7 @@ Example with a simple type attribute "text"
|
|
|
1611
2023
|
```
|
|
1612
2024
|
|
|
1613
2025
|
---
|
|
2026
|
+
|
|
1614
2027
|
Example with a simple type attribute "text"
|
|
1615
2028
|
|
|
1616
2029
|
```json
|
|
@@ -1629,6 +2042,7 @@ Example with a simple type attribute "text"
|
|
|
1629
2042
|
```
|
|
1630
2043
|
|
|
1631
2044
|
---
|
|
2045
|
+
|
|
1632
2046
|
Example with a simple type attribute "textWithHeader"
|
|
1633
2047
|
|
|
1634
2048
|
```json
|
|
@@ -1648,6 +2062,7 @@ Example with a simple type attribute "textWithHeader"
|
|
|
1648
2062
|
```
|
|
1649
2063
|
|
|
1650
2064
|
---
|
|
2065
|
+
|
|
1651
2066
|
Example with a simple type attribute "image" or "groupOfImages"
|
|
1652
2067
|
|
|
1653
2068
|
```json
|
|
@@ -1669,6 +2084,7 @@ Example with a simple type attribute "image" or "groupOfImages"
|
|
|
1669
2084
|
```
|
|
1670
2085
|
|
|
1671
2086
|
---
|
|
2087
|
+
|
|
1672
2088
|
Example with a simple type attribute "files"
|
|
1673
2089
|
|
|
1674
2090
|
```json
|
|
@@ -1686,6 +2102,7 @@ Example with a simple type attribute "files"
|
|
|
1686
2102
|
```
|
|
1687
2103
|
|
|
1688
2104
|
---
|
|
2105
|
+
|
|
1689
2106
|
Example with a simple type attribute "radioButton" or "list"
|
|
1690
2107
|
|
|
1691
2108
|
```json
|
|
@@ -1705,6 +2122,33 @@ Example with a simple type attribute "radioButton" or "list"
|
|
|
1705
2122
|
}
|
|
1706
2123
|
```
|
|
1707
2124
|
|
|
2125
|
+
---
|
|
2126
|
+
|
|
2127
|
+
Example with attribute type "entity" (nested list)
|
|
2128
|
+
|
|
2129
|
+
```json
|
|
2130
|
+
{
|
|
2131
|
+
"formIdentifier": "reg",
|
|
2132
|
+
"formData": {
|
|
2133
|
+
"en_US": [
|
|
2134
|
+
{
|
|
2135
|
+
"marker": "entity-marker",
|
|
2136
|
+
"type": "entity",
|
|
2137
|
+
"value": [
|
|
2138
|
+
{
|
|
2139
|
+
"id": 1,
|
|
2140
|
+
"title": "red",
|
|
2141
|
+
"value": "1",
|
|
2142
|
+
"parentId": null,
|
|
2143
|
+
"depth": 0,
|
|
2144
|
+
}
|
|
2145
|
+
]
|
|
2146
|
+
}
|
|
2147
|
+
]
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
```
|
|
2151
|
+
|
|
1708
2152
|
### FormData.postFormsData(data, langCode)
|
|
1709
2153
|
|
|
1710
2154
|
```js
|