@delopay/sdk 0.69.0 → 0.70.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.cjs CHANGED
@@ -735,10 +735,14 @@ var Disputes = class {
735
735
  return this.request("PUT", "/disputes/evidence", { body: params });
736
736
  }
737
737
  /**
738
- * Retrieve previously submitted evidence for a dispute.
738
+ * Retrieve previously stored evidence for a dispute.
739
+ *
740
+ * Returns an ARRAY of file-evidence blocks (this was previously mistyped
741
+ * as the flat submit-request shape). Only file evidence is reported —
742
+ * text evidence is not retrievable once submitted.
739
743
  *
740
744
  * @param disputeId - The dispute ID.
741
- * @returns The submitted evidence.
745
+ * @returns The stored file-evidence blocks.
742
746
  */
743
747
  async retrieveEvidence(disputeId) {
744
748
  return this.request("GET", `/disputes/evidence/${encodeURIComponent(disputeId)}`);
@@ -776,16 +780,22 @@ var Disputes = class {
776
780
  return this.request("GET", "/disputes/profile/aggregate", { query: params });
777
781
  }
778
782
  /**
779
- * Fetch the latest dispute state from the connector (gateway).
780
- * `GET /disputes/{connectorId}/fetch`
783
+ * Fetch the latest dispute state from the connector (gateway) and persist it.
784
+ * `GET /disputes/{disputeId}?force_sync=true`
785
+ *
786
+ * The path parameter is the **Delopay dispute id** (`dp_…`). Force-sync asks the
787
+ * backend to pull the dispute from the connector (supported where the connector
788
+ * implements the dispute-sync flow, e.g. Stripe) and update the stored record
789
+ * before returning it.
781
790
  *
782
- * Note: the path parameter is the **connector dispute id** on the gateway, not the
783
- * Delopay dispute id. Method is GET (not POST) and this method signature was
784
- * previously wrongcallers depending on the old `POST /disputes/{id}/fetch_from_connector`
785
- * path were silently hitting 404s.
791
+ * Note: this method previously called `GET /disputes/{id}/fetch`, which is a
792
+ * different backend route a bulk import keyed by **merchant connector account
793
+ * id** with a required date range so every call with a dispute id failed.
786
794
  */
787
- async fetchFromConnector(connectorId) {
788
- return this.request("GET", `/disputes/${encodeURIComponent(connectorId)}/fetch`);
795
+ async fetchFromConnector(disputeId) {
796
+ return this.request("GET", `/disputes/${encodeURIComponent(disputeId)}`, {
797
+ query: { force_sync: "true" }
798
+ });
789
799
  }
790
800
  };
791
801