@delopay/sdk 0.129.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/{chunk-IWGBRSUJ.js → chunk-I2YGFOLA.js} +52 -4
- package/dist/chunk-I2YGFOLA.js.map +1 -0
- package/dist/index.cjs +52 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +123 -4
- package/dist/index.d.ts +123 -4
- package/dist/index.js +3 -1
- package/dist/internal.cjs +52 -3
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +3 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
- package/dist/chunk-IWGBRSUJ.js.map +0 -1
|
@@ -700,6 +700,23 @@ var Connectors = class {
|
|
|
700
700
|
{ body: params }
|
|
701
701
|
);
|
|
702
702
|
}
|
|
703
|
+
/**
|
|
704
|
+
* Register checkout/shop domains as Airwallex Apple Pay domains, so Apple Pay
|
|
705
|
+
* renders on those pages.
|
|
706
|
+
* `POST /account/{merchantId}/connectors/{connectorId}/airwallex/apple-pay-domains`
|
|
707
|
+
*
|
|
708
|
+
* Airwallex connectors only. One call registers against a single credential
|
|
709
|
+
* set (`environment`, default `'live'`) — call twice to cover live and
|
|
710
|
+
* sandbox. Idempotent: a host already on the account comes back
|
|
711
|
+
* `already_registered` without a write.
|
|
712
|
+
*/
|
|
713
|
+
async registerAirwallexApplePayDomains(merchantId, connectorId, params) {
|
|
714
|
+
return this.request(
|
|
715
|
+
"POST",
|
|
716
|
+
`/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/airwallex/apple-pay-domains`,
|
|
717
|
+
{ body: params }
|
|
718
|
+
);
|
|
719
|
+
}
|
|
703
720
|
/** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
|
|
704
721
|
async getWebhook(merchantId, connectorId) {
|
|
705
722
|
return this.request(
|
|
@@ -5242,6 +5259,7 @@ var SURCHARGE_POSITIONS = [
|
|
|
5242
5259
|
"cornerStart",
|
|
5243
5260
|
"cornerEnd"
|
|
5244
5261
|
];
|
|
5262
|
+
var NATIVE_ELEMENT_POSITIONS = ["top", "bottom"];
|
|
5245
5263
|
var SURCHARGE_STYLES = [
|
|
5246
5264
|
"plain",
|
|
5247
5265
|
"underline",
|
|
@@ -5654,6 +5672,9 @@ var DEFAULT_BRANDING_BASE = {
|
|
|
5654
5672
|
// find out about on the statement.
|
|
5655
5673
|
showSurcharge: true,
|
|
5656
5674
|
surchargePosition: "trailing",
|
|
5675
|
+
// The button is the surface a buyer recognises fastest; it leads its section
|
|
5676
|
+
// unless the merchant says otherwise.
|
|
5677
|
+
nativeElementPosition: "top",
|
|
5657
5678
|
surchargeStyle: "badge",
|
|
5658
5679
|
surchargeSize: "sm",
|
|
5659
5680
|
surchargeShape: "pill",
|
|
@@ -6294,6 +6315,11 @@ function decodeBranding(source) {
|
|
|
6294
6315
|
SURCHARGE_POSITIONS,
|
|
6295
6316
|
DEFAULT_BRANDING.surchargePosition
|
|
6296
6317
|
),
|
|
6318
|
+
nativeElementPosition: pickEnum(
|
|
6319
|
+
extras["nativeElementPosition"],
|
|
6320
|
+
NATIVE_ELEMENT_POSITIONS,
|
|
6321
|
+
DEFAULT_BRANDING.nativeElementPosition
|
|
6322
|
+
),
|
|
6297
6323
|
surchargeStyle: pickEnum(
|
|
6298
6324
|
extras["surchargeStyle"],
|
|
6299
6325
|
SURCHARGE_STYLES,
|
|
@@ -6413,6 +6439,7 @@ function encodeBranding(branding, base) {
|
|
|
6413
6439
|
buttonSize: branding.buttonSize,
|
|
6414
6440
|
showSurcharge: String(branding.showSurcharge),
|
|
6415
6441
|
surchargePosition: branding.surchargePosition,
|
|
6442
|
+
nativeElementPosition: branding.nativeElementPosition,
|
|
6416
6443
|
surchargeStyle: branding.surchargeStyle,
|
|
6417
6444
|
surchargeSize: branding.surchargeSize,
|
|
6418
6445
|
surchargeShape: branding.surchargeShape,
|
|
@@ -6571,6 +6598,11 @@ function parseImportedBranding(raw) {
|
|
|
6571
6598
|
SURCHARGE_POSITIONS,
|
|
6572
6599
|
dflt.surchargePosition
|
|
6573
6600
|
),
|
|
6601
|
+
nativeElementPosition: pickEnum(
|
|
6602
|
+
root["nativeElementPosition"],
|
|
6603
|
+
NATIVE_ELEMENT_POSITIONS,
|
|
6604
|
+
dflt.nativeElementPosition
|
|
6605
|
+
),
|
|
6574
6606
|
surchargeStyle: pickEnum(
|
|
6575
6607
|
root["surchargeStyle"],
|
|
6576
6608
|
SURCHARGE_STYLES,
|
|
@@ -7101,6 +7133,14 @@ var PANE_VISIBILITIES = ["always", "embedded_only", "external_only"];
|
|
|
7101
7133
|
function parseVisibility(raw) {
|
|
7102
7134
|
return PANE_VISIBILITIES.find((value) => value === raw) ?? "always";
|
|
7103
7135
|
}
|
|
7136
|
+
var PANE_NATIVE_ELEMENTS = [
|
|
7137
|
+
"everywhere",
|
|
7138
|
+
"embedded_only",
|
|
7139
|
+
"external_only"
|
|
7140
|
+
];
|
|
7141
|
+
function parseNativeElement(raw) {
|
|
7142
|
+
return PANE_NATIVE_ELEMENTS.find((value) => value === raw) ?? "everywhere";
|
|
7143
|
+
}
|
|
7104
7144
|
function paneViewVisibility(view) {
|
|
7105
7145
|
const declared = PANE_VISIBILITIES.find((value) => value === view.visibility);
|
|
7106
7146
|
if (declared) return declared;
|
|
@@ -7332,7 +7372,8 @@ function defaultPane(method, catalog = STRIPE_FALLBACK_PANE_CATALOG) {
|
|
|
7332
7372
|
iconSvg: "",
|
|
7333
7373
|
displayOrder: 0,
|
|
7334
7374
|
visibility: "always",
|
|
7335
|
-
openIn: "tab"
|
|
7375
|
+
openIn: "tab",
|
|
7376
|
+
nativeElement: "everywhere"
|
|
7336
7377
|
};
|
|
7337
7378
|
}
|
|
7338
7379
|
function clonePane(pane) {
|
|
@@ -7378,7 +7419,8 @@ function decodePanes(raw) {
|
|
|
7378
7419
|
// Anything unrecognised degrades to `always` rather than dropping the row.
|
|
7379
7420
|
visibility: parseVisibility(entry["visibility"]),
|
|
7380
7421
|
// Same tolerance: an unknown value degrades to the default `tab`.
|
|
7381
|
-
openIn: entry["open_in"] === "popup" ? "popup" : "tab"
|
|
7422
|
+
openIn: entry["open_in"] === "popup" ? "popup" : "tab",
|
|
7423
|
+
nativeElement: parseNativeElement(entry["native_element"])
|
|
7382
7424
|
});
|
|
7383
7425
|
const indexByMethod = /* @__PURE__ */ new Map();
|
|
7384
7426
|
const out = [];
|
|
@@ -7430,7 +7472,12 @@ function encodePanes(panes) {
|
|
|
7430
7472
|
// never went through `decodePanes`. A decoded pane always holds a valid
|
|
7431
7473
|
// value, so this is a no-op on the round-trip path.
|
|
7432
7474
|
visibility: parseVisibility(pane.visibility),
|
|
7433
|
-
open_in: pane.openIn === "popup" ? "popup" : "tab"
|
|
7475
|
+
open_in: pane.openIn === "popup" ? "popup" : "tab",
|
|
7476
|
+
// Omitted at the default: `everywhere` is what the router decodes an
|
|
7477
|
+
// absent key to, so leaving it out changes nothing — and keeps a blob
|
|
7478
|
+
// stored before the field existed byte-identical on re-encode, which
|
|
7479
|
+
// is what the wire-compatibility test pins.
|
|
7480
|
+
...parseNativeElement(pane.nativeElement) === "everywhere" ? {} : { native_element: parseNativeElement(pane.nativeElement) }
|
|
7434
7481
|
};
|
|
7435
7482
|
});
|
|
7436
7483
|
}
|
|
@@ -7505,6 +7552,7 @@ export {
|
|
|
7505
7552
|
surchargeFigurePlan,
|
|
7506
7553
|
readableInkOn,
|
|
7507
7554
|
SURCHARGE_POSITIONS,
|
|
7555
|
+
NATIVE_ELEMENT_POSITIONS,
|
|
7508
7556
|
SURCHARGE_STYLES,
|
|
7509
7557
|
SURCHARGE_BORDER_WIDTHS,
|
|
7510
7558
|
SURCHARGE_BORDER_STYLES,
|
|
@@ -7625,4 +7673,4 @@ export {
|
|
|
7625
7673
|
decodeNativePanes,
|
|
7626
7674
|
encodeNativePanes
|
|
7627
7675
|
};
|
|
7628
|
-
//# sourceMappingURL=chunk-
|
|
7676
|
+
//# sourceMappingURL=chunk-I2YGFOLA.js.map
|