@paydock/client-sdk 1.144.1-beta → 1.147.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 (82) hide show
  1. package/README.md +551 -32
  2. package/bundles/index.cjs +2683 -599
  3. package/bundles/index.cjs.d.ts +322 -21
  4. package/bundles/index.mjs +2683 -600
  5. package/bundles/index.mjs.d.ts +322 -21
  6. package/bundles/types/api/api-base.d.ts +6 -0
  7. package/bundles/types/api/api-base.d.ts.map +1 -1
  8. package/bundles/types/api/api-charge-internal.d.ts +1 -5
  9. package/bundles/types/api/api-charge-internal.d.ts.map +1 -1
  10. package/bundles/types/canvas-3ds/canvas-3ds-event-map.d.ts +50 -0
  11. package/bundles/types/canvas-3ds/canvas-3ds-event-map.d.ts.map +1 -1
  12. package/bundles/types/canvas-3ds/canvas-3ds.d.ts +7 -5
  13. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -1
  14. package/bundles/types/canvas-3ds/index.d.ts +1 -1
  15. package/bundles/types/canvas-3ds/index.d.ts.map +1 -1
  16. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +117 -2
  17. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
  18. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts +6 -0
  19. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -1
  20. package/bundles/types/components/iframe-event.d.ts +4 -3
  21. package/bundles/types/components/iframe-event.d.ts.map +1 -1
  22. package/bundles/types/components/iframe.d.ts +5 -0
  23. package/bundles/types/components/iframe.d.ts.map +1 -1
  24. package/bundles/types/components/param.d.ts +19 -0
  25. package/bundles/types/components/param.d.ts.map +1 -1
  26. package/bundles/types/helper/browser.d.ts.map +1 -1
  27. package/bundles/types/helper/element-id.d.ts +3 -1
  28. package/bundles/types/helper/element-id.d.ts.map +1 -1
  29. package/bundles/types/helper/uuid.d.ts.map +1 -1
  30. package/bundles/types/index-cba.d.ts +1 -1
  31. package/bundles/types/index-cba.d.ts.map +1 -1
  32. package/bundles/types/index.d.ts +2 -2
  33. package/bundles/types/index.d.ts.map +1 -1
  34. package/bundles/types/open-wallets/apple-pay-open-wallet-button.d.ts +41 -0
  35. package/bundles/types/open-wallets/apple-pay-open-wallet-button.d.ts.map +1 -1
  36. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts +10 -0
  37. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts.map +1 -1
  38. package/bundles/types/open-wallets/base/service-config-cache.d.ts +23 -0
  39. package/bundles/types/open-wallets/base/service-config-cache.d.ts.map +1 -0
  40. package/bundles/types/open-wallets/google-pay-open-wallet-button.d.ts +33 -1
  41. package/bundles/types/open-wallets/google-pay-open-wallet-button.d.ts.map +1 -1
  42. package/bundles/types/open-wallets/index.d.ts +82 -1
  43. package/bundles/types/open-wallets/index.d.ts.map +1 -1
  44. package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-availability.interface.d.ts +41 -0
  45. package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-availability.interface.d.ts.map +1 -0
  46. package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts +1 -0
  47. package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts.map +1 -1
  48. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-availability.interface.d.ts +25 -0
  49. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-availability.interface.d.ts.map +1 -0
  50. package/bundles/types/open-wallets/interfaces/google-pay/index.d.ts +1 -0
  51. package/bundles/types/open-wallets/interfaces/google-pay/index.d.ts.map +1 -1
  52. package/bundles/types/open-wallets/interfaces/index.d.ts +3 -0
  53. package/bundles/types/open-wallets/interfaces/index.d.ts.map +1 -1
  54. package/bundles/types/open-wallets/interfaces/open-wallet-availability.interface.d.ts +31 -0
  55. package/bundles/types/open-wallets/interfaces/open-wallet-availability.interface.d.ts.map +1 -0
  56. package/bundles/types/open-wallets/services/apple-pay/apple-pay-availability.d.ts +58 -0
  57. package/bundles/types/open-wallets/services/apple-pay/apple-pay-availability.d.ts.map +1 -0
  58. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts +8 -10
  59. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map +1 -1
  60. package/bundles/types/open-wallets/services/apple-pay/index.d.ts +1 -0
  61. package/bundles/types/open-wallets/services/apple-pay/index.d.ts.map +1 -1
  62. package/bundles/types/open-wallets/services/google-pay/google-pay-availability.d.ts +53 -0
  63. package/bundles/types/open-wallets/services/google-pay/google-pay-availability.d.ts.map +1 -0
  64. package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts.map +1 -1
  65. package/bundles/types/open-wallets/services/google-pay/index.d.ts +1 -0
  66. package/bundles/types/open-wallets/services/google-pay/index.d.ts.map +1 -1
  67. package/bundles/types/widget/multi-widget.d.ts +19 -0
  68. package/bundles/types/widget/multi-widget.d.ts.map +1 -1
  69. package/bundles/widget.umd.js +2683 -599
  70. package/bundles/widget.umd.js.d.ts +322 -21
  71. package/bundles/widget.umd.js.min.d.ts +322 -21
  72. package/bundles/widget.umd.min.js +1 -1
  73. package/docs/api-canvas3ds.md +10 -8
  74. package/docs/api-checkout-button.md +15 -0
  75. package/docs/api-ps-widget.md +15 -0
  76. package/docs/api-widget.md +15 -0
  77. package/docs/canvas3ds-examples.md +43 -1
  78. package/docs/open-wallet-buttons-examples.md +170 -2
  79. package/docs/open-wallet-buttons.md +252 -29
  80. package/docs/widget-examples.md +41 -0
  81. package/package.json +20 -11
  82. package/slate.md +254 -3
