@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
package/dist/internal.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
BUILTIN_PAYMENT_ICON_KEYS,
|
|
24
24
|
BuyerBlocklist,
|
|
25
25
|
BuyerConversations,
|
|
26
|
+
BuyerEvidenceReviews,
|
|
26
27
|
CARD_FIELD_CHROMES,
|
|
27
28
|
CARD_FIELD_FONT_SIZES,
|
|
28
29
|
CARD_FIELD_WEIGHTS,
|
|
@@ -251,7 +252,7 @@ import {
|
|
|
251
252
|
visibleCustomFields,
|
|
252
253
|
whopAccentSwatch,
|
|
253
254
|
whopCardElement
|
|
254
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-C7D3FUJ2.js";
|
|
255
256
|
|
|
256
257
|
// src/internal/resources/admin.ts
|
|
257
258
|
var Admin = class {
|
|
@@ -577,6 +578,82 @@ var AdminPortal = class {
|
|
|
577
578
|
query: params
|
|
578
579
|
});
|
|
579
580
|
}
|
|
581
|
+
// --- Buyer evidence review --------------------------------------------------
|
|
582
|
+
/**
|
|
583
|
+
* DeloPay's review queue of buyers' evidence, the nearest target first,
|
|
584
|
+
* across merchants unless `merchant_id` narrows it.
|
|
585
|
+
*/
|
|
586
|
+
async listBuyerEvidence(params) {
|
|
587
|
+
return this.request("GET", "/admin-portal/buyer-evidence", {
|
|
588
|
+
query: params
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
/** One case's evidence with every step and file, internal ones included. */
|
|
592
|
+
async getBuyerEvidence(evidenceId) {
|
|
593
|
+
return this.request("GET", `/admin-portal/buyer-evidence/${encodeURIComponent(evidenceId)}`);
|
|
594
|
+
}
|
|
595
|
+
/** Download a file of a case's evidence. */
|
|
596
|
+
async downloadBuyerEvidenceFile(evidenceId, fileId) {
|
|
597
|
+
return this.request(
|
|
598
|
+
"GET",
|
|
599
|
+
`/admin-portal/buyer-evidence/${encodeURIComponent(evidenceId)}/files/${encodeURIComponent(fileId)}`,
|
|
600
|
+
{ responseType: "blob" }
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Ask the buyer for more, by a cut-off. Refused once a result has closed
|
|
605
|
+
* the review.
|
|
606
|
+
*/
|
|
607
|
+
async requestBuyerEvidenceInformation(evidenceId, params) {
|
|
608
|
+
return this.request(
|
|
609
|
+
"POST",
|
|
610
|
+
`/admin-portal/buyer-evidence/${encodeURIComponent(evidenceId)}/information-requests`,
|
|
611
|
+
{ body: params }
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
/** An answer the buyer sees. */
|
|
615
|
+
async replyToBuyerEvidence(evidenceId, params) {
|
|
616
|
+
return this.request(
|
|
617
|
+
"POST",
|
|
618
|
+
`/admin-portal/buyer-evidence/${encodeURIComponent(evidenceId)}/replies`,
|
|
619
|
+
{ body: params }
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Record the result, which closes the review. It never refunds a payment
|
|
624
|
+
* and never decides a dispute with the payment provider.
|
|
625
|
+
*/
|
|
626
|
+
async reviewBuyerEvidence(evidenceId, params) {
|
|
627
|
+
return this.request(
|
|
628
|
+
"POST",
|
|
629
|
+
`/admin-portal/buyer-evidence/${encodeURIComponent(evidenceId)}/reviews`,
|
|
630
|
+
{ body: params }
|
|
631
|
+
);
|
|
632
|
+
}
|
|
633
|
+
/** Move the buyer's cut-off, with a reason the buyer sees. */
|
|
634
|
+
async moveBuyerEvidenceDeadline(evidenceId, params) {
|
|
635
|
+
return this.request(
|
|
636
|
+
"PUT",
|
|
637
|
+
`/admin-portal/buyer-evidence/${encodeURIComponent(evidenceId)}/deadline`,
|
|
638
|
+
{ body: params }
|
|
639
|
+
);
|
|
640
|
+
}
|
|
641
|
+
/** Make a user responsible for the review: an id, `me`, or `null` for nobody. */
|
|
642
|
+
async assignBuyerEvidence(evidenceId, params) {
|
|
643
|
+
return this.request(
|
|
644
|
+
"PUT",
|
|
645
|
+
`/admin-portal/buyer-evidence/${encodeURIComponent(evidenceId)}/reviewer`,
|
|
646
|
+
{ body: params }
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
/** An internal note, never shown to the buyer. */
|
|
650
|
+
async noteBuyerEvidence(evidenceId, params) {
|
|
651
|
+
return this.request(
|
|
652
|
+
"POST",
|
|
653
|
+
`/admin-portal/buyer-evidence/${encodeURIComponent(evidenceId)}/notes`,
|
|
654
|
+
{ body: params }
|
|
655
|
+
);
|
|
656
|
+
}
|
|
580
657
|
async analytics(params) {
|
|
581
658
|
return this.request("GET", "/admin-portal/analytics", {
|
|
582
659
|
query: params
|
|
@@ -1909,6 +1986,7 @@ export {
|
|
|
1909
1986
|
BUILTIN_PAYMENT_ICON_KEYS,
|
|
1910
1987
|
BuyerBlocklist,
|
|
1911
1988
|
BuyerConversations,
|
|
1989
|
+
BuyerEvidenceReviews,
|
|
1912
1990
|
CARD_FIELD_CHROMES,
|
|
1913
1991
|
CARD_FIELD_FONT_SIZES,
|
|
1914
1992
|
CARD_FIELD_WEIGHTS,
|