@delopay/sdk 0.306.0 → 0.308.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-45D6N4NJ.js → chunk-P6A6B2ZR.js} +39 -1
- package/dist/chunk-P6A6B2ZR.js.map +1 -0
- package/dist/{index-Bm3SEEGz.d.cts → index-R5RsXhoc.d.cts} +131 -1
- package/dist/{index-Bm3SEEGz.d.ts → index-R5RsXhoc.d.ts} +131 -1
- package/dist/index.cjs +38 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +38 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +24 -3
- package/dist/internal.d.ts +24 -3
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-45D6N4NJ.js.map +0 -1
|
@@ -552,6 +552,44 @@ var Connectors = class {
|
|
|
552
552
|
constructor(request) {
|
|
553
553
|
this.request = request;
|
|
554
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* Read the connected provider account's optional buyer-email preference.
|
|
557
|
+
* Currently supported for Whop. Use `setJwtToken` with a merchant JWT that
|
|
558
|
+
* has Connector Edit authority; a shop token or API key cannot substitute.
|
|
559
|
+
* Select Sandbox or Live explicitly through `test_mode`.
|
|
560
|
+
*
|
|
561
|
+
* The preference affects every shop sharing the provider account. It does
|
|
562
|
+
* not disable mandatory provider messages or DeloPay invoice delivery.
|
|
563
|
+
* A null or absent value establishes no on/off preference.
|
|
564
|
+
*/
|
|
565
|
+
async retrieveBuyerEmailPreference(merchantId, connectorId, params) {
|
|
566
|
+
return this.request(
|
|
567
|
+
"GET",
|
|
568
|
+
`/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,
|
|
569
|
+
{ query: { test_mode: params.test_mode } }
|
|
570
|
+
);
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Change the optional buyer-email preference for the whole provider account.
|
|
574
|
+
* Currently supported for Whop. Requires a merchant JWT with Connector Edit
|
|
575
|
+
* authority and explicit confirmation for every shop sharing the account.
|
|
576
|
+
* Send the exact account, credential mode and value read before confirmation;
|
|
577
|
+
* a changed account or preference is refused before mutation.
|
|
578
|
+
*
|
|
579
|
+
* Inspect `outcome`: only `verified` confirms the requested value through a
|
|
580
|
+
* fresh exact-account read. HTTP 200 may instead report a conflict, refusal
|
|
581
|
+
* or unknown outcome. An uncertain change may have happened; read the
|
|
582
|
+
* preference again before retrying, including after a transport error.
|
|
583
|
+
* This method adds no automatic readback or retry. Mandatory provider
|
|
584
|
+
* messages and DeloPay invoice delivery are unaffected.
|
|
585
|
+
*/
|
|
586
|
+
async updateBuyerEmailPreference(merchantId, connectorId, params) {
|
|
587
|
+
return this.request(
|
|
588
|
+
"PUT",
|
|
589
|
+
`/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,
|
|
590
|
+
{ body: params }
|
|
591
|
+
);
|
|
592
|
+
}
|
|
555
593
|
async create(accountId, params) {
|
|
556
594
|
return this.request("POST", `/account/${encodeURIComponent(accountId)}/connectors`, {
|
|
557
595
|
body: params
|
|
@@ -15665,4 +15703,4 @@ export {
|
|
|
15665
15703
|
decodeNativePanes,
|
|
15666
15704
|
encodeNativePanes
|
|
15667
15705
|
};
|
|
15668
|
-
//# sourceMappingURL=chunk-
|
|
15706
|
+
//# sourceMappingURL=chunk-P6A6B2ZR.js.map
|