@delopay/sdk 0.136.0 → 0.138.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
@@ -20,6 +20,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/internal.ts
21
21
  var internal_exports = {};
22
22
  __export(internal_exports, {
23
+ AIRWALLEX_AUTOFILL_TREATMENTS: () => AIRWALLEX_AUTOFILL_TREATMENTS,
24
+ AIRWALLEX_CARD_LAYOUTS: () => AIRWALLEX_CARD_LAYOUTS,
25
+ AIRWALLEX_CARD_PRESETS: () => AIRWALLEX_CARD_PRESETS,
26
+ AIRWALLEX_CARD_PRESET_FALLBACK: () => AIRWALLEX_CARD_PRESET_FALLBACK,
27
+ AIRWALLEX_FIELD_CHROMES: () => AIRWALLEX_FIELD_CHROMES,
28
+ AIRWALLEX_FIELD_FONT_SIZES: () => AIRWALLEX_FIELD_FONT_SIZES,
29
+ AIRWALLEX_FIELD_WEIGHTS: () => AIRWALLEX_FIELD_WEIGHTS,
30
+ AIRWALLEX_FOCUS_RINGS: () => AIRWALLEX_FOCUS_RINGS,
31
+ AIRWALLEX_LABEL_STYLES: () => AIRWALLEX_LABEL_STYLES,
32
+ AIRWALLEX_NETWORK_MARKS: () => AIRWALLEX_NETWORK_MARKS,
23
33
  ALL_CUSTOM_FIELD_CONDITION_SOURCES: () => ALL_CUSTOM_FIELD_CONDITION_SOURCES,
24
34
  ALL_CUSTOM_FIELD_OPERATORS: () => ALL_CUSTOM_FIELD_OPERATORS,
25
35
  ALL_CUSTOM_FIELD_TYPES: () => ALL_CUSTOM_FIELD_TYPES,
@@ -57,6 +67,7 @@ __export(internal_exports, {
57
67
  DelopayAuthenticationError: () => DelopayAuthenticationError,
58
68
  DelopayError: () => DelopayError,
59
69
  DelopayInternal: () => DelopayInternal,
70
+ Diagnostic: () => Diagnostic,
60
71
  Export: () => Export,
61
72
  FeatureMatrix: () => FeatureMatrix,
62
73
  FeeProgramBuilder: () => FeeProgramBuilder,
@@ -102,9 +113,15 @@ __export(internal_exports, {
102
113
  WCAG_AA_TEXT: () => WCAG_AA_TEXT,
103
114
  WCAG_AA_UI: () => WCAG_AA_UI,
104
115
  Webhooks: () => Webhooks,
116
+ airwallexCardLayout: () => airwallexCardLayout,
117
+ airwallexCardLayoutIsCoherent: () => airwallexCardLayoutIsCoherent,
118
+ airwallexCellWeight: () => airwallexCellWeight,
119
+ airwallexFieldFontPx: () => airwallexFieldFontPx,
120
+ airwallexFieldWeightValue: () => airwallexFieldWeightValue,
105
121
  allOf: () => allOf,
106
122
  anyOf: () => anyOf,
107
123
  applyBrandingVariables: () => applyBrandingVariables,
124
+ asAirwallexCardPreset: () => asAirwallexCardPreset,
108
125
  buildBrandingExport: () => buildBrandingExport,
109
126
  buttonPadValue: () => buttonPadValue,
110
127
  canonicalSectionId: () => canonicalSectionId,
@@ -168,6 +185,8 @@ __export(internal_exports, {
168
185
  programToTree: () => programToTree,
169
186
  radiusValue: () => radiusValue,
170
187
  readableInkOn: () => readableInkOn,
188
+ resolveAirwallexCardPreset: () => resolveAirwallexCardPreset,
189
+ resolveAirwallexLabelStyle: () => resolveAirwallexLabelStyle,
171
190
  ruleMatchToTree: () => ruleMatchToTree,
172
191
  sanitizeCustomCss: () => sanitizeCustomCss,
173
192
  sectionLabel: () => sectionLabel,
@@ -5499,6 +5518,120 @@ function feeProgram() {
5499
5518
  return new FeeProgramBuilder();
5500
5519
  }
5501
5520
 
5521
+ // src/airwallexCard.ts
5522
+ var AIRWALLEX_CARD_PRESETS = [
5523
+ "single_row",
5524
+ "split_fields",
5525
+ "split_fields_labelled",
5526
+ "stacked",
5527
+ "number_expiry_row",
5528
+ "compact"
5529
+ ];
5530
+ var SPLIT = ["cardNumber", "expiry", "cvc"];
5531
+ var AIRWALLEX_CARD_LAYOUTS = {
5532
+ // Airwallex's combined element. One iframe, one row, and the only preset
5533
+ // whose insides are not ours to lay out — which is why it carries no
5534
+ // captions: there is nothing to caption but the row as a whole.
5535
+ single_row: {
5536
+ elements: ["card"],
5537
+ rows: [["card"]],
5538
+ labels: false,
5539
+ density: "default"
5540
+ },
5541
+ // The trio with placeholders carrying the meaning. Shorter than the
5542
+ // labelled variant and fine on a wide surface.
5543
+ split_fields: {
5544
+ elements: SPLIT,
5545
+ rows: [["cardNumber"], ["expiry", "cvc"]],
5546
+ labels: false,
5547
+ density: "default"
5548
+ },
5549
+ // The default. The same geometry, captioned — which is what makes it
5550
+ // survive a narrow embed, where a bare field row stops being self-evident.
5551
+ split_fields_labelled: {
5552
+ elements: SPLIT,
5553
+ rows: [["cardNumber"], ["expiry", "cvc"]],
5554
+ labels: true,
5555
+ density: "default"
5556
+ },
5557
+ // Every field full width. Expiry and CVC side by side start to crowd below
5558
+ // roughly 320px, and this is the layout that does not.
5559
+ stacked: {
5560
+ elements: SPLIT,
5561
+ rows: [["cardNumber"], ["expiry"], ["cvc"]],
5562
+ labels: true,
5563
+ density: "default"
5564
+ },
5565
+ // Two rows instead of two-plus-one: shorter than the split forms without
5566
+ // the ambiguity of a single combined field.
5567
+ //
5568
+ // 3:2, not an even split. A card number is nineteen characters and an expiry
5569
+ // is five, so halving the row clipped the number's own placeholder at 460px
5570
+ // — seen in the preview before this was weighted. The proposal drew it even;
5571
+ // the merchant-facing decision was taken on the two drawn side by side and
5572
+ // the weighted one was chosen, so do not "restore" the even split to match
5573
+ // the original mock.
5574
+ number_expiry_row: {
5575
+ elements: SPLIT,
5576
+ rows: [["cardNumber", "expiry"], ["cvc"]],
5577
+ weights: { cardNumber: 3, expiry: 2 },
5578
+ labels: true,
5579
+ density: "default"
5580
+ },
5581
+ // Split geometry at reduced density and type size, for a checkout embedded
5582
+ // in a page that already has its own chrome.
5583
+ compact: {
5584
+ elements: SPLIT,
5585
+ rows: [["cardNumber"], ["expiry", "cvc"]],
5586
+ labels: false,
5587
+ density: "compact"
5588
+ }
5589
+ };
5590
+ var AIRWALLEX_CARD_PRESET_FALLBACK = "split_fields_labelled";
5591
+ function resolveAirwallexCardPreset(fromBranding, fromConnector) {
5592
+ return asPreset(fromBranding) ?? asPreset(fromConnector) ?? AIRWALLEX_CARD_PRESET_FALLBACK;
5593
+ }
5594
+ function asAirwallexCardPreset(value) {
5595
+ return asPreset(value);
5596
+ }
5597
+ function asPreset(value) {
5598
+ if (typeof value !== "string") return null;
5599
+ const trimmed = value.trim().toLowerCase();
5600
+ return AIRWALLEX_CARD_PRESETS.includes(trimmed) ? trimmed : null;
5601
+ }
5602
+ function airwallexCardLayout(preset) {
5603
+ return AIRWALLEX_CARD_LAYOUTS[preset];
5604
+ }
5605
+ function airwallexCellWeight(layout, field) {
5606
+ const weight = layout.weights?.[field];
5607
+ return typeof weight === "number" && Number.isFinite(weight) && weight > 0 ? weight : 1;
5608
+ }
5609
+ function airwallexCardLayoutIsCoherent(layout) {
5610
+ const drawn = layout.rows.flat();
5611
+ if (drawn.length !== layout.elements.length) return false;
5612
+ return layout.elements.every((field) => drawn.filter((f) => f === field).length === 1);
5613
+ }
5614
+ var AIRWALLEX_LABEL_STYLES = ["above", "inline", "floating", "none"];
5615
+ function resolveAirwallexLabelStyle(override, layout) {
5616
+ if (typeof override === "string" && AIRWALLEX_LABEL_STYLES.includes(override)) {
5617
+ return override;
5618
+ }
5619
+ return layout.labels ? "above" : "none";
5620
+ }
5621
+ var AIRWALLEX_FIELD_CHROMES = ["outlined", "filled", "underline"];
5622
+ var AIRWALLEX_FOCUS_RINGS = ["none", "subtle", "strong"];
5623
+ var AIRWALLEX_AUTOFILL_TREATMENTS = ["system", "brand", "neutral"];
5624
+ var AIRWALLEX_FIELD_FONT_SIZES = ["sm", "md", "lg"];
5625
+ var AIRWALLEX_FIELD_WEIGHTS = ["regular", "medium", "semibold"];
5626
+ function airwallexFieldFontPx(size, density) {
5627
+ const base = size === "sm" ? 14 : size === "lg" ? 18 : 16;
5628
+ return density === "compact" ? Math.max(13, base - 1) : base;
5629
+ }
5630
+ function airwallexFieldWeightValue(weight) {
5631
+ return weight === "regular" ? 400 : weight === "semibold" ? 600 : 500;
5632
+ }
5633
+ var AIRWALLEX_NETWORK_MARKS = ["visa", "mastercard", "amex", "discover"];
5634
+
5502
5635
  // src/branding.ts
5503
5636
  function surchargeShowsLabel(labelMode, style, position) {
5504
5637
  if (labelMode !== "labelled") return false;
@@ -6034,6 +6167,25 @@ var DEFAULT_BRANDING_BASE = {
6034
6167
  paymentLayout: "tabs",
6035
6168
  labelStyle: "above",
6036
6169
  showPoweredBy: true,
6170
+ // Every one of these defaults to what the Airwallex pane already did before
6171
+ // the section existed, so a merchant who never opens it sees no change:
6172
+ // empty preset (defer to the connector account), an outlined box, 16px /
6173
+ // 500 type, no focus ring, the browser's own autofill highlight, no valid
6174
+ // tint, no marks. The single deliberate change of behaviour is not here —
6175
+ // it is the fallback at the END of `resolveAirwallexCardPreset`, which
6176
+ // moves a shop that configured NOTHING from the combined row to the
6177
+ // labelled split form.
6178
+ airwallexCardPreset: "",
6179
+ // Off. With this on, no buyer can pay by card on the shop.
6180
+ airwallexHideCard: false,
6181
+ airwallexFieldChrome: "outlined",
6182
+ airwallexLabelStyle: "",
6183
+ airwallexFieldFontSize: "md",
6184
+ airwallexFieldWeight: "medium",
6185
+ airwallexFocusRing: "none",
6186
+ airwallexAutofill: "system",
6187
+ airwallexValidTint: false,
6188
+ airwallexNetworkMarks: false,
6037
6189
  customCss: ""
6038
6190
  };
6039
6191
  var DEFAULT_BRANDING = {
@@ -6143,6 +6295,10 @@ function pickEnum(value, allowed, fallback) {
6143
6295
  if (typeof value !== "string") return fallback;
6144
6296
  return allowed.includes(value) ? value : fallback;
6145
6297
  }
6298
+ function pickEnumOrEmpty(value, allowed) {
6299
+ if (typeof value !== "string") return "";
6300
+ return allowed.includes(value) ? value : "";
6301
+ }
6146
6302
  function parseBool(value, fallback) {
6147
6303
  if (typeof value === "boolean") return value;
6148
6304
  if (value === "true") return true;
@@ -6713,6 +6869,53 @@ function decodeBranding(source) {
6713
6869
  ),
6714
6870
  labelStyle,
6715
6871
  showPoweredBy: source.branding_visibility !== false,
6872
+ // The two that can be empty use `pickEnumOrEmpty`, not `pickEnum`: a
6873
+ // value this build does not know has to decode to "unset" and defer, the
6874
+ // same as a key that was never written. Sending it to a concrete default
6875
+ // instead would make an older checkout override the connector account of
6876
+ // a merchant who picked a preset a newer dashboard offers.
6877
+ airwallexCardPreset: pickEnumOrEmpty(
6878
+ extras["airwallexCardPreset"],
6879
+ AIRWALLEX_CARD_PRESETS
6880
+ ),
6881
+ airwallexHideCard: parseBool(extras["airwallexHideCard"], DEFAULT_BRANDING.airwallexHideCard),
6882
+ airwallexFieldChrome: pickEnum(
6883
+ extras["airwallexFieldChrome"],
6884
+ AIRWALLEX_FIELD_CHROMES,
6885
+ DEFAULT_BRANDING.airwallexFieldChrome
6886
+ ),
6887
+ airwallexLabelStyle: pickEnumOrEmpty(
6888
+ extras["airwallexLabelStyle"],
6889
+ AIRWALLEX_LABEL_STYLES
6890
+ ),
6891
+ airwallexFieldFontSize: pickEnum(
6892
+ extras["airwallexFieldFontSize"],
6893
+ AIRWALLEX_FIELD_FONT_SIZES,
6894
+ DEFAULT_BRANDING.airwallexFieldFontSize
6895
+ ),
6896
+ airwallexFieldWeight: pickEnum(
6897
+ extras["airwallexFieldWeight"],
6898
+ AIRWALLEX_FIELD_WEIGHTS,
6899
+ DEFAULT_BRANDING.airwallexFieldWeight
6900
+ ),
6901
+ airwallexFocusRing: pickEnum(
6902
+ extras["airwallexFocusRing"],
6903
+ AIRWALLEX_FOCUS_RINGS,
6904
+ DEFAULT_BRANDING.airwallexFocusRing
6905
+ ),
6906
+ airwallexAutofill: pickEnum(
6907
+ extras["airwallexAutofill"],
6908
+ AIRWALLEX_AUTOFILL_TREATMENTS,
6909
+ DEFAULT_BRANDING.airwallexAutofill
6910
+ ),
6911
+ airwallexValidTint: parseBool(
6912
+ extras["airwallexValidTint"],
6913
+ DEFAULT_BRANDING.airwallexValidTint
6914
+ ),
6915
+ airwallexNetworkMarks: parseBool(
6916
+ extras["airwallexNetworkMarks"],
6917
+ DEFAULT_BRANDING.airwallexNetworkMarks
6918
+ ),
6716
6919
  customCss: s(extras["customCss"])
6717
6920
  };
6718
6921
  }
@@ -6768,6 +6971,21 @@ function encodeBranding(branding, base) {
6768
6971
  logoShape: branding.logoShape,
6769
6972
  logoSize: branding.logoSize,
6770
6973
  labelStyle: branding.labelStyle,
6974
+ // Written unconditionally, empty string included. The encoder REPLACES
6975
+ // `sdk_ui_rules.branding` wholesale, so a key it skips is a key it
6976
+ // deletes — and here the empty string is a real value ("no choice made"),
6977
+ // not an absence. Omitting it would be indistinguishable from omitting it
6978
+ // by accident, which is how `summaryOrder` was lost.
6979
+ airwallexCardPreset: branding.airwallexCardPreset,
6980
+ airwallexHideCard: String(branding.airwallexHideCard),
6981
+ airwallexFieldChrome: branding.airwallexFieldChrome,
6982
+ airwallexLabelStyle: branding.airwallexLabelStyle,
6983
+ airwallexFieldFontSize: branding.airwallexFieldFontSize,
6984
+ airwallexFieldWeight: branding.airwallexFieldWeight,
6985
+ airwallexFocusRing: branding.airwallexFocusRing,
6986
+ airwallexAutofill: branding.airwallexAutofill,
6987
+ airwallexValidTint: String(branding.airwallexValidTint),
6988
+ airwallexNetworkMarks: String(branding.airwallexNetworkMarks),
6771
6989
  trustBadges: encodeBadges(branding.trustBadges),
6772
6990
  [METHOD_SECTION_ORDER_KEY]: encodeMethodSectionOrder(branding.methodSectionOrder)
6773
6991
  };
@@ -6995,6 +7213,47 @@ function parseImportedBranding(raw) {
6995
7213
  ),
6996
7214
  labelStyle,
6997
7215
  showPoweredBy: parseBool(root["showPoweredBy"], dflt.showPoweredBy),
7216
+ // An imported profile that predates this section carries none of these
7217
+ // and lands on the defaults — which is to say on "defer", so importing an
7218
+ // old export into a shop does not take that shop's connector setting
7219
+ // away. The one field that would be dangerous to import loosely is the
7220
+ // hide switch, and `parseBool` only says true for a literal `true`.
7221
+ airwallexCardPreset: pickEnumOrEmpty(
7222
+ root["airwallexCardPreset"],
7223
+ AIRWALLEX_CARD_PRESETS
7224
+ ),
7225
+ airwallexHideCard: parseBool(root["airwallexHideCard"], dflt.airwallexHideCard),
7226
+ airwallexFieldChrome: pickEnum(
7227
+ root["airwallexFieldChrome"],
7228
+ AIRWALLEX_FIELD_CHROMES,
7229
+ dflt.airwallexFieldChrome
7230
+ ),
7231
+ airwallexLabelStyle: pickEnumOrEmpty(
7232
+ root["airwallexLabelStyle"],
7233
+ AIRWALLEX_LABEL_STYLES
7234
+ ),
7235
+ airwallexFieldFontSize: pickEnum(
7236
+ root["airwallexFieldFontSize"],
7237
+ AIRWALLEX_FIELD_FONT_SIZES,
7238
+ dflt.airwallexFieldFontSize
7239
+ ),
7240
+ airwallexFieldWeight: pickEnum(
7241
+ root["airwallexFieldWeight"],
7242
+ AIRWALLEX_FIELD_WEIGHTS,
7243
+ dflt.airwallexFieldWeight
7244
+ ),
7245
+ airwallexFocusRing: pickEnum(
7246
+ root["airwallexFocusRing"],
7247
+ AIRWALLEX_FOCUS_RINGS,
7248
+ dflt.airwallexFocusRing
7249
+ ),
7250
+ airwallexAutofill: pickEnum(
7251
+ root["airwallexAutofill"],
7252
+ AIRWALLEX_AUTOFILL_TREATMENTS,
7253
+ dflt.airwallexAutofill
7254
+ ),
7255
+ airwallexValidTint: parseBool(root["airwallexValidTint"], dflt.airwallexValidTint),
7256
+ airwallexNetworkMarks: parseBool(root["airwallexNetworkMarks"], dflt.airwallexNetworkMarks),
6998
7257
  customCss: sStr(root["customCss"], dflt.customCss).slice(0, CUSTOM_CSS_MAX_LENGTH)
6999
7258
  };
7000
7259
  }
@@ -8526,6 +8785,210 @@ var ConnectorRestrictions = class {
8526
8785
  }
8527
8786
  };
8528
8787
 
8788
+ // src/internal/resources/diagnostic.ts
8789
+ var Diagnostic = class {
8790
+ constructor(request) {
8791
+ this.request = request;
8792
+ }
8793
+ /**
8794
+ * The ranked attention board — the page's landing state, with nothing typed.
8795
+ *
8796
+ * Always carries `checks_run` and `vitals`, so an empty `items` reads as
8797
+ * "checked these things at 14:02, all clear" rather than as a panel that
8798
+ * failed to load. A check that could not run is **absent** from `checks_run`
8799
+ * rather than silently counted as clear.
8800
+ */
8801
+ async attention(body) {
8802
+ return this.request("POST", "/admin-portal/diagnostic/attention", { body: body ?? {} });
8803
+ }
8804
+ /**
8805
+ * Provider webhooks received, across every merchant.
8806
+ *
8807
+ * `source_verified: false` selects rows that failed verification **or** never
8808
+ * reached it — the deliveries that failed before verification was attempted
8809
+ * are exactly the ones an operator opens this tab for.
8810
+ */
8811
+ async listIncomingWebhooks(body) {
8812
+ return this.request("POST", "/admin-portal/diagnostic/webhooks/incoming", {
8813
+ body: body ?? {}
8814
+ });
8815
+ }
8816
+ /**
8817
+ * One delivery in full: masked headers and body, the verification verdict,
8818
+ * and the router log lines for its request id.
8819
+ *
8820
+ * `router_logs` is `null` — not `[]` — when the log store is unreachable, and
8821
+ * `router_logs_unavailable` then says why. Render the first as *unavailable*,
8822
+ * never as "the router logged nothing".
8823
+ */
8824
+ async getIncomingWebhook(eventId) {
8825
+ return this.request(
8826
+ "GET",
8827
+ `/admin-portal/diagnostic/webhooks/incoming/${encodeURIComponent(eventId)}`
8828
+ );
8829
+ }
8830
+ /** Shop webhooks sent, across every merchant, with each event's attempts folded in. */
8831
+ async listOutgoingWebhooks(body) {
8832
+ return this.request("POST", "/admin-portal/diagnostic/webhooks/outgoing", {
8833
+ body: body ?? {}
8834
+ });
8835
+ }
8836
+ /**
8837
+ * The four tiles above the shop-webhooks table.
8838
+ *
8839
+ * Counted under the same window and environment as the table but **without**
8840
+ * its delivery filter — the tiles say what the window holds, and applying the
8841
+ * filter would make every tile agree with whichever one is selected.
8842
+ */
8843
+ async outgoingWebhookSummary(body) {
8844
+ return this.request("POST", "/admin-portal/diagnostic/webhooks/outgoing/summary", {
8845
+ body: body ?? {}
8846
+ });
8847
+ }
8848
+ /**
8849
+ * Connector calls the router made.
8850
+ *
8851
+ * List rows carry no payload. Fetch one with {@link getConnectorCall} for the
8852
+ * masked request and response.
8853
+ */
8854
+ async listConnectorCalls(body) {
8855
+ return this.request("POST", "/admin-portal/diagnostic/connector-calls", { body: body ?? {} });
8856
+ }
8857
+ /** One connector call, with its masked payloads. */
8858
+ async getConnectorCall(id) {
8859
+ return this.request(
8860
+ "GET",
8861
+ `/admin-portal/diagnostic/connector-calls/${encodeURIComponent(id)}`
8862
+ );
8863
+ }
8864
+ /**
8865
+ * Router logs, proxied from the deployment's log store.
8866
+ *
8867
+ * Answers a {@link DiagnosticPanel}. Check `status` before reading `data`:
8868
+ * `'unavailable'` means the store did not answer, which is the opposite of
8869
+ * "there were no errors" and must be rendered as such.
8870
+ */
8871
+ async routerLogs(body) {
8872
+ return this.request("POST", "/admin-portal/diagnostic/logs", { body: body ?? {} });
8873
+ }
8874
+ /**
8875
+ * Payments that are stuck or failed.
8876
+ *
8877
+ * Stuck means non-terminal for longer than `stuck_minutes`; failed means it
8878
+ * ended without succeeding inside the window. Omitting `stuck_minutes` turns
8879
+ * the first arm off rather than widening it.
8880
+ */
8881
+ async listPayments(body) {
8882
+ return this.request("POST", "/admin-portal/diagnostic/payments", { body: body ?? {} });
8883
+ }
8884
+ /**
8885
+ * The error codes in this window, each with its count in the previous window
8886
+ * of equal length.
8887
+ *
8888
+ * `previous_count: null` means the code did not appear before — render it as
8889
+ * "new" rather than as a fall to zero.
8890
+ */
8891
+ async paymentErrorCodes(body) {
8892
+ return this.request("POST", "/admin-portal/diagnostic/payments/error-codes", {
8893
+ body: body ?? {}
8894
+ });
8895
+ }
8896
+ /**
8897
+ * Everything about one payment, in one call: the payment, its attempts, its
8898
+ * status history, its client context, and what it produced — connector calls,
8899
+ * webhooks both ways, and scheduler jobs.
8900
+ *
8901
+ * Read `diagnostic_capture` before rendering an empty section. A payment with
8902
+ * no connector calls and a deployment that never recorded any are different
8903
+ * facts, and the second must not read as the first.
8904
+ *
8905
+ * Typed loosely on purpose: the payment, attempts, status-history and
8906
+ * client-context halves are the merchant-facing shapes this package already
8907
+ * exports, and re-declaring them here would give consumers two names for one
8908
+ * thing that could then drift apart.
8909
+ */
8910
+ async getPayment(paymentId) {
8911
+ return this.request(
8912
+ "GET",
8913
+ `/admin-portal/diagnostic/payments/${encodeURIComponent(paymentId)}`
8914
+ );
8915
+ }
8916
+ /** Scheduler tasks, most overdue first. */
8917
+ async listQueues(body) {
8918
+ return this.request("POST", "/admin-portal/diagnostic/queues", { body: body ?? {} });
8919
+ }
8920
+ /**
8921
+ * The four tiles above the queues table, plus the approvals count.
8922
+ *
8923
+ * `pending_approvals` is a **different** queue from `pending_count`: a stalled
8924
+ * scheduler needs a consumer, a full approvals queue needs a person, and
8925
+ * folding them into one number would point an operator at the wrong fix.
8926
+ */
8927
+ async queueSummary() {
8928
+ return this.request("GET", "/admin-portal/diagnostic/queues/summary");
8929
+ }
8930
+ /**
8931
+ * Replicas and their dependencies.
8932
+ *
8933
+ * `build_mismatch` is computed server-side rather than left for a caller to
8934
+ * notice by comparing strings: one replica in four answering differently
8935
+ * explains a whole class of "it only fails sometimes" incident, and is
8936
+ * invisible unless something says it out loud.
8937
+ */
8938
+ async infrastructure() {
8939
+ return this.request("GET", "/admin-portal/diagnostic/infrastructure");
8940
+ }
8941
+ /**
8942
+ * Firing alerts, proxied from Alertmanager.
8943
+ *
8944
+ * Answers a {@link DiagnosticPanel} for the same reason {@link routerLogs}
8945
+ * does: a strip that renders empty because Alertmanager is down says "nothing
8946
+ * is firing", which is the most dangerous sentence this page could print.
8947
+ */
8948
+ async alerts() {
8949
+ return this.request("GET", "/admin-portal/diagnostic/alerts");
8950
+ }
8951
+ /** Config edits and admin actions inside the window. */
8952
+ async listChanges(body) {
8953
+ return this.request("POST", "/admin-portal/diagnostic/changes", { body: body ?? {} });
8954
+ }
8955
+ /**
8956
+ * What a pasted id is, and whether we hold it.
8957
+ *
8958
+ * `kind` and `found` are separate answers on purpose. A well-shaped id that
8959
+ * matches nothing comes back `found: false` with the three `reasons` and
8960
+ * their fixes — render that, never an empty table, which reads as "no such
8961
+ * payment" when the real answer is "outside the window" or "it is a test
8962
+ * payment".
8963
+ */
8964
+ async resolveId(id) {
8965
+ return this.request("GET", `/admin-portal/diagnostic/resolve/${encodeURIComponent(id)}`);
8966
+ }
8967
+ /**
8968
+ * One id across every source, as an ordered span list.
8969
+ *
8970
+ * Accepts a payment, attempt, event or request id. Sources that could not be
8971
+ * read are named in `unavailable_sources` rather than left out: a waterfall
8972
+ * with an unexplained gap reads as a period when nothing happened.
8973
+ */
8974
+ async trace(id) {
8975
+ return this.request("GET", `/admin-portal/diagnostic/trace/${encodeURIComponent(id)}`);
8976
+ }
8977
+ /**
8978
+ * Unmask one field of one object.
8979
+ *
8980
+ * **Writes an audit row** naming the operator, the field and the object,
8981
+ * before the value is returned — a reveal that could not be audited does not
8982
+ * happen. Needs a dashboard JWT holding `DiagnosticReveal`; an admin API key
8983
+ * cannot call it, because an API key names no person.
8984
+ *
8985
+ * `reason` is required and is stored verbatim.
8986
+ */
8987
+ async reveal(body) {
8988
+ return this.request("POST", "/admin-portal/diagnostic/reveal", { body });
8989
+ }
8990
+ };
8991
+
8529
8992
  // src/internal/resources/gsm.ts
8530
8993
  var Gsm = class {
8531
8994
  constructor(request) {
@@ -8814,6 +9277,7 @@ var DelopayInternal = class extends Delopay {
8814
9277
  this.configs = new Configs(request);
8815
9278
  this.connectorRestrictions = new ConnectorRestrictions(request);
8816
9279
  this.connectorRestrictionRules = new ConnectorRestrictionRules(request);
9280
+ this.diagnostic = new Diagnostic(request);
8817
9281
  this.gsm = new Gsm(request);
8818
9282
  this.platformBilling = new PlatformBilling(request);
8819
9283
  this.platformFees = new PlatformFees(request);
@@ -8821,6 +9285,16 @@ var DelopayInternal = class extends Delopay {
8821
9285
  };
8822
9286
  // Annotate the CommonJS export names for ESM import in node:
8823
9287
  0 && (module.exports = {
9288
+ AIRWALLEX_AUTOFILL_TREATMENTS,
9289
+ AIRWALLEX_CARD_LAYOUTS,
9290
+ AIRWALLEX_CARD_PRESETS,
9291
+ AIRWALLEX_CARD_PRESET_FALLBACK,
9292
+ AIRWALLEX_FIELD_CHROMES,
9293
+ AIRWALLEX_FIELD_FONT_SIZES,
9294
+ AIRWALLEX_FIELD_WEIGHTS,
9295
+ AIRWALLEX_FOCUS_RINGS,
9296
+ AIRWALLEX_LABEL_STYLES,
9297
+ AIRWALLEX_NETWORK_MARKS,
8824
9298
  ALL_CUSTOM_FIELD_CONDITION_SOURCES,
8825
9299
  ALL_CUSTOM_FIELD_OPERATORS,
8826
9300
  ALL_CUSTOM_FIELD_TYPES,
@@ -8858,6 +9332,7 @@ var DelopayInternal = class extends Delopay {
8858
9332
  DelopayAuthenticationError,
8859
9333
  DelopayError,
8860
9334
  DelopayInternal,
9335
+ Diagnostic,
8861
9336
  Export,
8862
9337
  FeatureMatrix,
8863
9338
  FeeProgramBuilder,
@@ -8903,9 +9378,15 @@ var DelopayInternal = class extends Delopay {
8903
9378
  WCAG_AA_TEXT,
8904
9379
  WCAG_AA_UI,
8905
9380
  Webhooks,
9381
+ airwallexCardLayout,
9382
+ airwallexCardLayoutIsCoherent,
9383
+ airwallexCellWeight,
9384
+ airwallexFieldFontPx,
9385
+ airwallexFieldWeightValue,
8906
9386
  allOf,
8907
9387
  anyOf,
8908
9388
  applyBrandingVariables,
9389
+ asAirwallexCardPreset,
8909
9390
  buildBrandingExport,
8910
9391
  buttonPadValue,
8911
9392
  canonicalSectionId,
@@ -8969,6 +9450,8 @@ var DelopayInternal = class extends Delopay {
8969
9450
  programToTree,
8970
9451
  radiusValue,
8971
9452
  readableInkOn,
9453
+ resolveAirwallexCardPreset,
9454
+ resolveAirwallexLabelStyle,
8972
9455
  ruleMatchToTree,
8973
9456
  sanitizeCustomCss,
8974
9457
  sectionLabel,