@@ -1,7 +1,7 @@
1
1
  import { type GetConfigResponse } from '../api/api-service-internal';
2
2
  import type { OpenWalletService } from './base/open-wallet.service';
3
3
  import { OpenWalletButtons } from './base/open-wallet-buttons';
4
- import type { GooglePayOpenWalletMeta } from './interfaces/google-pay';
4
+ import type { GooglePayAvailabilityOptions, GooglePayAvailabilityResult, GooglePayOpenWalletMeta } from './interfaces/google-pay';
5
5
  import type { WalletType } from './types';
6
6
  /**
7
7
  * @classdesc Google Pay wallet button that creates One-Time Tokens (OTT) via Google Pay.
@@ -39,6 +39,38 @@ import type { WalletType } from './types';
39
39
  export declare class GooglePayOpenWalletButton extends OpenWalletButtons<GooglePayOpenWalletMeta> {
40
40
  /** @private */
41
41
  readonly walletType: WalletType;
42
+ /**
43
+ * Checks Google Pay availability **without instantiating the button** — the static
44
+ * availability entry point.
45
+ *
46
+ * Loads the Google Pay JS SDK if needed, then runs `PaymentsClient.isReadyToPay()` using
47
+ * the **default** card configuration (a button instance with a custom `card_config` may
48
+ * produce a different result). All options are optional — unlike Apple Pay, Google Pay's
49
+ * readiness check does not require a merchant identifier; supplying `service_id` +
50
+ * `public_key_or_access_token` additionally validates that the service is a Google Pay service.
51
+ *
52
+ * Pass `{ sync: true }` for a cheap, network-free check that only reports whether the
53
+ * Google Pay JS API is already present (see {@link GooglePayAvailabilityOptions.sync}).
54
+ *
55
+ * @param {GooglePayAvailabilityOptions} [options] - Optional merchant context and mode.
56
+ * @returns {Promise<GooglePayAvailabilityResult>} The availability result.
57
+ *
58
+ * @example
59
+ * // Simplest form — no merchant context needed:
60
+ * const result = await GooglePayOpenWalletButton.checkAvailability();
61
+ * if (result.available) {
62
+ * // Render the Google Pay button.
63
+ * }
64
+ *
65
+ * @example
66
+ * // Validate the service is a Google Pay service while checking:
67
+ * const result = await GooglePayOpenWalletButton.checkAvailability({
68
+ * public_key_or_access_token,
69
+ * service_id,
70
+ * env: 'sandbox',
71
+ * });
72
+ */
73
+ static checkAvailability(options?: GooglePayAvailabilityOptions): Promise<GooglePayAvailabilityResult>;
42
74
  /**
43
75
  * Validates Google Pay-specific required metadata fields.
44
76
  * Google Pay has no additional required fields beyond the base (amount, currency, country).
@@ -1 +1 @@
1
- {"version":3,"file":"google-pay-open-wallet-button.d.ts","sourceRoot":"","sources":["../../src/open-wallets/google-pay-open-wallet-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAi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;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;WACiB,iBAAiB,CACnC,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,2BAA2B,CAAC;IAqDvC;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAMpC;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,aAAa,EAAE,iBAAiB,GAAG,IAAI;IASrE;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,aAAa,EAAE,iBAAiB,GAAG,iBAAiB;CAUnF"}
@@ -26,7 +26,7 @@ export { WALLET_TYPES } from './types/wallet-type.type';
26
26
  * @param {IApplePayShippingOption[]} [shipping_options] - Array of available shipping options. The first item is used as the default selected option. Requires `request_shipping` to be `true`.
27
27
  * @param {boolean} [show_billing_address] - Show billing address fields in the Apple Pay sheet.
28
28
  * @param {string} store_name - The merchant's store name displayed during payment.
29
- * @param {Array<'credentials_available' | 'credentials_status_unknown' | 'credentials_unavailable'>} [apple_pay_capabilities] - Device capabilities needed for the wallet button to be available.
29
+ * @param {Array<'credentials_available' | 'credentials_status_unknown' | 'credentials_unavailable'>} [apple_pay_capabilities] - Device credential statuses that make the button render. Defaults to `['credentials_available', 'credentials_status_unknown']`: `credentials_available` means the device has a confirmed Apple Pay card ready to use; `credentials_status_unknown` means a local card can't be confirmed but Apple Pay can still proceed (e.g. the cross-device QR flow used by Chrome, Edge and Firefox). Narrow to `['credentials_available']` to require a confirmed local card.
30
30
  * @param {Array<'supports3DS' | 'supportsEMV' | 'supportsCredit' | 'supportsDebit'>} [merchant_capabilities] - Array of merchant capabilities influencing the transaction processing features available.
31
31
  * @param {Array<'visa' | 'masterCard' | 'amex' | 'chinaUnionPay' | 'discover' | 'interac' | 'jcb' | 'privateLabel'>} [supported_networks] - List of payment networks supported for Apple Pay transactions.
32
32
  * @param {Array<'email' | 'name' | 'phone' | 'postalAddress'>} [required_billing_contact_fields] - Contact fields required from the user for billing purposes. Phone and email are currently not returned by Apple.
@@ -57,6 +57,87 @@ export { WALLET_TYPES } from './types/wallet-type.type';
57
57
  * @param {GooglePayButtonColor} [style.button_color] - The color of the Google Pay button (`'default'`, `'black'`, `'white'`).
58
58
  * @param {GooglePayButtonSizeMode} [style.button_size_mode] - The size mode (`'static'`, `'fill'`).
59
59
  **/
