@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.
@@ -434,6 +434,39 @@ var Connectors = class {
434
434
  async list(accountId) {
435
435
  return this.request("GET", `/account/${encodeURIComponent(accountId)}/connectors`);
436
436
  }
437
+ /**
438
+ * The profile-scoped connector list. The merchant-wide `list()` is
439
+ * merchant-gated and 403s for a profile-entity (shop user) JWT; this
440
+ * variant is scoped server-side to the caller's own profile.
441
+ *
442
+ * `GET /account/{accountId}/profile/connectors`
443
+ */
444
+ async listByProfile(accountId) {
445
+ return this.request("GET", `/account/${encodeURIComponent(accountId)}/profile/connectors`);
446
+ }
447
+ /**
448
+ * The built-in e-Payouts reference catalog — the "Restore defaults" source.
449
+ * `GET /account/{accountId}/connectors/epayouts/catalog/defaults`
450
+ */
451
+ async getEpayoutsCatalogDefaults(accountId) {
452
+ return this.request(
453
+ "GET",
454
+ `/account/${encodeURIComponent(accountId)}/connectors/epayouts/catalog/defaults`
455
+ );
456
+ }
457
+ /**
458
+ * Sweep the merchant's own e-Payouts module and return the rails it
459
+ * actually has enabled. Server-side this makes many upstream calls, so it
460
+ * can take several seconds — show progress.
461
+ *
462
+ * `POST /account/{accountId}/connectors/{connectorId}/epayouts/catalog/sync`
463
+ */
464
+ async syncEpayoutsCatalog(accountId, connectorId) {
465
+ return this.request(
466
+ "POST",
467
+ `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/epayouts/catalog/sync`
468
+ );
469
+ }
437
470
  async update(accountId, connectorId, params) {
438
471
  return this.request(
439
472
  "POST",
@@ -466,6 +499,55 @@ var Connectors = class {
466
499
  );
467
500
  }
468
501
  // --- Advanced operations (Task 4.8) ---
502
+ /**
503
+ * Run the configuration checks for a vault (VGS) connector account:
504
+ * credential validity, write-only Collect scope, reachability, environment
505
+ * coherence, route coverage. Read-only but not cheap — it decrypts the
506
+ * vault's management credential and talks to VGS.
507
+ *
508
+ * `POST /account/{accountId}/connectors/{connectorId}/vault/verify`
509
+ */
510
+ async verifyVault(accountId, connectorId, params) {
511
+ return this.request(
512
+ "POST",
513
+ `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/verify`,
514
+ { body: params }
515
+ );
516
+ }
517
+ /**
518
+ * Compute the route document the vault SHOULD have and diff it against
519
+ * what exists, without writing anything. The returned fingerprints must be
520
+ * echoed byte for byte on {@link Connectors.applyVaultRoutes}.
521
+ *
522
+ * A router without these endpoints answers 404 — render that as "this
523
+ * build cannot configure routes", never as "there is nothing to change".
524
+ *
525
+ * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/preview`
526
+ */
527
+ async previewVaultRoutes(accountId, connectorId, params) {
528
+ return this.request(
529
+ "POST",
530
+ `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/preview`,
531
+ { body: params }
532
+ );
533
+ }
534
+ /**
535
+ * Write the routes the merchant just previewed. Both fingerprints come
536
+ * from the preview and are opaque: `expected_current_fingerprint` says the
537
+ * vault has not moved (`null` = "the preview found no routes" and is sent
538
+ * as `null`, never omitted), `expected_desired_fingerprint` says the
539
+ * document is still the one on screen. A 409 (`DE_04`) means the vault
540
+ * changed since the preview — nothing was written; preview again.
541
+ *
542
+ * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/apply`
543
+ */
544
+ async applyVaultRoutes(accountId, connectorId, params) {
545
+ return this.request(
546
+ "POST",
547
+ `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/apply`,
548
+ { body: params }
549
+ );
550
+ }
469
551
  /** Verify connector credentials. `POST /account/connectors/verify` */
470
552
  async verify(params) {
471
553
  return this.request("POST", "/account/connectors/verify", { body: params });
@@ -2564,6 +2646,26 @@ var Users = class {
2564
2646
  async update(params) {
2565
2647
  return this.request("POST", "/user/update", { body: params });
2566
2648
  }
2649
+ /**
2650
+ * RFC 7396 merge-patch the caller's own user-scoped metadata bucket.
2651
+ * Returns the full user details, so callers can refresh their context
2652
+ * without a second fetch.
2653
+ *
2654
+ * `PATCH /user/metadata`
2655
+ */
2656
+ async updateMetadata(params) {
2657
+ return this.request("PATCH", "/user/metadata", { body: params });
2658
+ }
2659
+ /**
2660
+ * RFC 7396 merge-patch the merchant-scoped metadata bucket shared by
2661
+ * every dashboard user of the merchant. Same response contract as
2662
+ * {@link Users.updateMetadata}.
2663
+ *
2664
+ * `PATCH /user/merchant/metadata`
2665
+ */
2666
+ async updateMerchantMetadata(params) {
2667
+ return this.request("PATCH", "/user/merchant/metadata", { body: params });
2668
+ }
2567
2669
  /**
2568
2670
  * Permanently delete the caller's account. Requires a fresh password
2569
2671
  * (and a current 6-digit TOTP code if the user has TOTP enrolled). On
@@ -5670,4 +5772,4 @@ export {
5670
5772
  focusedCheckoutUrl,
5671
5773
  CHECKOUT_EVENT_KINDS
5672
5774
  };
5673
- //# sourceMappingURL=chunk-HSUVEFKO.js.map
5775
+ //# sourceMappingURL=chunk-DQ36QCU7.js.map