@getopenpay/openpay-js 0.5.25 → 0.5.26-alpha.9401a5a

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.
@@ -1,8 +1,8 @@
1
- import { z as Ar, p as g, _ as X, s as Pr, l as Sr, j as Ir, q as vr, y as yr, dK as hr, h as gr, dL as mr, n as Cr, r as Nr, i as Mr, m as Ur, o as Br, t as br, u as Dr } from "./url-c5k5Yl5P.js";
2
- import { i as G, s as Q, u as Xr } from "./suppress-tracing-QycbVyJL.js";
3
- import { d as c } from "./diag-api-iTj0t8NN.js";
1
+ import { z as Ar, p as g, _ as X, s as Pr, l as Sr, j as Ir, q as vr, y as yr, dK as hr, h as gr, dL as mr, n as Cr, r as Nr, i as Mr, m as Ur, o as Br, t as br, u as Dr } from "./url-Sz8IIjja.js";
2
+ import { i as G, s as Q, u as Xr } from "./suppress-tracing-BuzzyrGF.js";
3
+ import { d as c } from "./diag-api-Dyd0Q5lk.js";
4
4
  import { h as q, E as Gr } from "./ExportResult-BacsqwKA.js";
5
- import { f as u, t as N, i as k, T as M, c as wr, b as Vr, a as K } from "./index-BmfwKlzi.js";
5
+ import { f as u, t as N, i as k, T as M, c as wr, b as Vr, a as K } from "./index-BE5ODQB4.js";
6
6
  import { a as jr, bm as Hr } from "./sdk-info-ChuKu8zW.js";
7
7
  var l;
