@rebilly/framepay 5.198.4 → 5.199.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +11 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -15,6 +15,16 @@ export declare class ApplePay extends PaymentMethod {
15
15
  #private;
16
16
  ApplePayMarkIcon: string;
17
17
  constructor(framepayInstance: FramePay, applePayValidationRequest: DigitalWalletValidationRequest);
18
+ /**
19
+ * Whether a button mounted now would be displayed.
20
+ * Call after Framepay.initialize(). Waits until FramePay is ready.
21
+ * Resolves true only when ready-to-pay offers Apple Pay for this
22
+ * transaction and this device can use it. Rejects with not-initialized
23
+ * when FramePay is not initialized, including after an initialization
24
+ * error. Otherwise never rejects: a global error before ready, or the
25
+ * Apple SDK check timing out, resolves false.
26
+ */
27
+ isAvailable(): Promise<boolean>;
18
28
  mount(target: HTMLElement | string): ApplePayElement;
19
29
  }
20
30
 
@@ -37,6 +47,7 @@ export declare type ApplePayElementBusOn = <T extends keyof ApplePayElementEvent
37
47
 
38
48
  export declare interface ApplePayElementEventMap {
39
49
  ready: [];
50
+ error: [FramepayError];
40
51
  }
41
52
 
42
53
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebilly/framepay",
3
- "version": "5.198.4",
3
+ "version": "5.199.0",
4
4
  "description": "A wrapper to load Rebilly's FramePay library and provide TypeScript types",
5
5
  "type": "module",
6
6
  "license": "MIT",