60
+ /**
61
+ * Base options shared by every wallet's static availability check
62
+ * (e.g. {@link ApplePayOpenWalletButton}.checkAvailability). Wallet-specific option
63
+ * interfaces (such as {@link ApplePayAvailabilityOptions}) extend this.
64
+ *
65
+ * @interface OpenWalletAvailabilityOptions
66
+ *
67
+ * @type {object}
68
+ * @param {string} [public_key_or_access_token] - Public key or access token used to fetch the service config when needed.
69
+ * @param {string} [service_id] - Service ID — used with `public_key_or_access_token` to resolve the wallet configuration.
70
+ * @param {string} [env] - Environment for the config fetch (e.g. `'sandbox'`). Defaults to the SDK default.
71
+ * @param {boolean} [sync] - When `true`, performs only the cheap, network-free synchronous check and resolves immediately — no config fetch, SDK load, or remote capability query.
72
+ **/
73
+ /**
74
+ * Base result shared by every wallet's static availability check. Wallet-specific
75
+ * result interfaces (such as {@link ApplePayAvailabilityResult}) extend this.
76
+ *
77
+ * @interface OpenWalletAvailabilityResult
78
+ *
79
+ * @type {object}
80
+ * @param {boolean} available - Convenience verdict: the wallet is usable for a payment in the current context.
81
+ * @param {boolean} supported - Whether the wallet is supported here at all (may be available via a fallback flow).
82
+ * @param {string} [reason] - Machine-readable reason when not available.
83
+ **/
84
+ /**
85
+ * Options for `ApplePayOpenWalletButton.checkAvailability`. Extends
86
+ * {@link OpenWalletAvailabilityOptions}. Provide `merchant_id` directly to skip the network
87
+ * call, **or** provide `public_key_or_access_token` + `service_id` to resolve the merchant
88
+ * identifier from the service configuration.
89
+ *
90
+ * @interface ApplePayAvailabilityOptions
91
+ * @extends OpenWalletAvailabilityOptions
92
+ *
93
+ * @type {object}
94
+ * @param {string} [merchant_id] - Apple merchant identifier. Provide this OR (`public_key_or_access_token` + `service_id`).
95
+ * @param {Array<'credentials_available' | 'credentials_status_unknown' | 'credentials_unavailable'>} [apple_pay_capabilities] - Device credential statuses that count as available. Defaults to `['credentials_available', 'credentials_status_unknown']` — `credentials_status_unknown` is what third-party / cross-device (QR) browsers report, so the default keeps Apple Pay visible outside Safari.
96
+ * @param {boolean} [sync] - When `true`, runs only the synchronous native same-device check (`window.ApplePaySession` + `canMakePayments()`) and resolves immediately — no merchant resolution, SDK load, or `applePayCapabilities()` query. In this mode `available` reflects the native session only and `payment_credential_status` is `undefined`; it is **not** authoritative for cross-browser / QR availability.
97
+ **/
98
+ /**
99
+ * Result of `ApplePayOpenWalletButton.checkAvailability`. Extends
100
+ * {@link OpenWalletAvailabilityResult}.
101
+ *
102
+ * Infer the transport (Apple does not expose it directly): `available && has_native_session`
103
+ * ⇒ native sheet likely; `available && !has_native_session` ⇒ cross-device / QR handoff likely.
104
+ *
105
+ * @interface ApplePayAvailabilityResult
106
+ * @extends OpenWalletAvailabilityResult
107
+ *
108
+ * @type {object}
109
+ * @param {boolean} available - Whether the device credential status is within the allowed capability set.
110
+ * @param {boolean} supported - Whether Apple Pay is usable here at all (incl. the cross-device QR flow). Derived from `payment_credential_status` (anything other than `applePayUnsupported`); falls back to the native `canMakePayments()` signal when the capabilities query could not run.
111
+ * @param {boolean} has_native_session - Whether a native, same-device Apple Pay session is present right now (`ApplePaySession` exists and `canMakePayments()` is `true`).
112
+ * @param {'paymentCredentialsAvailable' | 'paymentCredentialStatusUnknown' | 'paymentCredentialsUnavailable' | 'applePayUnsupported'} [payment_credential_status] - The raw device-reported credential status. Undefined when unsupported or not queried.
113
+ * @param {string} [reason] - Machine-readable reason when not available: `'unsupported_browser'`, `'missing_merchant_id'`, `'service_type_mismatch'`, `'config_fetch_failed'`, `'sdk_load_failed'`, `'query_failed'`, `'no_credentials'`, or `'no_native_session'` (only from the synchronous `sync: true` check).
114
+ **/
115
+ /**
116
+ * Options for `GooglePayOpenWalletButton.checkAvailability`. Extends
117
+ * {@link OpenWalletAvailabilityOptions}. All fields are optional — Google Pay's
118
+ * `isReadyToPay` check does not require a merchant identifier. Supplying
119
+ * `public_key_or_access_token` + `service_id` additionally validates the service type.
120
+ *
121
+ * @interface GooglePayAvailabilityOptions
122
+ * @extends OpenWalletAvailabilityOptions
123
+ *
124
+ * @type {object}
125
+ * @param {string} [merchant_id] - Google Pay gateway merchant identifier. Optional; the readiness check runs without it.
126
+ * @param {boolean} [sync] - When `true`, reports only whether the Google Pay JS API is already present in the page (no `isReadyToPay` call). It does **not** run the device/card readiness check.
127
+ **/
128
+ /**
129
+ * Result of `GooglePayOpenWalletButton.checkAvailability`. Extends
130
+ * {@link OpenWalletAvailabilityResult}.
131
+ *
132
+ * @interface GooglePayAvailabilityResult
133
+ * @extends OpenWalletAvailabilityResult
134
+ *
135
+ * @type {object}
136
+ * @param {boolean} available - Whether Google Pay is ready to pay in the current context (from `isReadyToPay().result`).
137
+ * @param {boolean} supported - Whether the Google Pay JS API is present and the readiness query could run.
138
+ * @param {boolean} [payment_method_present] - Google's `isReadyToPay` `paymentMethodPresent` — whether the buyer already has a usable payment method. Undefined when not reported.
139
+ * @param {string} [reason] - Machine-readable reason when not available: `'unsupported_browser'`, `'service_type_mismatch'`, `'config_fetch_failed'`, `'sdk_load_failed'`, `'query_failed'`, `'no_payment_method'`, or `'api_not_loaded'` (only from the synchronous `sync: true` check).
140
+ **/
60
141
  /**
61
142
  * Interface for OnClickEventData.
62
143
  * Emitted when the wallet button is clicked.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/open-wallets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAM1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;A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friendly capability tokens accepted as **input** — the same values used in
4
+ * `ApplePayOpenWalletMeta.apple_pay_capabilities`. They declare which device
5
+ * credential statuses should be treated as "available".
6
+ */
7
+ export type ApplePayCapabilityToken = 'credentials_available' | 'credentials_status_unknown' | 'credentials_unavailable';
8
+ /**
9
+ * Device-reported credential status — the **output** of
10
+ * `ApplePaySession.applePayCapabilities()`.
11
+ */
12
+ export type ApplePayCredentialStatus = 'paymentCredentialsAvailable' | 'paymentCredentialStatusUnknown' | 'paymentCredentialsUnavailable' | 'applePayUnsupported';
13
+ /**
14
+ * Options for `ApplePayOpenWalletButton.checkAvailability`. Provide `merchant_id`
15
+ * directly to skip the network call, **or** provide `public_key_or_access_token` +
16
+ * `service_id` to have the SDK resolve the merchant identifier from the service config.
17
+ */
18
+ export interface ApplePayAvailabilityOptions extends OpenWalletAvailabilityOptions {
19
+ /** Apple merchant identifier. Provide this OR (`public_key_or_access_token` + `service_id`). */
20
+ merchant_id?: string;
21
+ /**
22
+ * Device credential statuses that count as available. Defaults to
23
+ * `['credentials_available', 'credentials_status_unknown']` — `credentials_status_unknown`
24
+ * is what third-party / cross-device (QR) browsers report, so the default keeps Apple Pay
25
+ * visible outside Safari.
26
+ */
27
+ apple_pay_capabilities?: ApplePayCapabilityToken[];
28
+ }
29
+ /** Result of `ApplePayOpenWalletButton.checkAvailability`. */
30
+ export interface ApplePayAvailabilityResult extends OpenWalletAvailabilityResult {
31
+ /**
32
+ * Whether a **native, same-device** Apple Pay session is present right now
33
+ * (`ApplePaySession` exists and `canMakePayments()` is `true`). Apple does not expose
34
+ * the transport directly, so use this to infer it: `available && has_native_session` ⇒
35
+ * native sheet likely; `available && !has_native_session` ⇒ cross-device / QR handoff likely.
36
+ */
37
+ has_native_session: boolean;
38
+ /** The raw device-reported credential status. Undefined when unsupported or not queried. */
39
+ payment_credential_status?: ApplePayCredentialStatus;
40
+ }
41
+ //# sourceMappingURL=apple-pay-availability.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apple-pay-availability.interface.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/interfaces/apple-pay/apple-pay-availability.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,uCAAuC,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAC/B,uBAAuB,GACvB,4BAA4B,GAC5B,yBAAyB,CAAC;AAE9B;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAChC,6BAA6B,GAC7B,gCAAgC,GAChC,+BAA+B,GAC/B,qBAAqB,CAAC;AAE1B;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,6BAA6B;IAChF,gGAAgG;IAChG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACpD;AAED,8DAA8D;AAC9D,MAAM,WAAW,0BAA2B,SAAQ,4BAA4B;IAC9E;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B,4FAA4F;IAC5F,yBAAyB,CAAC,EAAE,wBAAwB,CAAC;CACtD"}
@@ -1,2 +1,3 @@
1
+ export type { ApplePayAvailabilityOptions, ApplePayAvailabilityResult, ApplePayCapabilityToken, ApplePayCredentialStatus, } from './apple-pay-availability.interface';
1
2
  export type { ApplePayLineItem, ApplePayMerchantCapability, ApplePayPaymentContact, ApplePayPaymentRequest, } from './apple-pay-payment-request.interface';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/interfaces/apple-pay/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/interfaces/apple-pay/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,uCAAuC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { OpenWalletAvailabilityOptions, OpenWalletAvailabilityResult } from '../open-wallet-availability.interface';
