@mitumba/sdk 1.20.0 → 1.21.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 +36 -1
- package/dist/index.d.ts +36 -1
- package/dist/index.js +36 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -309,8 +309,8 @@ var APIClient = class {
|
|
|
309
309
|
patch(path, body, options) {
|
|
310
310
|
return this.request("PATCH", path, body, void 0, options);
|
|
311
311
|
}
|
|
312
|
-
delete(path, options) {
|
|
313
|
-
return this.request("DELETE", path,
|
|
312
|
+
delete(path, body, options) {
|
|
313
|
+
return this.request("DELETE", path, body, void 0, options);
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
316
|
|
|
@@ -427,6 +427,26 @@ var AuthModule = class {
|
|
|
427
427
|
async becomeSeller(input, options) {
|
|
428
428
|
return this.client.post("/auth/become-seller", input, options);
|
|
429
429
|
}
|
|
430
|
+
/**
|
|
431
|
+
* Check if the account is eligible for deletion and what blockers exist.
|
|
432
|
+
*/
|
|
433
|
+
async getDeletionEligibility(options) {
|
|
434
|
+
return this.client.get("/auth/account/deletion-eligibility", void 0, options);
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Request account deletion. Sends a confirmation email if eligible.
|
|
438
|
+
*/
|
|
439
|
+
async requestAccountDeletion(options) {
|
|
440
|
+
return this.client.post("/auth/account/deletion-request", void 0, options);
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Confirm account deletion (from emailed link). Clears local session on success.
|
|
444
|
+
*/
|
|
445
|
+
async confirmAccountDeletion(input, options) {
|
|
446
|
+
const result = await this.client.delete("/auth/account", input, options);
|
|
447
|
+
await this.client.clearToken();
|
|
448
|
+
return result;
|
|
449
|
+
}
|
|
430
450
|
};
|
|
431
451
|
|
|
432
452
|
// src/modules/listings.ts
|
|
@@ -473,7 +493,7 @@ var ListingsModule = class {
|
|
|
473
493
|
* Soft delete a listing (sets status to 'removed').
|
|
474
494
|
*/
|
|
475
495
|
async delete(id, options) {
|
|
476
|
-
return this.client.delete(`/listings/${id}`, options);
|
|
496
|
+
return this.client.delete(`/listings/${id}`, void 0, options);
|
|
477
497
|
}
|
|
478
498
|
/**
|
|
479
499
|
* Get a seller's public storefront.
|
|
@@ -808,7 +828,7 @@ var StoresModule = class {
|
|
|
808
828
|
* Unfollow a store.
|
|
809
829
|
*/
|
|
810
830
|
async unfollow(storeId, options) {
|
|
811
|
-
return this.client.delete(`/listings/stores/${storeId}/follow`, options);
|
|
831
|
+
return this.client.delete(`/listings/stores/${storeId}/follow`, void 0, options);
|
|
812
832
|
}
|
|
813
833
|
/**
|
|
814
834
|
* Get paginated listings for a specific store.
|
|
@@ -892,6 +912,12 @@ var StoresModule = class {
|
|
|
892
912
|
formData.append("file", file);
|
|
893
913
|
return this.client.post(`/listings/stores/${storeId}/banner`, formData, options);
|
|
894
914
|
}
|
|
915
|
+
/**
|
|
916
|
+
* Delete a store. Blocked if active orders, pending payouts, or open disputes exist.
|
|
917
|
+
*/
|
|
918
|
+
async delete(storeId, options) {
|
|
919
|
+
return this.client.delete(`/listings/stores/${storeId}`, void 0, options);
|
|
920
|
+
}
|
|
895
921
|
};
|
|
896
922
|
|
|
897
923
|
// src/modules/reviews.ts
|
|
@@ -946,7 +972,7 @@ var WishlistsModule = class {
|
|
|
946
972
|
* Remove a listing from the wishlist.
|
|
947
973
|
*/
|
|
948
974
|
async remove(listingId, options) {
|
|
949
|
-
return this.client.delete(`/listings/wishlists/${listingId}`, options);
|
|
975
|
+
return this.client.delete(`/listings/wishlists/${listingId}`, void 0, options);
|
|
950
976
|
}
|
|
951
977
|
};
|
|
952
978
|
|
|
@@ -972,7 +998,7 @@ var CartModule = class {
|
|
|
972
998
|
* Remove a listing from the cart.
|
|
973
999
|
*/
|
|
974
1000
|
async remove(listingId, options) {
|
|
975
|
-
return this.client.delete(`/listings/cart/${listingId}`, options);
|
|
1001
|
+
return this.client.delete(`/listings/cart/${listingId}`, void 0, options);
|
|
976
1002
|
}
|
|
977
1003
|
/**
|
|
978
1004
|
* Update the quantity of a cart item.
|
|
@@ -1009,7 +1035,7 @@ var SettingsModule = class {
|
|
|
1009
1035
|
return this.client.get("/auth/sessions", void 0, options);
|
|
1010
1036
|
}
|
|
1011
1037
|
async revokeSession(sessionId, options) {
|
|
1012
|
-
return this.client.delete(`/auth/sessions/${sessionId}`, options);
|
|
1038
|
+
return this.client.delete(`/auth/sessions/${sessionId}`, void 0, options);
|
|
1013
1039
|
}
|
|
1014
1040
|
// ── Notification Preferences ──
|
|
1015
1041
|
async getNotificationPrefs(options) {
|
|
@@ -1036,7 +1062,7 @@ var SettingsModule = class {
|
|
|
1036
1062
|
return this.client.put(`/auth/addresses/${id}`, input, options);
|
|
1037
1063
|
}
|
|
1038
1064
|
async deleteAddress(id, options) {
|
|
1039
|
-
return this.client.delete(`/auth/addresses/${id}`, options);
|
|
1065
|
+
return this.client.delete(`/auth/addresses/${id}`, void 0, options);
|
|
1040
1066
|
}
|
|
1041
1067
|
async setDefaultAddress(id, options) {
|
|
1042
1068
|
return this.client.post(`/auth/addresses/${id}/default`, void 0, options);
|
|
@@ -1049,7 +1075,7 @@ var SettingsModule = class {
|
|
|
1049
1075
|
return this.client.post("/auth/payment-methods", input, options);
|
|
1050
1076
|
}
|
|
1051
1077
|
async deletePaymentMethod(id, options) {
|
|
1052
|
-
return this.client.delete(`/auth/payment-methods/${id}`, options);
|
|
1078
|
+
return this.client.delete(`/auth/payment-methods/${id}`, void 0, options);
|
|
1053
1079
|
}
|
|
1054
1080
|
async setDefaultPaymentMethod(id, options) {
|
|
1055
1081
|
return this.client.post(`/auth/payment-methods/${id}/default`, void 0, options);
|
|
@@ -1062,7 +1088,7 @@ var SettingsModule = class {
|
|
|
1062
1088
|
return this.client.post("/auth/linked-accounts", { provider, token }, options);
|
|
1063
1089
|
}
|
|
1064
1090
|
async unlinkAccount(provider, options) {
|
|
1065
|
-
return this.client.delete(`/auth/linked-accounts/${provider}`, options);
|
|
1091
|
+
return this.client.delete(`/auth/linked-accounts/${provider}`, void 0, options);
|
|
1066
1092
|
}
|
|
1067
1093
|
// ── 2FA ──
|
|
1068
1094
|
async setup2FA(options) {
|