@mitumba/sdk 2.0.0 → 3.0.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 +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1735,7 +1735,11 @@ var ReviewsModule = class {
|
|
|
1735
1735
|
);
|
|
1736
1736
|
}
|
|
1737
1737
|
/**
|
|
1738
|
-
* Create a review for a store (authenticated).
|
|
1738
|
+
* Create a review for a store (authenticated). `input.order_id` is required.
|
|
1739
|
+
*
|
|
1740
|
+
* @throws {APIError} `review_not_allowed` when the order is not the caller's delivered/completed
|
|
1741
|
+
* purchase from this store, and `already_reviewed` when the order already has a review (one
|
|
1742
|
+
* review per order, enforced atomically server-side).
|
|
1739
1743
|
*/
|
|
1740
1744
|
async create(storeId, input, options) {
|
|
1741
1745
|
return this.client.post(`/listings/stores/${storeId}/reviews`, input, options);
|
|
@@ -2302,6 +2306,17 @@ var WholesaleModule = class {
|
|
|
2302
2306
|
formData.append("index", String(index));
|
|
2303
2307
|
return this.client.post(`/listings/bales/${baleId}/images/upload`, formData, options);
|
|
2304
2308
|
}
|
|
2309
|
+
/**
|
|
2310
|
+
* Remove a bale image from its slot (requires the owning wholesale store).
|
|
2311
|
+
*
|
|
2312
|
+
* @param baleId - The bale whose image is being removed
|
|
2313
|
+
* @param index - The slot index; slot 0 is the cover
|
|
2314
|
+
* @returns `{ ok: true }` on success
|
|
2315
|
+
* @throws {APIError} On network or server errors
|
|
2316
|
+
*/
|
|
2317
|
+
async removeBaleImage(baleId, index, options) {
|
|
2318
|
+
return this.client.delete(`/listings/bales/${baleId}/images/${index}`, void 0, options);
|
|
2319
|
+
}
|
|
2305
2320
|
// ── Feed ──
|
|
2306
2321
|
/** Browse the wholesale bale feed (public). */
|
|
2307
2322
|
async wholesaleFeed(params, options) {
|