2
+ /**
3
+ * Options for `GooglePayOpenWalletButton.checkAvailability`. Extends
4
+ * {@link OpenWalletAvailabilityOptions}. All fields are optional — Google Pay's
5
+ * `isReadyToPay` check does not require a merchant identifier. Provide
6
+ * `public_key_or_access_token` + `service_id` to validate that the service is a Google Pay
7
+ * service (and resolve the merchant id), or `merchant_id` directly.
8
+ */
9
+ export interface GooglePayAvailabilityOptions extends OpenWalletAvailabilityOptions {
10
+ /**
11
+ * Google Pay gateway merchant identifier. Optional — `isReadyToPay` does not require it;
12
+ * when omitted the readiness check still runs.
13
+ */
14
+ merchant_id?: string;
15
+ }
16
+ /** Result of `GooglePayOpenWalletButton.checkAvailability`. */
17
+ export interface GooglePayAvailabilityResult extends OpenWalletAvailabilityResult {
18
+ /**
19
+ * Google's `isReadyToPay` `paymentMethodPresent` — whether the buyer already has a
20
+ * payment method usable with Google Pay. `undefined` when not reported (e.g. the
21
+ * synchronous check, or browsers where it is not surfaced).
22
+ */
23
+ payment_method_present?: boolean;
24
+ }
25
+ //# sourceMappingURL=google-pay-availability.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-pay-availability.interface.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/interfaces/google-pay/google-pay-availability.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,uCAAuC,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,WAAW,4BAA6B,SAAQ,6BAA6B;IACjF;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,+DAA+D;AAC/D,MAAM,WAAW,2BAA4B,SAAQ,4BAA4B;IAC/E;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC"}
@@ -1,2 +1,3 @@
1
+ export type { GooglePayAvailabilityOptions, GooglePayAvailabilityResult, } from './google-pay-availability.interface';
1
2
  export type { GooglePayAuthMethod, GooglePayCardConfig, GooglePayCardNetwork, GooglePayOpenWalletMeta, GooglePayOpenWalletMetaStyles, } from './google-pay-meta.interface';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/interfaces/google-pay/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/interfaces/google-pay/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC"}
