@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
|
@@ -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
|
|
@@ -4639,6 +4677,31 @@ var Users = class {
|
|
|
4639
4677
|
async deletePreference(key) {
|
|
4640
4678
|
return this.request("DELETE", `/user/preferences/${encodeURIComponent(key)}`);
|
|
4641
4679
|
}
|
|
4680
|
+
/**
|
|
4681
|
+
* The caller's guided dashboard tour in the session's scope: their progress,
|
|
4682
|
+
* whether to offer the tour now, and their current and acknowledged access.
|
|
4683
|
+
* Progress is kept per merchant, or per shop for a user whose role is limited
|
|
4684
|
+
* to shops; the scope comes from the session. Login JWT only.
|
|
4685
|
+
*
|
|
4686
|
+
* `GET /user/dashboard-tour`
|
|
4687
|
+
*/
|
|
4688
|
+
async getDashboardTour() {
|
|
4689
|
+
return this.request("GET", "/user/dashboard-tour");
|
|
4690
|
+
}
|
|
4691
|
+
/**
|
|
4692
|
+
* Save the caller's tour progress in the session's scope and return the same
|
|
4693
|
+
* body as {@link Users.getDashboardTour}. `completed` and `skipped` are added
|
|
4694
|
+
* to the stored ones unless `restart` is set; `active`, `baseline` and
|
|
4695
|
+
* `offer_handled_at` replace them. `acknowledge_access: true` stores the
|
|
4696
|
+
* access the server computes as acknowledged. Unknown fields, malformed step
|
|
4697
|
+
* ids or baselines, and more than 300 steps per list are refused; so is any
|
|
4698
|
+
* save while acting as another user (`read_only`). Login JWT only.
|
|
4699
|
+
*
|
|
4700
|
+
* `PUT /user/dashboard-tour`
|
|
4701
|
+
*/
|
|
4702
|
+
async updateDashboardTour(params) {
|
|
4703
|
+
return this.request("PUT", "/user/dashboard-tour", { body: params });
|
|
4704
|
+
}
|
|
4642
4705
|
/**
|
|
4643
4706
|
* RFC 7396 merge-patch the caller's own user-scoped metadata bucket.
|
|
4644
4707
|
* Returns the full user details, so callers can refresh their context
|
|
@@ -15665,4 +15728,4 @@ export {
|
|
|
15665
15728
|
decodeNativePanes,
|
|
15666
15729
|
encodeNativePanes
|
|
15667
15730
|
};
|
|
15668
|
-
//# sourceMappingURL=chunk-
|
|
15731
|
+
//# sourceMappingURL=chunk-FRYFAWLF.js.map
|