@lumeweb/portal-sdk 0.1.5 → 0.1.6
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/accountAPI.schemas.d.ts +1 -1
- package/dist/esm/account/generated/billing.js +3 -21
- package/dist/esm/account/generated/billing.js.map +1 -1
- package/dist/esm/account/generated/default.js +5 -34
- package/dist/esm/account/generated/default.js.map +1 -1
- package/dist/esm/account/generated/quota.js +1 -2
- package/dist/esm/account/generated/quota.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import { HttpResponse,
|
|
2
|
+
import { HttpResponse, http } from "msw";
|
|
3
3
|
|
|
4
4
|
//#region src/account/generated/default.ts
|
|
5
5
|
const getDeleteApiAccountUrl = () => {
|
|
@@ -128,7 +128,7 @@ const postApiAccountAvatar = async (postApiAccountAvatarBody, options) => {
|
|
|
128
128
|
const getGetApiAccountKeysUrl = (params) => {
|
|
129
129
|
const normalizedParams = new URLSearchParams();
|
|
130
130
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
131
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value
|
|
131
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
132
132
|
});
|
|
133
133
|
const stringifiedParams = normalizedParams.toString();
|
|
134
134
|
return stringifiedParams.length > 0 ? `/api/account/keys?${stringifiedParams}` : `/api/account/keys`;
|
|
@@ -286,7 +286,7 @@ const getApiAccountPermissions = async (options) => {
|
|
|
286
286
|
const getGetApiAccountQuotaHistoryUrl = (params) => {
|
|
287
287
|
const normalizedParams = new URLSearchParams();
|
|
288
288
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
289
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value
|
|
289
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
290
290
|
});
|
|
291
291
|
const stringifiedParams = normalizedParams.toString();
|
|
292
292
|
return stringifiedParams.length > 0 ? `/api/account/quota/history?${stringifiedParams}` : `/api/account/quota/history`;
|
|
@@ -370,7 +370,7 @@ const postApiAccountUpdatePassword = async (updatePasswordRequest, options) => {
|
|
|
370
370
|
const getPostApiAccountVerifyEmailUrl = (params) => {
|
|
371
371
|
const normalizedParams = new URLSearchParams();
|
|
372
372
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
373
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value
|
|
373
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
374
374
|
});
|
|
375
375
|
const stringifiedParams = normalizedParams.toString();
|
|
376
376
|
return stringifiedParams.length > 0 ? `/api/account/verify-email?${stringifiedParams}` : `/api/account/verify-email`;
|
|
@@ -663,7 +663,7 @@ const postApiAuthRegister = async (registerRequest, options) => {
|
|
|
663
663
|
const getGetApiOperationsUrl = (params) => {
|
|
664
664
|
const normalizedParams = new URLSearchParams();
|
|
665
665
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
666
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value
|
|
666
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
667
667
|
});
|
|
668
668
|
const stringifiedParams = normalizedParams.toString();
|
|
669
669
|
return stringifiedParams.length > 0 ? `/api/operations?${stringifiedParams}` : `/api/operations`;
|
|
@@ -1113,191 +1113,162 @@ const getGetApiUploadLimitResponseMock = (overrideResponse = {}) => ({
|
|
|
1113
1113
|
});
|
|
1114
1114
|
const getDeleteApiAccountMockHandler = (overrideResponse, options) => {
|
|
1115
1115
|
return http.delete("*/api/account", async (info) => {
|
|
1116
|
-
await delay(0);
|
|
1117
1116
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1118
1117
|
return new HttpResponse(null, { status: 200 });
|
|
1119
1118
|
}, options);
|
|
1120
1119
|
};
|
|
1121
1120
|
const getGetApiAccountMockHandler = (overrideResponse, options) => {
|
|
1122
1121
|
return http.get("*/api/account", async (info) => {
|
|
1123
|
-
await delay(0);
|
|
1124
1122
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiAccountResponseMock(), { status: 200 });
|
|
1125
1123
|
}, options);
|
|
1126
1124
|
};
|
|
1127
1125
|
const getPatchApiAccountMockHandler = (overrideResponse, options) => {
|
|
1128
1126
|
return http.patch("*/api/account", async (info) => {
|
|
1129
|
-
await delay(0);
|
|
1130
1127
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1131
1128
|
return new HttpResponse(null, { status: 200 });
|
|
1132
1129
|
}, options);
|
|
1133
1130
|
};
|
|
1134
1131
|
const getGetApiAccountAvatarMockHandler = (overrideResponse, options) => {
|
|
1135
1132
|
return http.get("*/api/account/avatar", async (info) => {
|
|
1136
|
-
await delay(0);
|
|
1137
1133
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1138
1134
|
return new HttpResponse(null, { status: 200 });
|
|
1139
1135
|
}, options);
|
|
1140
1136
|
};
|
|
1141
1137
|
const getPostApiAccountAvatarMockHandler = (overrideResponse, options) => {
|
|
1142
1138
|
return http.post("*/api/account/avatar", async (info) => {
|
|
1143
|
-
await delay(0);
|
|
1144
1139
|
const resolvedBody = overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAccountAvatarResponseMock();
|
|
1145
1140
|
return resolvedBody === void 0 ? new HttpResponse(null, { status: 204 }) : HttpResponse.json(resolvedBody, { status: 200 });
|
|
1146
1141
|
}, options);
|
|
1147
1142
|
};
|
|
1148
1143
|
const getGetApiAccountKeysMockHandler = (overrideResponse, options) => {
|
|
1149
1144
|
return http.get("*/api/account/keys", async (info) => {
|
|
1150
|
-
await delay(0);
|
|
1151
1145
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiAccountKeysResponseMock(), { status: 200 });
|
|
1152
1146
|
}, options);
|
|
1153
1147
|
};
|
|
1154
1148
|
const getPostApiAccountKeysMockHandler = (overrideResponse, options) => {
|
|
1155
1149
|
return http.post("*/api/account/keys", async (info) => {
|
|
1156
|
-
await delay(0);
|
|
1157
1150
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAccountKeysResponseMock(), { status: 200 });
|
|
1158
1151
|
}, options);
|
|
1159
1152
|
};
|
|
1160
1153
|
const getDeleteApiAccountKeysKeyIDMockHandler = (overrideResponse, options) => {
|
|
1161
1154
|
return http.delete("*/api/account/keys/:keyID", async (info) => {
|
|
1162
|
-
await delay(0);
|
|
1163
1155
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1164
1156
|
return new HttpResponse(null, { status: 200 });
|
|
1165
1157
|
}, options);
|
|
1166
1158
|
};
|
|
1167
1159
|
const getPostApiAccountPasswordResetConfirmMockHandler = (overrideResponse, options) => {
|
|
1168
1160
|
return http.post("*/api/account/password-reset/confirm", async (info) => {
|
|
1169
|
-
await delay(0);
|
|
1170
1161
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1171
1162
|
return new HttpResponse(null, { status: 200 });
|
|
1172
1163
|
}, options);
|
|
1173
1164
|
};
|
|
1174
1165
|
const getPostApiAccountPasswordResetRequestMockHandler = (overrideResponse, options) => {
|
|
1175
1166
|
return http.post("*/api/account/password-reset/request", async (info) => {
|
|
1176
|
-
await delay(0);
|
|
1177
1167
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1178
1168
|
return new HttpResponse(null, { status: 200 });
|
|
1179
1169
|
}, options);
|
|
1180
1170
|
};
|
|
1181
1171
|
const getGetApiAccountPermissionsMockHandler = (overrideResponse, options) => {
|
|
1182
1172
|
return http.get("*/api/account/permissions", async (info) => {
|
|
1183
|
-
await delay(0);
|
|
1184
1173
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiAccountPermissionsResponseMock(), { status: 200 });
|
|
1185
1174
|
}, options);
|
|
1186
1175
|
};
|
|
1187
1176
|
const getGetApiAccountQuotaHistoryMockHandler = (overrideResponse, options) => {
|
|
1188
1177
|
return http.get("*/api/account/quota/history", async (info) => {
|
|
1189
|
-
await delay(0);
|
|
1190
1178
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiAccountQuotaHistoryResponseMock(), { status: 200 });
|
|
1191
1179
|
}, options);
|
|
1192
1180
|
};
|
|
1193
1181
|
const getPostApiAccountUpdateEmailMockHandler = (overrideResponse, options) => {
|
|
1194
1182
|
return http.post("*/api/account/update-email", async (info) => {
|
|
1195
|
-
await delay(0);
|
|
1196
1183
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1197
1184
|
return new HttpResponse(null, { status: 200 });
|
|
1198
1185
|
}, options);
|
|
1199
1186
|
};
|
|
1200
1187
|
const getPostApiAccountUpdatePasswordMockHandler = (overrideResponse, options) => {
|
|
1201
1188
|
return http.post("*/api/account/update-password", async (info) => {
|
|
1202
|
-
await delay(0);
|
|
1203
1189
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1204
1190
|
return new HttpResponse(null, { status: 200 });
|
|
1205
1191
|
}, options);
|
|
1206
1192
|
};
|
|
1207
1193
|
const getPostApiAccountVerifyEmailMockHandler = (overrideResponse, options) => {
|
|
1208
1194
|
return http.post("*/api/account/verify-email", async (info) => {
|
|
1209
|
-
await delay(0);
|
|
1210
1195
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1211
1196
|
return new HttpResponse(null, { status: 200 });
|
|
1212
1197
|
}, options);
|
|
1213
1198
|
};
|
|
1214
1199
|
const getPostApiAccountVerifyEmailResendMockHandler = (overrideResponse, options) => {
|
|
1215
1200
|
return http.post("*/api/account/verify-email/resend", async (info) => {
|
|
1216
|
-
await delay(0);
|
|
1217
1201
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1218
1202
|
return new HttpResponse(null, { status: 200 });
|
|
1219
1203
|
}, options);
|
|
1220
1204
|
};
|
|
1221
1205
|
const getPostApiAuthKeyMockHandler = (overrideResponse, options) => {
|
|
1222
1206
|
return http.post("*/api/auth/key", async (info) => {
|
|
1223
|
-
await delay(0);
|
|
1224
1207
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthKeyResponseMock(), { status: 200 });
|
|
1225
1208
|
}, options);
|
|
1226
1209
|
};
|
|
1227
1210
|
const getPostApiAuthLoginMockHandler = (overrideResponse, options) => {
|
|
1228
1211
|
return http.post("*/api/auth/login", async (info) => {
|
|
1229
|
-
await delay(0);
|
|
1230
1212
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthLoginResponseMock(), { status: 200 });
|
|
1231
1213
|
}, options);
|
|
1232
1214
|
};
|
|
1233
1215
|
const getPostApiAuthLogoutMockHandler = (overrideResponse, options) => {
|
|
1234
1216
|
return http.post("*/api/auth/logout", async (info) => {
|
|
1235
|
-
await delay(0);
|
|
1236
1217
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1237
1218
|
return new HttpResponse(null, { status: 200 });
|
|
1238
1219
|
}, options);
|
|
1239
1220
|
};
|
|
1240
1221
|
const getPostApiAuthOtpDisableMockHandler = (overrideResponse, options) => {
|
|
1241
1222
|
return http.post("*/api/auth/otp/disable", async (info) => {
|
|
1242
|
-
await delay(0);
|
|
1243
1223
|
const resolvedBody = overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthOtpDisableResponseMock();
|
|
1244
1224
|
return resolvedBody === void 0 ? new HttpResponse(null, { status: 204 }) : HttpResponse.json(resolvedBody, { status: 200 });
|
|
1245
1225
|
}, options);
|
|
1246
1226
|
};
|
|
1247
1227
|
const getPostApiAuthOtpGenerateMockHandler = (overrideResponse, options) => {
|
|
1248
1228
|
return http.post("*/api/auth/otp/generate", async (info) => {
|
|
1249
|
-
await delay(0);
|
|
1250
1229
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthOtpGenerateResponseMock(), { status: 200 });
|
|
1251
1230
|
}, options);
|
|
1252
1231
|
};
|
|
1253
1232
|
const getPostApiAuthOtpValidateMockHandler = (overrideResponse, options) => {
|
|
1254
1233
|
return http.post("*/api/auth/otp/validate", async (info) => {
|
|
1255
|
-
await delay(0);
|
|
1256
1234
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1257
1235
|
return new HttpResponse(null, { status: 200 });
|
|
1258
1236
|
}, options);
|
|
1259
1237
|
};
|
|
1260
1238
|
const getPostApiAuthOtpVerifyMockHandler = (overrideResponse, options) => {
|
|
1261
1239
|
return http.post("*/api/auth/otp/verify", async (info) => {
|
|
1262
|
-
await delay(0);
|
|
1263
1240
|
const resolvedBody = overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthOtpVerifyResponseMock();
|
|
1264
1241
|
return resolvedBody === void 0 ? new HttpResponse(null, { status: 204 }) : HttpResponse.json(resolvedBody, { status: 200 });
|
|
1265
1242
|
}, options);
|
|
1266
1243
|
};
|
|
1267
1244
|
const getPostApiAuthPingMockHandler = (overrideResponse, options) => {
|
|
1268
1245
|
return http.post("*/api/auth/ping", async (info) => {
|
|
1269
|
-
await delay(0);
|
|
1270
1246
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiAuthPingResponseMock(), { status: 200 });
|
|
1271
1247
|
}, options);
|
|
1272
1248
|
};
|
|
1273
1249
|
const getPostApiAuthRegisterMockHandler = (overrideResponse, options) => {
|
|
1274
1250
|
return http.post("*/api/auth/register", async (info) => {
|
|
1275
|
-
await delay(0);
|
|
1276
1251
|
if (typeof overrideResponse === "function") await overrideResponse(info);
|
|
1277
1252
|
return new HttpResponse(null, { status: 200 });
|
|
1278
1253
|
}, options);
|
|
1279
1254
|
};
|
|
1280
1255
|
const getGetApiOperationsMockHandler = (overrideResponse, options) => {
|
|
1281
1256
|
return http.get("*/api/operations", async (info) => {
|
|
1282
|
-
await delay(0);
|
|
1283
1257
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiOperationsResponseMock(), { status: 200 });
|
|
1284
1258
|
}, options);
|
|
1285
1259
|
};
|
|
1286
1260
|
const getGetApiOperationsIdMockHandler = (overrideResponse, options) => {
|
|
1287
1261
|
return http.get("*/api/operations/:id", async (info) => {
|
|
1288
|
-
await delay(0);
|
|
1289
1262
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiOperationsIdResponseMock(), { status: 200 });
|
|
1290
1263
|
}, options);
|
|
1291
1264
|
};
|
|
1292
1265
|
const getGetApiOperationsFiltersMockHandler = (overrideResponse, options) => {
|
|
1293
1266
|
return http.get("*/api/operations/filters", async (info) => {
|
|
1294
|
-
await delay(0);
|
|
1295
1267
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiOperationsFiltersResponseMock(), { status: 200 });
|
|
1296
1268
|
}, options);
|
|
1297
1269
|
};
|
|
1298
1270
|
const getGetApiUploadLimitMockHandler = (overrideResponse, options) => {
|
|
1299
1271
|
return http.get("*/api/upload-limit", async (info) => {
|
|
1300
|
-
await delay(0);
|
|
1301
1272
|
return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiUploadLimitResponseMock(), { status: 200 });
|
|
1302
1273
|
}, options);
|
|
1303
1274
|
};
|