@delopay/sdk 0.265.0 → 0.267.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-SW4N2WY4.js → chunk-C7D3FUJ2.js} +225 -1
- package/dist/chunk-C7D3FUJ2.js.map +1 -0
- package/dist/index.cjs +225 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +481 -1
- package/dist/index.d.ts +481 -1
- package/dist/index.js +3 -1
- package/dist/internal.cjs +301 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +44 -3
- package/dist/internal.d.ts +44 -3
- package/dist/internal.js +79 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
- package/dist/chunk-SW4N2WY4.js.map +0 -1
|
@@ -1642,6 +1642,23 @@ var Disputes = class {
|
|
|
1642
1642
|
async accept(disputeId) {
|
|
1643
1643
|
return this.request("POST", `/disputes/accept/${encodeURIComponent(disputeId)}`);
|
|
1644
1644
|
}
|
|
1645
|
+
/**
|
|
1646
|
+
* Correct the exchange rate of a dispute the processor reported in another
|
|
1647
|
+
* currency, or record its final settled amount. Until it is settled, the
|
|
1648
|
+
* reserved amount is an estimate and no other dispute on the same payment
|
|
1649
|
+
* attempt can take a new reservation. Signed-in users with the
|
|
1650
|
+
* external-record permission only.
|
|
1651
|
+
*
|
|
1652
|
+
* @param disputeId - The dispute to reconcile.
|
|
1653
|
+
* @param request - `correct_rate` with the processor's rate, or `settle`
|
|
1654
|
+
* with the final amount and a reason.
|
|
1655
|
+
* @returns The updated dispute.
|
|
1656
|
+
*/
|
|
1657
|
+
async reconcile(disputeId, request) {
|
|
1658
|
+
return this.request("POST", `/disputes/${encodeURIComponent(disputeId)}/reconcile`, {
|
|
1659
|
+
body: request
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1645
1662
|
/**
|
|
1646
1663
|
* Submit evidence to challenge a dispute.
|
|
1647
1664
|
*
|
|
@@ -5699,6 +5716,60 @@ var BuyerConversations = class {
|
|
|
5699
5716
|
}
|
|
5700
5717
|
};
|
|
5701
5718
|
|
|
5719
|
+
// src/resources/buyerEvidenceReviews.ts
|
|
5720
|
+
var BuyerEvidenceReviews = class {
|
|
5721
|
+
constructor(request) {
|
|
5722
|
+
this.request = request;
|
|
5723
|
+
}
|
|
5724
|
+
/**
|
|
5725
|
+
* The shop's cases with buyer evidence, the nearest target first.
|
|
5726
|
+
* `merchant_id` and `reviewer` are ignored here. `GET /buyer-evidence`
|
|
5727
|
+
*/
|
|
5728
|
+
async list(params) {
|
|
5729
|
+
return this.request("GET", "/buyer-evidence", {
|
|
5730
|
+
query: params
|
|
5731
|
+
});
|
|
5732
|
+
}
|
|
5733
|
+
/** One case's evidence with its history and files. `GET /buyer-evidence/{id}` */
|
|
5734
|
+
async retrieve(evidenceId) {
|
|
5735
|
+
return this.request("GET", `/buyer-evidence/${encodeURIComponent(evidenceId)}`);
|
|
5736
|
+
}
|
|
5737
|
+
/** Download a file of a case's evidence. */
|
|
5738
|
+
async downloadFile(evidenceId, fileId) {
|
|
5739
|
+
return this.request(
|
|
5740
|
+
"GET",
|
|
5741
|
+
`/buyer-evidence/${encodeURIComponent(evidenceId)}/files/${encodeURIComponent(fileId)}`,
|
|
5742
|
+
{ responseType: "blob" }
|
|
5743
|
+
);
|
|
5744
|
+
}
|
|
5745
|
+
/** Ask the buyer for more, by a cut-off. Refused once a result closed the review. */
|
|
5746
|
+
async requestInformation(evidenceId, params) {
|
|
5747
|
+
return this.request(
|
|
5748
|
+
"POST",
|
|
5749
|
+
`/buyer-evidence/${encodeURIComponent(evidenceId)}/information-requests`,
|
|
5750
|
+
{ body: params }
|
|
5751
|
+
);
|
|
5752
|
+
}
|
|
5753
|
+
/** An answer the buyer sees. */
|
|
5754
|
+
async reply(evidenceId, params) {
|
|
5755
|
+
return this.request("POST", `/buyer-evidence/${encodeURIComponent(evidenceId)}/replies`, {
|
|
5756
|
+
body: params
|
|
5757
|
+
});
|
|
5758
|
+
}
|
|
5759
|
+
/** Record the result, which closes the review. */
|
|
5760
|
+
async review(evidenceId, params) {
|
|
5761
|
+
return this.request("POST", `/buyer-evidence/${encodeURIComponent(evidenceId)}/reviews`, {
|
|
5762
|
+
body: params
|
|
5763
|
+
});
|
|
5764
|
+
}
|
|
5765
|
+
/** A note the shop's team and DeloPay read, never the buyer. */
|
|
5766
|
+
async note(evidenceId, params) {
|
|
5767
|
+
return this.request("POST", `/buyer-evidence/${encodeURIComponent(evidenceId)}/notes`, {
|
|
5768
|
+
body: params
|
|
5769
|
+
});
|
|
5770
|
+
}
|
|
5771
|
+
};
|
|
5772
|
+
|
|
5702
5773
|
// src/resources/checkoutRecovery.ts
|
|
5703
5774
|
var CheckoutRecovery = class {
|
|
5704
5775
|
constructor(request) {
|
|
@@ -7316,6 +7387,17 @@ var BuyerAccount = class {
|
|
|
7316
7387
|
async getSession(options) {
|
|
7317
7388
|
return this.request("GET", "/buyer-account/session", { ...options });
|
|
7318
7389
|
}
|
|
7390
|
+
/**
|
|
7391
|
+
* What the buyer is mailed about: a reply from a shop's team they have not
|
|
7392
|
+
* read, and news in their refund requests and disputes.
|
|
7393
|
+
*/
|
|
7394
|
+
async noticeSettings(options) {
|
|
7395
|
+
return this.request("GET", "/buyer-account/notice-settings", { ...options });
|
|
7396
|
+
}
|
|
7397
|
+
/** Turn either mail on or off for the buyer, at every shop. */
|
|
7398
|
+
async setNoticeSettings(params, options) {
|
|
7399
|
+
return this.request("PUT", "/buyer-account/notice-settings", { body: params, ...options });
|
|
7400
|
+
}
|
|
7319
7401
|
/** End the current session. */
|
|
7320
7402
|
async signOut(options) {
|
|
7321
7403
|
return this.request("DELETE", "/buyer-account/session", { ...options });
|
|
@@ -7450,6 +7532,78 @@ var BuyerAccount = class {
|
|
|
7450
7532
|
...options
|
|
7451
7533
|
});
|
|
7452
7534
|
}
|
|
7535
|
+
/**
|
|
7536
|
+
* A case's evidence: what may be handed in and by when, the files saved
|
|
7537
|
+
* and handed in, and what the reviewer said. Opened on the first read
|
|
7538
|
+
* while the case still waits.
|
|
7539
|
+
* The case is one of a confirmed record's, named by the `record` its
|
|
7540
|
+
* purchases carry and the case id the case list shows.
|
|
7541
|
+
*/
|
|
7542
|
+
async caseEvidence(record, caseId, options) {
|
|
7543
|
+
return this.request(
|
|
7544
|
+
"GET",
|
|
7545
|
+
`/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence`,
|
|
7546
|
+
{ ...options }
|
|
7547
|
+
);
|
|
7548
|
+
}
|
|
7549
|
+
/**
|
|
7550
|
+
* Upload a file for a case. It is saved, not handed in, until a
|
|
7551
|
+
* submission takes it. Uploading again with the same `clientUploadId`
|
|
7552
|
+
* returns the file the first upload stored, also after the cut-off.
|
|
7553
|
+
*/
|
|
7554
|
+
async uploadEvidenceFile(record, caseId, file, clientUploadId, options) {
|
|
7555
|
+
const { fileName, ...extras } = options ?? {};
|
|
7556
|
+
const form = new FormData();
|
|
7557
|
+
form.append("client_upload_id", clientUploadId);
|
|
7558
|
+
if (fileName === void 0) form.append("file", file);
|
|
7559
|
+
else form.append("file", file, fileName);
|
|
7560
|
+
return this.request(
|
|
7561
|
+
"POST",
|
|
7562
|
+
`/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files`,
|
|
7563
|
+
{ body: form, ...extras }
|
|
7564
|
+
);
|
|
7565
|
+
}
|
|
7566
|
+
/** Download a file of the case's evidence. */
|
|
7567
|
+
async downloadEvidenceFile(record, caseId, fileId, options) {
|
|
7568
|
+
return this.request(
|
|
7569
|
+
"GET",
|
|
7570
|
+
`/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files/${encodeURIComponent(fileId)}`,
|
|
7571
|
+
{
|
|
7572
|
+
responseType: "blob",
|
|
7573
|
+
...options
|
|
7574
|
+
}
|
|
7575
|
+
);
|
|
7576
|
+
}
|
|
7577
|
+
/** Remove a saved file. A file a submission took stays. */
|
|
7578
|
+
async removeEvidenceFile(record, caseId, fileId, options) {
|
|
7579
|
+
return this.request(
|
|
7580
|
+
"DELETE",
|
|
7581
|
+
`/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files/${encodeURIComponent(fileId)}`,
|
|
7582
|
+
{
|
|
7583
|
+
...options
|
|
7584
|
+
}
|
|
7585
|
+
);
|
|
7586
|
+
}
|
|
7587
|
+
/**
|
|
7588
|
+
* Hand in an explanation, saved files or both, while the buyer's window
|
|
7589
|
+
* is open. Sending again with the same `client_submission_id` returns the
|
|
7590
|
+
* submission the first send stored.
|
|
7591
|
+
*/
|
|
7592
|
+
async submitEvidence(record, caseId, params, options) {
|
|
7593
|
+
return this.request(
|
|
7594
|
+
"POST",
|
|
7595
|
+
`/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/submissions`,
|
|
7596
|
+
{ body: params, ...options }
|
|
7597
|
+
);
|
|
7598
|
+
}
|
|
7599
|
+
/** Ask for more time, once until the cut-off is next set. */
|
|
7600
|
+
async requestEvidenceExtension(record, caseId, params, options) {
|
|
7601
|
+
return this.request(
|
|
7602
|
+
"POST",
|
|
7603
|
+
`/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/extension-requests`,
|
|
7604
|
+
{ body: params, ...options }
|
|
7605
|
+
);
|
|
7606
|
+
}
|
|
7453
7607
|
};
|
|
7454
7608
|
|
|
7455
7609
|
// src/resources/buyerPortal.ts
|
|
@@ -7468,6 +7622,74 @@ var BuyerPortal = class {
|
|
|
7468
7622
|
async listCases(options) {
|
|
7469
7623
|
return this.request("GET", "/buyer-portal/cases", { ...options });
|
|
7470
7624
|
}
|
|
7625
|
+
/**
|
|
7626
|
+
* A case's evidence: what may be handed in and by when, the files saved
|
|
7627
|
+
* and handed in, and what the reviewer said. Opened on the first read
|
|
7628
|
+
* while the case still waits.
|
|
7629
|
+
*/
|
|
7630
|
+
async caseEvidence(caseId, options) {
|
|
7631
|
+
return this.request("GET", `/buyer-portal/cases/${encodeURIComponent(caseId)}/evidence`, {
|
|
7632
|
+
...options
|
|
7633
|
+
});
|
|
7634
|
+
}
|
|
7635
|
+
/**
|
|
7636
|
+
* Upload a file for a case. It is saved, not handed in, until a
|
|
7637
|
+
* submission takes it. Uploading again with the same `clientUploadId`
|
|
7638
|
+
* returns the file the first upload stored, also after the cut-off.
|
|
7639
|
+
*/
|
|
7640
|
+
async uploadEvidenceFile(caseId, file, clientUploadId, options) {
|
|
7641
|
+
const { fileName, ...extras } = options ?? {};
|
|
7642
|
+
const form = new FormData();
|
|
7643
|
+
form.append("client_upload_id", clientUploadId);
|
|
7644
|
+
if (fileName === void 0) form.append("file", file);
|
|
7645
|
+
else form.append("file", file, fileName);
|
|
7646
|
+
return this.request(
|
|
7647
|
+
"POST",
|
|
7648
|
+
`/buyer-portal/cases/${encodeURIComponent(caseId)}/evidence/files`,
|
|
7649
|
+
{ body: form, ...extras }
|
|
7650
|
+
);
|
|
7651
|
+
}
|
|
7652
|
+
/** Download a file of the case's evidence. */
|
|
7653
|
+
async downloadEvidenceFile(caseId, fileId, options) {
|
|
7654
|
+
return this.request(
|
|
7655
|
+
"GET",
|
|
7656
|
+
`/buyer-portal/cases/${encodeURIComponent(caseId)}/evidence/files/${encodeURIComponent(fileId)}`,
|
|
7657
|
+
{
|
|
7658
|
+
responseType: "blob",
|
|
7659
|
+
...options
|
|
7660
|
+
}
|
|
7661
|
+
);
|
|
7662
|
+
}
|
|
7663
|
+
/** Remove a saved file. A file a submission took stays. */
|
|
7664
|
+
async removeEvidenceFile(caseId, fileId, options) {
|
|
7665
|
+
return this.request(
|
|
7666
|
+
"DELETE",
|
|
7667
|
+
`/buyer-portal/cases/${encodeURIComponent(caseId)}/evidence/files/${encodeURIComponent(fileId)}`,
|
|
7668
|
+
{
|
|
7669
|
+
...options
|
|
7670
|
+
}
|
|
7671
|
+
);
|
|
7672
|
+
}
|
|
7673
|
+
/**
|
|
7674
|
+
* Hand in an explanation, saved files or both, while the buyer's window
|
|
7675
|
+
* is open. Sending again with the same `client_submission_id` returns the
|
|
7676
|
+
* submission the first send stored.
|
|
7677
|
+
*/
|
|
7678
|
+
async submitEvidence(caseId, params, options) {
|
|
7679
|
+
return this.request(
|
|
7680
|
+
"POST",
|
|
7681
|
+
`/buyer-portal/cases/${encodeURIComponent(caseId)}/evidence/submissions`,
|
|
7682
|
+
{ body: params, ...options }
|
|
7683
|
+
);
|
|
7684
|
+
}
|
|
7685
|
+
/** Ask for more time, once until the cut-off is next set. */
|
|
7686
|
+
async requestEvidenceExtension(caseId, params, options) {
|
|
7687
|
+
return this.request(
|
|
7688
|
+
"POST",
|
|
7689
|
+
`/buyer-portal/cases/${encodeURIComponent(caseId)}/evidence/extension-requests`,
|
|
7690
|
+
{ body: params, ...options }
|
|
7691
|
+
);
|
|
7692
|
+
}
|
|
7471
7693
|
/**
|
|
7472
7694
|
* The buyer's conversations with the shop, the latest message first. A
|
|
7473
7695
|
* portal link for the whole merchant lists one per shop and mode.
|
|
@@ -8630,6 +8852,7 @@ var Delopay = class {
|
|
|
8630
8852
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
8631
8853
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
8632
8854
|
this.buyerConversations = new BuyerConversations(request);
|
|
8855
|
+
this.buyerEvidence = new BuyerEvidenceReviews(request);
|
|
8633
8856
|
this.checkoutRecovery = new CheckoutRecovery(request);
|
|
8634
8857
|
this.costRules = new CostRules(request);
|
|
8635
8858
|
this.externalRecords = new ExternalRecords(request);
|
|
@@ -13447,6 +13670,7 @@ export {
|
|
|
13447
13670
|
SellToRestrictions,
|
|
13448
13671
|
BuyerBlocklist,
|
|
13449
13672
|
BuyerConversations,
|
|
13673
|
+
BuyerEvidenceReviews,
|
|
13450
13674
|
CheckoutRecovery,
|
|
13451
13675
|
CostRules,
|
|
13452
13676
|
ExternalRecords,
|
|
@@ -13679,4 +13903,4 @@ export {
|
|
|
13679
13903
|
decodeNativePanes,
|
|
13680
13904
|
encodeNativePanes
|
|
13681
13905
|
};
|
|
13682
|
-
//# sourceMappingURL=chunk-
|
|
13906
|
+
//# sourceMappingURL=chunk-C7D3FUJ2.js.map
|