@delopay/sdk 0.305.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-DR2pMx-H.d.cts → index-R5RsXhoc.d.cts} +182 -1
- package/dist/{index-DR2pMx-H.d.ts → index-R5RsXhoc.d.ts} +182 -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 +48 -3
- package/dist/internal.d.ts +48 -3
- package/dist/internal.js +1 -1
- package/package.json +17 -18
- package/dist/chunk-45D6N4NJ.js.map +0 -1
package/dist/internal.cjs
CHANGED
|
@@ -858,6 +858,44 @@ var Connectors = class {
|
|
|
858
858
|
constructor(request) {
|
|
859
859
|
this.request = request;
|
|
860
860
|
}
|
|
861
|
+
/**
|
|
862
|
+
* Read the connected provider account's optional buyer-email preference.
|
|
863
|
+
* Currently supported for Whop. Use `setJwtToken` with a merchant JWT that
|
|
864
|
+
* has Connector Edit authority; a shop token or API key cannot substitute.
|
|
865
|
+
* Select Sandbox or Live explicitly through `test_mode`.
|
|
866
|
+
*
|
|
867
|
+
* The preference affects every shop sharing the provider account. It does
|
|
868
|
+
* not disable mandatory provider messages or DeloPay invoice delivery.
|
|
869
|
+
* A null or absent value establishes no on/off preference.
|
|
870
|
+
*/
|
|
871
|
+
async retrieveBuyerEmailPreference(merchantId, connectorId, params) {
|
|
872
|
+
return this.request(
|
|
873
|
+
"GET",
|
|
874
|
+
`/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,
|
|
875
|
+
{ query: { test_mode: params.test_mode } }
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Change the optional buyer-email preference for the whole provider account.
|
|
880
|
+
* Currently supported for Whop. Requires a merchant JWT with Connector Edit
|
|
881
|
+
* authority and explicit confirmation for every shop sharing the account.
|
|
882
|
+
* Send the exact account, credential mode and value read before confirmation;
|
|
883
|
+
* a changed account or preference is refused before mutation.
|
|
884
|
+
*
|
|
885
|
+
* Inspect `outcome`: only `verified` confirms the requested value through a
|
|
886
|
+
* fresh exact-account read. HTTP 200 may instead report a conflict, refusal
|
|
887
|
+
* or unknown outcome. An uncertain change may have happened; read the
|
|
888
|
+
* preference again before retrying, including after a transport error.
|
|
889
|
+
* This method adds no automatic readback or retry. Mandatory provider
|
|
890
|
+
* messages and DeloPay invoice delivery are unaffected.
|
|
891
|
+
*/
|
|
892
|
+
async updateBuyerEmailPreference(merchantId, connectorId, params) {
|
|
893
|
+
return this.request(
|
|
894
|
+
"PUT",
|
|
895
|
+
`/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,
|
|
896
|
+
{ body: params }
|
|
897
|
+
);
|
|
898
|
+
}
|
|
861
899
|
async create(accountId, params) {
|
|
862
900
|
return this.request("POST", `/account/${encodeURIComponent(accountId)}/connectors`, {
|
|
863
901
|
body: params
|