@getopenpay/openpay-js 0.5.14 → 0.5.16

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.
Files changed (47) hide show
  1. package/dist/{ExportResult-B-YLKMaU.js → ExportResult-BacsqwKA.js} +1 -1
  2. package/dist/{Resource-qJjZ52YV.js → Resource-CUhg8dEK.js} +6 -6
  3. package/dist/SimpleSpanProcessor-BtNzab2_.js +910 -0
  4. package/dist/_commonjsHelpers-CdLE1o9f.js +30 -0
  5. package/dist/detect-resources-6fNItMfQ.js +862 -0
  6. package/dist/{diag-api-CCLNzlUs.js → diag-api-BaoBTidT.js} +2 -2
  7. package/dist/index-2Dpi7rDE.js +127 -0
  8. package/dist/index-BkFKN09r.js +18 -0
  9. package/dist/index-BohOdvI5.js +6718 -0
  10. package/dist/index-Cb6WFqJj.js +1012 -0
  11. package/dist/index-CfhP31jP.js +147 -0
  12. package/dist/index-CmjNpx1j.js +1619 -0
  13. package/dist/index-CsjF5pDg.js +6 -0
  14. package/dist/index-Dcezwdcs.js +7000 -0
  15. package/dist/index-DhyFkarT.js +430 -0
  16. package/dist/index-t_WVTb5S.js +28 -0
  17. package/dist/index.d.ts +27 -2
  18. package/dist/index.es.js +2 -2
  19. package/dist/index.umd.js +40 -40
  20. package/dist/lifecycle-D1BdEbZs.js +119 -0
  21. package/dist/{metrics-api-DtBUlvdW.js → metrics-api-CsLzDvjo.js} +28 -28
  22. package/dist/sdk-info-ChuKu8zW.js +285 -0
  23. package/dist/suppress-tracing-Cu47NVB2.js +17 -0
  24. package/dist/url-CgnFZYDI.js +798 -0
  25. package/dist/utils-BJ1UAbM8.js +101 -0
  26. package/dist/utils-De78ey-v.js +12 -0
  27. package/dist/utils-Dius2V8g.js +270 -0
  28. package/package.json +4 -4
  29. package/dist/SimpleSpanProcessor-BwonVfHA.js +0 -957
  30. package/dist/_commonjsHelpers-f76XedMs.js +0 -25
  31. package/dist/detect-resources-Bi3A_QRE.js +0 -854
  32. package/dist/index-BIZrcIxl.js +0 -19
  33. package/dist/index-Bs_K1BID.js +0 -431
  34. package/dist/index-CRez6biP.js +0 -150
  35. package/dist/index-Cmp0890G.js +0 -1599
  36. package/dist/index-DCgcMBKE.js +0 -52
  37. package/dist/index-DDPV-DRN.js +0 -7040
  38. package/dist/index-SVnUIdm3.js +0 -130
  39. package/dist/index-UHBeywOG.js +0 -330
  40. package/dist/index-sp5MCjj0.js +0 -6685
  41. package/dist/index-wETKGbBW.js +0 -830
  42. package/dist/lifecycle-BjQ-7GLm.js +0 -119
  43. package/dist/sdk-info-Ved2vK62.js +0 -484
  44. package/dist/url-C-ZmHCbX.js +0 -797
  45. package/dist/utils-CX5YT7yI.js +0 -14
  46. package/dist/utils-DwFEBfnB.js +0 -142
  47. package/dist/utils-wV4fOQ_R.js +0 -381
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /// <reference types="googlepay" />
3
3
 
4
4
  import { PaymentRequest as PaymentRequest_2 } from '@stripe/stripe-js';
5
+ import { StripeLinkAuthenticationElement } from '@stripe/stripe-js';
5
6
  import { Subject } from 'rxjs';
6
7
  import { z } from 'zod';
7
8
 
@@ -241,6 +242,22 @@ declare type CustomInitParams = {
241
242
  * If this value is true, the stripe link is not mounted on init, and should instead be manually mounted.
242
243
  */
243
244
  doNotMountOnInit?: boolean;
245
+
246
+ /**
247
+ * If this value is true, the link authentication element is checked for login status silently.
248
+ *
249
+ * ⚠️ [**Warning**]: This is a workaround for checking Link authentication status without user gesture.
250
+ * Stripe don't expose API for this and it's recommended to mount the `linkAuthenticationElement` manually and check the authentication status via `.on('change')`
251
+ * You can mount the `linkAuthenticationElement` manually by calling `stripeLink.mountLinkAuthenticationElement(selector)`
252
+ */
253
+ silentlyCheckAuthentication?: boolean;
254
+ /**
255
+ * This callback is called when the authentication status changes when `silentlyCheckAuthentication` is true,
256
+ *
257
+ * ⚠️ [**Warning**]: This is a workaround for checking authentication status without user gesture.
258
+ * This is working with current version of Stripe element (v3). This is not guaranteed to work with future versions of Stripe element.
259
+ */
260
+ onAuthenticationStatusChange?: (isAuthenticated: boolean) => void;
244
261
  };
