@paydock/client-sdk 1.132.0-beta → 1.133.1-beta

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 (134) hide show
  1. package/README.md +166 -0
  2. package/bundles/index.cjs +12752 -11063
  3. package/bundles/index.cjs.d.ts +1231 -905
  4. package/bundles/index.mjs +12751 -11063
  5. package/bundles/index.mjs.d.ts +1231 -905
  6. package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.d.ts +40 -0
  7. package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.d.ts.map +1 -0
  8. package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.interfaces.d.ts +29 -0
  9. package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.interfaces.d.ts.map +1 -0
  10. package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.service.d.ts +14 -0
  11. package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.service.d.ts.map +1 -0
  12. package/bundles/types/afterpay-on-site-messaging/index.d.ts +18 -0
  13. package/bundles/types/afterpay-on-site-messaging/index.d.ts.map +1 -0
  14. package/bundles/types/api/api-payment-source-internal.d.ts +2 -1
  15. package/bundles/types/api/api-payment-source-internal.d.ts.map +1 -1
  16. package/bundles/types/api/api-service-internal.d.ts +13 -6
  17. package/bundles/types/api/api-service-internal.d.ts.map +1 -1
  18. package/bundles/types/checkout/v3/instructions/instruction.card_form.show.d.ts +1 -0
  19. package/bundles/types/checkout/v3/instructions/instruction.card_form.show.d.ts.map +1 -1
  20. package/bundles/types/checkout/v3/instructions/instruction.payment_methods.show.d.ts.map +1 -1
  21. package/bundles/types/components/param.d.ts +3 -1
  22. package/bundles/types/components/param.d.ts.map +1 -1
  23. package/bundles/types/index-cba.d.ts +9 -6
  24. package/bundles/types/index-cba.d.ts.map +1 -1
  25. package/bundles/types/index.d.ts +9 -6
  26. package/bundles/types/index.d.ts.map +1 -1
  27. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts +198 -0
  28. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts.map +1 -0
  29. package/bundles/types/open-wallets/base/open-wallet.service.d.ts +27 -0
  30. package/bundles/types/open-wallets/base/open-wallet.service.d.ts.map +1 -0
  31. package/bundles/types/open-wallets/enum/event.enum.d.ts +8 -1
  32. package/bundles/types/open-wallets/enum/event.enum.d.ts.map +1 -1
  33. package/bundles/types/open-wallets/enum/payload-format.enum.d.ts +4 -0
  34. package/bundles/types/open-wallets/enum/payload-format.enum.d.ts.map +1 -0
  35. package/bundles/types/open-wallets/enum/service-group.enum.d.ts +5 -0
  36. package/bundles/types/open-wallets/enum/service-group.enum.d.ts.map +1 -0
  37. package/bundles/types/open-wallets/index.d.ts +2 -2
  38. package/bundles/types/open-wallets/index.d.ts.map +1 -1
  39. package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts +495 -0
  40. package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts.map +1 -0
  41. package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts +2 -0
  42. package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts.map +1 -0
  43. package/bundles/types/open-wallets/interfaces/events.interface.d.ts +5 -6
  44. package/bundles/types/open-wallets/interfaces/events.interface.d.ts.map +1 -1
  45. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts +54 -0
  46. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts.map +1 -0
  47. package/bundles/types/open-wallets/interfaces/google-pay/index.d.ts +2 -0
  48. package/bundles/types/open-wallets/interfaces/google-pay/index.d.ts.map +1 -0
  49. package/bundles/types/open-wallets/interfaces/index.d.ts +1 -3
  50. package/bundles/types/open-wallets/interfaces/index.d.ts.map +1 -1
  51. package/bundles/types/open-wallets/interfaces/open-wallet-meta.interface.d.ts +11 -0
  52. package/bundles/types/open-wallets/interfaces/open-wallet-meta.interface.d.ts.map +1 -0
  53. package/bundles/types/open-wallets/interfaces/payment-source.interface.d.ts +0 -1
  54. package/bundles/types/open-wallets/interfaces/payment-source.interface.d.ts.map +1 -1
  55. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts +64 -0
  56. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map +1 -0
  57. package/bundles/types/open-wallets/services/apple-pay/index.d.ts +2 -0
  58. package/bundles/types/open-wallets/services/apple-pay/index.d.ts.map +1 -0
  59. package/bundles/types/open-wallets/services/google-pay/constants/google-pay.constants.d.ts +11 -0
  60. package/bundles/types/open-wallets/services/google-pay/constants/google-pay.constants.d.ts.map +1 -0
  61. package/bundles/types/open-wallets/services/google-pay/constants/index.d.ts +2 -0
  62. package/bundles/types/open-wallets/services/google-pay/constants/index.d.ts.map +1 -0
  63. package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts +55 -0
  64. package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts.map +1 -0
  65. package/bundles/types/open-wallets/services/google-pay/index.d.ts +2 -0
  66. package/bundles/types/open-wallets/services/google-pay/index.d.ts.map +1 -0
  67. package/bundles/types/open-wallets/services/google-pay/utils/google-pay.utils.d.ts +20 -0
  68. package/bundles/types/open-wallets/services/google-pay/utils/google-pay.utils.d.ts.map +1 -0
  69. package/bundles/types/open-wallets/services/google-pay/utils/index.d.ts +2 -0
  70. package/bundles/types/open-wallets/services/google-pay/utils/index.d.ts.map +1 -0
  71. package/bundles/types/open-wallets/services/google-pay/validation/google-pay.validation.d.ts +3 -0
  72. package/bundles/types/open-wallets/services/google-pay/validation/google-pay.validation.d.ts.map +1 -0
  73. package/bundles/types/open-wallets/services/google-pay/validation/index.d.ts +2 -0
  74. package/bundles/types/open-wallets/services/google-pay/validation/index.d.ts.map +1 -0
  75. package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-style.type.d.ts +2 -0
  76. package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-style.type.d.ts.map +1 -0
  77. package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-type.type.d.ts +2 -0
  78. package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-type.type.d.ts.map +1 -0
  79. package/bundles/types/open-wallets/types/apple-pay/index.d.ts +3 -0
  80. package/bundles/types/open-wallets/types/apple-pay/index.d.ts.map +1 -0
  81. package/bundles/types/open-wallets/types/base-event-data.interface.d.ts +5 -0
  82. package/bundles/types/open-wallets/types/base-event-data.interface.d.ts.map +1 -0
  83. package/bundles/types/open-wallets/types/google-pay/google-pay-button-color.type.d.ts +2 -0
  84. package/bundles/types/open-wallets/types/google-pay/google-pay-button-color.type.d.ts.map +1 -0
  85. package/bundles/types/open-wallets/types/google-pay/google-pay-button-size-mode.type.d.ts +2 -0
  86. package/bundles/types/open-wallets/types/google-pay/google-pay-button-size-mode.type.d.ts.map +1 -0
  87. package/bundles/types/open-wallets/types/google-pay/google-pay-button-type.type.d.ts +2 -0
  88. package/bundles/types/open-wallets/types/google-pay/google-pay-button-type.type.d.ts.map +1 -0
  89. package/bundles/types/open-wallets/types/google-pay/index.d.ts +4 -0
  90. package/bundles/types/open-wallets/types/google-pay/index.d.ts.map +1 -0
  91. package/bundles/types/open-wallets/types/index.d.ts +1 -2
  92. package/bundles/types/open-wallets/types/index.d.ts.map +1 -1
  93. package/bundles/types/open-wallets/types/on-shipping-address-change-event-data.interface.d.ts +21 -0
  94. package/bundles/types/open-wallets/types/on-shipping-address-change-event-data.interface.d.ts.map +1 -0
  95. package/bundles/types/open-wallets/types/on-shipping-address-change-event-response.interface.d.ts +6 -0
  96. package/bundles/types/open-wallets/types/on-shipping-address-change-event-response.interface.d.ts.map +1 -0
  97. package/bundles/types/open-wallets/types/on-shipping-option-change-event-data.interface.d.ts +13 -0
  98. package/bundles/types/open-wallets/types/on-shipping-option-change-event-data.interface.d.ts.map +1 -0
  99. package/bundles/types/open-wallets/types/on-shipping-option-change-event-response.interface.d.ts +4 -0
  100. package/bundles/types/open-wallets/types/on-shipping-option-change-event-response.interface.d.ts.map +1 -0
  101. package/bundles/types/open-wallets/types/payment-source.type.d.ts +85 -0
  102. package/bundles/types/open-wallets/types/payment-source.type.d.ts.map +1 -0
  103. package/bundles/types/open-wallets/types/shipping-event-to-response.type.d.ts +6 -0
  104. package/bundles/types/open-wallets/types/shipping-event-to-response.type.d.ts.map +1 -0
  105. package/bundles/types/open-wallets/types/wallet-type.type.d.ts +2 -2
  106. package/bundles/types/open-wallets/types/wallet-type.type.d.ts.map +1 -1
  107. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +16 -16
  108. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
  109. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +9 -9
  110. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -1
  111. package/bundles/types/widget/html-multi-widget.d.ts +13 -1
  112. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
  113. package/bundles/types/widget/multi-widget.d.ts +7 -4
  114. package/bundles/types/widget/multi-widget.d.ts.map +1 -1
  115. package/bundles/widget.umd.js +12752 -11063
  116. package/bundles/widget.umd.js.d.ts +1231 -905
  117. package/bundles/widget.umd.js.min.d.ts +1231 -905
  118. package/bundles/widget.umd.min.js +1 -1
  119. package/docs/afterpay-on-site-messaging-examples.md +60 -0
  120. package/docs/afterpay-on-site-messaging.md +104 -0
  121. package/docs/open-wallet-buttons-examples.md +1188 -0
  122. package/package.json +1 -1
  123. package/bundles/types/open-wallets/base/base-open-wallet.d.ts +0 -33
  124. package/bundles/types/open-wallets/base/base-open-wallet.d.ts.map +0 -1
  125. package/bundles/types/open-wallets/interfaces/base-service-config.interface.d.ts +0 -30
  126. package/bundles/types/open-wallets/interfaces/base-service-config.interface.d.ts.map +0 -1
  127. package/bundles/types/open-wallets/interfaces/base-wallet-meta.interface.d.ts +0 -5
  128. package/bundles/types/open-wallets/interfaces/base-wallet-meta.interface.d.ts.map +0 -1
  129. package/bundles/types/open-wallets/services/index.d.ts +0 -9
  130. package/bundles/types/open-wallets/services/index.d.ts.map +0 -1
  131. package/bundles/types/open-wallets/types/ott-backend.type.d.ts +0 -26
  132. package/bundles/types/open-wallets/types/ott-backend.type.d.ts.map +0 -1
  133. package/bundles/types/open-wallets/types/ott-response.type.d.ts +0 -8
  134. package/bundles/types/open-wallets/types/ott-response.type.d.ts.map +0 -1
