@getopenpay/openpay-js 0.5.18 → 0.5.19

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,4 +1,4 @@
1
- import { R as qe } from "./index-CwJSDd4w.js";
1
+ import { R as qe } from "./index-Dk9vjfYt.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
@@ -6,6 +6,16 @@ import { StripeLinkAuthenticationElement } from '@stripe/stripe-js';
6
6
  import { Subject } from 'rxjs';
7
7
  import { z } from 'zod';
8
8
 
9
+ declare type AffirmFlowCustomParams = {
10
+ processor?: PaymentProcessor;
11
+ useRedirectFlow?: boolean;
12
+ };
13
+
14
+ declare type AfterpayFlowCustomParams = {
15
+ processor?: PaymentProcessor;
16
+ useRedirectFlow?: boolean;
17
+ };
18
+
9
19
  declare type AirwallexACHFlowParams = {
10
20
  verificationMethod?: 'plaid' | 'micro_deposit';
11
21
  defaultFieldValues?: DefaultFieldValues;
@@ -544,6 +554,16 @@ declare type InitOjsFlowResult = {
544
554
  isAvailable: boolean;
545
555
  };
546
556
 
557
+ declare type InitStripeAffirmFlowResult = {
558
+ isAvailable: boolean;
559
+ startFlow: (customParams?: AffirmFlowCustomParams) => Promise<void>;
560
+ };
561
+
562
+ declare type InitStripeAfterpayFlowResult = {
563
+ isAvailable: boolean;
564
+ startFlow: (customParams?: AfterpayFlowCustomParams) => Promise<void>;
565
+ };
566
+
547
567
  declare type InitStripeKlarnaFlowResult = {
548
568
  isAvailable: boolean;
549
569
  startFlow: (customParams?: KlarnaFlowCustomParams) => Promise<void>;
@@ -836,6 +856,14 @@ declare const OjsFlows = {
836
856
  init: initStripeKlarnaFlow,
837
857
  run: runStripeKlarnaFlow,
838
858
  },
859
+ stripeAffirm: {
860
+ init: initStripeAffirmFlow,
861
+ run: runStripeAffirmFlow,
862
+ },
863
+ stripeAfterpay: {
864
+ init: initStripeAfterpayFlow,
865
+ run: runStripeAfterpayFlow,
866
+ },
839
867
 
840
868
  // Pockyt
841
869
  pockytPaypal: {
@@ -966,6 +994,14 @@ export declare class OpenPayForm {
966
994
  publisher: LoadedOncePublisher<InitStripeKlarnaFlowResult>;
967
995
  initialize: (initParams: InitOjsFlowParams) => Promise<void>;
968
996
  };
997
+ readonly stripeAffirm: {
998
+ publisher: LoadedOncePublisher<InitStripeAffirmFlowResult>;
999
+ initialize: (initParams: InitOjsFlowParams) => Promise<void>;
1000
+ };
1001
+ readonly stripeAfterpay: {
1002
+ publisher: LoadedOncePublisher<InitStripeAfterpayFlowResult>;
1003
+ initialize: (initParams: InitOjsFlowParams) => Promise<void>;
1004
+ };
969
1005
  readonly airwallexGooglePay: {
970
1006
  publisher: LoadedOncePublisher<InitGooglePayFlowResult>;
971
1007
  initialize: (initParams: InitOjsFlowParams) => Promise<void>;
@@ -1225,6 +1261,8 @@ declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMeth
1225
1261
  [SubmitMethods.loopCrypto]: LoopCryptoFlowCustomParams;
1226
1262
  [SubmitMethods.paypal]: PaypalFlowCustomParams;
1227
1263
  [SubmitMethods.klarna]: KlarnaFlowCustomParams;
1264
+ [SubmitMethods.affirm]: AffirmFlowCustomParams;
1265
+ [SubmitMethods.afterpay]: AfterpayFlowCustomParams;
1228
1266
  [SubmitMethods.stripeLink]: unknown;
1229
1267
  // TODO: The following methods are deprecated and will be removed in the future.
1230
1268
  // Use googlePay/applePay instead
@@ -1272,6 +1310,8 @@ export declare enum SubmitMethods {
1272
1310
  loopCrypto = 'loop-crypto',
1273
1311
  paypal = 'paypal',
1274
1312
  klarna = 'klarna',
1313
+ affirm = 'affirm',
1314
+ afterpay = 'afterpay',
1275
1315
  /**
1276
1316
  * This submit method only for Available payment methods.
1277
1317
  * Manual submission for StripeLink is not available
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-CwJSDd4w.js";
1
+ import { E as p, F as r, O as i, l as s } from "./index-Dk9vjfYt.js";
2
2
  import "penpal";
3
3
  import "uuid";
4
4
  import "zod";