245
262
 
246
263
  googlePay?: {
@@ -958,6 +975,7 @@ export declare class OpenPayForm {
958
975
  name: SubmitMethods;
959
976
  processors: PaymentProcessor[];
960
977
  isAvailable: boolean;
978
+ controller?: unknown;
961
979
  }[]>;
962
980
  /**
963
981
  * @deprecated
@@ -1125,6 +1143,7 @@ declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMeth
1125
1143
  [SubmitMethods.googlePay]: GooglePayFlowCustomParams;
1126
1144
  [SubmitMethods.loopCrypto]: LoopCryptoFlowCustomParams;
1127
1145
  [SubmitMethods.paypal]: PaypalFlowCustomParams;
1146
+ [SubmitMethods.stripeLink]: unknown;
1128
1147
  // TODO: The following methods are deprecated and will be removed in the future.
1129
1148
  // Use googlePay/applePay instead
1130
1149
  [SubmitMethods.airwallexGooglePay]: GooglePayFlowCustomParams;
@@ -1152,10 +1171,11 @@ declare type RunOjsFlow<T_PARAMS = undefined, T_INIT_RESULT = undefined> = (
1152
1171
  params: OjsFlowParams<T_PARAMS, T_INIT_RESULT>
1153
1172
  ) => Promise<void>;
1154
1173
 
1155
- declare type StripeLinkController = {
1156
- mountButton: () => void;
1174
+ export declare type StripeLinkController = {
1175
+ mountButton: (selector?: string) => void;
1157
1176
  dismountButton: () => void;
1158
1177
  waitForButtonToMount: () => Promise<HTMLElement>;
1178
+ mountLinkAuthenticationElement: (selector: string) => StripeLinkAuthenticationElement;
1159
1179
  };
1160
1180
 
1161
1181
  declare const SubmitMethod = z.nativeEnum(SubmitMethods);
@@ -1169,6 +1189,11 @@ export declare enum SubmitMethods {
1169
1189
  googlePay = 'google-pay',
1170
1190
  loopCrypto = 'loop-crypto',
1171
1191
  paypal = 'paypal',
1192
+ /**
1193
+ * This submit method only for Available payment methods.
1194
+ * Manual submission for StripeLink is not available
1195
+ */
1196
+ stripeLink = 'stripe-link',
1172
1197
  // TODO: The following methods are deprecated and will be removed in the future.
1173
1198
  /**
1174
1199
  * @deprecated Use googlePay instead
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-DDPV-DRN.js";
1
+ import { E as p, F as r, O as i, l as s } from "./index-Dcezwdcs.js";
2
2
  import "penpal";
3
3
  import "uuid";
4
4
  import "zod";
@@ -8,4 +8,4 @@ export {
8
8
  i as OpenPayForm,
9
9
  s as SubmitMethods
10
10
  };
11
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiaW5kZXguZXMuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImV4cG9ydCB7IEUgYXMgRWxlbWVudFR5cGVFbnVtLCBGIGFzIEZpZWxkTmFtZSwgTyBhcyBPcGVuUGF5Rm9ybSwgbCBhcyBTdWJtaXRNZXRob2RzIH0gZnJvbSAnLi9pbmRleC0hfnswMDZ9fi5qcyc7XG5pbXBvcnQgJ3BlbnBhbCc7XG5pbXBvcnQgJ3V1aWQnO1xuaW1wb3J0ICd6b2QnOyJdLAogICJtYXBwaW5ncyI6ICJBQUFBLFNBQWMsS0FBTEEsR0FBMkIsS0FBTEMsR0FBcUIsS0FBTEMsR0FBdUIsS0FBTEMsU0FBMEI7QUFDM0YsT0FBTztBQUNQLE9BQU87QUFDUCxPQUFPOyIsCiAgIm5hbWVzIjogWyJFIiwgIkYiLCAiTyIsICJsIl0KfQo=
11
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiaW5kZXguZXMuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImV4cG9ydCB7IEUgYXMgRWxlbWVudFR5cGVFbnVtLCBGIGFzIEZpZWxkTmFtZSwgTyBhcyBPcGVuUGF5Rm9ybSwgbCBhcyBTdWJtaXRNZXRob2RzIH0gZnJvbSAnLi9pbmRleC0hfnswMDl9fi5qcyc7XG5pbXBvcnQgJ3BlbnBhbCc7XG5pbXBvcnQgJ3V1aWQnO1xuaW1wb3J0ICd6b2QnOyJdLAogICJtYXBwaW5ncyI6ICJBQUFBLFNBQWMsS0FBTEEsR0FBMkIsS0FBTEMsR0FBcUIsS0FBTEMsR0FBdUIsS0FBTEMsU0FBMEI7QUFDM0YsT0FBTztBQUNQLE9BQU87QUFDUCxPQUFPOyIsCiAgIm5hbWVzIjogWyJFIiwgIkYiLCAiTyIsICJsIl0KfQo=