@novu/api 0.0.2 → 0.0.3
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 +2 -0
- package/docs/sdks/admin/README.md +75 -0
- package/funcs/adminGenerateRandomNumber.d.ts +10 -0
- package/funcs/adminGenerateRandomNumber.d.ts.map +1 -0
- package/funcs/adminGenerateRandomNumber.js +126 -0
- package/funcs/adminGenerateRandomNumber.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/operations/healthcontrollergeneraterandomnumber.d.ts +64 -0
- package/models/operations/healthcontrollergeneraterandomnumber.d.ts.map +1 -0
- package/models/operations/healthcontrollergeneraterandomnumber.js +108 -0
- package/models/operations/healthcontrollergeneraterandomnumber.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/admin.d.ts +1 -0
- package/sdk/admin.d.ts.map +1 -1
- package/sdk/admin.js +4 -0
- package/sdk/admin.js.map +1 -1
- package/sources/json-development.json +472 -0
- package/src/funcs/adminGenerateRandomNumber.ts +183 -0
- package/src/lib/config.ts +2 -2
- package/src/models/operations/healthcontrollergeneraterandomnumber.ts +177 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/admin.ts +12 -0
|
@@ -661,6 +661,478 @@
|
|
|
661
661
|
"api-key": []
|
|
662
662
|
}
|
|
663
663
|
]
|
|
664
|
+
},
|
|
665
|
+
"get": {
|
|
666
|
+
"operationId": "HealthController_generateRandomNumber",
|
|
667
|
+
"x-speakeasy-name-override": "generateRandomNumber",
|
|
668
|
+
"parameters": [
|
|
669
|
+
{
|
|
670
|
+
"name": "idempotency-key",
|
|
671
|
+
"in": "header",
|
|
672
|
+
"description": "A header for idempotency purposes",
|
|
673
|
+
"required": false,
|
|
674
|
+
"schema": {
|
|
675
|
+
"type": "string"
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
],
|
|
679
|
+
"responses": {
|
|
680
|
+
"201": {
|
|
681
|
+
"headers": {
|
|
682
|
+
"Content-Type": {
|
|
683
|
+
"$ref": "#/components/headers/Content-Type"
|
|
684
|
+
},
|
|
685
|
+
"RateLimit-Limit": {
|
|
686
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
687
|
+
},
|
|
688
|
+
"RateLimit-Remaining": {
|
|
689
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
690
|
+
},
|
|
691
|
+
"RateLimit-Reset": {
|
|
692
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
693
|
+
},
|
|
694
|
+
"RateLimit-Policy": {
|
|
695
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
696
|
+
},
|
|
697
|
+
"Idempotency-Key": {
|
|
698
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
699
|
+
},
|
|
700
|
+
"Idempotency-Replay": {
|
|
701
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
"description": "",
|
|
705
|
+
"content": {
|
|
706
|
+
"application/json": {
|
|
707
|
+
"schema": {
|
|
708
|
+
"$ref": "#/components/schemas/IdempotenceTestingResponse"
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"400": {
|
|
714
|
+
"description": "Bad Request",
|
|
715
|
+
"headers": {
|
|
716
|
+
"Content-Type": {
|
|
717
|
+
"$ref": "#/components/headers/Content-Type"
|
|
718
|
+
},
|
|
719
|
+
"RateLimit-Limit": {
|
|
720
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
721
|
+
},
|
|
722
|
+
"RateLimit-Remaining": {
|
|
723
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
724
|
+
},
|
|
725
|
+
"RateLimit-Reset": {
|
|
726
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
727
|
+
},
|
|
728
|
+
"RateLimit-Policy": {
|
|
729
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
730
|
+
},
|
|
731
|
+
"Idempotency-Key": {
|
|
732
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
733
|
+
},
|
|
734
|
+
"Idempotency-Replay": {
|
|
735
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
"content": {
|
|
739
|
+
"application/json": {
|
|
740
|
+
"schema": {
|
|
741
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
"401": {
|
|
747
|
+
"description": "Unauthorized",
|
|
748
|
+
"headers": {
|
|
749
|
+
"Content-Type": {
|
|
750
|
+
"$ref": "#/components/headers/Content-Type"
|
|
751
|
+
},
|
|
752
|
+
"RateLimit-Limit": {
|
|
753
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
754
|
+
},
|
|
755
|
+
"RateLimit-Remaining": {
|
|
756
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
757
|
+
},
|
|
758
|
+
"RateLimit-Reset": {
|
|
759
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
760
|
+
},
|
|
761
|
+
"RateLimit-Policy": {
|
|
762
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
763
|
+
},
|
|
764
|
+
"Idempotency-Key": {
|
|
765
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
766
|
+
},
|
|
767
|
+
"Idempotency-Replay": {
|
|
768
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
"content": {
|
|
772
|
+
"application/json": {
|
|
773
|
+
"schema": {
|
|
774
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
"403": {
|
|
780
|
+
"description": "Forbidden",
|
|
781
|
+
"headers": {
|
|
782
|
+
"Content-Type": {
|
|
783
|
+
"$ref": "#/components/headers/Content-Type"
|
|
784
|
+
},
|
|
785
|
+
"RateLimit-Limit": {
|
|
786
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
787
|
+
},
|
|
788
|
+
"RateLimit-Remaining": {
|
|
789
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
790
|
+
},
|
|
791
|
+
"RateLimit-Reset": {
|
|
792
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
793
|
+
},
|
|
794
|
+
"RateLimit-Policy": {
|
|
795
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
796
|
+
},
|
|
797
|
+
"Idempotency-Key": {
|
|
798
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
799
|
+
},
|
|
800
|
+
"Idempotency-Replay": {
|
|
801
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
"content": {
|
|
805
|
+
"application/json": {
|
|
806
|
+
"schema": {
|
|
807
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
"404": {
|
|
813
|
+
"description": "Not Found",
|
|
814
|
+
"headers": {
|
|
815
|
+
"Content-Type": {
|
|
816
|
+
"$ref": "#/components/headers/Content-Type"
|
|
817
|
+
},
|
|
818
|
+
"RateLimit-Limit": {
|
|
819
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
820
|
+
},
|
|
821
|
+
"RateLimit-Remaining": {
|
|
822
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
823
|
+
},
|
|
824
|
+
"RateLimit-Reset": {
|
|
825
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
826
|
+
},
|
|
827
|
+
"RateLimit-Policy": {
|
|
828
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
829
|
+
},
|
|
830
|
+
"Idempotency-Key": {
|
|
831
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
832
|
+
},
|
|
833
|
+
"Idempotency-Replay": {
|
|
834
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
"content": {
|
|
838
|
+
"application/json": {
|
|
839
|
+
"schema": {
|
|
840
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
"405": {
|
|
846
|
+
"description": "Method Not Allowed",
|
|
847
|
+
"headers": {
|
|
848
|
+
"Content-Type": {
|
|
849
|
+
"$ref": "#/components/headers/Content-Type"
|
|
850
|
+
},
|
|
851
|
+
"RateLimit-Limit": {
|
|
852
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
853
|
+
},
|
|
854
|
+
"RateLimit-Remaining": {
|
|
855
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
856
|
+
},
|
|
857
|
+
"RateLimit-Reset": {
|
|
858
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
859
|
+
},
|
|
860
|
+
"RateLimit-Policy": {
|
|
861
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
862
|
+
},
|
|
863
|
+
"Idempotency-Key": {
|
|
864
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
865
|
+
},
|
|
866
|
+
"Idempotency-Replay": {
|
|
867
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
"content": {
|
|
871
|
+
"application/json": {
|
|
872
|
+
"schema": {
|
|
873
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
"409": {
|
|
879
|
+
"description": "Conflict",
|
|
880
|
+
"headers": {
|
|
881
|
+
"Content-Type": {
|
|
882
|
+
"$ref": "#/components/headers/Content-Type"
|
|
883
|
+
},
|
|
884
|
+
"RateLimit-Limit": {
|
|
885
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
886
|
+
},
|
|
887
|
+
"RateLimit-Remaining": {
|
|
888
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
889
|
+
},
|
|
890
|
+
"RateLimit-Reset": {
|
|
891
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
892
|
+
},
|
|
893
|
+
"RateLimit-Policy": {
|
|
894
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
895
|
+
},
|
|
896
|
+
"Idempotency-Key": {
|
|
897
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
898
|
+
},
|
|
899
|
+
"Idempotency-Replay": {
|
|
900
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
"content": {
|
|
904
|
+
"application/json": {
|
|
905
|
+
"schema": {
|
|
906
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
"413": {
|
|
912
|
+
"description": "Payload Too Large",
|
|
913
|
+
"headers": {
|
|
914
|
+
"Content-Type": {
|
|
915
|
+
"$ref": "#/components/headers/Content-Type"
|
|
916
|
+
},
|
|
917
|
+
"RateLimit-Limit": {
|
|
918
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
919
|
+
},
|
|
920
|
+
"RateLimit-Remaining": {
|
|
921
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
922
|
+
},
|
|
923
|
+
"RateLimit-Reset": {
|
|
924
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
925
|
+
},
|
|
926
|
+
"RateLimit-Policy": {
|
|
927
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
928
|
+
},
|
|
929
|
+
"Idempotency-Key": {
|
|
930
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
931
|
+
},
|
|
932
|
+
"Idempotency-Replay": {
|
|
933
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
"content": {
|
|
937
|
+
"application/json": {
|
|
938
|
+
"schema": {
|
|
939
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
"414": {
|
|
945
|
+
"description": "URI Too Long",
|
|
946
|
+
"content": {
|
|
947
|
+
"application/json": {
|
|
948
|
+
"schema": {
|
|
949
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
"415": {
|
|
955
|
+
"description": "Unsupported Media Type",
|
|
956
|
+
"headers": {
|
|
957
|
+
"Content-Type": {
|
|
958
|
+
"$ref": "#/components/headers/Content-Type"
|
|
959
|
+
},
|
|
960
|
+
"RateLimit-Limit": {
|
|
961
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
962
|
+
},
|
|
963
|
+
"RateLimit-Remaining": {
|
|
964
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
965
|
+
},
|
|
966
|
+
"RateLimit-Reset": {
|
|
967
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
968
|
+
},
|
|
969
|
+
"RateLimit-Policy": {
|
|
970
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
971
|
+
},
|
|
972
|
+
"Idempotency-Key": {
|
|
973
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
974
|
+
},
|
|
975
|
+
"Idempotency-Replay": {
|
|
976
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
"content": {
|
|
980
|
+
"application/json": {
|
|
981
|
+
"schema": {
|
|
982
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
"422": {
|
|
988
|
+
"description": "Unprocessable Entity",
|
|
989
|
+
"headers": {
|
|
990
|
+
"Content-Type": {
|
|
991
|
+
"$ref": "#/components/headers/Content-Type"
|
|
992
|
+
},
|
|
993
|
+
"RateLimit-Limit": {
|
|
994
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
995
|
+
},
|
|
996
|
+
"RateLimit-Remaining": {
|
|
997
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
998
|
+
},
|
|
999
|
+
"RateLimit-Reset": {
|
|
1000
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
1001
|
+
},
|
|
1002
|
+
"RateLimit-Policy": {
|
|
1003
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1004
|
+
},
|
|
1005
|
+
"Idempotency-Key": {
|
|
1006
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
1007
|
+
},
|
|
1008
|
+
"Idempotency-Replay": {
|
|
1009
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"content": {
|
|
1013
|
+
"application/json": {
|
|
1014
|
+
"schema": {
|
|
1015
|
+
"$ref": "#/components/schemas/ValidationErrorDto"
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
"429": {
|
|
1021
|
+
"description": "The client has sent too many requests in a given amount of time. ",
|
|
1022
|
+
"headers": {
|
|
1023
|
+
"Content-Type": {
|
|
1024
|
+
"$ref": "#/components/headers/Content-Type"
|
|
1025
|
+
},
|
|
1026
|
+
"RateLimit-Limit": {
|
|
1027
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
1028
|
+
},
|
|
1029
|
+
"RateLimit-Remaining": {
|
|
1030
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
1031
|
+
},
|
|
1032
|
+
"RateLimit-Reset": {
|
|
1033
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
1034
|
+
},
|
|
1035
|
+
"RateLimit-Policy": {
|
|
1036
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1037
|
+
},
|
|
1038
|
+
"Idempotency-Key": {
|
|
1039
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
1040
|
+
},
|
|
1041
|
+
"Idempotency-Replay": {
|
|
1042
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
1043
|
+
},
|
|
1044
|
+
"Retry-After": {
|
|
1045
|
+
"$ref": "#/components/headers/Retry-After"
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
"content": {
|
|
1049
|
+
"application/json": {
|
|
1050
|
+
"schema": {
|
|
1051
|
+
"type": "string",
|
|
1052
|
+
"example": "API rate limit exceeded"
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"500": {
|
|
1058
|
+
"description": "Internal Server Error",
|
|
1059
|
+
"headers": {
|
|
1060
|
+
"Content-Type": {
|
|
1061
|
+
"$ref": "#/components/headers/Content-Type"
|
|
1062
|
+
},
|
|
1063
|
+
"RateLimit-Limit": {
|
|
1064
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
1065
|
+
},
|
|
1066
|
+
"RateLimit-Remaining": {
|
|
1067
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
1068
|
+
},
|
|
1069
|
+
"RateLimit-Reset": {
|
|
1070
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
1071
|
+
},
|
|
1072
|
+
"RateLimit-Policy": {
|
|
1073
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1074
|
+
},
|
|
1075
|
+
"Idempotency-Key": {
|
|
1076
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
1077
|
+
},
|
|
1078
|
+
"Idempotency-Replay": {
|
|
1079
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
"content": {
|
|
1083
|
+
"application/json": {
|
|
1084
|
+
"schema": {
|
|
1085
|
+
"$ref": "#/components/schemas/ErrorDto"
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
"503": {
|
|
1091
|
+
"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
|
|
1092
|
+
"headers": {
|
|
1093
|
+
"Content-Type": {
|
|
1094
|
+
"$ref": "#/components/headers/Content-Type"
|
|
1095
|
+
},
|
|
1096
|
+
"RateLimit-Limit": {
|
|
1097
|
+
"$ref": "#/components/headers/RateLimit-Limit"
|
|
1098
|
+
},
|
|
1099
|
+
"RateLimit-Remaining": {
|
|
1100
|
+
"$ref": "#/components/headers/RateLimit-Remaining"
|
|
1101
|
+
},
|
|
1102
|
+
"RateLimit-Reset": {
|
|
1103
|
+
"$ref": "#/components/headers/RateLimit-Reset"
|
|
1104
|
+
},
|
|
1105
|
+
"RateLimit-Policy": {
|
|
1106
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1107
|
+
},
|
|
1108
|
+
"Idempotency-Key": {
|
|
1109
|
+
"$ref": "#/components/headers/Idempotency-Key"
|
|
1110
|
+
},
|
|
1111
|
+
"Idempotency-Replay": {
|
|
1112
|
+
"$ref": "#/components/headers/Idempotency-Replay"
|
|
1113
|
+
},
|
|
1114
|
+
"Retry-After": {
|
|
1115
|
+
"$ref": "#/components/headers/Retry-After"
|
|
1116
|
+
}
|
|
1117
|
+
},
|
|
1118
|
+
"content": {
|
|
1119
|
+
"application/json": {
|
|
1120
|
+
"schema": {
|
|
1121
|
+
"type": "string",
|
|
1122
|
+
"example": "Please wait some time, then try again."
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
"tags": [
|
|
1129
|
+
"Admin"
|
|
1130
|
+
],
|
|
1131
|
+
"security": [
|
|
1132
|
+
{
|
|
1133
|
+
"api-key": []
|
|
1134
|
+
}
|
|
1135
|
+
]
|
|
664
1136
|
}
|
|
665
1137
|
},
|
|
666
1138
|
"/v1/events/trigger": {
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { NovuCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
export async function adminGenerateRandomNumber(
|
|
27
|
+
client: NovuCore,
|
|
28
|
+
idempotencyKey?: string | undefined,
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): Promise<
|
|
31
|
+
Result<
|
|
32
|
+
operations.HealthControllerGenerateRandomNumberResponse,
|
|
33
|
+
| errors.ErrorDto
|
|
34
|
+
| errors.ErrorDto
|
|
35
|
+
| errors.ValidationErrorDto
|
|
36
|
+
| errors.ErrorDto
|
|
37
|
+
| SDKError
|
|
38
|
+
| SDKValidationError
|
|
39
|
+
| UnexpectedClientError
|
|
40
|
+
| InvalidRequestError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
>
|
|
45
|
+
> {
|
|
46
|
+
const input: operations.HealthControllerGenerateRandomNumberRequest = {
|
|
47
|
+
idempotencyKey: idempotencyKey,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
input,
|
|
52
|
+
(value) =>
|
|
53
|
+
operations.HealthControllerGenerateRandomNumberRequest$outboundSchema
|
|
54
|
+
.parse(value),
|
|
55
|
+
"Input validation failed",
|
|
56
|
+
);
|
|
57
|
+
if (!parsed.ok) {
|
|
58
|
+
return parsed;
|
|
59
|
+
}
|
|
60
|
+
const payload = parsed.value;
|
|
61
|
+
const body = null;
|
|
62
|
+
|
|
63
|
+
const path = pathToFunc("/v1/health-check/test-idempotency")();
|
|
64
|
+
|
|
65
|
+
const headers = new Headers(compactMap({
|
|
66
|
+
Accept: "application/json",
|
|
67
|
+
"idempotency-key": encodeSimple(
|
|
68
|
+
"idempotency-key",
|
|
69
|
+
payload["idempotency-key"],
|
|
70
|
+
{ explode: false, charEncoding: "none" },
|
|
71
|
+
),
|
|
72
|
+
}));
|
|
73
|
+
|
|
74
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
75
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
76
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
|
+
|
|
78
|
+
const context = {
|
|
79
|
+
operationID: "HealthController_generateRandomNumber",
|
|
80
|
+
oAuth2Scopes: [],
|
|
81
|
+
|
|
82
|
+
resolvedSecurity: requestSecurity,
|
|
83
|
+
|
|
84
|
+
securitySource: client._options.apiKey,
|
|
85
|
+
retryConfig: options?.retries
|
|
86
|
+
|| client._options.retryConfig
|
|
87
|
+
|| {
|
|
88
|
+
strategy: "backoff",
|
|
89
|
+
backoff: {
|
|
90
|
+
initialInterval: 1000,
|
|
91
|
+
maxInterval: 30000,
|
|
92
|
+
exponent: 1.5,
|
|
93
|
+
maxElapsedTime: 3600000,
|
|
94
|
+
},
|
|
95
|
+
retryConnectionErrors: true,
|
|
96
|
+
}
|
|
97
|
+
|| { strategy: "none" },
|
|
98
|
+
retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"],
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const requestRes = client._createRequest(context, {
|
|
102
|
+
security: requestSecurity,
|
|
103
|
+
method: "GET",
|
|
104
|
+
baseURL: options?.serverURL,
|
|
105
|
+
path: path,
|
|
106
|
+
headers: headers,
|
|
107
|
+
body: body,
|
|
108
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
109
|
+
}, options);
|
|
110
|
+
if (!requestRes.ok) {
|
|
111
|
+
return requestRes;
|
|
112
|
+
}
|
|
113
|
+
const req = requestRes.value;
|
|
114
|
+
|
|
115
|
+
const doResult = await client._do(req, {
|
|
116
|
+
context,
|
|
117
|
+
errorCodes: [
|
|
118
|
+
"400",
|
|
119
|
+
"401",
|
|
120
|
+
"403",
|
|
121
|
+
"404",
|
|
122
|
+
"405",
|
|
123
|
+
"409",
|
|
124
|
+
"413",
|
|
125
|
+
"414",
|
|
126
|
+
"415",
|
|
127
|
+
"422",
|
|
128
|
+
"429",
|
|
129
|
+
"4XX",
|
|
130
|
+
"500",
|
|
131
|
+
"503",
|
|
132
|
+
"5XX",
|
|
133
|
+
],
|
|
134
|
+
retryConfig: context.retryConfig,
|
|
135
|
+
retryCodes: context.retryCodes,
|
|
136
|
+
});
|
|
137
|
+
if (!doResult.ok) {
|
|
138
|
+
return doResult;
|
|
139
|
+
}
|
|
140
|
+
const response = doResult.value;
|
|
141
|
+
|
|
142
|
+
const responseFields = {
|
|
143
|
+
HttpMeta: { Response: response, Request: req },
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const [result] = await M.match<
|
|
147
|
+
operations.HealthControllerGenerateRandomNumberResponse,
|
|
148
|
+
| errors.ErrorDto
|
|
149
|
+
| errors.ErrorDto
|
|
150
|
+
| errors.ValidationErrorDto
|
|
151
|
+
| errors.ErrorDto
|
|
152
|
+
| SDKError
|
|
153
|
+
| SDKValidationError
|
|
154
|
+
| UnexpectedClientError
|
|
155
|
+
| InvalidRequestError
|
|
156
|
+
| RequestAbortedError
|
|
157
|
+
| RequestTimeoutError
|
|
158
|
+
| ConnectionError
|
|
159
|
+
>(
|
|
160
|
+
M.json(
|
|
161
|
+
201,
|
|
162
|
+
operations.HealthControllerGenerateRandomNumberResponse$inboundSchema,
|
|
163
|
+
{ hdrs: true, key: "Result" },
|
|
164
|
+
),
|
|
165
|
+
M.jsonErr(
|
|
166
|
+
[400, 401, 403, 404, 405, 409, 413, 415],
|
|
167
|
+
errors.ErrorDto$inboundSchema,
|
|
168
|
+
{ hdrs: true },
|
|
169
|
+
),
|
|
170
|
+
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
171
|
+
M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
|
|
172
|
+
M.fail(429),
|
|
173
|
+
M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }),
|
|
174
|
+
M.fail(503),
|
|
175
|
+
M.fail("4XX"),
|
|
176
|
+
M.fail("5XX"),
|
|
177
|
+
)(response, { extraFields: responseFields });
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return result;
|
|
183
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
55
55
|
export const SDK_METADATA = {
|
|
56
56
|
language: "typescript",
|
|
57
57
|
openapiDocVersion: "1.0",
|
|
58
|
-
sdkVersion: "0.0.
|
|
58
|
+
sdkVersion: "0.0.3",
|
|
59
59
|
genVersion: "2.493.21",
|
|
60
|
-
userAgent: "speakeasy-sdk/typescript 0.0.
|
|
60
|
+
userAgent: "speakeasy-sdk/typescript 0.0.3 2.493.21 1.0 @novu/api",
|
|
61
61
|
} as const;
|