@delopay/sdk 0.85.0 → 0.86.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-HSUVEFKO.js → chunk-DQ36QCU7.js} +103 -1
- package/dist/chunk-DQ36QCU7.js.map +1 -0
- package/dist/index.cjs +102 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +211 -1
- package/dist/index.d.ts +211 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +102 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +3 -5
- package/dist/internal.d.ts +3 -5
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-HSUVEFKO.js.map +0 -1
package/dist/internal.cjs
CHANGED
|
@@ -560,6 +560,39 @@ var Connectors = class {
|
|
|
560
560
|
async list(accountId) {
|
|
561
561
|
return this.request("GET", `/account/${encodeURIComponent(accountId)}/connectors`);
|
|
562
562
|
}
|
|
563
|
+
/**
|
|
564
|
+
* The profile-scoped connector list. The merchant-wide `list()` is
|
|
565
|
+
* merchant-gated and 403s for a profile-entity (shop user) JWT; this
|
|
566
|
+
* variant is scoped server-side to the caller's own profile.
|
|
567
|
+
*
|
|
568
|
+
* `GET /account/{accountId}/profile/connectors`
|
|
569
|
+
*/
|
|
570
|
+
async listByProfile(accountId) {
|
|
571
|
+
return this.request("GET", `/account/${encodeURIComponent(accountId)}/profile/connectors`);
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* The built-in e-Payouts reference catalog — the "Restore defaults" source.
|
|
575
|
+
* `GET /account/{accountId}/connectors/epayouts/catalog/defaults`
|
|
576
|
+
*/
|
|
577
|
+
async getEpayoutsCatalogDefaults(accountId) {
|
|
578
|
+
return this.request(
|
|
579
|
+
"GET",
|
|
580
|
+
`/account/${encodeURIComponent(accountId)}/connectors/epayouts/catalog/defaults`
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Sweep the merchant's own e-Payouts module and return the rails it
|
|
585
|
+
* actually has enabled. Server-side this makes many upstream calls, so it
|
|
586
|
+
* can take several seconds — show progress.
|
|
587
|
+
*
|
|
588
|
+
* `POST /account/{accountId}/connectors/{connectorId}/epayouts/catalog/sync`
|
|
589
|
+
*/
|
|
590
|
+
async syncEpayoutsCatalog(accountId, connectorId) {
|
|
591
|
+
return this.request(
|
|
592
|
+
"POST",
|
|
593
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/epayouts/catalog/sync`
|
|
594
|
+
);
|
|
595
|
+
}
|
|
563
596
|
async update(accountId, connectorId, params) {
|
|
564
597
|
return this.request(
|
|
565
598
|
"POST",
|
|
@@ -592,6 +625,55 @@ var Connectors = class {
|
|
|
592
625
|
);
|
|
593
626
|
}
|
|
594
627
|
// --- Advanced operations (Task 4.8) ---
|
|
628
|
+
/**
|
|
629
|
+
* Run the configuration checks for a vault (VGS) connector account:
|
|
630
|
+
* credential validity, write-only Collect scope, reachability, environment
|
|
631
|
+
* coherence, route coverage. Read-only but not cheap — it decrypts the
|
|
632
|
+
* vault's management credential and talks to VGS.
|
|
633
|
+
*
|
|
634
|
+
* `POST /account/{accountId}/connectors/{connectorId}/vault/verify`
|
|
635
|
+
*/
|
|
636
|
+
async verifyVault(accountId, connectorId, params) {
|
|
637
|
+
return this.request(
|
|
638
|
+
"POST",
|
|
639
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/verify`,
|
|
640
|
+
{ body: params }
|
|
641
|
+
);
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Compute the route document the vault SHOULD have and diff it against
|
|
645
|
+
* what exists, without writing anything. The returned fingerprints must be
|
|
646
|
+
* echoed byte for byte on {@link Connectors.applyVaultRoutes}.
|
|
647
|
+
*
|
|
648
|
+
* A router without these endpoints answers 404 — render that as "this
|
|
649
|
+
* build cannot configure routes", never as "there is nothing to change".
|
|
650
|
+
*
|
|
651
|
+
* `POST /account/{accountId}/connectors/{connectorId}/vault/routes/preview`
|
|
652
|
+
*/
|
|
653
|
+
async previewVaultRoutes(accountId, connectorId, params) {
|
|
654
|
+
return this.request(
|
|
655
|
+
"POST",
|
|
656
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/preview`,
|
|
657
|
+
{ body: params }
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Write the routes the merchant just previewed. Both fingerprints come
|
|
662
|
+
* from the preview and are opaque: `expected_current_fingerprint` says the
|
|
663
|
+
* vault has not moved (`null` = "the preview found no routes" and is sent
|
|
664
|
+
* as `null`, never omitted), `expected_desired_fingerprint` says the
|
|
665
|
+
* document is still the one on screen. A 409 (`DE_04`) means the vault
|
|
666
|
+
* changed since the preview — nothing was written; preview again.
|
|
667
|
+
*
|
|
668
|
+
* `POST /account/{accountId}/connectors/{connectorId}/vault/routes/apply`
|
|
669
|
+
*/
|
|
670
|
+
async applyVaultRoutes(accountId, connectorId, params) {
|
|
671
|
+
return this.request(
|
|
672
|
+
"POST",
|
|
673
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/apply`,
|
|
674
|
+
{ body: params }
|
|
675
|
+
);
|
|
676
|
+
}
|
|
595
677
|
/** Verify connector credentials. `POST /account/connectors/verify` */
|
|
596
678
|
async verify(params) {
|
|
597
679
|
return this.request("POST", "/account/connectors/verify", { body: params });
|
|
@@ -2690,6 +2772,26 @@ var Users = class {
|
|
|
2690
2772
|
async update(params) {
|
|
2691
2773
|
return this.request("POST", "/user/update", { body: params });
|
|
2692
2774
|
}
|
|
2775
|
+
/**
|
|
2776
|
+
* RFC 7396 merge-patch the caller's own user-scoped metadata bucket.
|
|
2777
|
+
* Returns the full user details, so callers can refresh their context
|
|
2778
|
+
* without a second fetch.
|
|
2779
|
+
*
|
|
2780
|
+
* `PATCH /user/metadata`
|
|
2781
|
+
*/
|
|
2782
|
+
async updateMetadata(params) {
|
|
2783
|
+
return this.request("PATCH", "/user/metadata", { body: params });
|
|
2784
|
+
}
|
|
2785
|
+
/**
|
|
2786
|
+
* RFC 7396 merge-patch the merchant-scoped metadata bucket shared by
|
|
2787
|
+
* every dashboard user of the merchant. Same response contract as
|
|
2788
|
+
* {@link Users.updateMetadata}.
|
|
2789
|
+
*
|
|
2790
|
+
* `PATCH /user/merchant/metadata`
|
|
2791
|
+
*/
|
|
2792
|
+
async updateMerchantMetadata(params) {
|
|
2793
|
+
return this.request("PATCH", "/user/merchant/metadata", { body: params });
|
|
2794
|
+
}
|
|
2693
2795
|
/**
|
|
2694
2796
|
* Permanently delete the caller's account. Requires a fresh password
|
|
2695
2797
|
* (and a current 6-digit TOTP code if the user has TOTP enrolled). On
|