package/README.md CHANGED
@@ -6834,5 +6834,171 @@ Callback for onError method.
6834
6834
  | data | [<code>IOnErrorEventData</code>](#IOnErrorEventData) \| <code>null</code> |
6835
6835
 
6836
6836
 
6837
+ ## AfterpayOnSiteMessaging
6838
+
6839
+ Afterpay On-Site Messaging informs customers that Afterpay had an available payment method on the website. Allows to have this features when implemented:
6840
+ - An interactive icon ⓘ that shows a modal with some available information.
6841
+ - Shows if an instalment is available and its amount.
6842
+ - Displays the best payment option available on that particular product.
6843
+
6844
+ The general flow to use it is:
6845
+ 1. Initialize the Afterpay On Site Messaging class, providing a HTML selector id, and configuration parameters that requires AfterPay. The general format is:
6846
+ ```js
6847
+ var afterpayOnSiteMessaging = new paydock.AfterpayOnSiteMessaging(
6848
+ "#selector",
6849
+ configParams,
6850
+ );
6851
+ ```
6852
+ 2. Once all in place, just call load function to start the injection, like following:
6853
+ ```js
6854
+ afterpayOnSiteMessaging.load();
6855
+ ```
6856
+
6857
+ ### AfterpayOnSiteMessaging example
6858
+
6859
+ A full description of the config parameters for [AfterpayOnSiteMessaging](#AfterpayOnSiteMessaging) meta parameters can be found [here](#IAfterpayOnSiteMessagingConfig). Below you will find a fully working html example.
6860
+
6861
+ ```html
6862
+ <!DOCTYPE html>
6863
+ <html lang="en">
6864
+ <head>
6865
+ <meta charset="UTF-8">
6866
+ <title>Title</title>
6867
+ </head>
6868
+ <body>
6869
+ <h2>Using PayDock AfterpayOnSiteMessaging!</h2>
6870
+ <div id="afterpayOnSiteMessagingDiv"></div>
6871
+ </body>
6872
+ <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
6873
+ <script>
6874
+ const afterpayOnSiteMessaging = new paydock.AfterpayOnSiteMessaging(
6875
+ '#afterpayOnSiteMessagingDiv',
6876
+ {
6877
+ mpid: "uuid-uuid-uuid-uuid-uuid",
6878
+ placement_id: "uuid-uuid-uuid-uuid-uuid",
6879
+ page_type: "product",
6880
+ amount: "100",
6881
+ currency: "AUD",
6882
+ consumer_locale: "AU",
6883
+ item_skus: "Test",
6884
+ item_categories: "Test",
6885
+ is_eligible: true
6886
+ }
6887
+ );
6888
+
6889
+ afterpayOnSiteMessaging.onError(function(error) {
6890
+ console.log("On Error Callback", error);
6891
+ });
6892
+
6893
+ afterpayOnSiteMessaging.load();
6894
+ </script>
6895
+ </html>
6896
+ ```
6897
+
6898
+ ## Classes
6899
+
6900
+ <dl>
6901
+ <dt><a href="#AfterpayOnSiteMessaging">AfterpayOnSiteMessaging</a></dt>
6902
+ <dd><p>Afterpay On Site Messaging constructor</p>
6903
+ </dd>
6904
+ </dl>
6905
+
6906
+ ## Typedefs
6907
+
6908
+ <dl>
6909
+ <dt><a href="#OnErrorCallback">OnErrorCallback</a> : <code>function</code></dt>
6910
+ <dd><p>Callback for onError method.</p>
6911
+ </dd>
6912
+ </dl>
6913
+
6914
+ ## Interfaces
6915
+
6916
+ <dl>
6917
+ <dt><a href="#IAfterpayOnSiteMessagingConfig">IAfterpayOnSiteMessagingConfig</a> : <code>object</code></dt>
6918
+ <dd><p>Interface of data used for Afterpay On Site Messaging configuration.
6919
+ For further information refer to <a href="https://developers.afterpay.com/docs/api/afterpay-messaging/getting-started-with-afterpay-on-site-messaging">the documentation</a>.</p>
6920
+ </dd>
6921
+ </dl>
6922
+
6923
+ <a name="IAfterpayOnSiteMessagingConfig" id="IAfterpayOnSiteMessagingConfig" href="#IAfterpayOnSiteMessagingConfig">&nbsp;</a>
6924
+
6925
+ ## IAfterpayOnSiteMessagingConfig : <code>object</code>
6926
+ Interface of data used for Afterpay On Site Messaging configuration.
6927
+ For further information refer to [the documentation](https://developers.afterpay.com/docs/api/afterpay-messaging/getting-started-with-afterpay-on-site-messaging).
6928
+
6929
+ **Kind**: global interface
6930
+
6931
+ | Param | Type | Description |
6932
+ | --- | --- | --- |
6933
+ | [mpid] | <code>string</code> | Used for indicating the MPID. |
6934
+ | [placement_id] | <code>string</code> | Used for indicating the product Placement ID. |
6935
+ | [page_type] | <code>&#x27;cart&#x27;</code> \| <code>&#x27;product&#x27;</code> | Used for indicating the page type. Allowed values are: cart, product. |
6936
+ | [amount] | <code>string</code> | Used for indicating the amount. |
6937
+ | [currency] | <code>string</code> | Used for indicating the currency. |
6938
+ | [consumer_locale] | <code>string</code> | Used for indicating the consumer locale. |
6939
+ | [item_skus] | <code>string</code> | Used for indicating the SKU. |
6940
+ | [item_categories] | <code>string</code> | Used for indicating the category. |
6941
+ | [is_eligible] | <code>boolean</code> | Used for indicating if the user is eligible. |
6942
+
6943
+ <a name="AfterpayOnSiteMessaging" id="AfterpayOnSiteMessaging" href="#AfterpayOnSiteMessaging">&nbsp;</a>
6944
+
6945
+ ## AfterpayOnSiteMessaging
6946
+ Afterpay On Site Messaging constructor
6947
+
6948
+ **Kind**: global class
6949
+
6950
+ * [AfterpayOnSiteMessaging](#AfterpayOnSiteMessaging)
6951
+ * [new exports.AfterpayOnSiteMessaging(selector, config)](#new_AfterpayOnSiteMessaging_new)
6952
+ * [.load()](#AfterpayOnSiteMessaging+load)
6953
+ * [.onError([callback])](#AfterpayOnSiteMessaging+onError)
6954
+
6955
+ <a name="new_AfterpayOnSiteMessaging_new" id="new_AfterpayOnSiteMessaging_new" href="#new_AfterpayOnSiteMessaging_new">&nbsp;</a>
6956
+
6957
+ ### new exports.AfterpayOnSiteMessaging(selector, config)
6958
+
6959
+ | Param | Type | Description |
6960
+ | --- | --- | --- |
6961
+ | selector | <code>string</code> | Selector of html element. Container for Afterpay On Site Messaging. |
6962
+ | config | [<code>IAfterpayOnSiteMessagingConfig</code>](#IAfterpayOnSiteMessagingConfig) | Required configuration for the Afterpay On Site Messaging. |
6963
+
6964
+ **Example**
6965
+ ```js
6966
+ var afterpayOnSiteMessaging = new AfterpayOnSiteMessaging('#afterpayButton', config);
6967
+ ```
6968
+ <a name="AfterpayOnSiteMessaging+load" id="AfterpayOnSiteMessaging+load" href="#AfterpayOnSiteMessaging+load">&nbsp;</a>
6969
+
6970
+ ### afterpayOnSiteMessaging.load()
6971
+ The final method after configuring the AfterpayOnSiteMessaging to
6972
+ start the load process.
6973
+
6974
+ **Kind**: instance method of [<code>AfterpayOnSiteMessaging</code>](#AfterpayOnSiteMessaging)
6975
+ <a name="AfterpayOnSiteMessaging+onError" id="AfterpayOnSiteMessaging+onError" href="#AfterpayOnSiteMessaging+onError">&nbsp;</a>
6976
+
6977
+ ### afterpayOnSiteMessaging.onError([callback])
6978
+ If the process fails, the function passed as parameter will be called.
6979
+ Important: Do not perform thread blocking operations in callback such as window.alert() calls.
6980
+
6981
+ **Kind**: instance method of [<code>AfterpayOnSiteMessaging</code>](#AfterpayOnSiteMessaging)
6982
+
6983
+ | Param | Type | Description |
6984
+ | --- | --- | --- |
6985
+ | [callback] | [<code>OnErrorCallback</code>](#OnErrorCallback) | Function to be called when there is an error in the flow. |
6986
+
6987
+ **Example**
6988
+ ```js
6989
+ AfterpayOnSiteMessaging.onError((eventData) => console.log('Some error occur'));
6990
+ ```
6991
+ <a name="OnErrorCallback" id="OnErrorCallback" href="#OnErrorCallback">&nbsp;</a>
6992
+
6993
+ ## OnErrorCallback : <code>function</code>
6994
+ Callback for onError method.
6995
+
6996
+ **Kind**: global typedef
6997
+
6998
+ | Param | Type |
6999
+ | --- | --- |
7000
+ | data | <code>unknown</code> \| <code>null</code> |
7001
+
7002
+
6837
7003
  ## License
6838
7004
  Copyright (c) 2025 paydock