8
8
  (function(r) {
@@ -1,4 +1,4 @@
1
- import { R as r, d as o } from "./Resource-zujlVo-F.js";
1
+ import { R as r, d as o } from "./Resource-CmCb6ylx.js";
2
2
  export {
3
3
  r as Resource,
4
4
  o as defaultServiceName
@@ -1,8 +1,8 @@
1
- import { d as z } from "./diag-api-iTj0t8NN.js";
2
- import { b as G, c as I, d as W, e as X, p as _, i as V, f as K, g as Q, j as C, m as $, k as J, _ as T } from "./url-c5k5Yl5P.js";
3
- import { s as Y, i as Z, I as q } from "./utils-5D-ArVRe.js";
4
- import { P as O, b as P, p as N, s as ee, g as te } from "./utils-RafSjFZg.js";
5
- import { t as x, a as p, S as re } from "./index-BmfwKlzi.js";
1
+ import { d as z } from "./diag-api-Dyd0Q5lk.js";
2
+ import { b as G, c as I, d as W, e as X, p as _, i as V, f as K, g as Q, j as C, m as $, k as J, _ as T } from "./url-Sz8IIjja.js";
3
+ import { s as Y, i as Z, I as q } from "./utils-C88dctBG.js";
4
+ import { P as O, b as P, p as N, s as ee, g as te } from "./utils-DMrbua8x.js";
5
+ import { t as x, a as p, S as re } from "./index-BE5ODQB4.js";
6
6
  var y;
7
7
  (function(a) {
8
8
  a.COMPONENT = "component", a.HTTP_ERROR_NAME = "http.error_name", a.HTTP_STATUS_TEXT = "http.status_text";
@@ -1,4 +1,4 @@
1
- import { d as diag } from "./diag-api-iTj0t8NN.js";
1
+ import { d as diag } from "./diag-api-Dyd0Q5lk.js";
2
2
  import { E as ExportResultCode, h as hexToBinary } from "./ExportResult-BacsqwKA.js";
3
3
  import { c as commonjsGlobal } from "./_commonjsHelpers-CdLE1o9f.js";
4
4
  var OTLPExporterBase = (
@@ -1,7 +1,7 @@
1
- import { m as v } from "./metrics-api-Cmje9Aat.js";
2
- import { t as d } from "./index-BmfwKlzi.js";
3
- import { l as f } from "./utils-5D-ArVRe.js";
4
- import { I, i as p, s as h } from "./utils-5D-ArVRe.js";
1
+ import { m as v } from "./metrics-api-AiGSSkkO.js";
2
+ import { t as d } from "./index-BE5ODQB4.js";
3
+ import { l as f } from "./utils-C88dctBG.js";
4
+ import { I, i as p, s as h } from "./utils-C88dctBG.js";
5
5
  function n(r, o, a, i) {
6
6
  for (var t = 0, s = r.length; t < s; t++) {
7
7
  var e = r[t];
@@ -1,4 +1,4 @@
1
- import { A as r, b as e, B as o, a as p, C as S, F as n, N as c, P as l, R as m, d as t, S as d, e as i, c as P, T as B } from "./SimpleSpanProcessor-a50wJDqC.js";
1
+ import { A as r, b as e, B as o, a as p, C as S, F as n, N as c, P as l, R as m, d as t, S as d, e as i, c as P, T as B } from "./SimpleSpanProcessor-CQzVod32.js";
2
2
  export {
3
3
  r as AlwaysOffSampler,
4
4
  e as AlwaysOnSampler,
@@ -1,4 +1,4 @@
1
- import { R as qe } from "./index-BmfwKlzi.js";
1
+ import { R as qe } from "./index-BE5ODQB4.js";
2
2
  function xt(j) {
3
3
  return j === void 0 && (j = {}), typeof j.addEventListener == "function" && typeof j.removeEventListener == "function";
4
4
  }
package/dist/index.d.ts CHANGED
@@ -8,11 +8,21 @@ import { z } from 'zod';
8
8
 
9
9
  declare type AffirmFlowCustomParams = {
10
10
  processor?: PaymentProcessor;
11
+ /**
12
+ * Open the BNPL authorization page in a new tab instead of an iframe.
13
+ * The merchant page stays open, so `onCheckoutSuccess` / `onCheckoutError` still fire.
14
+ * Defaults to false to preserve the existing iframe flow.
15
+ */
11
16
  useRedirectFlow?: boolean;
12
17
  };
13
18
 
14
19
  declare type AfterpayFlowCustomParams = {
15
20
  processor?: PaymentProcessor;
21
+ /**
22
+ * Open the BNPL authorization page in a new tab instead of an iframe.
23
+ * The merchant page stays open, so `onCheckoutSuccess` / `onCheckoutError` still fire.
24
+ * Defaults to false to preserve the existing iframe flow.
25
+ */
16
26
  useRedirectFlow?: boolean;
17
27
  };
18
28
 
@@ -557,16 +567,19 @@ declare type InitOjsFlowResult = {
557
567
  declare type InitStripeAffirmFlowResult = {
558
568
  isAvailable: boolean;
559
569
  startFlow: (customParams?: AffirmFlowCustomParams) => Promise<void>;
570
+ abortFlow: () => void;
560
571
  };
561
572
 
562
573
  declare type InitStripeAfterpayFlowResult = {
563
574
  isAvailable: boolean;
564
575
  startFlow: (customParams?: AfterpayFlowCustomParams) => Promise<void>;
576
+ abortFlow: () => void;
565
577
  };
566
578
 
567
579
  declare type InitStripeKlarnaFlowResult = {
568
580
  isAvailable: boolean;
569
581
  startFlow: (customParams?: KlarnaFlowCustomParams) => Promise<void>;
582
+ abortFlow: () => void;
570
583
  };
571
584
 
572
585
  declare type InitStripeLinkFlowResult =
@@ -609,6 +622,11 @@ declare type KlarnaFlowCustomParams = {
609
622
  */
610
623
  processor?: PaymentProcessor;
611
624
  isAnonymous?: boolean;
625
+ /**
626
+ * Open the BNPL authorization page in a new tab instead of an iframe.
627
+ * The merchant page stays open, so `onCheckoutSuccess` / `onCheckoutError` still fire.
628
+ * Defaults to false to preserve the existing iframe flow.
629
+ */
612
630
  useRedirectFlow?: boolean;
613
631
  };
614
632
 
@@ -833,6 +851,11 @@ declare type OjsFlowParams<T_PARAMS = void, T_INIT_RESULT = void> = {
833
851
  * The result of the InitOjsFlow function.
834
852
  */
835
853
  initResult: T_INIT_RESULT;
854
+
855
+ /**
856
+ * Optional cancellation signal for flows that expose an explicit abort/reset controller.
857
+ */
858
+ abortSignal?: AbortSignal;
836
859
  };
837
860
 
838
861
  declare const OjsFlows = {
@@ -1058,6 +1081,7 @@ export declare class OpenPayForm {
1058
1081
  };
1059
1082
  private deviceToken;
1060
1083
  private isSubmitting;
1084
+ private activeGeneralSubmission;
1061
1085
  constructor(config: Config);
1062
1086
  /**
1063
1087
  * Starts the form initialization process
@@ -1106,6 +1130,8 @@ export declare class OpenPayForm {
1106
1130
  * Alias for submitCard
1107
1131
  */
1108
1132
  submit: (params?: CCSubmitParams) => Promise<void>;
1133
+ private isStripeBnplRedirectSubmission;
1134
+ private abortStripeBnplFlows;
1109
1135
  destroy: () => void;
1110
1136
  /**
1111
1137
  * Updates form callbacks after initialization
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as p, F as r, O as i, l as s } from "./index-BmfwKlzi.js";
1
+ import { E as p, F as r, O as i, l as s } from "./index-BE5ODQB4.js";
2
2
  import "penpal";
3
3
  import "uuid";
4
4
  import "zod";