@mitumba/sdk 1.22.0 → 1.24.0
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/index.d.mts +64 -1
- package/dist/index.d.ts +64 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -409,6 +409,13 @@ var AuthModule = class {
|
|
|
409
409
|
await this.client.setSession(result);
|
|
410
410
|
return result;
|
|
411
411
|
}
|
|
412
|
+
/**
|
|
413
|
+
* Send a 2FA challenge during login (for SMS/email methods).
|
|
414
|
+
* Call before verify2FA when the user picks a non-TOTP method.
|
|
415
|
+
*/
|
|
416
|
+
async sendLogin2FAChallenge(input, options) {
|
|
417
|
+
return this.client.post("/auth/2fa/login/challenge", input, options);
|
|
418
|
+
}
|
|
412
419
|
/**
|
|
413
420
|
* Send a verification code to the user's email.
|
|
414
421
|
*/
|
|
@@ -1106,6 +1113,31 @@ var SettingsModule = class {
|
|
|
1106
1113
|
async delete2FA(code, options) {
|
|
1107
1114
|
return this.client.delete("/auth/2fa", { code }, options);
|
|
1108
1115
|
}
|
|
1116
|
+
// ── Multi-Method 2FA ──
|
|
1117
|
+
async list2FAMethods(options) {
|
|
1118
|
+
return this.client.get("/auth/2fa/methods", void 0, options);
|
|
1119
|
+
}
|
|
1120
|
+
async add2FAMethod(input, options) {
|
|
1121
|
+
return this.client.post("/auth/2fa/methods", input, options);
|
|
1122
|
+
}
|
|
1123
|
+
async verify2FAMethod(id, code, options) {
|
|
1124
|
+
return this.client.post(`/auth/2fa/methods/${id}/verify`, { code }, options);
|
|
1125
|
+
}
|
|
1126
|
+
async enable2FAMethod(id, code, options) {
|
|
1127
|
+
return this.client.post(`/auth/2fa/methods/${id}/enable`, { code }, options);
|
|
1128
|
+
}
|
|
1129
|
+
async disable2FAMethod(id, code, options) {
|
|
1130
|
+
return this.client.post(`/auth/2fa/methods/${id}/disable`, { code }, options);
|
|
1131
|
+
}
|
|
1132
|
+
async delete2FAMethod(id, code, options) {
|
|
1133
|
+
return this.client.delete(`/auth/2fa/methods/${id}`, { code }, options);
|
|
1134
|
+
}
|
|
1135
|
+
async setPrimary2FAMethod(id, options) {
|
|
1136
|
+
return this.client.post(`/auth/2fa/methods/${id}/primary`, void 0, options);
|
|
1137
|
+
}
|
|
1138
|
+
async challenge2FAMethod(id, options) {
|
|
1139
|
+
return this.client.post(`/auth/2fa/methods/${id}/challenge`, void 0, options);
|
|
1140
|
+
}
|
|
1109
1141
|
};
|
|
1110
1142
|
|
|
1111
1143
|
// src/modules/mailer.ts
|
|
@@ -1351,6 +1383,9 @@ var ReportsModule = class {
|
|
|
1351
1383
|
}
|
|
1352
1384
|
};
|
|
1353
1385
|
|
|
1386
|
+
// src/types/auth.ts
|
|
1387
|
+
var TWO_FACTOR_METHOD_TYPES = ["totp", "sms", "email"];
|
|
1388
|
+
|
|
1354
1389
|
// src/types/listings.ts
|
|
1355
1390
|
var CONDITIONS = ["new", "like_new", "good", "fair"];
|
|
1356
1391
|
var LISTING_STATUSES = ["draft", "active", "sold", "removed"];
|
|
@@ -1459,6 +1494,6 @@ var MitumbaClient = class {
|
|
|
1459
1494
|
}
|
|
1460
1495
|
};
|
|
1461
1496
|
|
|
1462
|
-
export { APIClient, APIError, AdminModule, AuthModule, BusinessesModule, CONDITIONS, CartModule, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DisputesModule, IDBTokenStore, LISTING_STATUSES, ListingsModule, MailerModule, MemoryTokenStore, MessagesModule, MitumbaClient, NotificationsModule, ORDER_STATUSES, OrdersModule, PAYMENT_STATUSES, PayModule, ReportsModule, ReviewsModule, SearchModule, SettingsModule, StoresModule, UploadsModule, VaziModule, WishlistsModule, createTokenStore };
|
|
1497
|
+
export { APIClient, APIError, AdminModule, AuthModule, BusinessesModule, CONDITIONS, CartModule, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DisputesModule, IDBTokenStore, LISTING_STATUSES, ListingsModule, MailerModule, MemoryTokenStore, MessagesModule, MitumbaClient, NotificationsModule, ORDER_STATUSES, OrdersModule, PAYMENT_STATUSES, PayModule, ReportsModule, ReviewsModule, SearchModule, SettingsModule, StoresModule, TWO_FACTOR_METHOD_TYPES, UploadsModule, VaziModule, WishlistsModule, createTokenStore };
|
|
1463
1498
|
//# sourceMappingURL=index.mjs.map
|
|
1464
1499
|
//# sourceMappingURL=index.mjs.map
|