@delopay/sdk 0.85.0 → 0.87.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 +237 -6
- package/dist/index.d.ts +237 -6
- 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/index.cjs
CHANGED
|
@@ -548,6 +548,39 @@ var Connectors = class {
|
|
|
548
548
|
async list(accountId) {
|
|
549
549
|
return this.request("GET", `/account/${encodeURIComponent(accountId)}/connectors`);
|
|
550
550
|
}
|
|
551
|
+
/**
|
|
552
|
+
* The profile-scoped connector list. The merchant-wide `list()` is
|
|
553
|
+
* merchant-gated and 403s for a profile-entity (shop user) JWT; this
|
|
554
|
+
* variant is scoped server-side to the caller's own profile.
|
|
555
|
+
*
|
|
556
|
+
* `GET /account/{accountId}/profile/connectors`
|
|
557
|
+
*/
|
|
558
|
+
async listByProfile(accountId) {
|
|
559
|
+
return this.request("GET", `/account/${encodeURIComponent(accountId)}/profile/connectors`);
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* The built-in e-Payouts reference catalog — the "Restore defaults" source.
|
|
563
|
+
* `GET /account/{accountId}/connectors/epayouts/catalog/defaults`
|
|
564
|
+
*/
|
|
565
|
+
async getEpayoutsCatalogDefaults(accountId) {
|
|
566
|
+
return this.request(
|
|
567
|
+
"GET",
|
|
568
|
+
`/account/${encodeURIComponent(accountId)}/connectors/epayouts/catalog/defaults`
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Sweep the merchant's own e-Payouts module and return the rails it
|
|
573
|
+
* actually has enabled. Server-side this makes many upstream calls, so it
|
|
574
|
+
* can take several seconds — show progress.
|
|
575
|
+
*
|
|
576
|
+
* `POST /account/{accountId}/connectors/{connectorId}/epayouts/catalog/sync`
|
|
577
|
+
*/
|
|
578
|
+
async syncEpayoutsCatalog(accountId, connectorId) {
|
|
579
|
+
return this.request(
|
|
580
|
+
"POST",
|
|
581
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/epayouts/catalog/sync`
|
|
582
|
+
);
|
|
583
|
+
}
|
|
551
584
|
async update(accountId, connectorId, params) {
|
|
552
585
|
return this.request(
|
|
553
586
|
"POST",
|
|
@@ -580,6 +613,55 @@ var Connectors = class {
|
|
|
580
613
|
);
|
|
581
614
|
}
|
|
582
615
|
// --- Advanced operations (Task 4.8) ---
|
|
616
|
+
/**
|
|
617
|
+
* Run the configuration checks for a vault (VGS) connector account:
|
|
618
|
+
* credential validity, write-only Collect scope, reachability, environment
|
|
619
|
+
* coherence, route coverage. Read-only but not cheap — it decrypts the
|
|
620
|
+
* vault's management credential and talks to VGS.
|
|
621
|
+
*
|
|
622
|
+
* `POST /account/{accountId}/connectors/{connectorId}/vault/verify`
|
|
623
|
+
*/
|
|
624
|
+
async verifyVault(accountId, connectorId, params) {
|
|
625
|
+
return this.request(
|
|
626
|
+
"POST",
|
|
627
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/verify`,
|
|
628
|
+
{ body: params }
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Compute the route document the vault SHOULD have and diff it against
|
|
633
|
+
* what exists, without writing anything. The returned fingerprints must be
|
|
634
|
+
* echoed byte for byte on {@link Connectors.applyVaultRoutes}.
|
|
635
|
+
*
|
|
636
|
+
* A router without these endpoints answers 404 — render that as "this
|
|
637
|
+
* build cannot configure routes", never as "there is nothing to change".
|
|
638
|
+
*
|
|
639
|
+
* `POST /account/{accountId}/connectors/{connectorId}/vault/routes/preview`
|
|
640
|
+
*/
|
|
641
|
+
async previewVaultRoutes(accountId, connectorId, params) {
|
|
642
|
+
return this.request(
|
|
643
|
+
"POST",
|
|
644
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/preview`,
|
|
645
|
+
{ body: params }
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Write the routes the merchant just previewed. Both fingerprints come
|
|
650
|
+
* from the preview and are opaque: `expected_current_fingerprint` says the
|
|
651
|
+
* vault has not moved (`null` = "the preview found no routes" and is sent
|
|
652
|
+
* as `null`, never omitted), `expected_desired_fingerprint` says the
|
|
653
|
+
* document is still the one on screen. A 409 (`DE_04`) means the vault
|
|
654
|
+
* changed since the preview — nothing was written; preview again.
|
|
655
|
+
*
|
|
656
|
+
* `POST /account/{accountId}/connectors/{connectorId}/vault/routes/apply`
|
|
657
|
+
*/
|
|
658
|
+
async applyVaultRoutes(accountId, connectorId, params) {
|
|
659
|
+
return this.request(
|
|
660
|
+
"POST",
|
|
661
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/apply`,
|
|
662
|
+
{ body: params }
|
|
663
|
+
);
|
|
664
|
+
}
|
|
583
665
|
/** Verify connector credentials. `POST /account/connectors/verify` */
|
|
584
666
|
async verify(params) {
|
|
585
667
|
return this.request("POST", "/account/connectors/verify", { body: params });
|
|
@@ -2678,6 +2760,26 @@ var Users = class {
|
|
|
2678
2760
|
async update(params) {
|
|
2679
2761
|
return this.request("POST", "/user/update", { body: params });
|
|
2680
2762
|
}
|
|
2763
|
+
/**
|
|
2764
|
+
* RFC 7396 merge-patch the caller's own user-scoped metadata bucket.
|
|
2765
|
+
* Returns the full user details, so callers can refresh their context
|
|
2766
|
+
* without a second fetch.
|
|
2767
|
+
*
|
|
2768
|
+
* `PATCH /user/metadata`
|
|
2769
|
+
*/
|
|
2770
|
+
async updateMetadata(params) {
|
|
2771
|
+
return this.request("PATCH", "/user/metadata", { body: params });
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* RFC 7396 merge-patch the merchant-scoped metadata bucket shared by
|
|
2775
|
+
* every dashboard user of the merchant. Same response contract as
|
|
2776
|
+
* {@link Users.updateMetadata}.
|
|
2777
|
+
*
|
|
2778
|
+
* `PATCH /user/merchant/metadata`
|
|
2779
|
+
*/
|
|
2780
|
+
async updateMerchantMetadata(params) {
|
|
2781
|
+
return this.request("PATCH", "/user/merchant/metadata", { body: params });
|
|
2782
|
+
}
|
|
2681
2783
|
/**
|
|
2682
2784
|
* Permanently delete the caller's account. Requires a fresh password
|
|
2683
2785
|
* (and a current 6-digit TOTP code if the user has TOTP enrolled). On
|