@mitumba/sdk 5.28.0 → 5.30.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
@@ -1141,11 +1141,22 @@ var OrdersModule = class {
1141
1141
  return this.client.post("/orders", input, options);
1142
1142
  }
1143
1143
  /**
1144
- * Get full details of an order, including its event timeline.
1144
+ * Get full details of an order, including its event timeline. For the shop (the seller, or a team
1145
+ * member who may read orders) it also carries `items`, `settlement` and `next_step`.
1145
1146
  */
1146
1147
  async getById(id, options) {
1147
1148
  return this.client.get(`/orders/${id}`, void 0, options);
1148
1149
  }
1150
+ /**
1151
+ * Shop: cancel a paid order it cannot fulfil, before its parcel is ready. The buyer is refunded in
1152
+ * full. The owner or a team member who may cancel orders.
1153
+ *
1154
+ * Errors: 400 invalid_input; 403 store_forbidden; 404 not_found; 409 order_not_cancellable,
1155
+ * parcel_ready, not_refundable, conflict (reload and retry).
1156
+ */
1157
+ async cancel(id, input, options) {
1158
+ return this.client.post(`/orders/${encodeURIComponent(id)}/cancel`, input, options);
1159
+ }
1149
1160
  /**
1150
1161
  * Transition the status of an order.
1151
1162
  */
@@ -2483,6 +2494,7 @@ var REFUSAL_CODES = /* @__PURE__ */ new Set([
2483
2494
  "empty_cart",
2484
2495
  "cannot_buy_own",
2485
2496
  "invalid_deliveries",
2497
+ "invalid_selection",
2486
2498
  "address_not_found",
2487
2499
  "idempotency_conflict",
2488
2500
  "listing_unavailable",