@delopay/sdk 0.68.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/{chunk-2DNFEA5T.js → chunk-ASCCS4NN.js} +45 -11
- package/dist/chunk-ASCCS4NN.js.map +1 -0
- package/dist/index.cjs +44 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +140 -15
- package/dist/index.d.ts +140 -15
- package/dist/index.js +1 -1
- package/dist/internal.cjs +55 -10
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +9 -3
- package/dist/internal.d.ts +9 -3
- package/dist/internal.js +12 -1
- package/dist/internal.js.map +1 -1
- package/package.json +16 -17
- package/dist/chunk-2DNFEA5T.js.map +0 -1
|
@@ -660,10 +660,14 @@ var Disputes = class {
|
|
|
660
660
|
return this.request("PUT", "/disputes/evidence", { body: params });
|
|
661
661
|
}
|
|
662
662
|
/**
|
|
663
|
-
* Retrieve previously
|
|
663
|
+
* Retrieve previously stored evidence for a dispute.
|
|
664
|
+
*
|
|
665
|
+
* Returns an ARRAY of file-evidence blocks (this was previously mistyped
|
|
666
|
+
* as the flat submit-request shape). Only file evidence is reported —
|
|
667
|
+
* text evidence is not retrievable once submitted.
|
|
664
668
|
*
|
|
665
669
|
* @param disputeId - The dispute ID.
|
|
666
|
-
* @returns The
|
|
670
|
+
* @returns The stored file-evidence blocks.
|
|
667
671
|
*/
|
|
668
672
|
async retrieveEvidence(disputeId) {
|
|
669
673
|
return this.request("GET", `/disputes/evidence/${encodeURIComponent(disputeId)}`);
|
|
@@ -701,16 +705,22 @@ var Disputes = class {
|
|
|
701
705
|
return this.request("GET", "/disputes/profile/aggregate", { query: params });
|
|
702
706
|
}
|
|
703
707
|
/**
|
|
704
|
-
* Fetch the latest dispute state from the connector (gateway).
|
|
705
|
-
* `GET /disputes/{
|
|
708
|
+
* Fetch the latest dispute state from the connector (gateway) and persist it.
|
|
709
|
+
* `GET /disputes/{disputeId}?force_sync=true`
|
|
710
|
+
*
|
|
711
|
+
* The path parameter is the **Delopay dispute id** (`dp_…`). Force-sync asks the
|
|
712
|
+
* backend to pull the dispute from the connector (supported where the connector
|
|
713
|
+
* implements the dispute-sync flow, e.g. Stripe) and update the stored record
|
|
714
|
+
* before returning it.
|
|
706
715
|
*
|
|
707
|
-
* Note:
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
* path were silently hitting 404s.
|
|
716
|
+
* Note: this method previously called `GET /disputes/{id}/fetch`, which is a
|
|
717
|
+
* different backend route — a bulk import keyed by **merchant connector account
|
|
718
|
+
* id** with a required date range — so every call with a dispute id failed.
|
|
711
719
|
*/
|
|
712
|
-
async fetchFromConnector(
|
|
713
|
-
return this.request("GET", `/disputes/${encodeURIComponent(
|
|
720
|
+
async fetchFromConnector(disputeId) {
|
|
721
|
+
return this.request("GET", `/disputes/${encodeURIComponent(disputeId)}`, {
|
|
722
|
+
query: { force_sync: "true" }
|
|
723
|
+
});
|
|
714
724
|
}
|
|
715
725
|
};
|
|
716
726
|
|
|
@@ -1222,6 +1232,30 @@ var Payments = class {
|
|
|
1222
1232
|
async listAttempts(paymentId, options) {
|
|
1223
1233
|
return this.request("GET", `/payments/${encodeURIComponent(paymentId)}/attempts`, options);
|
|
1224
1234
|
}
|
|
1235
|
+
/**
|
|
1236
|
+
* The status timeline of a payment: every recorded creation / status
|
|
1237
|
+
* transition of the intent and its attempts, refunds and disputes, oldest
|
|
1238
|
+
* first. `complete: false` marks timelines partially reconstructed from
|
|
1239
|
+
* current records (payments created before the status log existed).
|
|
1240
|
+
*
|
|
1241
|
+
* @param paymentId - The payment intent ID.
|
|
1242
|
+
* @returns The ordered status-history events.
|
|
1243
|
+
*
|
|
1244
|
+
* @example
|
|
1245
|
+
* ```typescript
|
|
1246
|
+
* const { events, complete } = await delopay.payments.listStatusHistory('pay_abc123');
|
|
1247
|
+
* for (const event of events) {
|
|
1248
|
+
* console.log(event.timestamp, event.entity_type, event.status);
|
|
1249
|
+
* }
|
|
1250
|
+
* ```
|
|
1251
|
+
*/
|
|
1252
|
+
async listStatusHistory(paymentId, options) {
|
|
1253
|
+
return this.request(
|
|
1254
|
+
"GET",
|
|
1255
|
+
`/payments/${encodeURIComponent(paymentId)}/status-history`,
|
|
1256
|
+
options
|
|
1257
|
+
);
|
|
1258
|
+
}
|
|
1225
1259
|
/**
|
|
1226
1260
|
* Update an existing payment intent before it is confirmed.
|
|
1227
1261
|
*
|
|
@@ -4336,4 +4370,4 @@ export {
|
|
|
4336
4370
|
applyBrandingVariables,
|
|
4337
4371
|
shadowFor
|
|
4338
4372
|
};
|
|
4339
|
-
//# sourceMappingURL=chunk-
|
|
4373
|
+
//# sourceMappingURL=chunk-ASCCS4NN.js.map
|