@@ -1,6 +1,9 @@
1
1
  export type { WalletType } from '../types/wallet-type.type';
2
2
  export { WALLET_TYPES } from '../types/wallet-type.type';
3
+ export type { ApplePayAvailabilityOptions, ApplePayAvailabilityResult, ApplePayCapabilityToken, ApplePayCredentialStatus, } from './apple-pay/apple-pay-availability.interface';
3
4
  export type { OnCancelEventData, OnClickEventData, OnCreateOTTErrorEventData, OnCreateOTTErrorPayload, OnCreateOTTSuccessfulEventData, OnCreateOTTSuccessPayload, OnErrorEventData, OnErrorPayload, OnLoadedEventData, OnUnavailableDetails, OnUnavailableEventData, OnUnavailablePayload, } from './events.interface';
5
+ export type { GooglePayAvailabilityOptions, GooglePayAvailabilityResult, } from './google-pay/google-pay-availability.interface';
6
+ export type { OpenWalletAvailabilityOptions, OpenWalletAvailabilityResult, } from './open-wallet-availability.interface';
4
7
  export type { OpenWalletMeta } from './open-wallet-meta.interface';
5
8
  export type { IOpenWalletProvider } from './payment-source.interface';
6
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,gDAAgD,CAAC;AACxD,YAAY,EACV,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Base options shared by every wallet's static availability check
3
+ * (e.g. `ApplePayOpenWalletButton.checkAvailability`). Wallet-specific option
4
+ * interfaces extend this with their own fields.
5
+ */
6
+ export interface OpenWalletAvailabilityOptions {
7
+ /** Public key or access token used to fetch the service config when needed. */
8
+ public_key_or_access_token?: string;
9
+ /** Service ID — used with `public_key_or_access_token` to resolve the wallet configuration. */
10
+ service_id?: string;
11
+ /** Environment for the config fetch (e.g. `'sandbox'`). Defaults to the SDK default. */
12
+ env?: string;
13
+ /**
14
+ * When `true`, performs only the cheap, network-free synchronous check and resolves
15
+ * immediately — no config fetch, SDK load, or remote capability query.
16
+ */
17
+ sync?: boolean;
18
+ }
19
+ /**
20
+ * Base result shared by every wallet's static availability check. Wallet-specific
21
+ * result interfaces extend this with their own fields.
22
+ */
23
+ export interface OpenWalletAvailabilityResult {
24
+ /** Convenience verdict: the wallet is usable for a payment in the current context. */
25
+ available: boolean;
26
+ /** Whether the wallet is supported here at all (may be available via a fallback flow). */
27
+ supported: boolean;
28
+ /** Machine-readable reason when not available. */
29
+ reason?: string;
30
+ }
31
+ //# sourceMappingURL=open-wallet-availability.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-wallet-availability.interface.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/interfaces/open-wallet-availability.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,+EAA+E;IAC/E,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,sFAAsF;IACtF,SAAS,EAAE,OAAO,CAAC;IACnB,0FAA0F;IAC1F,SAAS,EAAE,OAAO,CAAC;IACnB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,58 @@
1
+ /// <reference types="applepayjs" />
2
+ import type { ApplePayAvailabilityResult, ApplePayCapabilityToken } from '../../interfaces/apple-pay/apple-pay-availability.interface';
3
+ declare global {
4
+ interface Window {
5
+ ApplePaySession: ApplePaySession;
6
+ }
7
+ }
8
+ /** Parameters for {@link evaluateApplePayAvailability}. */
9
+ export interface EvaluateApplePayAvailabilityParams {
10
+ /** Apple merchant identifier required by `ApplePaySession.applePayCapabilities`. */
11
+ merchantId: string;
12
+ /**
13
+ * Statuses that count as available. Defaults to
14
+ * `['credentials_available', 'credentials_status_unknown']` — the `unknown` status
15
+ * is the normal value in third-party / cross-device (QR) browsers, so including it
16
+ * is what makes Apple Pay show up outside Safari.
17
+ */
18
+ apple_pay_capabilities?: ApplePayCapabilityToken[];
19
+ }
20
+ /** CDN location of Apple's web SDK (provides the `<apple-pay-button>` web component). */
21
+ export declare const APPLE_PAY_SDK_URL = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js";
22
+ /**
23
+ * Statuses that count as available when the merchant does not override them.
24
+ * Includes `paymentCredentialStatusUnknown` so the button is shown in third-party /
25
+ * cross-device (QR) browsers, per Apple's guidance.
26
+ */
27
+ export declare const DEFAULT_APPLE_PAY_CAPABILITIES: ApplePayJS.PaymentCredentialStatus[];
28
+ /**
29
+ * Maps the SDK's friendly capability tokens to Apple's `PaymentCredentialStatus` values.
30
+ * Unknown tokens are passed through unchanged.
31
+ */
32
+ export declare function formatCapabilities(capabilities: ApplePayCapabilityToken[] | string[]): ApplePayJS.PaymentCredentialStatus[];
33
+ /**
34
+ * Synchronous, network-free check for a **native, same-device** Apple Pay session
35
+ * (`window.ApplePaySession` exists and `canMakePayments()` is `true`). Safe to call in
36
+ * any environment (never throws).
37
+ *
38
+ * Note: this is a legacy/Safari-oriented signal. It is **not** authoritative for
39
+ * cross-browser / cross-device (QR) availability — in Chrome/Edge/Firefox
40
+ * `window.ApplePaySession` is supplied by the CDN SDK and may be absent until it loads,
41
+ * and the cross-device flow is reflected by `applePayCapabilities()`, not this call.
42
+ * Use {@link evaluateApplePayAvailability} for the authoritative, cross-browser answer.
43
+ */
44
+ export declare function hasNativeApplePaySession(): boolean;
45
+ /**
46
+ * Idempotently loads Apple's web SDK from the CDN.
47
+ * Resolves immediately if the `<apple-pay-button>` custom element is already
48
+ * registered, and de-duplicates concurrent loads. Rejects if the script fails to load.
49
+ */
50
+ export declare function loadApplePaySdk(): Promise<void>;
51
+ /**
52
+ * Core Apple Pay availability evaluation, shared by the instance flow
53
+ * (`ApplePayOpenWalletService`) and the static `ApplePayOpenWalletButton.checkAvailability`.
54
+ *
55
+ * Assumes the Apple Pay SDK is already loaded (call {@link loadApplePaySdk} first).
56
+ */
57
+ export declare function evaluateApplePayAvailability(params: EvaluateApplePayAvailabilityParams): Promise<ApplePayAvailabilityResult>;
58
+ //# sourceMappingURL=apple-pay-availability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apple-pay-availability.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/apple-pay/apple-pay-availability.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,uBAAuB,EAExB,MAAM,6DAA6D,CAAC;AAErE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,eAAe,EAAE,eAAe,CAAC;KAClC;CACF;AAED,2DAA2D;AAC3D,MAAM,WAAW,kCAAkC;IACjD,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACpD;AAED,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,mEACoC,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,UAAU,CAAC,uBAAuB,EAG9E,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,uBAAuB,EAAE,GAAG,MAAM,EAAE,GACjD,UAAU,CAAC,uBAAuB,EAAE,CAUtC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAWlD;AAID;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAwB/C;AAED;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,0BAA0B,CAAC,CAsDrC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="applepayjs" />
2
1
  import type { ApiInternal } from '../../../api/api-internal';
