@delopay/sdk 0.130.0 → 0.131.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/index.cjs CHANGED
@@ -875,6 +875,23 @@ var Connectors = class {
875
875
  { body: params }
876
876
  );
877
877
  }
878
+ /**
879
+ * Register checkout/shop domains as Airwallex Apple Pay domains, so Apple Pay
880
+ * renders on those pages.
881
+ * `POST /account/{merchantId}/connectors/{connectorId}/airwallex/apple-pay-domains`
882
+ *
883
+ * Airwallex connectors only. One call registers against a single credential
884
+ * set (`environment`, default `'live'`) — call twice to cover live and
885
+ * sandbox. Idempotent: a host already on the account comes back
886
+ * `already_registered` without a write.
887
+ */
888
+ async registerAirwallexApplePayDomains(merchantId, connectorId, params) {
889
+ return this.request(
890
+ "POST",
891
+ `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/airwallex/apple-pay-domains`,
892
+ { body: params }
893
+ );
894
+ }
878
895
  /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
879
896
  async getWebhook(merchantId, connectorId) {
880
897
  return this.request(
@@ -7291,6 +7308,14 @@ var PANE_VISIBILITIES = ["always", "embedded_only", "external_only"];
7291
7308
  function parseVisibility(raw) {
7292
7309
  return PANE_VISIBILITIES.find((value) => value === raw) ?? "always";
7293
7310
  }
7311
+ var PANE_NATIVE_ELEMENTS = [
7312
+ "everywhere",
7313
+ "embedded_only",
7314
+ "external_only"
7315
+ ];
7316
+ function parseNativeElement(raw) {
7317
+ return PANE_NATIVE_ELEMENTS.find((value) => value === raw) ?? "everywhere";
7318
+ }
7294
7319
  function paneViewVisibility(view) {
7295
7320
  const declared = PANE_VISIBILITIES.find((value) => value === view.visibility);
7296
7321
  if (declared) return declared;
@@ -7522,7 +7547,8 @@ function defaultPane(method, catalog = STRIPE_FALLBACK_PANE_CATALOG) {
7522
7547
  iconSvg: "",
7523
7548
  displayOrder: 0,
7524
7549
  visibility: "always",
7525
- openIn: "tab"
7550
+ openIn: "tab",
7551
+ nativeElement: "everywhere"
7526
7552
  };
7527
7553
  }
7528
7554
  function clonePane(pane) {
@@ -7568,7 +7594,8 @@ function decodePanes(raw) {
7568
7594
  // Anything unrecognised degrades to `always` rather than dropping the row.
7569
7595
  visibility: parseVisibility(entry["visibility"]),
7570
7596
  // Same tolerance: an unknown value degrades to the default `tab`.
7571
- openIn: entry["open_in"] === "popup" ? "popup" : "tab"
7597
+ openIn: entry["open_in"] === "popup" ? "popup" : "tab",
7598
+ nativeElement: parseNativeElement(entry["native_element"])
7572
7599
  });
7573
7600
  const indexByMethod = /* @__PURE__ */ new Map();
7574
7601
  const out = [];
@@ -7620,7 +7647,12 @@ function encodePanes(panes) {
7620
7647
  // never went through `decodePanes`. A decoded pane always holds a valid
7621
7648
  // value, so this is a no-op on the round-trip path.
7622
7649
  visibility: parseVisibility(pane.visibility),
7623
- open_in: pane.openIn === "popup" ? "popup" : "tab"
7650
+ open_in: pane.openIn === "popup" ? "popup" : "tab",
7651
+ // Omitted at the default: `everywhere` is what the router decodes an
7652
+ // absent key to, so leaving it out changes nothing — and keeps a blob
7653
+ // stored before the field existed byte-identical on re-encode, which
7654
+ // is what the wire-compatibility test pins.
7655
+ ...parseNativeElement(pane.nativeElement) === "everywhere" ? {} : { native_element: parseNativeElement(pane.nativeElement) }
7624
7656
  };
7625
7657
  });
7626
7658
  }