@lumeweb/portal-sdk 0.1.2 → 0.1.4
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/esm/account/generated/billing.d.ts +38 -1
- package/dist/esm/account/generated/billing.js +568 -1
- package/dist/esm/account/generated/billing.js.map +1 -1
- package/dist/esm/account/generated/default.d.ts +49 -1
- package/dist/esm/account/generated/default.js +579 -1
- package/dist/esm/account/generated/default.js.map +1 -1
- package/dist/esm/account/generated/index.d.ts +2 -2
- package/dist/esm/account/generated/index.js +2 -2
- package/dist/esm/account/generated/quota.d.ts +6 -1
- package/dist/esm/account/generated/quota.js +95 -1
- package/dist/esm/account/generated/quota.js.map +1 -1
- package/dist/esm/account/mocks.d.ts +4 -0
- package/dist/esm/account/mocks.js +5 -0
- package/dist/esm/account.d.ts +3 -1
- package/dist/esm/account.js +12 -0
- package/dist/esm/account.js.map +1 -1
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +5 -4
- package/dist/esm/openapi.d.ts +2 -2
- package/dist/esm/openapi.js +3 -2
- package/package.json +8 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { HttpResponse, delay, http } from "msw";
|
|
3
|
+
|
|
1
4
|
//#region src/account/generated/default.ts
|
|
2
5
|
const getDeleteApiAccountUrl = () => {
|
|
3
6
|
return `/api/account`;
|
|
@@ -754,7 +757,582 @@ const getApiUploadLimit = async (options) => {
|
|
|
754
757
|
headers: res.headers
|
|
755
758
|
};
|
|
756
759
|
};
|
|
760
|
+
const getGetApiAccountResponseMock = (overrideResponse = {}) => ({
|
|
761
|
+
avatar: faker.helpers.arrayElement([faker.string.alpha({ length: {
|
|
762
|
+
min: 10,
|
|
763
|
+
max: 20
|
|
764
|
+
} }), void 0]),
|
|
765
|
+
created_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + "Z", void 0]),
|
|
766
|
+
email: faker.string.alpha({ length: {
|
|
767
|
+
min: 10,
|
|
768
|
+
max: 20
|
|
769
|
+
} }),
|
|
770
|
+
first_name: faker.string.alpha({ length: {
|
|
771
|
+
min: 10,
|
|
772
|
+
max: 20
|
|
773
|
+
} }),
|
|
774
|
+
id: faker.number.int(),
|
|
775
|
+
last_name: faker.string.alpha({ length: {
|
|
776
|
+
min: 10,
|
|
777
|
+
max: 20
|
|
778
|
+
} }),
|
|
779
|
+
otp: faker.datatype.boolean(),
|
|
780
|
+
verified: faker.datatype.boolean(),
|
|
781
|
+
...overrideResponse
|
|
782
|
+
});
|
|
783
|
+
const getPostApiAccountAvatarResponseMock = (overrideResponse = {}) => ({
|
|
784
|
+
error: faker.string.alpha({ length: {
|
|
785
|
+
min: 10,
|
|
786
|
+
max: 20
|
|
787
|
+
} }),
|
|
788
|
+
...overrideResponse
|
|
789
|
+
});
|
|
790
|
+
const getGetApiAccountKeysResponseMock = (overrideResponse = {}) => ({
|
|
791
|
+
data: Array.from({ length: faker.number.int({
|
|
792
|
+
min: 1,
|
|
793
|
+
max: 10
|
|
794
|
+
}) }, (_, i) => i + 1).map(() => ({
|
|
795
|
+
created_at: faker.date.past().toISOString().slice(0, 19) + "Z",
|
|
796
|
+
name: faker.string.alpha({ length: {
|
|
797
|
+
min: 10,
|
|
798
|
+
max: 20
|
|
799
|
+
} }),
|
|
800
|
+
uuid: faker.string.uuid()
|
|
801
|
+
})),
|
|
802
|
+
total: faker.number.int(),
|
|
803
|
+
...overrideResponse
|
|
804
|
+
});
|
|
805
|
+
const getPostApiAccountKeysResponseMock = (overrideResponse = {}) => ({
|
|
806
|
+
name: faker.string.alpha({ length: {
|
|
807
|
+
min: 10,
|
|
808
|
+
max: 20
|
|
809
|
+
} }),
|
|
810
|
+
token: faker.string.alpha({ length: {
|
|
811
|
+
min: 10,
|
|
812
|
+
max: 20
|
|
813
|
+
} }),
|
|
814
|
+
uuid: faker.string.uuid(),
|
|
815
|
+
...overrideResponse
|
|
816
|
+
});
|
|
817
|
+
const getGetApiAccountPermissionsResponseMock = (overrideResponse = {}) => ({
|
|
818
|
+
model: {
|
|
819
|
+
matchers: {
|
|
820
|
+
key: faker.string.alpha({ length: {
|
|
821
|
+
min: 10,
|
|
822
|
+
max: 20
|
|
823
|
+
} }),
|
|
824
|
+
value: faker.string.alpha({ length: {
|
|
825
|
+
min: 10,
|
|
826
|
+
max: 20
|
|
827
|
+
} })
|
|
828
|
+
},
|
|
829
|
+
policy_definition: {
|
|
830
|
+
key: faker.string.alpha({ length: {
|
|
831
|
+
min: 10,
|
|
832
|
+
max: 20
|
|
833
|
+
} }),
|
|
834
|
+
value: faker.string.alpha({ length: {
|
|
835
|
+
min: 10,
|
|
836
|
+
max: 20
|
|
837
|
+
} })
|
|
838
|
+
},
|
|
839
|
+
policy_effect: {
|
|
840
|
+
key: faker.string.alpha({ length: {
|
|
841
|
+
min: 10,
|
|
842
|
+
max: 20
|
|
843
|
+
} }),
|
|
844
|
+
value: faker.string.alpha({ length: {
|
|
845
|
+
min: 10,
|
|
846
|
+
max: 20
|
|
847
|
+
} })
|
|
848
|
+
},
|
|
849
|
+
request_definition: {
|
|
850
|
+
key: faker.string.alpha({ length: {
|
|
851
|
+
min: 10,
|
|
852
|
+
max: 20
|
|
853
|
+
} }),
|
|
854
|
+
value: faker.string.alpha({ length: {
|
|
855
|
+
min: 10,
|
|
856
|
+
max: 20
|
|
857
|
+
} })
|
|
858
|
+
},
|
|
859
|
+
role_definition: {
|
|
860
|
+
key: faker.string.alpha({ length: {
|
|
861
|
+
min: 10,
|
|
862
|
+
max: 20
|
|
863
|
+
} }),
|
|
864
|
+
value: faker.string.alpha({ length: {
|
|
865
|
+
min: 10,
|
|
866
|
+
max: 20
|
|
867
|
+
} })
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
permissions: Array.from({ length: faker.number.int({
|
|
871
|
+
min: 1,
|
|
872
|
+
max: 10
|
|
873
|
+
}) }, (_, i) => i + 1).map(() => ({
|
|
874
|
+
act: faker.string.alpha({ length: {
|
|
875
|
+
min: 10,
|
|
876
|
+
max: 20
|
|
877
|
+
} }),
|
|
878
|
+
dom: faker.string.alpha({ length: {
|
|
879
|
+
min: 10,
|
|
880
|
+
max: 20
|
|
881
|
+
} }),
|
|
882
|
+
obj: faker.string.alpha({ length: {
|
|
883
|
+
min: 10,
|
|
884
|
+
max: 20
|
|
885
|
+
} }),
|
|
886
|
+
sub: faker.string.alpha({ length: {
|
|
887
|
+
min: 10,
|
|
888
|
+
max: 20
|
|
889
|
+
} })
|
|
890
|
+
})),
|
|
891
|
+
...overrideResponse
|
|
892
|
+
});
|
|
893
|
+
const getGetApiAccountQuotaHistoryResponseMock = (overrideResponse = {}) => ({
|
|
894
|
+
points: Array.from({ length: faker.number.int({
|
|
895
|
+
min: 1,
|
|
896
|
+
max: 10
|
|
897
|
+
}) }, (_, i) => i + 1).map(() => ({
|
|
898
|
+
bytes: faker.number.int(),
|
|
899
|
+
date: faker.string.alpha({ length: {
|
|
900
|
+
min: 10,
|
|
901
|
+
max: 20
|
|
902
|
+
} })
|
|
903
|
+
})),
|
|
904
|
+
user_id: faker.number.int(),
|
|
905
|
+
...overrideResponse
|
|
906
|
+
});
|
|
907
|
+
const getPostApiAuthKeyResponseMock = (overrideResponse = {}) => ({
|
|
908
|
+
otp: faker.helpers.arrayElement([faker.datatype.boolean(), void 0]),
|
|
909
|
+
token: faker.string.alpha({ length: {
|
|
910
|
+
min: 10,
|
|
911
|
+
max: 20
|
|
912
|
+
} }),
|
|
913
|
+
...overrideResponse
|
|
914
|
+
});
|
|
915
|
+
const getPostApiAuthLoginResponseMock = (overrideResponse = {}) => ({
|
|
916
|
+
otp: faker.helpers.arrayElement([faker.datatype.boolean(), void 0]),
|
|
917
|
+
token: faker.string.alpha({ length: {
|
|
918
|
+
min: 10,
|
|
919
|
+
max: 20
|
|
920
|
+
} }),
|
|
921
|
+
...overrideResponse
|
|
922
|
+
});
|
|
923
|
+
const getPostApiAuthOtpDisableResponseMock = (overrideResponse = {}) => ({
|
|
924
|
+
error: faker.string.alpha({ length: {
|
|
925
|
+
min: 10,
|
|
926
|
+
max: 20
|
|
927
|
+
} }),
|
|
928
|
+
...overrideResponse
|
|
929
|
+
});
|
|
930
|
+
const getPostApiAuthOtpGenerateResponseMock = (overrideResponse = {}) => ({
|
|
931
|
+
otp: faker.string.alpha({ length: {
|
|
932
|
+
min: 10,
|
|
933
|
+
max: 20
|
|
934
|
+
} }),
|
|
935
|
+
...overrideResponse
|
|
936
|
+
});
|
|
937
|
+
const getPostApiAuthOtpVerifyResponseMock = (overrideResponse = {}) => ({
|
|
938
|
+
error: faker.string.alpha({ length: {
|
|
939
|
+
min: 10,
|
|
940
|
+
max: 20
|
|
941
|
+
} }),
|
|
942
|
+
...overrideResponse
|
|
943
|
+
});
|
|
944
|
+
const getPostApiAuthPingResponseMock = (overrideResponse = {}) => ({
|
|
945
|
+
ping: faker.string.alpha({ length: {
|
|
946
|
+
min: 10,
|
|
947
|
+
max: 20
|
|
948
|
+
} }),
|
|
949
|
+
token: faker.string.alpha({ length: {
|
|
950
|
+
min: 10,
|
|
951
|
+
max: 20
|
|
952
|
+
} }),
|
|
953
|
+
...overrideResponse
|
|
954
|
+
});
|
|
955
|
+
const getGetApiOperationsResponseMock = (overrideResponse = {}) => ({
|
|
956
|
+
data: Array.from({ length: faker.number.int({
|
|
957
|
+
min: 1,
|
|
958
|
+
max: 10
|
|
959
|
+
}) }, (_, i) => i + 1).map(() => ({
|
|
960
|
+
cid: faker.helpers.arrayElement([faker.string.alpha({ length: {
|
|
961
|
+
min: 10,
|
|
962
|
+
max: 20
|
|
963
|
+
} }), void 0]),
|
|
964
|
+
current_step: faker.helpers.arrayElement([faker.number.int(), void 0]),
|
|
965
|
+
error: faker.helpers.arrayElement([faker.string.alpha({ length: {
|
|
966
|
+
min: 10,
|
|
967
|
+
max: 20
|
|
968
|
+
} }), void 0]),
|
|
969
|
+
estimated_completion_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + "Z", void 0]),
|
|
970
|
+
id: faker.number.int(),
|
|
971
|
+
operation: faker.string.alpha({ length: {
|
|
972
|
+
min: 10,
|
|
973
|
+
max: 20
|
|
974
|
+
} }),
|
|
975
|
+
operation_display_name: faker.string.alpha({ length: {
|
|
976
|
+
min: 10,
|
|
977
|
+
max: 20
|
|
978
|
+
} }),
|
|
979
|
+
progress_percent: faker.number.float({ fractionDigits: 2 }),
|
|
980
|
+
protocol: faker.string.alpha({ length: {
|
|
981
|
+
min: 10,
|
|
982
|
+
max: 20
|
|
983
|
+
} }),
|
|
984
|
+
protocol_display_name: faker.string.alpha({ length: {
|
|
985
|
+
min: 10,
|
|
986
|
+
max: 20
|
|
987
|
+
} }),
|
|
988
|
+
started_at: faker.date.past().toISOString().slice(0, 19) + "Z",
|
|
989
|
+
status: faker.string.alpha({ length: {
|
|
990
|
+
min: 10,
|
|
991
|
+
max: 20
|
|
992
|
+
} }),
|
|
993
|
+
status_display_name: faker.string.alpha({ length: {
|
|
994
|
+
min: 10,
|
|
995
|
+
max: 20
|
|
996
|
+
} }),
|
|
997
|
+
status_message: faker.string.alpha({ length: {
|
|
998
|
+
min: 10,
|
|
999
|
+
max: 20
|
|
1000
|
+
} }),
|
|
1001
|
+
total_steps: faker.helpers.arrayElement([faker.number.int(), void 0]),
|
|
1002
|
+
updated_at: faker.date.past().toISOString().slice(0, 19) + "Z"
|
|
1003
|
+
})),
|
|
1004
|
+
total: faker.number.int(),
|
|
1005
|
+
...overrideResponse
|
|
1006
|
+
});
|
|
1007
|
+
const getGetApiOperationsIdResponseMock = (overrideResponse = {}) => ({
|
|
1008
|
+
cid: faker.helpers.arrayElement([faker.string.alpha({ length: {
|
|
1009
|
+
min: 10,
|
|
1010
|
+
max: 20
|
|
1011
|
+
} }), void 0]),
|
|
1012
|
+
current_step: faker.helpers.arrayElement([faker.number.int(), void 0]),
|
|
1013
|
+
error: faker.helpers.arrayElement([faker.string.alpha({ length: {
|
|
1014
|
+
min: 10,
|
|
1015
|
+
max: 20
|
|
1016
|
+
} }), void 0]),
|
|
1017
|
+
estimated_completion_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + "Z", void 0]),
|
|
1018
|
+
id: faker.number.int(),
|
|
1019
|
+
operation: faker.string.alpha({ length: {
|
|
1020
|
+
min: 10,
|
|
1021
|
+
max: 20
|
|
1022
|
+
} }),
|
|
1023
|
+
operation_display_name: faker.string.alpha({ length: {
|
|
1024
|
+
min: 10,
|
|
1025
|
+
max: 20
|
|
1026
|
+
} }),
|
|
1027
|
+
progress_percent: faker.number.float({ fractionDigits: 2 }),
|
|
1028
|
+
protocol: faker.string.alpha({ length: {
|
|
1029
|
+
min: 10,
|
|
1030
|
+
max: 20
|
|
1031
|
+
} }),
|
|
1032
|
+
protocol_display_name: faker.string.alpha({ length: {
|
|
1033
|
+
min: 10,
|
|
1034
|
+
max: 20
|
|
1035
|
+
} }),
|
|
1036
|
+
started_at: faker.date.past().toISOString().slice(0, 19) + "Z",
|
|
1037
|
+
status: faker.string.alpha({ length: {
|
|
1038
|
+
min: 10,
|
|
1039
|
+
max: 20
|
|
1040
|
+
} }),
|
|
1041
|
+
status_display_name: faker.string.alpha({ length: {
|
|
1042
|
+
min: 10,
|
|
1043
|
+
max: 20
|
|
1044
|
+
} }),
|
|
1045
|
+
status_message: faker.string.alpha({ length: {
|
|
1046
|
+
min: 10,
|
|
1047
|
+
max: 20
|
|
1048
|
+
} }),
|
|
1049
|
+
total_steps: faker.helpers.arrayElement([faker.number.int(), void 0]),
|
|
1050
|
+
updated_at: faker.date.past().toISOString().slice(0, 19) + "Z",
|
|
1051
|
+
...overrideResponse
|
|
1052
|
+
});
|
|
1053
|
+
const getGetApiOperationsFiltersResponseMock = (overrideResponse = {}) => ({
|
|
1054
|
+
data: { data: {
|
|
1055
|
+
operations: Array.from({ length: faker.number.int({
|
|
1056
|
+
min: 1,
|
|
1057
|
+
max: 10
|
|
1058
|
+
}) }, (_, i) => i + 1).map(() => ({
|
|
1059
|
+
description: faker.helpers.arrayElement([faker.string.alpha({ length: {
|
|
1060
|
+
min: 10,
|
|
1061
|
+
max: 20
|
|
1062
|
+
} }), void 0]),
|
|
1063
|
+
name: faker.string.alpha({ length: {
|
|
1064
|
+
min: 10,
|
|
1065
|
+
max: 20
|
|
1066
|
+
} }),
|
|
1067
|
+
value: faker.string.alpha({ length: {
|
|
1068
|
+
min: 10,
|
|
1069
|
+
max: 20
|
|
1070
|
+
} })
|
|
1071
|
+
})),
|
|
1072
|
+
protocols: Array.from({ length: faker.number.int({
|
|
1073
|
+
min: 1,
|
|
1074
|
+
max: 10
|
|
1075
|
+
}) }, (_, i) => i + 1).map(() => ({
|
|
1076
|
+
description: faker.helpers.arrayElement([faker.string.alpha({ length: {
|
|
1077
|
+
min: 10,
|
|
1078
|
+
max: 20
|
|
1079
|
+
} }), void 0]),
|
|
1080
|
+
name: faker.string.alpha({ length: {
|
|
1081
|
+
min: 10,
|
|
1082
|
+
max: 20
|
|
1083
|
+
} }),
|
|
1084
|
+
value: faker.string.alpha({ length: {
|
|
1085
|
+
min: 10,
|
|
1086
|
+
max: 20
|
|
1087
|
+
} })
|
|
1088
|
+
})),
|
|
1089
|
+
statuses: Array.from({ length: faker.number.int({
|
|
1090
|
+
min: 1,
|
|
1091
|
+
max: 10
|
|
1092
|
+
}) }, (_, i) => i + 1).map(() => ({
|
|
1093
|
+
description: faker.helpers.arrayElement([faker.string.alpha({ length: {
|
|
1094
|
+
min: 10,
|
|
1095
|
+
max: 20
|
|
1096
|
+
} }), void 0]),
|
|
1097
|
+
name: faker.string.alpha({ length: {
|
|
1098
|
+
min: 10,
|
|
1099
|
+
max: 20
|
|
1100
|
+
} }),
|
|
1101
|
+
value: faker.string.alpha({ length: {
|
|
1102
|
+
min: 10,
|
|
1103
|
+
max: 20
|
|
1104
|
+
} })
|
|
1105
|
+
}))
|
|
1106
|
+
} },
|
|
1107
|
+
total: faker.number.int(),
|
|
1108
|
+
...overrideResponse
|
|
1109
|
+
});
|
|
1110
|
+
const getGetApiUploadLimitResponseMock = (overrideResponse = {}) => ({
|
|
1111
|
+
limit: faker.number.int(),
|
|
1112
|
+
...overrideResponse
|
|
1113
|
+
});
|
|
1114
|
+
const getDeleteApiAccountMockHandler = (overrideResponse, options) => {
|
|
1115
|
+
return http.delete("*/api/account", async (info) => {
|
|
1116
|
+
await delay(0);
|
|
1117
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1118
|
+
return new HttpResponse(null, { status: 200 });
|
|
1119
|
+
}, options);
|
|
1120
|
+
};
|
|
1121
|
+
const getGetApiAccountMockHandler = (overrideResponse, options) => {
|
|
1122
|
+
return http.get("*/api/account", async (info) => {
|
|
1123
|
+
await delay(0);
|
|
1124
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiAccountResponseMock(), { status: 200 });
|
|
1125
|
+
}, options);
|
|
1126
|
+
};
|
|
1127
|
+
const getPatchApiAccountMockHandler = (overrideResponse, options) => {
|
|
1128
|
+
return http.patch("*/api/account", async (info) => {
|
|
1129
|
+
await delay(0);
|
|
1130
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1131
|
+
return new HttpResponse(null, { status: 200 });
|
|
1132
|
+
}, options);
|
|
1133
|
+
};
|
|
1134
|
+
const getGetApiAccountAvatarMockHandler = (overrideResponse, options) => {
|
|
1135
|
+
return http.get("*/api/account/avatar", async (info) => {
|
|
1136
|
+
await delay(0);
|
|
1137
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1138
|
+
return new HttpResponse(null, { status: 200 });
|
|
1139
|
+
}, options);
|
|
1140
|
+
};
|
|
1141
|
+
const getPostApiAccountAvatarMockHandler = (overrideResponse, options) => {
|
|
1142
|
+
return http.post("*/api/account/avatar", async (info) => {
|
|
1143
|
+
await delay(0);
|
|
1144
|
+
const resolvedBody = overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAccountAvatarResponseMock();
|
|
1145
|
+
return resolvedBody === void 0 ? new HttpResponse(null, { status: 204 }) : HttpResponse.json(resolvedBody, { status: 200 });
|
|
1146
|
+
}, options);
|
|
1147
|
+
};
|
|
1148
|
+
const getGetApiAccountKeysMockHandler = (overrideResponse, options) => {
|
|
1149
|
+
return http.get("*/api/account/keys", async (info) => {
|
|
1150
|
+
await delay(0);
|
|
1151
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiAccountKeysResponseMock(), { status: 200 });
|
|
1152
|
+
}, options);
|
|
1153
|
+
};
|
|
1154
|
+
const getPostApiAccountKeysMockHandler = (overrideResponse, options) => {
|
|
1155
|
+
return http.post("*/api/account/keys", async (info) => {
|
|
1156
|
+
await delay(0);
|
|
1157
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAccountKeysResponseMock(), { status: 200 });
|
|
1158
|
+
}, options);
|
|
1159
|
+
};
|
|
1160
|
+
const getDeleteApiAccountKeysKeyIDMockHandler = (overrideResponse, options) => {
|
|
1161
|
+
return http.delete("*/api/account/keys/:keyID", async (info) => {
|
|
1162
|
+
await delay(0);
|
|
1163
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1164
|
+
return new HttpResponse(null, { status: 200 });
|
|
1165
|
+
}, options);
|
|
1166
|
+
};
|
|
1167
|
+
const getPostApiAccountPasswordResetConfirmMockHandler = (overrideResponse, options) => {
|
|
1168
|
+
return http.post("*/api/account/password-reset/confirm", async (info) => {
|
|
1169
|
+
await delay(0);
|
|
1170
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1171
|
+
return new HttpResponse(null, { status: 200 });
|
|
1172
|
+
}, options);
|
|
1173
|
+
};
|
|
1174
|
+
const getPostApiAccountPasswordResetRequestMockHandler = (overrideResponse, options) => {
|
|
1175
|
+
return http.post("*/api/account/password-reset/request", async (info) => {
|
|
1176
|
+
await delay(0);
|
|
1177
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1178
|
+
return new HttpResponse(null, { status: 200 });
|
|
1179
|
+
}, options);
|
|
1180
|
+
};
|
|
1181
|
+
const getGetApiAccountPermissionsMockHandler = (overrideResponse, options) => {
|
|
1182
|
+
return http.get("*/api/account/permissions", async (info) => {
|
|
1183
|
+
await delay(0);
|
|
1184
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiAccountPermissionsResponseMock(), { status: 200 });
|
|
1185
|
+
}, options);
|
|
1186
|
+
};
|
|
1187
|
+
const getGetApiAccountQuotaHistoryMockHandler = (overrideResponse, options) => {
|
|
1188
|
+
return http.get("*/api/account/quota/history", async (info) => {
|
|
1189
|
+
await delay(0);
|
|
1190
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiAccountQuotaHistoryResponseMock(), { status: 200 });
|
|
1191
|
+
}, options);
|
|
1192
|
+
};
|
|
1193
|
+
const getPostApiAccountUpdateEmailMockHandler = (overrideResponse, options) => {
|
|
1194
|
+
return http.post("*/api/account/update-email", async (info) => {
|
|
1195
|
+
await delay(0);
|
|
1196
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1197
|
+
return new HttpResponse(null, { status: 200 });
|
|
1198
|
+
}, options);
|
|
1199
|
+
};
|
|
1200
|
+
const getPostApiAccountUpdatePasswordMockHandler = (overrideResponse, options) => {
|
|
1201
|
+
return http.post("*/api/account/update-password", async (info) => {
|
|
1202
|
+
await delay(0);
|
|
1203
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1204
|
+
return new HttpResponse(null, { status: 200 });
|
|
1205
|
+
}, options);
|
|
1206
|
+
};
|
|
1207
|
+
const getPostApiAccountVerifyEmailMockHandler = (overrideResponse, options) => {
|
|
1208
|
+
return http.post("*/api/account/verify-email", async (info) => {
|
|
1209
|
+
await delay(0);
|
|
1210
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1211
|
+
return new HttpResponse(null, { status: 200 });
|
|
1212
|
+
}, options);
|
|
1213
|
+
};
|
|
1214
|
+
const getPostApiAccountVerifyEmailResendMockHandler = (overrideResponse, options) => {
|
|
1215
|
+
return http.post("*/api/account/verify-email/resend", async (info) => {
|
|
1216
|
+
await delay(0);
|
|
1217
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1218
|
+
return new HttpResponse(null, { status: 200 });
|
|
1219
|
+
}, options);
|
|
1220
|
+
};
|
|
1221
|
+
const getPostApiAuthKeyMockHandler = (overrideResponse, options) => {
|
|
1222
|
+
return http.post("*/api/auth/key", async (info) => {
|
|
1223
|
+
await delay(0);
|
|
1224
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthKeyResponseMock(), { status: 200 });
|
|
1225
|
+
}, options);
|
|
1226
|
+
};
|
|
1227
|
+
const getPostApiAuthLoginMockHandler = (overrideResponse, options) => {
|
|
1228
|
+
return http.post("*/api/auth/login", async (info) => {
|
|
1229
|
+
await delay(0);
|
|
1230
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthLoginResponseMock(), { status: 200 });
|
|
1231
|
+
}, options);
|
|
1232
|
+
};
|
|
1233
|
+
const getPostApiAuthLogoutMockHandler = (overrideResponse, options) => {
|
|
1234
|
+
return http.post("*/api/auth/logout", async (info) => {
|
|
1235
|
+
await delay(0);
|
|
1236
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1237
|
+
return new HttpResponse(null, { status: 200 });
|
|
1238
|
+
}, options);
|
|
1239
|
+
};
|
|
1240
|
+
const getPostApiAuthOtpDisableMockHandler = (overrideResponse, options) => {
|
|
1241
|
+
return http.post("*/api/auth/otp/disable", async (info) => {
|
|
1242
|
+
await delay(0);
|
|
1243
|
+
const resolvedBody = overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthOtpDisableResponseMock();
|
|
1244
|
+
return resolvedBody === void 0 ? new HttpResponse(null, { status: 204 }) : HttpResponse.json(resolvedBody, { status: 200 });
|
|
1245
|
+
}, options);
|
|
1246
|
+
};
|
|
1247
|
+
const getPostApiAuthOtpGenerateMockHandler = (overrideResponse, options) => {
|
|
1248
|
+
return http.post("*/api/auth/otp/generate", async (info) => {
|
|
1249
|
+
await delay(0);
|
|
1250
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthOtpGenerateResponseMock(), { status: 200 });
|
|
1251
|
+
}, options);
|
|
1252
|
+
};
|
|
1253
|
+
const getPostApiAuthOtpValidateMockHandler = (overrideResponse, options) => {
|
|
1254
|
+
return http.post("*/api/auth/otp/validate", async (info) => {
|
|
1255
|
+
await delay(0);
|
|
1256
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1257
|
+
return new HttpResponse(null, { status: 200 });
|
|
1258
|
+
}, options);
|
|
1259
|
+
};
|
|
1260
|
+
const getPostApiAuthOtpVerifyMockHandler = (overrideResponse, options) => {
|
|
1261
|
+
return http.post("*/api/auth/otp/verify", async (info) => {
|
|
1262
|
+
await delay(0);
|
|
1263
|
+
const resolvedBody = overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthOtpVerifyResponseMock();
|
|
1264
|
+
return resolvedBody === void 0 ? new HttpResponse(null, { status: 204 }) : HttpResponse.json(resolvedBody, { status: 200 });
|
|
1265
|
+
}, options);
|
|
1266
|
+
};
|
|
1267
|
+
const getPostApiAuthPingMockHandler = (overrideResponse, options) => {
|
|
1268
|
+
return http.post("*/api/auth/ping", async (info) => {
|
|
1269
|
+
await delay(0);
|
|
1270
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthPingResponseMock(), { status: 200 });
|
|
1271
|
+
}, options);
|
|
1272
|
+
};
|
|
1273
|
+
const getPostApiAuthRegisterMockHandler = (overrideResponse, options) => {
|
|
1274
|
+
return http.post("*/api/auth/register", async (info) => {
|
|
1275
|
+
await delay(0);
|
|
1276
|
+
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1277
|
+
return new HttpResponse(null, { status: 200 });
|
|
1278
|
+
}, options);
|
|
1279
|
+
};
|
|
1280
|
+
const getGetApiOperationsMockHandler = (overrideResponse, options) => {
|
|
1281
|
+
return http.get("*/api/operations", async (info) => {
|
|
1282
|
+
await delay(0);
|
|
1283
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiOperationsResponseMock(), { status: 200 });
|
|
1284
|
+
}, options);
|
|
1285
|
+
};
|
|
1286
|
+
const getGetApiOperationsIdMockHandler = (overrideResponse, options) => {
|
|
1287
|
+
return http.get("*/api/operations/:id", async (info) => {
|
|
1288
|
+
await delay(0);
|
|
1289
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiOperationsIdResponseMock(), { status: 200 });
|
|
1290
|
+
}, options);
|
|
1291
|
+
};
|
|
1292
|
+
const getGetApiOperationsFiltersMockHandler = (overrideResponse, options) => {
|
|
1293
|
+
return http.get("*/api/operations/filters", async (info) => {
|
|
1294
|
+
await delay(0);
|
|
1295
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiOperationsFiltersResponseMock(), { status: 200 });
|
|
1296
|
+
}, options);
|
|
1297
|
+
};
|
|
1298
|
+
const getGetApiUploadLimitMockHandler = (overrideResponse, options) => {
|
|
1299
|
+
return http.get("*/api/upload-limit", async (info) => {
|
|
1300
|
+
await delay(0);
|
|
1301
|
+
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiUploadLimitResponseMock(), { status: 200 });
|
|
1302
|
+
}, options);
|
|
1303
|
+
};
|
|
1304
|
+
const getDefaultMock = () => [
|
|
1305
|
+
getDeleteApiAccountMockHandler(),
|
|
1306
|
+
getGetApiAccountMockHandler(),
|
|
1307
|
+
getPatchApiAccountMockHandler(),
|
|
1308
|
+
getGetApiAccountAvatarMockHandler(),
|
|
1309
|
+
getPostApiAccountAvatarMockHandler(),
|
|
1310
|
+
getGetApiAccountKeysMockHandler(),
|
|
1311
|
+
getPostApiAccountKeysMockHandler(),
|
|
1312
|
+
getDeleteApiAccountKeysKeyIDMockHandler(),
|
|
1313
|
+
getPostApiAccountPasswordResetConfirmMockHandler(),
|
|
1314
|
+
getPostApiAccountPasswordResetRequestMockHandler(),
|
|
1315
|
+
getGetApiAccountPermissionsMockHandler(),
|
|
1316
|
+
getGetApiAccountQuotaHistoryMockHandler(),
|
|
1317
|
+
getPostApiAccountUpdateEmailMockHandler(),
|
|
1318
|
+
getPostApiAccountUpdatePasswordMockHandler(),
|
|
1319
|
+
getPostApiAccountVerifyEmailMockHandler(),
|
|
1320
|
+
getPostApiAccountVerifyEmailResendMockHandler(),
|
|
1321
|
+
getPostApiAuthKeyMockHandler(),
|
|
1322
|
+
getPostApiAuthLoginMockHandler(),
|
|
1323
|
+
getPostApiAuthLogoutMockHandler(),
|
|
1324
|
+
getPostApiAuthOtpDisableMockHandler(),
|
|
1325
|
+
getPostApiAuthOtpGenerateMockHandler(),
|
|
1326
|
+
getPostApiAuthOtpValidateMockHandler(),
|
|
1327
|
+
getPostApiAuthOtpVerifyMockHandler(),
|
|
1328
|
+
getPostApiAuthPingMockHandler(),
|
|
1329
|
+
getPostApiAuthRegisterMockHandler(),
|
|
1330
|
+
getGetApiOperationsMockHandler(),
|
|
1331
|
+
getGetApiOperationsIdMockHandler(),
|
|
1332
|
+
getGetApiOperationsFiltersMockHandler(),
|
|
1333
|
+
getGetApiUploadLimitMockHandler()
|
|
1334
|
+
];
|
|
757
1335
|
|
|
758
1336
|
//#endregion
|
|
759
|
-
export { deleteApiAccount, deleteApiAccountKeysKeyID, getApiAccount, getApiAccountAvatar, getApiAccountKeys, getApiAccountPermissions, getApiAccountQuotaHistory, getApiOperations, getApiOperationsFilters, getApiOperationsId, getApiUploadLimit, getDeleteApiAccountKeysKeyIDUrl, getDeleteApiAccountUrl, getGetApiAccountAvatarUrl, getGetApiAccountKeysUrl, getGetApiAccountPermissionsUrl, getGetApiAccountQuotaHistoryUrl, getGetApiAccountUrl, getGetApiOperationsFiltersUrl, getGetApiOperationsIdUrl, getGetApiOperationsUrl, getGetApiUploadLimitUrl, getPatchApiAccountUrl, getPostApiAccountAvatarUrl, getPostApiAccountKeysUrl, getPostApiAccountPasswordResetConfirmUrl, getPostApiAccountPasswordResetRequestUrl, getPostApiAccountUpdateEmailUrl, getPostApiAccountUpdatePasswordUrl, getPostApiAccountVerifyEmailResendUrl, getPostApiAccountVerifyEmailUrl, getPostApiAuthKeyUrl, getPostApiAuthLoginUrl, getPostApiAuthLogoutUrl, getPostApiAuthOtpDisableUrl, getPostApiAuthOtpGenerateUrl, getPostApiAuthOtpValidateUrl, getPostApiAuthOtpVerifyUrl, getPostApiAuthPingUrl, getPostApiAuthRegisterUrl, patchApiAccount, postApiAccountAvatar, postApiAccountKeys, postApiAccountPasswordResetConfirm, postApiAccountPasswordResetRequest, postApiAccountUpdateEmail, postApiAccountUpdatePassword, postApiAccountVerifyEmail, postApiAccountVerifyEmailResend, postApiAuthKey, postApiAuthLogin, postApiAuthLogout, postApiAuthOtpDisable, postApiAuthOtpGenerate, postApiAuthOtpValidate, postApiAuthOtpVerify, postApiAuthPing, postApiAuthRegister };
|
|
1337
|
+
export { deleteApiAccount, deleteApiAccountKeysKeyID, getApiAccount, getApiAccountAvatar, getApiAccountKeys, getApiAccountPermissions, getApiAccountQuotaHistory, getApiOperations, getApiOperationsFilters, getApiOperationsId, getApiUploadLimit, getDefaultMock, getDeleteApiAccountKeysKeyIDMockHandler, getDeleteApiAccountKeysKeyIDUrl, getDeleteApiAccountMockHandler, getDeleteApiAccountUrl, getGetApiAccountAvatarMockHandler, getGetApiAccountAvatarUrl, getGetApiAccountKeysMockHandler, getGetApiAccountKeysResponseMock, getGetApiAccountKeysUrl, getGetApiAccountMockHandler, getGetApiAccountPermissionsMockHandler, getGetApiAccountPermissionsResponseMock, getGetApiAccountPermissionsUrl, getGetApiAccountQuotaHistoryMockHandler, getGetApiAccountQuotaHistoryResponseMock, getGetApiAccountQuotaHistoryUrl, getGetApiAccountResponseMock, getGetApiAccountUrl, getGetApiOperationsFiltersMockHandler, getGetApiOperationsFiltersResponseMock, getGetApiOperationsFiltersUrl, getGetApiOperationsIdMockHandler, getGetApiOperationsIdResponseMock, getGetApiOperationsIdUrl, getGetApiOperationsMockHandler, getGetApiOperationsResponseMock, getGetApiOperationsUrl, getGetApiUploadLimitMockHandler, getGetApiUploadLimitResponseMock, getGetApiUploadLimitUrl, getPatchApiAccountMockHandler, getPatchApiAccountUrl, getPostApiAccountAvatarMockHandler, getPostApiAccountAvatarResponseMock, getPostApiAccountAvatarUrl, getPostApiAccountKeysMockHandler, getPostApiAccountKeysResponseMock, getPostApiAccountKeysUrl, getPostApiAccountPasswordResetConfirmMockHandler, getPostApiAccountPasswordResetConfirmUrl, getPostApiAccountPasswordResetRequestMockHandler, getPostApiAccountPasswordResetRequestUrl, getPostApiAccountUpdateEmailMockHandler, getPostApiAccountUpdateEmailUrl, getPostApiAccountUpdatePasswordMockHandler, getPostApiAccountUpdatePasswordUrl, getPostApiAccountVerifyEmailMockHandler, getPostApiAccountVerifyEmailResendMockHandler, getPostApiAccountVerifyEmailResendUrl, getPostApiAccountVerifyEmailUrl, getPostApiAuthKeyMockHandler, getPostApiAuthKeyResponseMock, getPostApiAuthKeyUrl, getPostApiAuthLoginMockHandler, getPostApiAuthLoginResponseMock, getPostApiAuthLoginUrl, getPostApiAuthLogoutMockHandler, getPostApiAuthLogoutUrl, getPostApiAuthOtpDisableMockHandler, getPostApiAuthOtpDisableResponseMock, getPostApiAuthOtpDisableUrl, getPostApiAuthOtpGenerateMockHandler, getPostApiAuthOtpGenerateResponseMock, getPostApiAuthOtpGenerateUrl, getPostApiAuthOtpValidateMockHandler, getPostApiAuthOtpValidateUrl, getPostApiAuthOtpVerifyMockHandler, getPostApiAuthOtpVerifyResponseMock, getPostApiAuthOtpVerifyUrl, getPostApiAuthPingMockHandler, getPostApiAuthPingResponseMock, getPostApiAuthPingUrl, getPostApiAuthRegisterMockHandler, getPostApiAuthRegisterUrl, patchApiAccount, postApiAccountAvatar, postApiAccountKeys, postApiAccountPasswordResetConfirm, postApiAccountPasswordResetRequest, postApiAccountUpdateEmail, postApiAccountUpdatePassword, postApiAccountVerifyEmail, postApiAccountVerifyEmailResend, postApiAuthKey, postApiAuthLogin, postApiAuthLogout, postApiAuthOtpDisable, postApiAuthOtpGenerate, postApiAuthOtpValidate, postApiAuthOtpVerify, postApiAuthPing, postApiAuthRegister };
|
|
760
1338
|
//# sourceMappingURL=default.js.map
|