@thorprovider/medusa-extended 1.13.0 → 1.13.2

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
@@ -1227,6 +1227,31 @@ var DropshipperClient = class {
1227
1227
  "/admin/thor/dropshipper/account"
1228
1228
  );
1229
1229
  }
1230
+ /**
1231
+ * Get the authenticated dropshipper's business policy text.
1232
+ * Returns an empty string when no policy is set.
1233
+ *
1234
+ * `GET /admin/thor/dropshipper/account/policies`
1235
+ */
1236
+ async getBusinessPolicy() {
1237
+ return this.request(
1238
+ "GET",
1239
+ "/admin/thor/dropshipper/account/policies"
1240
+ );
1241
+ }
1242
+ /**
1243
+ * Update the authenticated dropshipper's business policy text.
1244
+ * The value is trimmed server-side before being persisted.
1245
+ *
1246
+ * `PATCH /admin/thor/dropshipper/account/policies`
1247
+ */
1248
+ async updateBusinessPolicy(body) {
1249
+ return this.request(
1250
+ "PATCH",
1251
+ "/admin/thor/dropshipper/account/policies",
1252
+ body
1253
+ );
1254
+ }
1230
1255
  /**
1231
1256
  * Orders where Y owes money to X (Y collected payment, needs to pay costs).
1232
1257
  *
@@ -2113,6 +2138,13 @@ var RecoveryClient = class {
2113
2138
  retryAfterSeconds: details.retry_after_seconds
2114
2139
  };
2115
2140
  }
2141
+ if (error.status === 400 && details?.type === "challenge_failed") {
2142
+ return {
2143
+ ok: false,
2144
+ reason: "challenge_failed",
2145
+ ...typeof details.message === "string" ? { message: details.message } : {}
2146
+ };
2147
+ }
2116
2148
  if (error.status === 400) {
2117
2149
  return {
2118
2150
  ok: false,