@delopay/sdk 0.217.0 → 0.219.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/internal.cjs CHANGED
@@ -150,6 +150,7 @@ __export(internal_exports, {
150
150
  WCAG_AA_TEXT: () => WCAG_AA_TEXT,
151
151
  WCAG_AA_UI: () => WCAG_AA_UI,
152
152
  Webhooks: () => Webhooks,
153
+ WhopResolutionCases: () => WhopResolutionCases,
153
154
  airwallexCardLayout: () => airwallexCardLayout,
154
155
  airwallexCardLayoutIsCoherent: () => airwallexCardLayoutIsCoherent,
155
156
  airwallexCellWeight: () => airwallexCellWeight,
@@ -1012,6 +1013,23 @@ var Connectors = class {
1012
1013
  { body: params }
1013
1014
  );
1014
1015
  }
1016
+ /**
1017
+ * Register and verify checkout/shop domains as Whop Apple Pay payment method
1018
+ * domains, so Apple Pay renders in Whop's embedded card form on those pages.
1019
+ * `POST /account/{merchantId}/connectors/{connectorId}/whop/apple-pay-domains`
1020
+ *
1021
+ * Whop connectors only. One call registers against a single credential set
1022
+ * (`environment`, default `'live'`) — call twice to cover live and sandbox.
1023
+ * Idempotent: a host Whop already holds as verified comes back
1024
+ * `already_verified` without a write, and a `pending` one is verified again.
1025
+ */
1026
+ async registerWhopApplePayDomains(merchantId, connectorId, params) {
1027
+ return this.request(
1028
+ "POST",
1029
+ `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/whop/apple-pay-domains`,
1030
+ { body: params }
1031
+ );
1032
+ }
1015
1033
  /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
1016
1034
  async getWebhook(merchantId, connectorId) {
1017
1035
  return this.request(
@@ -1775,6 +1793,41 @@ var PaypalDisputes = class {
1775
1793
  }
1776
1794
  };
1777
1795
 
1796
+ // src/resources/whopResolutionCases.ts
1797
+ var WhopResolutionCases = class {
1798
+ constructor(request) {
1799
+ this.request = request;
1800
+ }
1801
+ /** GET /disputes/whop/cases — newest first, one Whop page at a time. */
1802
+ list(params) {
1803
+ return this.request("GET", "/disputes/whop/cases", {
1804
+ query: { ...params }
1805
+ });
1806
+ }
1807
+ /** GET /disputes/whop/cases/{case_id} — the case as Whop reports it now. */
1808
+ retrieve(caseId, locator) {
1809
+ return this.request("GET", `/disputes/whop/cases/${encodeURIComponent(caseId)}`, {
1810
+ query: { ...locator }
1811
+ });
1812
+ }
1813
+ /** GET /disputes/whop/cases/{case_id}/events — the case timeline, newest first. */
1814
+ events(caseId, params) {
1815
+ return this.request("GET", `/disputes/whop/cases/${encodeURIComponent(caseId)}/events`, {
1816
+ query: { ...params }
1817
+ });
1818
+ }
1819
+ /**
1820
+ * POST /disputes/whop/cases/{case_id}/actions — accept, deny, reply or
1821
+ * request info. `accept` refunds the payment in full at Whop. An `unknown`
1822
+ * outcome is retried with the same `request_id`.
1823
+ */
1824
+ act(caseId, params) {
1825
+ return this.request("POST", `/disputes/whop/cases/${encodeURIComponent(caseId)}/actions`, {
1826
+ body: params
1827
+ });
1828
+ }
1829
+ };
1830
+
1778
1831
  // src/resources/ephemeralKeys.ts
1779
1832
  var EphemeralKeys = class {
1780
1833
  constructor(request) {
@@ -3365,6 +3418,44 @@ var Routing = class {
3365
3418
  async connectorCaps(profileId) {
3366
3419
  return this.request("GET", `/routing/connector-caps/${encodeURIComponent(profileId)}`);
3367
3420
  }
3421
+ /** Read a shop's dated limit overrides. `GET /routing/connector-cap-schedules/{profileId}` */
3422
+ async connectorCapSchedules(profileId) {
3423
+ return this.request("GET", `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`);
3424
+ }
3425
+ /**
3426
+ * Replace a shop's complete schedule using its last-read revision.
3427
+ * Remove an entry to cancel it; ordinary configured caps are unchanged.
3428
+ * Instants require explicit offsets, and overlapping entries for the same
3429
+ * account and unit are refused by the server. Capability preflight refuses
3430
+ * unsupported backends before submitting any schedule.
3431
+ *
3432
+ * `PUT /routing/connector-cap-schedules/{profileId}`
3433
+ */
3434
+ async setConnectorCapSchedules(profileId, params) {
3435
+ const caps = await this.connectorCaps(profileId);
3436
+ if (!caps.features?.includes("limit_schedules")) {
3437
+ throw new Error("Connector limit schedules are unsupported by the serving backend");
3438
+ }
3439
+ return this.request(
3440
+ "PUT",
3441
+ `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`,
3442
+ {
3443
+ body: params
3444
+ }
3445
+ );
3446
+ }
3447
+ /** Change the drawn value of an active scheduled range; preserves all usage. */
3448
+ async shuffleConnectorCapSchedule(profileId, params) {
3449
+ const caps = await this.connectorCaps(profileId);
3450
+ if (!caps.features?.includes("limit_schedules")) {
3451
+ throw new Error("Connector limit schedules are unsupported by the serving backend");
3452
+ }
3453
+ return this.request(
3454
+ "POST",
3455
+ `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}/shuffle`,
3456
+ { body: params }
3457
+ );
3458
+ }
3368
3459
  /**
3369
3460
  * The live `routing_volume` counters behind a shop's active advanced
3370
3461
  * program: one per distinct budget the program reads, each with the window
@@ -7899,6 +7990,7 @@ var Delopay = class {
7899
7990
  this.mandates = new Mandates(request);
7900
7991
  this.disputes = new Disputes(request);
7901
7992
  this.paypalDisputes = new PaypalDisputes(request);
7993
+ this.whopResolutionCases = new WhopResolutionCases(request);
7902
7994
  this.payouts = new Payouts(request);
7903
7995
  this.ephemeralKeys = new EphemeralKeys(request);
7904
7996
  this.events = new Events(request);
@@ -13568,6 +13660,7 @@ var DelopayInternal = class extends Delopay {
13568
13660
  WCAG_AA_TEXT,
13569
13661
  WCAG_AA_UI,
13570
13662
  Webhooks,
13663
+ WhopResolutionCases,
13571
13664
  airwallexCardLayout,
13572
13665
  airwallexCardLayoutIsCoherent,
13573
13666
  airwallexCellWeight,