@delopay/sdk 0.306.0 → 0.309.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-FRYFAWLF.js} +64 -1
- package/dist/chunk-FRYFAWLF.js.map +1 -0
- package/dist/{index-Bm3SEEGz.d.cts → index-Bao1891v.d.cts} +300 -1
- package/dist/{index-Bm3SEEGz.d.ts → index-Bao1891v.d.ts} +300 -1
- package/dist/index.cjs +63 -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 +63 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +90 -3
- package/dist/internal.d.ts +90 -3
- package/dist/internal.js +1 -1
- package/package.json +18 -17
- 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
|
|
@@ -4945,6 +4983,31 @@ var Users = class {
|
|
|
4945
4983
|
async deletePreference(key) {
|
|
4946
4984
|
return this.request("DELETE", `/user/preferences/${encodeURIComponent(key)}`);
|
|
4947
4985
|
}
|
|
4986
|
+
/**
|
|
4987
|
+
* The caller's guided dashboard tour in the session's scope: their progress,
|
|
4988
|
+
* whether to offer the tour now, and their current and acknowledged access.
|
|
4989
|
+
* Progress is kept per merchant, or per shop for a user whose role is limited
|
|
4990
|
+
* to shops; the scope comes from the session. Login JWT only.
|
|
4991
|
+
*
|
|
4992
|
+
* `GET /user/dashboard-tour`
|
|
4993
|
+
*/
|
|
4994
|
+
async getDashboardTour() {
|
|
4995
|
+
return this.request("GET", "/user/dashboard-tour");
|
|
4996
|
+
}
|
|
4997
|
+
/**
|
|
4998
|
+
* Save the caller's tour progress in the session's scope and return the same
|
|
4999
|
+
* body as {@link Users.getDashboardTour}. `completed` and `skipped` are added
|
|
5000
|
+
* to the stored ones unless `restart` is set; `active`, `baseline` and
|
|
5001
|
+
* `offer_handled_at` replace them. `acknowledge_access: true` stores the
|
|
5002
|
+
* access the server computes as acknowledged. Unknown fields, malformed step
|
|
5003
|
+
* ids or baselines, and more than 300 steps per list are refused; so is any
|
|
5004
|
+
* save while acting as another user (`read_only`). Login JWT only.
|
|
5005
|
+
*
|
|
5006
|
+
* `PUT /user/dashboard-tour`
|
|
5007
|
+
*/
|
|
5008
|
+
async updateDashboardTour(params) {
|
|
5009
|
+
return this.request("PUT", "/user/dashboard-tour", { body: params });
|
|
5010
|
+
}
|
|
4948
5011
|
/**
|
|
4949
5012
|
* RFC 7396 merge-patch the caller's own user-scoped metadata bucket.
|
|
4950
5013
|
* Returns the full user details, so callers can refresh their context
|