3
2
  import { type GetConfigResponse } from '../../../api/api-service-internal';
4
3
  import type { Container } from '../../../components/container';
@@ -9,11 +8,6 @@ import type { OpenWalletMeta } from '../../interfaces';
9
8
  import type { ApplePayLineItem, ApplePayMerchantCapability, ApplePayPaymentRequest } from '../../interfaces/apple-pay';
10
9
  import type { OpenWalletMetaStyles } from '../../interfaces/open-wallet-meta.interface';
11
10
  import type { ApplePayButtonStyle, ApplePayButtonType } from '../../types/apple-pay';
12
- declare global {
13
- interface Window {
14
- ApplePaySession: ApplePaySession;
15
- }
16
- }
17
11
  /** Styling configuration for the Apple Pay button. */
18
12
  interface ApplePayOpenWalletMetaStyles extends OpenWalletMetaStyles {
19
13
  /** Variant displayed on the button (e.g. `'buy'`, `'donate'`, `'plain'`, `'check-out'`). */
@@ -74,8 +68,14 @@ export interface ApplePayOpenWalletMeta extends OpenWalletMeta, Omit<ApplePayPay
74
68
  /** Visual styling for the Apple Pay button. */
75
69
  style?: ApplePayOpenWalletMetaStyles;
76
70
  /**
77
- * Device capabilities allowed for the wallet button to be considered available.
78
- * Used as a relaxation knob for testing — defaults to `['paymentCredentialsAvailable']` only.
71
+ * Device credential statuses that make the button render. Defaults to
72
+ * `['credentials_available', 'credentials_status_unknown']`:
73
+ * - `credentials_available` — the device has a confirmed Apple Pay card ready to use.
74
+ * - `credentials_status_unknown` — a local card can't be confirmed, but Apple Pay can
75
+ * still proceed (e.g. the cross-device flow where the buyer completes payment on their
76
+ * iPhone via QR, used by Chrome, Edge and Firefox).
77
+ * The button renders when the device's reported status is in this list. Narrow to
78
+ * `['credentials_available']` to require a confirmed local card.
79
79
  */
80
80
  apple_pay_capabilities?: Array<'credentials_available' | 'credentials_status_unknown' | 'credentials_unavailable'>;
81
81
  }
