@getopenpay/openpay-js 0.3.13-alpha.bdbda7a → 0.3.14-alpha.7c935e9

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,7 +1,7 @@
1
- import { R as l } from "./Resource-CgRaouhX.js";
2
- import { d as ee } from "./Resource-CgRaouhX.js";
3
- import { d as v } from "./diag-api-DPPZfEq3.js";
4
- import { e as A, f as m, g as b, h as w, S as D } from "./sdk-info-DZP6h9hw.js";
1
+ import { R as l } from "./Resource-BRYzUqve.js";
2
+ import { d as ee } from "./Resource-BRYzUqve.js";
3
+ import { d as v } from "./diag-api-_xbEFcQo.js";
4
+ import { e as A, f as m, g as b, h as w, S as D } from "./sdk-info-BKkfy_B_.js";
5
5
  var T = (
6
6
  /** @class */
7
7
  function() {
@@ -1,7 +1,7 @@
1
- import { R as u } from "./index-DyStz6kE.js";
2
- import { B as c } from "./SimpleSpanProcessor-CyajYl2K.js";
3
- import { A as g, b as x, a as S, C as b, F as w, I as P, N as C, P as T, R as O, d as M, S as A, e as E, c as R, T as N } from "./SimpleSpanProcessor-CyajYl2K.js";
4
- import { P as F, a as j, b as k, g as I, c as W, h as U, n as X, p as z, s as D, d as G } from "./utils-BzYKzge6.js";
1
+ import { R as u } from "./index-DfP3YYx1.js";
2
+ import { B as c } from "./SimpleSpanProcessor-CdfYCCJi.js";
3
+ import { A as g, b as x, a as S, C as b, F as w, I as P, N as C, P as T, R as O, d as M, S as A, e as E, c as R, T as N } from "./SimpleSpanProcessor-CdfYCCJi.js";
4
+ import { P as F, a as j, b as k, g as I, c as W, h as U, n as X, p as z, s as D, d as G } from "./utils-CJptw95A.js";
5
5
  var l = function(n, r) {
6
6
  var e = typeof Symbol == "function" && n[Symbol.iterator];
7
7
  if (!e) return n;
@@ -1,4 +1,4 @@
1
- import { b as I, t as l, i as D, T as o, d as T, e as b } from "./index-DyStz6kE.js";
1
+ import { b as I, t as l, i as D, T as o, d as T, e as b } from "./index-DfP3YYx1.js";
2
2
  var C = I("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
3
3
  function A(r) {
4
4
  return r.getValue(C) === !0;
@@ -1,8 +1,8 @@
1
- import { z as de, p as T, r as _e, w as ye, j as ve, n as he, y as me, dJ as ge, h as Se, dK as Ae, l as Ee, q as Te, i as Pe, m as Re, o as Oe, t as be, u as Ce } from "./url-BBt3GZd9.js";
2
- import { b as k, t as O, i as Y, T as b, d as Ie, c as B } from "./index-DyStz6kE.js";
3
- import { d as _ } from "./diag-api-DPPZfEq3.js";
1
+ import { z as de, p as T, r as _e, w as ye, j as ve, n as he, y as me, dJ as ge, h as Se, dK as Ae, l as Ee, q as Te, i as Pe, m as Re, o as Oe, t as be, u as Ce } from "./url-DMJTnK7v.js";
2
+ import { b as k, t as O, i as Y, T as b, d as Ie, c as B } from "./index-DfP3YYx1.js";
3
+ import { d as _ } from "./diag-api-_xbEFcQo.js";
4
4
  import { h as X, E as je } from "./ExportResult-Bo1QOwfo.js";
5
- import { D as Me, j as Ne, br as we, bs as De, bt as Le, b as xe, T as Ge, bu as Be, h as Ve, i as Ue, bv as He } from "./sdk-info-DZP6h9hw.js";
5
+ import { D as Me, j as Ne, br as we, bs as De, bt as Le, b as xe, T as Ge, bu as Be, h as Ve, i as Ue, bv as He } from "./sdk-info-BKkfy_B_.js";
6
6
  import { _ as Ke } from "./utils-BGeftTvk.js";
7
7
  var p;
8
8
  (function(e) {
package/dist/index.d.ts CHANGED
@@ -543,6 +543,7 @@ declare type LoopCryptoFlowCustomParams =
543
543
  declare type LoopCryptoWidgetProps = {
544
544
  paymentUsdAmount: number;
545
545
  suggestedAuthorizationUsdAmount: number;
546
+ minAuthorizationUsdAmount: number;
546
547
  subscriptionRefId?: string;
547
548
  customerRefId?: string;
548
549
  invoiceRefId?: string;
@@ -690,6 +691,17 @@ declare const OjsFlows = {
690
691
  init: initAuthnetGooglePayFlow,
691
692
  run: runAuthnetGooglePayFlow,
692
693
  },
694
+
695
+ adyenGooglePay: {
696
+ init: initAdyenGooglePayFlow,
697
+ run: runAdyenGooglePayFlow,
698
+ },
699
+
700
+ adyenApplePay: {
701
+ init: initAdyenApplePayFlow,
702
+ run: runAdyenApplePayFlow,
703
+ },
704
+
693
705
  // 👉 Add more flows here
694
706
 
695
707
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -767,6 +779,14 @@ export declare class OpenPayForm {
767
779
  publisher: LoadedOncePublisher<InitApplePayFlowResult>;
768
780
  initialize: (initParams: InitOjsFlowParams) => Promise<void>;
769
781
  };
782
+ readonly adyenGooglePay: {
783
+ publisher: LoadedOncePublisher<InitGooglePayFlowResult>;
784
+ initialize: (initParams: InitOjsFlowParams) => Promise<void>;
785
+ };
786
+ readonly adyenApplePay: {
787
+ publisher: LoadedOncePublisher<InitApplePayFlowResult>;
788
+ initialize: (initParams: InitOjsFlowParams) => Promise<void>;
789
+ };
770
790
  };
771
791
  private deviceToken;
772
792
  private isSubmitting;
@@ -803,18 +823,6 @@ export declare class OpenPayForm {
803
823
  private checkValidFormInstance;
804
824
  getAvailablePaymentMethods: () => Promise<({
805
825
  name: string;
806
- } | {
807
- processor: PaymentProcessor;
808
- isAvailable: boolean;
809
- isLoading: boolean;
810
- startFlow: (customParams?: ApplePayFlowCustomParams) => Promise<void>;
811
- name: string;
812
- } | {
813
- processor: PaymentProcessor;
814
- isAvailable: boolean;
815
- isLoading: boolean;
816
- startFlow: (customParams?: GooglePayFlowCustomParams) => Promise<void>;
817
- name: string;
818
826
  } | {
819
827
  isAvailable: true;
820
828
  widgetProps: LoopCryptoWidgetProps;
@@ -823,6 +831,12 @@ export declare class OpenPayForm {
823
831
  } | {
824
832
  isAvailable: false;
825
833
  name: string;
834
+ } | {
835
+ processor: PaymentProcessor;
836
+ isAvailable: boolean;
837
+ isLoading: boolean;
838
+ startFlow: (customParams?: ApplePayFlowCustomParams) => Promise<void>;
839
+ name: string;
826
840
  } | {
827
841
  processor: "stripe";
828
842
  isAvailable: true;
@@ -842,6 +856,12 @@ export declare class OpenPayForm {
842
856
  isAvailable: boolean;
843
857
  startFlow: () => Promise<void>;
844
858
  name: string;
859
+ } | {
860
+ processor: PaymentProcessor;
861
+ isAvailable: boolean;
862
+ isLoading: boolean;
863
+ startFlow: (customParams?: GooglePayFlowCustomParams) => Promise<void>;
864
+ name: string;
845
865
  })[]>;
846
866
  generalSubmit: <T extends SubmitMethod>(method: T, settings?: SubmitSettings<T>) => Promise<void>;
847
867
  /**
@@ -861,10 +881,13 @@ export declare class OpenPayForm {
861
881
  declare interface PayInCompleteEvent extends PayinResponse {}
862
882
 
863
883
  declare enum PayInFailed {
884
+ // Create payment method
885
+ METHOD_CREATION_FAILED = 'methodCreationFailed',
864
886
  INSUFFICIENT_BALANCE = 'insufficientBalance',
865
887
  INSUFFICIENT_AUTHORIZATION = 'insufficientAuthorization',
866
888
  SIGNED_MESSAGE_REQUIRED = 'signedMessageRequired',
867
889
  CUSTOMER_CREATION_FAILED = 'customerCreationFailed',
890
+ // Create pay-in
868
891
  PAYMENT_FAILED = 'paymentFailed',
869
892
  TRANSACTION_FAILED = 'transactionFailed',
870
893
  }
@@ -1073,7 +1096,7 @@ declare interface PaymentMethodTokenExchangeRate {
1073
1096
  timestamp: number;
1074
1097
  }
1075
1098
 
1076
- declare const PaymentProcessor = z.enum(['stripe', 'airwallex', 'authorize_net']);
1099
+ declare const PaymentProcessor = z.enum(['stripe', 'airwallex', 'authorize_net', 'adyen']);
1077
1100
 
1078
1101
  declare type PaymentProcessor = z.infer<typeof PaymentProcessor>;
1079
1102
 
@@ -1140,6 +1163,8 @@ declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMeth
1140
1163
  'airwallex-apple-pay': ApplePayFlowCustomParams;
1141
1164
  'authorizenet-google-pay': GooglePayFlowCustomParams;
1142
1165
  'authorizenet-apple-pay': ApplePayFlowCustomParams;
1166
+ 'adyen-google-pay': GooglePayFlowCustomParams;
1167
+ 'adyen-apple-pay': ApplePayFlowCustomParams;
1143
1168
  'loop-crypto': LoopCryptoFlowCustomParams;
1144
1169
  paypal: PaypalFlowCustomParams;
1145
1170
  }[T];
@@ -1172,6 +1197,8 @@ export declare enum SubmitMethods {
1172
1197
  airwallexApplePay = 'airwallex-apple-pay',
1173
1198
  authorizenetGooglePay = 'authorizenet-google-pay',
1174
1199
  authorizenetApplePay = 'authorizenet-apple-pay',
1200
+ adyenGooglePay = 'adyen-google-pay',
1201
+ adyenApplePay = 'adyen-apple-pay',
1175
1202
  loopCrypto = 'loop-crypto',
1176
1203
  paypal = 'paypal',
1177
1204
  }
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as e, O as i, l as r, m as s } from "./index-DyStz6kE.js";
1
+ import { F as e, O as i, l as r, m as s } from "./index-DfP3YYx1.js";
2
2
  import "penpal";
3
3
  import "uuid";
4
4
  export {