@twin.org/node 0.0.3-next.19 → 0.0.3-next.20
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/dist/locales/en.json +0 -1
- package/docs/changelog.md +14 -0
- package/docs/open-api/spec.json +751 -114
- package/package.json +2 -2
package/dist/locales/en.json
CHANGED
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"updateUserFailed": "Updating the user failed",
|
|
66
66
|
"removeUserFailed": "Removing the user failed",
|
|
67
67
|
"updatePasswordFailed": "Updating the user's password failed",
|
|
68
|
-
"passwordTooShort": "The password is too short, it must be at least {minLength} characters long",
|
|
69
68
|
"userNotFound": "The user with the specified e-mail could not be found \"{notFoundId}\"",
|
|
70
69
|
"currentPasswordMismatch": "The current password is incorrect"
|
|
71
70
|
},
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @twin.org/node - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.20](https://github.com/twinfoundation/node/compare/node-v0.0.3-next.19...node-v0.0.3-next.20) (2026-02-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update dependencies ([6cb3d3a](https://github.com/twinfoundation/node/commit/6cb3d3a63f7b976f80074ddecfba034b7e92f919))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/node-core bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
16
|
+
|
|
3
17
|
## [0.0.3-next.19](https://github.com/twinfoundation/node/compare/node-v0.0.3-next.18...node-v0.0.3-next.19) (2026-02-05)
|
|
4
18
|
|
|
5
19
|
|
package/docs/open-api/spec.json
CHANGED
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"name": "Authentication",
|
|
24
24
|
"description": "Authentication endpoints for the REST server."
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Authentication Admin",
|
|
28
|
+
"description": "Authentication Admin endpoints for the REST server."
|
|
29
|
+
},
|
|
26
30
|
{
|
|
27
31
|
"name": "Identity",
|
|
28
32
|
"description": "Service to provide all features related to digital identity."
|
|
@@ -494,36 +498,624 @@
|
|
|
494
498
|
}
|
|
495
499
|
}
|
|
496
500
|
},
|
|
497
|
-
"/spec": {
|
|
498
|
-
"get": {
|
|
499
|
-
"operationId": "serverSpec",
|
|
500
|
-
"summary": "Get the OpenAPI specification for the endpoints",
|
|
501
|
+
"/spec": {
|
|
502
|
+
"get": {
|
|
503
|
+
"operationId": "serverSpec",
|
|
504
|
+
"summary": "Get the OpenAPI specification for the endpoints",
|
|
505
|
+
"tags": [
|
|
506
|
+
"Info"
|
|
507
|
+
],
|
|
508
|
+
"responses": {
|
|
509
|
+
"200": {
|
|
510
|
+
"description": "The OpenAPI spec for the endpoints.",
|
|
511
|
+
"content": {
|
|
512
|
+
"application/json": {
|
|
513
|
+
"schema": {
|
|
514
|
+
"$ref": "#/components/schemas/ServerSpecResponse"
|
|
515
|
+
},
|
|
516
|
+
"examples": {
|
|
517
|
+
"specResponse": {
|
|
518
|
+
"summary": "The response for the spec request.",
|
|
519
|
+
"value": {
|
|
520
|
+
"openapi": "3.1.0",
|
|
521
|
+
"info": {},
|
|
522
|
+
"paths": {}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
"400": {
|
|
530
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
531
|
+
"content": {
|
|
532
|
+
"application/json": {
|
|
533
|
+
"schema": {
|
|
534
|
+
"$ref": "#/components/schemas/Error"
|
|
535
|
+
},
|
|
536
|
+
"examples": {
|
|
537
|
+
"exampleResponse": {
|
|
538
|
+
"value": {
|
|
539
|
+
"name": "GeneralError",
|
|
540
|
+
"message": "errorMessage",
|
|
541
|
+
"properties": {
|
|
542
|
+
"foo": "bar"
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"500": {
|
|
551
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
552
|
+
"content": {
|
|
553
|
+
"application/json": {
|
|
554
|
+
"schema": {
|
|
555
|
+
"$ref": "#/components/schemas/Error"
|
|
556
|
+
},
|
|
557
|
+
"examples": {
|
|
558
|
+
"exampleResponse": {
|
|
559
|
+
"value": {
|
|
560
|
+
"name": "InternalServerError",
|
|
561
|
+
"message": "errorMessage"
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
"/authentication/login": {
|
|
572
|
+
"post": {
|
|
573
|
+
"operationId": "authenticationLogin",
|
|
574
|
+
"summary": "Login to the server",
|
|
575
|
+
"tags": [
|
|
576
|
+
"Authentication"
|
|
577
|
+
],
|
|
578
|
+
"requestBody": {
|
|
579
|
+
"description": "Perform a login on the server.",
|
|
580
|
+
"required": true,
|
|
581
|
+
"content": {
|
|
582
|
+
"application/json": {
|
|
583
|
+
"schema": {
|
|
584
|
+
"$ref": "#/components/schemas/LoginRequest"
|
|
585
|
+
},
|
|
586
|
+
"examples": {
|
|
587
|
+
"loginRequestExample": {
|
|
588
|
+
"summary": "The request to login to the server.",
|
|
589
|
+
"value": {
|
|
590
|
+
"email": "user@example.com",
|
|
591
|
+
"password": "MyPassword123!"
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
"responses": {
|
|
599
|
+
"200": {
|
|
600
|
+
"description": "Response from a login on the server.",
|
|
601
|
+
"content": {
|
|
602
|
+
"application/json": {
|
|
603
|
+
"schema": {
|
|
604
|
+
"$ref": "#/components/schemas/LoginResponse"
|
|
605
|
+
},
|
|
606
|
+
"examples": {
|
|
607
|
+
"loginResponseExample": {
|
|
608
|
+
"summary": "The response for the login request.",
|
|
609
|
+
"value": {
|
|
610
|
+
"expiry": 1722514341067
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"400": {
|
|
618
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
619
|
+
"content": {
|
|
620
|
+
"application/json": {
|
|
621
|
+
"schema": {
|
|
622
|
+
"$ref": "#/components/schemas/Error"
|
|
623
|
+
},
|
|
624
|
+
"examples": {
|
|
625
|
+
"exampleResponse": {
|
|
626
|
+
"value": {
|
|
627
|
+
"name": "GeneralError",
|
|
628
|
+
"message": "errorMessage",
|
|
629
|
+
"properties": {
|
|
630
|
+
"foo": "bar"
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
"401": {
|
|
639
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
640
|
+
"content": {
|
|
641
|
+
"application/json": {
|
|
642
|
+
"schema": {
|
|
643
|
+
"$ref": "#/components/schemas/Error"
|
|
644
|
+
},
|
|
645
|
+
"examples": {
|
|
646
|
+
"exampleResponse": {
|
|
647
|
+
"value": {
|
|
648
|
+
"name": "UnauthorizedError",
|
|
649
|
+
"message": "errorMessage"
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"500": {
|
|
657
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
658
|
+
"content": {
|
|
659
|
+
"application/json": {
|
|
660
|
+
"schema": {
|
|
661
|
+
"$ref": "#/components/schemas/Error"
|
|
662
|
+
},
|
|
663
|
+
"examples": {
|
|
664
|
+
"exampleResponse": {
|
|
665
|
+
"value": {
|
|
666
|
+
"name": "InternalServerError",
|
|
667
|
+
"message": "errorMessage"
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
"/authentication/logout": {
|
|
678
|
+
"get": {
|
|
679
|
+
"operationId": "authenticationLogout",
|
|
680
|
+
"summary": "Logout from the server",
|
|
681
|
+
"tags": [
|
|
682
|
+
"Authentication"
|
|
683
|
+
],
|
|
684
|
+
"parameters": [
|
|
685
|
+
{
|
|
686
|
+
"name": "token",
|
|
687
|
+
"description": "The token to logout, if it uses a mechanism with public access.",
|
|
688
|
+
"in": "query",
|
|
689
|
+
"required": false,
|
|
690
|
+
"schema": {
|
|
691
|
+
"type": "string"
|
|
692
|
+
},
|
|
693
|
+
"example": "eyJhbGciOiJIU...sw5c"
|
|
694
|
+
}
|
|
695
|
+
],
|
|
696
|
+
"responses": {
|
|
697
|
+
"204": {
|
|
698
|
+
"description": "The rest request ended in success with no data."
|
|
699
|
+
},
|
|
700
|
+
"400": {
|
|
701
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
702
|
+
"content": {
|
|
703
|
+
"application/json": {
|
|
704
|
+
"schema": {
|
|
705
|
+
"$ref": "#/components/schemas/Error"
|
|
706
|
+
},
|
|
707
|
+
"examples": {
|
|
708
|
+
"exampleResponse": {
|
|
709
|
+
"value": {
|
|
710
|
+
"name": "GeneralError",
|
|
711
|
+
"message": "errorMessage",
|
|
712
|
+
"properties": {
|
|
713
|
+
"foo": "bar"
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
"500": {
|
|
722
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
723
|
+
"content": {
|
|
724
|
+
"application/json": {
|
|
725
|
+
"schema": {
|
|
726
|
+
"$ref": "#/components/schemas/Error"
|
|
727
|
+
},
|
|
728
|
+
"examples": {
|
|
729
|
+
"exampleResponse": {
|
|
730
|
+
"value": {
|
|
731
|
+
"name": "InternalServerError",
|
|
732
|
+
"message": "errorMessage"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
"/authentication/refresh": {
|
|
743
|
+
"get": {
|
|
744
|
+
"operationId": "authenticationRefreshToken",
|
|
745
|
+
"summary": "Refresh an authentication token",
|
|
746
|
+
"tags": [
|
|
747
|
+
"Authentication"
|
|
748
|
+
],
|
|
749
|
+
"parameters": [
|
|
750
|
+
{
|
|
751
|
+
"name": "token",
|
|
752
|
+
"description": "The token to refresh, if it uses a mechanism with public access.",
|
|
753
|
+
"in": "query",
|
|
754
|
+
"required": false,
|
|
755
|
+
"schema": {
|
|
756
|
+
"type": "string"
|
|
757
|
+
},
|
|
758
|
+
"example": "eyJhbGciOiJIU...sw5c"
|
|
759
|
+
}
|
|
760
|
+
],
|
|
761
|
+
"security": [
|
|
762
|
+
{
|
|
763
|
+
"jwtBearerAuthScheme": []
|
|
764
|
+
}
|
|
765
|
+
],
|
|
766
|
+
"responses": {
|
|
767
|
+
"200": {
|
|
768
|
+
"description": "Response from a refresh on the auth token.",
|
|
769
|
+
"content": {
|
|
770
|
+
"application/json": {
|
|
771
|
+
"schema": {
|
|
772
|
+
"$ref": "#/components/schemas/RefreshTokenResponse"
|
|
773
|
+
},
|
|
774
|
+
"examples": {
|
|
775
|
+
"refreshTokenResponseExample": {
|
|
776
|
+
"summary": "The response for the refresh token request.",
|
|
777
|
+
"value": {
|
|
778
|
+
"expiry": 1722514341067
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"400": {
|
|
786
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
787
|
+
"content": {
|
|
788
|
+
"application/json": {
|
|
789
|
+
"schema": {
|
|
790
|
+
"$ref": "#/components/schemas/Error"
|
|
791
|
+
},
|
|
792
|
+
"examples": {
|
|
793
|
+
"exampleResponse": {
|
|
794
|
+
"value": {
|
|
795
|
+
"name": "GeneralError",
|
|
796
|
+
"message": "errorMessage",
|
|
797
|
+
"properties": {
|
|
798
|
+
"foo": "bar"
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
"401": {
|
|
807
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
808
|
+
"content": {
|
|
809
|
+
"application/json": {
|
|
810
|
+
"schema": {
|
|
811
|
+
"$ref": "#/components/schemas/Error"
|
|
812
|
+
},
|
|
813
|
+
"examples": {
|
|
814
|
+
"exampleResponse": {
|
|
815
|
+
"value": {
|
|
816
|
+
"name": "UnauthorizedError",
|
|
817
|
+
"message": "errorMessage"
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
"500": {
|
|
825
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
826
|
+
"content": {
|
|
827
|
+
"application/json": {
|
|
828
|
+
"schema": {
|
|
829
|
+
"$ref": "#/components/schemas/Error"
|
|
830
|
+
},
|
|
831
|
+
"examples": {
|
|
832
|
+
"exampleResponse": {
|
|
833
|
+
"value": {
|
|
834
|
+
"name": "InternalServerError",
|
|
835
|
+
"message": "errorMessage"
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
"/authentication/password": {
|
|
846
|
+
"put": {
|
|
847
|
+
"operationId": "authenticationUpdatePassword",
|
|
848
|
+
"summary": "Update the current user's password",
|
|
849
|
+
"tags": [
|
|
850
|
+
"Authentication"
|
|
851
|
+
],
|
|
852
|
+
"security": [
|
|
853
|
+
{
|
|
854
|
+
"jwtBearerAuthScheme": []
|
|
855
|
+
}
|
|
856
|
+
],
|
|
857
|
+
"requestBody": {
|
|
858
|
+
"description": "Update the current user's password.",
|
|
859
|
+
"required": true,
|
|
860
|
+
"content": {
|
|
861
|
+
"application/json": {
|
|
862
|
+
"schema": {
|
|
863
|
+
"$ref": "#/components/schemas/UpdatePasswordRequest"
|
|
864
|
+
},
|
|
865
|
+
"examples": {
|
|
866
|
+
"updatePasswordRequestExample": {
|
|
867
|
+
"summary": "The request to update the current user's password.",
|
|
868
|
+
"value": {
|
|
869
|
+
"currentPassword": "MyNewPassword123!",
|
|
870
|
+
"newPassword": "MyNewPassword123!"
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
"responses": {
|
|
878
|
+
"204": {
|
|
879
|
+
"description": "The rest request ended in success with no data."
|
|
880
|
+
},
|
|
881
|
+
"400": {
|
|
882
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
883
|
+
"content": {
|
|
884
|
+
"application/json": {
|
|
885
|
+
"schema": {
|
|
886
|
+
"$ref": "#/components/schemas/Error"
|
|
887
|
+
},
|
|
888
|
+
"examples": {
|
|
889
|
+
"exampleResponse": {
|
|
890
|
+
"value": {
|
|
891
|
+
"name": "GeneralError",
|
|
892
|
+
"message": "errorMessage",
|
|
893
|
+
"properties": {
|
|
894
|
+
"foo": "bar"
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
"401": {
|
|
903
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
904
|
+
"content": {
|
|
905
|
+
"application/json": {
|
|
906
|
+
"schema": {
|
|
907
|
+
"$ref": "#/components/schemas/Error"
|
|
908
|
+
},
|
|
909
|
+
"examples": {
|
|
910
|
+
"exampleResponse": {
|
|
911
|
+
"value": {
|
|
912
|
+
"name": "UnauthorizedError",
|
|
913
|
+
"message": "errorMessage"
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
},
|
|
920
|
+
"500": {
|
|
921
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
922
|
+
"content": {
|
|
923
|
+
"application/json": {
|
|
924
|
+
"schema": {
|
|
925
|
+
"$ref": "#/components/schemas/Error"
|
|
926
|
+
},
|
|
927
|
+
"examples": {
|
|
928
|
+
"exampleResponse": {
|
|
929
|
+
"value": {
|
|
930
|
+
"name": "InternalServerError",
|
|
931
|
+
"message": "errorMessage"
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
"/authentication/admin/users": {
|
|
942
|
+
"post": {
|
|
943
|
+
"operationId": "authenticationAdminCreateUser",
|
|
944
|
+
"summary": "Create a new user",
|
|
945
|
+
"tags": [
|
|
946
|
+
"Authentication Admin"
|
|
947
|
+
],
|
|
948
|
+
"security": [
|
|
949
|
+
{
|
|
950
|
+
"jwtBearerAuthScheme": []
|
|
951
|
+
}
|
|
952
|
+
],
|
|
953
|
+
"requestBody": {
|
|
954
|
+
"description": "Create a new user as an admin.",
|
|
955
|
+
"required": true,
|
|
956
|
+
"content": {
|
|
957
|
+
"application/json": {
|
|
958
|
+
"schema": {
|
|
959
|
+
"$ref": "#/components/schemas/AuthenticationUser"
|
|
960
|
+
},
|
|
961
|
+
"examples": {
|
|
962
|
+
"createUserRequestExample": {
|
|
963
|
+
"summary": "The request to create a new user.",
|
|
964
|
+
"value": {
|
|
965
|
+
"email": "user@example.com",
|
|
966
|
+
"password": "MyPassword123!",
|
|
967
|
+
"userIdentity": "did:example:123456789abcdefghi",
|
|
968
|
+
"organizationIdentity": "did:example:123456789abcdefghi",
|
|
969
|
+
"scope": [
|
|
970
|
+
"scope1",
|
|
971
|
+
"scope2"
|
|
972
|
+
]
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
"responses": {
|
|
980
|
+
"204": {
|
|
981
|
+
"description": "The rest request ended in success with no data."
|
|
982
|
+
},
|
|
983
|
+
"400": {
|
|
984
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
985
|
+
"content": {
|
|
986
|
+
"application/json": {
|
|
987
|
+
"schema": {
|
|
988
|
+
"$ref": "#/components/schemas/Error"
|
|
989
|
+
},
|
|
990
|
+
"examples": {
|
|
991
|
+
"exampleResponse": {
|
|
992
|
+
"value": {
|
|
993
|
+
"name": "GeneralError",
|
|
994
|
+
"message": "errorMessage",
|
|
995
|
+
"properties": {
|
|
996
|
+
"foo": "bar"
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
"401": {
|
|
1005
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
1006
|
+
"content": {
|
|
1007
|
+
"application/json": {
|
|
1008
|
+
"schema": {
|
|
1009
|
+
"$ref": "#/components/schemas/Error"
|
|
1010
|
+
},
|
|
1011
|
+
"examples": {
|
|
1012
|
+
"exampleResponse": {
|
|
1013
|
+
"value": {
|
|
1014
|
+
"name": "UnauthorizedError",
|
|
1015
|
+
"message": "errorMessage"
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
"500": {
|
|
1023
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
1024
|
+
"content": {
|
|
1025
|
+
"application/json": {
|
|
1026
|
+
"schema": {
|
|
1027
|
+
"$ref": "#/components/schemas/Error"
|
|
1028
|
+
},
|
|
1029
|
+
"examples": {
|
|
1030
|
+
"exampleResponse": {
|
|
1031
|
+
"value": {
|
|
1032
|
+
"name": "InternalServerError",
|
|
1033
|
+
"message": "errorMessage"
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"/authentication/admin/users/{email}": {
|
|
1044
|
+
"put": {
|
|
1045
|
+
"operationId": "authenticationAdminUpdateUser",
|
|
1046
|
+
"summary": "Update an existing user",
|
|
501
1047
|
"tags": [
|
|
502
|
-
"
|
|
1048
|
+
"Authentication Admin"
|
|
1049
|
+
],
|
|
1050
|
+
"parameters": [
|
|
1051
|
+
{
|
|
1052
|
+
"name": "email",
|
|
1053
|
+
"description": "The user email.",
|
|
1054
|
+
"in": "path",
|
|
1055
|
+
"required": true,
|
|
1056
|
+
"schema": {
|
|
1057
|
+
"type": "string"
|
|
1058
|
+
},
|
|
1059
|
+
"style": "simple",
|
|
1060
|
+
"example": "user@example.com"
|
|
1061
|
+
}
|
|
1062
|
+
],
|
|
1063
|
+
"security": [
|
|
1064
|
+
{
|
|
1065
|
+
"jwtBearerAuthScheme": []
|
|
1066
|
+
}
|
|
503
1067
|
],
|
|
1068
|
+
"requestBody": {
|
|
1069
|
+
"description": "Update a user as an admin.",
|
|
1070
|
+
"required": true,
|
|
1071
|
+
"content": {
|
|
1072
|
+
"application/json": {
|
|
1073
|
+
"schema": {
|
|
1074
|
+
"$ref": "#/components/schemas/Partial<AuthenticationUser"
|
|
1075
|
+
},
|
|
1076
|
+
"examples": {
|
|
1077
|
+
"updateUserRequestExample": {
|
|
1078
|
+
"summary": "The request to update an existing user.",
|
|
1079
|
+
"value": {
|
|
1080
|
+
"userIdentity": "did:example:123456789abcdefghi",
|
|
1081
|
+
"organizationIdentity": "did:example:123456789abcdefghi",
|
|
1082
|
+
"scope": [
|
|
1083
|
+
"scope1",
|
|
1084
|
+
"scope2"
|
|
1085
|
+
]
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
504
1092
|
"responses": {
|
|
505
|
-
"
|
|
506
|
-
"description": "The
|
|
1093
|
+
"204": {
|
|
1094
|
+
"description": "The rest request ended in success with no data."
|
|
1095
|
+
},
|
|
1096
|
+
"400": {
|
|
1097
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
507
1098
|
"content": {
|
|
508
1099
|
"application/json": {
|
|
509
1100
|
"schema": {
|
|
510
|
-
"$ref": "#/components/schemas/
|
|
1101
|
+
"$ref": "#/components/schemas/Error"
|
|
511
1102
|
},
|
|
512
1103
|
"examples": {
|
|
513
|
-
"
|
|
514
|
-
"summary": "The response for the spec request.",
|
|
1104
|
+
"exampleResponse": {
|
|
515
1105
|
"value": {
|
|
516
|
-
"
|
|
517
|
-
"
|
|
518
|
-
"
|
|
1106
|
+
"name": "GeneralError",
|
|
1107
|
+
"message": "errorMessage",
|
|
1108
|
+
"properties": {
|
|
1109
|
+
"foo": "bar"
|
|
1110
|
+
}
|
|
519
1111
|
}
|
|
520
1112
|
}
|
|
521
1113
|
}
|
|
522
1114
|
}
|
|
523
1115
|
}
|
|
524
1116
|
},
|
|
525
|
-
"
|
|
526
|
-
"description": "
|
|
1117
|
+
"401": {
|
|
1118
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
527
1119
|
"content": {
|
|
528
1120
|
"application/json": {
|
|
529
1121
|
"schema": {
|
|
@@ -532,11 +1124,8 @@
|
|
|
532
1124
|
"examples": {
|
|
533
1125
|
"exampleResponse": {
|
|
534
1126
|
"value": {
|
|
535
|
-
"name": "
|
|
536
|
-
"message": "errorMessage"
|
|
537
|
-
"properties": {
|
|
538
|
-
"foo": "bar"
|
|
539
|
-
}
|
|
1127
|
+
"name": "UnauthorizedError",
|
|
1128
|
+
"message": "errorMessage"
|
|
540
1129
|
}
|
|
541
1130
|
}
|
|
542
1131
|
}
|
|
@@ -562,48 +1151,50 @@
|
|
|
562
1151
|
}
|
|
563
1152
|
}
|
|
564
1153
|
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
"operationId": "authenticationLogin",
|
|
570
|
-
"summary": "Login to the server",
|
|
1154
|
+
},
|
|
1155
|
+
"get": {
|
|
1156
|
+
"operationId": "authenticationAdminGetUser",
|
|
1157
|
+
"summary": "Get existing user",
|
|
571
1158
|
"tags": [
|
|
572
|
-
"Authentication"
|
|
1159
|
+
"Authentication Admin"
|
|
573
1160
|
],
|
|
574
|
-
"
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
"
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
"value": {
|
|
586
|
-
"email": "user@example.com",
|
|
587
|
-
"password": "MyPassword123!"
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
}
|
|
1161
|
+
"parameters": [
|
|
1162
|
+
{
|
|
1163
|
+
"name": "email",
|
|
1164
|
+
"description": "The user email.",
|
|
1165
|
+
"in": "path",
|
|
1166
|
+
"required": true,
|
|
1167
|
+
"schema": {
|
|
1168
|
+
"type": "string"
|
|
1169
|
+
},
|
|
1170
|
+
"style": "simple",
|
|
1171
|
+
"example": "user@example.com"
|
|
592
1172
|
}
|
|
593
|
-
|
|
1173
|
+
],
|
|
1174
|
+
"security": [
|
|
1175
|
+
{
|
|
1176
|
+
"jwtBearerAuthScheme": []
|
|
1177
|
+
}
|
|
1178
|
+
],
|
|
594
1179
|
"responses": {
|
|
595
1180
|
"200": {
|
|
596
|
-
"description": "
|
|
1181
|
+
"description": "Get a user as an admin.",
|
|
597
1182
|
"content": {
|
|
598
1183
|
"application/json": {
|
|
599
1184
|
"schema": {
|
|
600
|
-
"$ref": "#/components/schemas/
|
|
1185
|
+
"$ref": "#/components/schemas/AuthenticationUser"
|
|
601
1186
|
},
|
|
602
1187
|
"examples": {
|
|
603
|
-
"
|
|
604
|
-
"summary": "The response
|
|
1188
|
+
"getUserResponseExample": {
|
|
1189
|
+
"summary": "The response to get an existing user.",
|
|
605
1190
|
"value": {
|
|
606
|
-
"
|
|
1191
|
+
"email": "user@example.com",
|
|
1192
|
+
"userIdentity": "did:example:123456789abcdefghi",
|
|
1193
|
+
"organizationIdentity": "did:example:123456789abcdefghi",
|
|
1194
|
+
"scope": [
|
|
1195
|
+
"scope1",
|
|
1196
|
+
"scope2"
|
|
1197
|
+
]
|
|
607
1198
|
}
|
|
608
1199
|
}
|
|
609
1200
|
}
|
|
@@ -668,25 +1259,29 @@
|
|
|
668
1259
|
}
|
|
669
1260
|
}
|
|
670
1261
|
}
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
"operationId": "authenticationLogout",
|
|
676
|
-
"summary": "Logout from the server",
|
|
1262
|
+
},
|
|
1263
|
+
"delete": {
|
|
1264
|
+
"operationId": "authenticationAdminRemoveUser",
|
|
1265
|
+
"summary": "Remove existing user",
|
|
677
1266
|
"tags": [
|
|
678
|
-
"Authentication"
|
|
1267
|
+
"Authentication Admin"
|
|
679
1268
|
],
|
|
680
1269
|
"parameters": [
|
|
681
1270
|
{
|
|
682
|
-
"name": "
|
|
683
|
-
"description": "The
|
|
684
|
-
"in": "
|
|
685
|
-
"required":
|
|
1271
|
+
"name": "email",
|
|
1272
|
+
"description": "The user email.",
|
|
1273
|
+
"in": "path",
|
|
1274
|
+
"required": true,
|
|
686
1275
|
"schema": {
|
|
687
1276
|
"type": "string"
|
|
688
1277
|
},
|
|
689
|
-
"
|
|
1278
|
+
"style": "simple",
|
|
1279
|
+
"example": "user@example.com"
|
|
1280
|
+
}
|
|
1281
|
+
],
|
|
1282
|
+
"security": [
|
|
1283
|
+
{
|
|
1284
|
+
"jwtBearerAuthScheme": []
|
|
690
1285
|
}
|
|
691
1286
|
],
|
|
692
1287
|
"responses": {
|
|
@@ -714,6 +1309,24 @@
|
|
|
714
1309
|
}
|
|
715
1310
|
}
|
|
716
1311
|
},
|
|
1312
|
+
"401": {
|
|
1313
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
1314
|
+
"content": {
|
|
1315
|
+
"application/json": {
|
|
1316
|
+
"schema": {
|
|
1317
|
+
"$ref": "#/components/schemas/Error"
|
|
1318
|
+
},
|
|
1319
|
+
"examples": {
|
|
1320
|
+
"exampleResponse": {
|
|
1321
|
+
"value": {
|
|
1322
|
+
"name": "UnauthorizedError",
|
|
1323
|
+
"message": "errorMessage"
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
717
1330
|
"500": {
|
|
718
1331
|
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
719
1332
|
"content": {
|
|
@@ -735,23 +1348,24 @@
|
|
|
735
1348
|
}
|
|
736
1349
|
}
|
|
737
1350
|
},
|
|
738
|
-
"/authentication/
|
|
739
|
-
"
|
|
740
|
-
"operationId": "
|
|
741
|
-
"summary": "
|
|
1351
|
+
"/authentication/admin/users/{email}/password": {
|
|
1352
|
+
"put": {
|
|
1353
|
+
"operationId": "authenticationAdminUpdateUserPassword",
|
|
1354
|
+
"summary": "Update an existing user password",
|
|
742
1355
|
"tags": [
|
|
743
|
-
"Authentication"
|
|
1356
|
+
"Authentication Admin"
|
|
744
1357
|
],
|
|
745
1358
|
"parameters": [
|
|
746
1359
|
{
|
|
747
|
-
"name": "
|
|
748
|
-
"description": "The
|
|
749
|
-
"in": "
|
|
750
|
-
"required":
|
|
1360
|
+
"name": "email",
|
|
1361
|
+
"description": "The user email.",
|
|
1362
|
+
"in": "path",
|
|
1363
|
+
"required": true,
|
|
751
1364
|
"schema": {
|
|
752
1365
|
"type": "string"
|
|
753
1366
|
},
|
|
754
|
-
"
|
|
1367
|
+
"style": "simple",
|
|
1368
|
+
"example": "user@example.com"
|
|
755
1369
|
}
|
|
756
1370
|
],
|
|
757
1371
|
"security": [
|
|
@@ -759,24 +1373,28 @@
|
|
|
759
1373
|
"jwtBearerAuthScheme": []
|
|
760
1374
|
}
|
|
761
1375
|
],
|
|
762
|
-
"
|
|
763
|
-
"
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
}
|
|
1376
|
+
"requestBody": {
|
|
1377
|
+
"description": "Update a users password as an admin.",
|
|
1378
|
+
"required": true,
|
|
1379
|
+
"content": {
|
|
1380
|
+
"application/json": {
|
|
1381
|
+
"schema": {
|
|
1382
|
+
"$ref": "#/components/schemas/AdminUserUpdatePasswordRequest"
|
|
1383
|
+
},
|
|
1384
|
+
"examples": {
|
|
1385
|
+
"updateUserPasswordRequestExample": {
|
|
1386
|
+
"summary": "The request to update an existing user password.",
|
|
1387
|
+
"value": {
|
|
1388
|
+
"newPassword": "MyNewPassword123!"
|
|
776
1389
|
}
|
|
777
1390
|
}
|
|
778
1391
|
}
|
|
779
1392
|
}
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
"responses": {
|
|
1396
|
+
"204": {
|
|
1397
|
+
"description": "The rest request ended in success with no data."
|
|
780
1398
|
},
|
|
781
1399
|
"400": {
|
|
782
1400
|
"description": "The server cannot process the request, see the content for more details.",
|
|
@@ -838,24 +1456,24 @@
|
|
|
838
1456
|
}
|
|
839
1457
|
}
|
|
840
1458
|
},
|
|
841
|
-
"/authentication/{
|
|
842
|
-
"
|
|
843
|
-
"operationId": "
|
|
844
|
-
"summary": "
|
|
1459
|
+
"/authentication/admin/users/identity/{identity}": {
|
|
1460
|
+
"get": {
|
|
1461
|
+
"operationId": "authenticationAdminGetByIdentityUser",
|
|
1462
|
+
"summary": "Get existing user by identity",
|
|
845
1463
|
"tags": [
|
|
846
|
-
"Authentication"
|
|
1464
|
+
"Authentication Admin"
|
|
847
1465
|
],
|
|
848
1466
|
"parameters": [
|
|
849
1467
|
{
|
|
850
|
-
"name": "
|
|
851
|
-
"description": "The user
|
|
1468
|
+
"name": "identity",
|
|
1469
|
+
"description": "The user identity.",
|
|
852
1470
|
"in": "path",
|
|
853
1471
|
"required": true,
|
|
854
1472
|
"schema": {
|
|
855
1473
|
"type": "string"
|
|
856
1474
|
},
|
|
857
1475
|
"style": "simple",
|
|
858
|
-
"example": "
|
|
1476
|
+
"example": "did:example:123456789abcdefghi"
|
|
859
1477
|
}
|
|
860
1478
|
],
|
|
861
1479
|
"security": [
|
|
@@ -863,29 +1481,30 @@
|
|
|
863
1481
|
"jwtBearerAuthScheme": []
|
|
864
1482
|
}
|
|
865
1483
|
],
|
|
866
|
-
"
|
|
867
|
-
"
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
1484
|
+
"responses": {
|
|
1485
|
+
"200": {
|
|
1486
|
+
"description": "Get a user as an admin.",
|
|
1487
|
+
"content": {
|
|
1488
|
+
"application/json": {
|
|
1489
|
+
"schema": {
|
|
1490
|
+
"$ref": "#/components/schemas/AuthenticationUser"
|
|
1491
|
+
},
|
|
1492
|
+
"examples": {
|
|
1493
|
+
"getUserResponseExample": {
|
|
1494
|
+
"summary": "The response to get an existing user.",
|
|
1495
|
+
"value": {
|
|
1496
|
+
"email": "user@example.com",
|
|
1497
|
+
"userIdentity": "did:example:123456789abcdefghi",
|
|
1498
|
+
"organizationIdentity": "did:example:123456789abcdefghi",
|
|
1499
|
+
"scope": [
|
|
1500
|
+
"scope1",
|
|
1501
|
+
"scope2"
|
|
1502
|
+
]
|
|
1503
|
+
}
|
|
880
1504
|
}
|
|
881
1505
|
}
|
|
882
1506
|
}
|
|
883
1507
|
}
|
|
884
|
-
}
|
|
885
|
-
},
|
|
886
|
-
"responses": {
|
|
887
|
-
"204": {
|
|
888
|
-
"description": "The rest request ended in success with no data."
|
|
889
1508
|
},
|
|
890
1509
|
"400": {
|
|
891
1510
|
"description": "The server cannot process the request, see the content for more details.",
|
|
@@ -16280,6 +16899,24 @@
|
|
|
16280
16899
|
],
|
|
16281
16900
|
"description": "The types concerning Activity Streams. Section 3.1 Activity Types: https://www.w3.org/TR/activitystreams-vocabulary/#activity-types The types concerning Activity. Section 3.1 Activity Types: https://www.w3.org/TR/activitystreams-vocabulary/#activity-types"
|
|
16282
16901
|
},
|
|
16902
|
+
"AdminUserUpdatePasswordRequest": {
|
|
16903
|
+
"type": "object",
|
|
16904
|
+
"properties": {
|
|
16905
|
+
"newPassword": {
|
|
16906
|
+
"type": "string",
|
|
16907
|
+
"description": "The new password for the user."
|
|
16908
|
+
},
|
|
16909
|
+
"currentPassword": {
|
|
16910
|
+
"type": "string",
|
|
16911
|
+
"description": "The current password for the user."
|
|
16912
|
+
}
|
|
16913
|
+
},
|
|
16914
|
+
"required": [
|
|
16915
|
+
"newPassword"
|
|
16916
|
+
],
|
|
16917
|
+
"additionalProperties": false,
|
|
16918
|
+
"description": "The body of the request."
|
|
16919
|
+
},
|
|
16283
16920
|
"AttestationCreateRequest": {
|
|
16284
16921
|
"type": "object",
|
|
16285
16922
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/node",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.20",
|
|
4
4
|
"description": "TWIN Node serving APIs using the specified configuration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/node-core": "0.0.3-next.
|
|
17
|
+
"@twin.org/node-core": "0.0.3-next.20"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "git+https://github.com/twinfoundation/node/issues"
|