@mitumba/sdk 1.25.0 → 1.26.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.mjs CHANGED
@@ -1414,6 +1414,61 @@ var ReportsModule = class {
1414
1414
  }
1415
1415
  };
1416
1416
 
1417
+ // src/modules/wholesale.ts
1418
+ var WholesaleModule = class {
1419
+ constructor(client) {
1420
+ this.client = client;
1421
+ }
1422
+ client;
1423
+ // ── Wholesale Store ──
1424
+ /** Get the current user's wholesale store and depots. */
1425
+ async getWholesaleStore(options) {
1426
+ return this.client.get("/listings/wholesale/store", void 0, options);
1427
+ }
1428
+ /** Create or update the wholesale store (bale_seller only). */
1429
+ async saveWholesaleStore(input, options) {
1430
+ return this.client.post("/listings/wholesale/store", input, options);
1431
+ }
1432
+ /** Add a depot to the wholesale store. */
1433
+ async addDepot(input, options) {
1434
+ return this.client.post("/listings/wholesale/store/depots", input, options);
1435
+ }
1436
+ /** Remove a depot. */
1437
+ async removeDepot(id, options) {
1438
+ return this.client.delete(`/listings/wholesale/store/depots/${id}`, void 0, options);
1439
+ }
1440
+ // ── Bales ──
1441
+ /** Create a bale listing (requires verified wholesale store). */
1442
+ async createBale(input, options) {
1443
+ return this.client.post("/listings/bales", input, options);
1444
+ }
1445
+ /** Get a bale by ID (public). */
1446
+ async getBale(id, options) {
1447
+ return this.client.get(`/listings/bales/${id}`, void 0, options);
1448
+ }
1449
+ /** Update a bale. */
1450
+ async updateBale(id, input, options) {
1451
+ return this.client.patch(`/listings/bales/${id}`, input, options);
1452
+ }
1453
+ /** Soft-delete a bale. */
1454
+ async removeBale(id, options) {
1455
+ return this.client.delete(`/listings/bales/${id}`, void 0, options);
1456
+ }
1457
+ /** Get all bales for the current user's wholesale store. */
1458
+ async myBales(options) {
1459
+ return this.client.get("/listings/wholesale/mine/bales", void 0, options);
1460
+ }
1461
+ // ── Feed ──
1462
+ /** Browse the wholesale bale feed (public). */
1463
+ async wholesaleFeed(params, options) {
1464
+ return this.client.get(
1465
+ "/listings/wholesale/feed",
1466
+ params,
1467
+ options
1468
+ );
1469
+ }
1470
+ };
1471
+
1417
1472
  // src/types/auth.ts
1418
1473
  var TWO_FACTOR_METHOD_TYPES = ["totp", "sms", "email", "passkey"];
1419
1474
 
@@ -1464,6 +1519,7 @@ var MitumbaClient = class {
1464
1519
  disputes;
1465
1520
  uploads;
1466
1521
  reports;
1522
+ wholesale;
1467
1523
  constructor(config) {
1468
1524
  this.api = new APIClient(config);
1469
1525
  this.auth = new AuthModule(this.api);
@@ -1485,6 +1541,7 @@ var MitumbaClient = class {
1485
1541
  this.disputes = new DisputesModule(this.api);
1486
1542
  this.uploads = new UploadsModule(this.api);
1487
1543
  this.reports = new ReportsModule(this.api);
1544
+ this.wholesale = new WholesaleModule(this.api);
1488
1545
  }
1489
1546
  /**
1490
1547
  * Set the access token for authenticated requests.
@@ -1525,6 +1582,6 @@ var MitumbaClient = class {
1525
1582
  }
1526
1583
  };
1527
1584
 
1528
- 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 };
1585
+ 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, WholesaleModule, WishlistsModule, createTokenStore };
1529
1586
  //# sourceMappingURL=index.mjs.map
1530
1587
  //# sourceMappingURL=index.mjs.map