@@ -120,7 +120,6 @@ export declare class ApplePayOpenWalletService extends OpenWalletService {
120
120
  private handleMerchantOnButtonClickEvent;
121
121
  private onPaymentAuthorized;
122
122
  private formatShippingOptions;
123
- private formatCapabilities;
124
123
  private formatErrorFields;
125
124
  private createButtonStyle;
126
125
  private onShippingContactUpdated;
@@ -130,7 +129,6 @@ export declare class ApplePayOpenWalletService extends OpenWalletService {
130
129
  private parseShippingMethodUpdateEvent;
131
130
  private mapContactToApplePayPaymentRequestContact;
132
131
  private mapMetaToApplePayPaymentRequest;
133
- private isUnsuportedBrowser;
134
132
  }
135
133
  export {};
136
134
  //# sourceMappingURL=apple-pay.open-wallet.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apple-pay.open-wallet.service.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/apple-pay/apple-pay.open-wallet.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MA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gDzB;IAEF,OAAO,CAAC,qBAAqB,CAQvB;IAEN,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,iBAAiB;IA2BzB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,wBAAwB,CAmD9B;IAEF,OAAO,CAAC,+BAA+B;IAuBvC,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,uBAAuB,CA+C7B;IAEF,OAAO,CAAC,8BAA8B;IAWtC,OAAO,CAAC,yCAAyC;IA2BjD,OAAO,CAAC,+BAA+B;IAsEvC,OAAO,CAAC,mBAAmB;CAK5B"}
1
+ {"version":3,"file":"apple-pay.open-wallet.service.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/apple-pay/apple-pay.open-wallet.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EACV,gBAAgB,EAChB,0BAA0B,EAE1B,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAExF,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAarF,sDAAsD;AACtD,UAAU,4BAA6B,SAAQ,oBAAoB;IACjE,4FAA4F;IAC5F,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,gEAAgE;IAChE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MAAM,EACjB,SAAS,EAAE,SAAS,EACZ,IAAI,EAAE,sBAAsB,EAC5B,aAAa,EAAE,iBAAiB;IAcnC,OAAO,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI;IAKlD,OAAO,CAAC,SAAS;IAwDjB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,kBAAkB;IAIb,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAelC,OAAO,CAAC,cAAc;YAuBR,iBAAiB;IAQ/B,OAAO,CAAC,KAAK;IAoBb,OAAO,CAAC,uBAAuB;IAuC/B,OAAO,CAAC,eAAe,CAIrB;IAEF,OAAO,CAAC,kBAAkB;IAqB1B,OAAO,CAAC,kBAAkB,CAcxB;YAEY,gCAAgC;IAW9C,OAAO,CAAC,mBAAmB,CAgDzB;IAEF,OAAO,CAAC,qBAAqB,CAQvB;IAEN,OAAO,CAAC,iBAAiB;IA2BzB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,wBAAwB,CAmD9B;IAEF,OAAO,CAAC,+BAA+B;IAuBvC,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,uBAAuB,CA+C7B;IAEF,OAAO,CAAC,8BAA8B;IAWtC,OAAO,CAAC,yCAAyC;IA2BjD,OAAO,CAAC,+BAA+B;CAqExC"}
@@ -1,2 +1,3 @@
1
1
  export { ApplePayOpenWalletMeta, ApplePayOpenWalletService, } from './apple-pay.open-wallet.service';
2
+ export { evaluateApplePayAvailability, hasNativeApplePaySession, loadApplePaySdk, } from './apple-pay-availability';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/apple-pay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/apple-pay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,eAAe,GAChB,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,53 @@
1
+ /// <reference types="googlepay" />
2
+ import type { GooglePayAvailabilityResult } from '../../interfaces/google-pay/google-pay-availability.interface';
3
+ declare global {
4
+ interface Window {
5
+ google: typeof google;
6
+ }
7
+ }
8
+ /** Parameters for {@link evaluateGooglePayAvailability}. */
9
+ export interface EvaluateGooglePayAvailabilityParams {
10
+ /** Google Pay gateway merchant identifier (optional — not required by `isReadyToPay`). */
11
+ merchantId?: string;
12
+ /**
13
+ * Pre-built `PaymentsClient` to reuse instead of constructing a fresh one. The button
14
+ * instance passes its already-configured client so the readiness check runs against
15
+ * exactly the same client it will pay with. Omitted by the static check.
16
+ */
17
+ paymentsClient?: google.payments.api.PaymentsClient;
18
+ /**
19
+ * `isReadyToPay` request to use instead of the default-card-config request. The button
20
+ * instance passes its own request so the check honours the merchant's `card_config`;
21
+ * the static check omits it and uses {@link buildIsReadyToPayRequest}.
22
+ */
23
+ request?: google.payments.api.IsReadyToPayRequest;
24
+ }
25
+ /**
26
+ * Synchronous, network-free check for whether the Google Pay JS API is already present
27
+ * in the page (`window.google.payments.api.PaymentsClient`). Safe to call in any
28
+ * environment (never throws).
29
+ *
30
+ * Note: Google Pay has no synchronous device/card capability API — this only reports
31
+ * whether the SDK script has loaded. The authoritative readiness signal comes from
32
+ * {@link evaluateGooglePayAvailability} (which runs `isReadyToPay`).
33
+ */
34
+ export declare function isGooglePayApiPresent(): boolean;
35
+ /**
36
+ * Idempotently loads the Google Pay JS SDK from the CDN.
37
+ * Resolves immediately if the API is already present, de-duplicates concurrent loads,
38
+ * and rejects if the script fails to load.
39
+ */
40
+ export declare function loadGooglePayScript(): Promise<void>;
41
+ /**
42
+ * Core Google Pay availability evaluation, shared by the instance flow
43
+ * (`GooglePayOpenWalletService`) and the static `GooglePayOpenWalletButton.checkAvailability`.
44
+ *
45
+ * The static check passes no `request`, so it uses the **default** card configuration
46
+ * (a button instance with a custom `card_config` may produce a different result). The
47
+ * instance flow passes its own `paymentsClient` and `request` so the readiness check
48
+ * honours the merchant's `card_config` and runs against the same client it pays with.
49
+ *
50
+ * Assumes the Google Pay SDK is already loaded (call {@link loadGooglePayScript} first).
51
+ */
52
+ export declare function evaluateGooglePayAvailability(params?: EvaluateGooglePayAvailabilityParams): Promise<GooglePayAvailabilityResult>;
53
+ //# sourceMappingURL=google-pay-availability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-pay-availability.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/google-pay/google-pay-availability.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+DAA+D,CAAC;AAYjH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,OAAO,MAAM,CAAC;KACvB;CACF;AAED,4DAA4D;AAC5D,MAAM,WAAW,mCAAmC;IAClD,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC;IACpD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC;CACnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAQ/C;AAID;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CA+BnD;AA0BD;;;;;;;;;;GAUG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,GAAE,mCAAwC,GAC/C,OAAO,CAAC,2BAA2B,CAAC,CA8BtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"google-pay.open-wallet.service.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/google-pay/google-pay.open-wallet.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,KAAK,EAIV,uBAAuB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoB3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,OAAO,MAAM,CAAC;KACvB;CACF;AAED;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAwB7D,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,aAAa;IAxBvB,SAAgB,UAAU,2BAA2B;IACrD,OAAO,CAAC,cAAc,CAAqC;IAC3D,OAAO,CAAC,kCAAkC,CAE5B;IACd,OAAO,CAAC,iCAAiC,CAAyC;IAClF,OAAO,CAAC,sBAAsB,CAA2B;IACzD,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,yBAAyB,CAAS;IAE1C;;;;;;;OAOG;gBAED,GAAG,EAAE,WAAW,EAChB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,SAAS,EACZ,IAAI,EAAE,uBAAuB,EAC7B,aAAa,EAAE,iBAAiB;IAY7B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAa3B,OAAO,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI;IAInD,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,mBAAmB;IA6B3B,OAAO,CAAC,cAAc;YAmCR,iBAAiB;IAW/B,OAAO,CAAC,KAAK;IAcb,OAAO,CAAC,wBAAwB;YAsBlB,gCAAgC;YAWhC,eAAe;IAU7B,OAAO,CAAC,mBAAmB;IA4C3B,OAAO,CAAC,oBAAoB;IAyE5B,OAAO,CAAC,yBAAyB;IAYjC,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,wBAAwB;IAwDhC,OAAO,CAAC,+BAA+B;IAkCvC,OAAO,CAAC,2BAA2B;IAanC,OAAO,CAAC,mBAAmB;IAmD3B,OAAO,CAAC,cAAc;IAwBtB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,MAAM;CAoEf"}
1
+ {"version":3,"file":"google-pay.open-wallet.service.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/google-pay/google-pay.open-wallet.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,KAAK,EAIV,uBAAuB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAqB3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,OAAO,MAAM,CAAC;KACvB;CACF;AAED;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAwB7D,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,aAAa;IAxBvB,SAAgB,UAAU,2BAA2B;IACrD,OAAO,CAAC,cAAc,CAAqC;IAC3D,OAAO,CAAC,kCAAkC,CAE5B;IACd,OAAO,CAAC,iCAAiC,CAAyC;IAClF,OAAO,CAAC,sBAAsB,CAA2B;IACzD,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,yBAAyB,CAAS;IAE1C;;;;;;;OAOG;gBAED,GAAG,EAAE,WAAW,EAChB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,SAAS,EACZ,IAAI,EAAE,uBAAuB,EAC7B,aAAa,EAAE,iBAAiB;IAY7B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAa3B,OAAO,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI;IAInD,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,mBAAmB;IA6B3B,OAAO,CAAC,cAAc;YAmCR,iBAAiB;IAQ/B,OAAO,CAAC,KAAK;IAcb,OAAO,CAAC,wBAAwB;YAsBlB,gCAAgC;YAWhC,eAAe;IAU7B,OAAO,CAAC,mBAAmB;IA4C3B,OAAO,CAAC,oBAAoB;IAyE5B,OAAO,CAAC,yBAAyB;IAYjC,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,wBAAwB;IAwDhC,OAAO,CAAC,+BAA+B;IAkCvC,OAAO,CAAC,2BAA2B;IAanC,OAAO,CAAC,mBAAmB;IAmD3B,OAAO,CAAC,cAAc;IAwBtB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,MAAM;CAoEf"}
@@ -1,2 +1,3 @@
1
1
  export { GooglePayOpenWalletService } from './google-pay.open-wallet.service';
2
+ export { evaluateGooglePayAvailability, isGooglePayApiPresent, loadGooglePayScript, } from './google-pay-availability';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/google-pay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/google-pay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC"}
@@ -197,6 +197,25 @@ declare class MultiWidget {
197
197
  * @param {boolean} validateCardNumberInput - [validateCardNumberInput=false] - using this param you allow validation for card number input on supported card types
198
198
  */
199
199
  setSupportedCardIcons(elements: string[], validateCardNumberInput?: boolean): void;
200
+ /**
201
+ * Current method restricts which card schemes the card number input accepts, without changing which card
202
+ * icons the widget displays. Scheme identifiers are matched case-insensitively and ignoring surrounding
203
+ * whitespace; unsupported identifiers are ignored with a warning, so a list in which every identifier is
204
+ * unsupported applies no restriction at all.
205
+ *
206
+ * Takes precedence over setSupportedCardIcons: when a non-empty list is supplied here, it is the only list
207
+ * used for validation and the validateCardNumberInput flag of setSupportedCardIcons no longer affects it.
208
+ * Calling this method more than once replaces the previous list rather than merging with it.
209
+ *
210
+ * Must be called before load().
211
+ *
212
+ * @example
213
+ *
214
+ * widget.setAllowedCardSchemes(['visa', 'mastercard']);
215
+ *
216
+ * @param {string[]} schemes - [CARD_SCHEME]{@link CARD_SCHEME}
217
+ */
218
+ setAllowedCardSchemes(schemes: string[]): void;
200
219
  /**
201
220
  * Current method can hide prevent the widget from showing the error messages
202
221
  *
@@ -1 +1 @@
1
- {"version":3,"file":"multi-widget.d.ts","sourceRoot":"","sources":["../../src/widget/multi-widget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAe,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC9D,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