@paydock/client-sdk 1.138.1 → 1.139.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 (40) hide show
  1. package/README.md +24 -9
  2. package/bundles/index.cjs +194 -164
  3. package/bundles/index.cjs.d.ts +13 -2
  4. package/bundles/index.mjs +194 -164
  5. package/bundles/index.mjs.d.ts +13 -2
  6. package/bundles/types/checkout/v3/instructions/instruction.card_form.show.d.ts.map +1 -1
  7. package/bundles/types/checkout/v3/utils/checkout-customisation-styles.util.d.ts.map +1 -1
  8. package/bundles/types/components/iframe.d.ts +2 -0
  9. package/bundles/types/components/iframe.d.ts.map +1 -1
  10. package/bundles/types/helper/browser.d.ts +1 -0
  11. package/bundles/types/helper/browser.d.ts.map +1 -1
  12. package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts +12 -3
  13. package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts.map +1 -1
  14. package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts +6 -5
  15. package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts.map +1 -1
  16. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -1
  17. package/bundles/types/wallet-buttons/index-cba.d.ts +132 -1
  18. package/bundles/types/wallet-buttons/index-cba.d.ts.map +1 -1
  19. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +1 -1
  20. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +81 -126
  21. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -1
  22. package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts +1 -0
  23. package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts.map +1 -1
  24. package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts +0 -1
  25. package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -1
  26. package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts +0 -1
  27. package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts.map +1 -1
  28. package/bundles/types/wallet-buttons/wallet-services/google.wallet-service.d.ts +0 -1
  29. package/bundles/types/wallet-buttons/wallet-services/google.wallet-service.d.ts.map +1 -1
  30. package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts.map +1 -1
  31. package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts +6 -0
  32. package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts.map +1 -1
  33. package/bundles/widget.umd.js +194 -164
  34. package/bundles/widget.umd.js.d.ts +13 -2
  35. package/bundles/widget.umd.js.min.d.ts +13 -2
  36. package/bundles/widget.umd.min.js +1 -1
  37. package/docs/paypal-data-collector-examples.md +12 -7
  38. package/docs/paypal-data-collector.md +11 -1
  39. package/docs/wallet-buttons.md +1 -1
  40. package/package.json +1 -1
@@ -747,6 +747,8 @@ declare class IFrame {
747
747
  constructor(container: Container);
748
748
  load(link: string, options?: {
749
749
  title?: string;
750
+ attributes?: Record<string, string>;
751
+ styles?: Record<string, string>;
750
752
  }, iframeClass?: string): void;
751
753
  loadFromHtml(content: string, options?: {
752
754
  title?: string;
@@ -3669,11 +3671,20 @@ declare class PayPalDataCollector {
3669
3671
  * the correlation id used among the requests asynchronously.
3670
3672
  *
3671
3673
  * @returns {Promise<CollectedDeviceData>} Promise when resolved, returns an object
3672
- * that contains the `correlation_id` key.
3674
+ * that contains the `correlation_id` key. The promise may be rejected if script loading fails.
3673
3675
  *
3674
3676
  * @example
3675
3677
  * const collectedDeviceData = await payPalDataCollectorWidget.collectDeviceData();
3676
3678
  * console.log(collectedDeviceData.correlation_id)
3679
+ *
3680
+ * @example
3681
+ * payPalDataCollectorWidget.collectDeviceData()
3682
+ * .then((collectedDeviceData) => {
3683
+ * console.log(collectedDeviceData.correlation_id);
3684
+ * })
3685
+ * .catch((error) => {
3686
+ * console.error('Failed to collect device data', error);
3687
+ * });
3677
3688
  */
3678
3689
  collectDeviceData(): Promise<CollectedDeviceData>;
3679
3690
  /**
@@ -4505,7 +4516,7 @@ declare class WalletButtons {
4505
4516
  * There are two operational modes supported, Synchronous and Asynchronous.
4506
4517
  * When asynchronous operations need to occur on the callback handler, attaching the Promise via `attachResult` is required to have the wallet wait for a result.
4507
4518
  * When synchronous operations occur on the callback handler, attaching a boolean result via `attachResult` is optional to control the execution flow.
4508
- * Note this is supported for Paypal, GooglePay and ApplePay wallet buttons at the moment.
4519
+ * Note this is supported for Paypal, GooglePay, ApplePay, Afterpay and FlypayV2 wallet buttons at the moment.
4509
4520
  *
4510
4521
  * @example
4511
4522
  * button.onClick((data) => {
@@ -747,6 +747,8 @@ declare class IFrame {
747
747
  constructor(container: Container);
748
748
  load(link: string, options?: {
749
749
  title?: string;
750
+ attributes?: Record<string, string>;
751
+ styles?: Record<string, string>;
750
752
  }, iframeClass?: string): void;
751
753
  loadFromHtml(content: string, options?: {
752
754
  title?: string;
@@ -3669,11 +3671,20 @@ declare class PayPalDataCollector {
3669
3671
  * the correlation id used among the requests asynchronously.
3670
3672
  *
3671
3673
  * @returns {Promise<CollectedDeviceData>} Promise when resolved, returns an object
3672
- * that contains the `correlation_id` key.
3674
+ * that contains the `correlation_id` key. The promise may be rejected if script loading fails.
3673
3675
  *
3674
3676
  * @example
3675
3677
  * const collectedDeviceData = await payPalDataCollectorWidget.collectDeviceData();
3676
3678
  * console.log(collectedDeviceData.correlation_id)
3679
+ *
3680
+ * @example
3681
+ * payPalDataCollectorWidget.collectDeviceData()
3682
+ * .then((collectedDeviceData) => {
3683
+ * console.log(collectedDeviceData.correlation_id);
3684
+ * })
3685
+ * .catch((error) => {
3686
+ * console.error('Failed to collect device data', error);
3687
+ * });
3677
3688
  */
3678
3689
  collectDeviceData(): Promise<CollectedDeviceData>;
3679
3690
  /**
@@ -4505,7 +4516,7 @@ declare class WalletButtons {
4505
4516
  * There are two operational modes supported, Synchronous and Asynchronous.
4506
4517
  * When asynchronous operations need to occur on the callback handler, attaching the Promise via `attachResult` is required to have the wallet wait for a result.
4507
4518
  * When synchronous operations occur on the callback handler, attaching a boolean result via `attachResult` is optional to control the execution flow.
4508
- * Note this is supported for Paypal, GooglePay and ApplePay wallet buttons at the moment.
4519
+ * Note this is supported for Paypal, GooglePay, ApplePay, Afterpay and FlypayV2 wallet buttons at the moment.
4509
4520
  *
4510
4521
  * @example
4511
4522
  * button.onClick((data) => {