@paydock/client-sdk 1.131.0 → 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 (135) hide show
  1. package/README.md +166 -0
  2. package/bundles/index.cjs +12754 -11064
  3. package/bundles/index.cjs.d.ts +1231 -905
  4. package/bundles/index.mjs +12753 -11064
  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/v1/layout-widgets/payment-methods-template.d.ts.map +1 -1
  19. package/bundles/types/checkout/v3/instructions/instruction.card_form.show.d.ts +1 -0
  20. package/bundles/types/checkout/v3/instructions/instruction.card_form.show.d.ts.map +1 -1
  21. package/bundles/types/checkout/v3/instructions/instruction.payment_methods.show.d.ts.map +1 -1
  22. package/bundles/types/components/param.d.ts +3 -1
  23. package/bundles/types/components/param.d.ts.map +1 -1
  24. package/bundles/types/index-cba.d.ts +9 -6
  25. package/bundles/types/index-cba.d.ts.map +1 -1
  26. package/bundles/types/index.d.ts +9 -6
  27. package/bundles/types/index.d.ts.map +1 -1
  28. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts +198 -0
  29. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts.map +1 -0
  30. package/bundles/types/open-wallets/base/open-wallet.service.d.ts +27 -0
  31. package/bundles/types/open-wallets/base/open-wallet.service.d.ts.map +1 -0
  32. package/bundles/types/open-wallets/enum/event.enum.d.ts +8 -1
  33. package/bundles/types/open-wallets/enum/event.enum.d.ts.map +1 -1
  34. package/bundles/types/open-wallets/enum/payload-format.enum.d.ts +4 -0
  35. package/bundles/types/open-wallets/enum/payload-format.enum.d.ts.map +1 -0
  36. package/bundles/types/open-wallets/enum/service-group.enum.d.ts +5 -0
  37. package/bundles/types/open-wallets/enum/service-group.enum.d.ts.map +1 -0
  38. package/bundles/types/open-wallets/index.d.ts +2 -2
  39. package/bundles/types/open-wallets/index.d.ts.map +1 -1
  40. package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts +495 -0
  41. package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts.map +1 -0
  42. package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts +2 -0
  43. package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts.map +1 -0
  44. package/bundles/types/open-wallets/interfaces/events.interface.d.ts +5 -6
  45. package/bundles/types/open-wallets/interfaces/events.interface.d.ts.map +1 -1
  46. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts +54 -0
  47. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts.map +1 -0
  48. package/bundles/types/open-wallets/interfaces/google-pay/index.d.ts +2 -0
  49. package/bundles/types/open-wallets/interfaces/google-pay/index.d.ts.map +1 -0
  50. package/bundles/types/open-wallets/interfaces/index.d.ts +1 -3
  51. package/bundles/types/open-wallets/interfaces/index.d.ts.map +1 -1
  52. package/bundles/types/open-wallets/interfaces/open-wallet-meta.interface.d.ts +11 -0
  53. package/bundles/types/open-wallets/interfaces/open-wallet-meta.interface.d.ts.map +1 -0
  54. package/bundles/types/open-wallets/interfaces/payment-source.interface.d.ts +0 -1
  55. package/bundles/types/open-wallets/interfaces/payment-source.interface.d.ts.map +1 -1
  56. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts +64 -0
  57. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map +1 -0
  58. package/bundles/types/open-wallets/services/apple-pay/index.d.ts +2 -0
  59. package/bundles/types/open-wallets/services/apple-pay/index.d.ts.map +1 -0
  60. package/bundles/types/open-wallets/services/google-pay/constants/google-pay.constants.d.ts +11 -0
  61. package/bundles/types/open-wallets/services/google-pay/constants/google-pay.constants.d.ts.map +1 -0
  62. package/bundles/types/open-wallets/services/google-pay/constants/index.d.ts +2 -0
  63. package/bundles/types/open-wallets/services/google-pay/constants/index.d.ts.map +1 -0
  64. package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts +55 -0
  65. package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts.map +1 -0
  66. package/bundles/types/open-wallets/services/google-pay/index.d.ts +2 -0
  67. package/bundles/types/open-wallets/services/google-pay/index.d.ts.map +1 -0
  68. package/bundles/types/open-wallets/services/google-pay/utils/google-pay.utils.d.ts +20 -0
  69. package/bundles/types/open-wallets/services/google-pay/utils/google-pay.utils.d.ts.map +1 -0
  70. package/bundles/types/open-wallets/services/google-pay/utils/index.d.ts +2 -0
  71. package/bundles/types/open-wallets/services/google-pay/utils/index.d.ts.map +1 -0
  72. package/bundles/types/open-wallets/services/google-pay/validation/google-pay.validation.d.ts +3 -0
  73. package/bundles/types/open-wallets/services/google-pay/validation/google-pay.validation.d.ts.map +1 -0
  74. package/bundles/types/open-wallets/services/google-pay/validation/index.d.ts +2 -0
  75. package/bundles/types/open-wallets/services/google-pay/validation/index.d.ts.map +1 -0
  76. package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-style.type.d.ts +2 -0
  77. package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-style.type.d.ts.map +1 -0
  78. package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-type.type.d.ts +2 -0
  79. package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-type.type.d.ts.map +1 -0
  80. package/bundles/types/open-wallets/types/apple-pay/index.d.ts +3 -0
  81. package/bundles/types/open-wallets/types/apple-pay/index.d.ts.map +1 -0
  82. package/bundles/types/open-wallets/types/base-event-data.interface.d.ts +5 -0
  83. package/bundles/types/open-wallets/types/base-event-data.interface.d.ts.map +1 -0
  84. package/bundles/types/open-wallets/types/google-pay/google-pay-button-color.type.d.ts +2 -0
  85. package/bundles/types/open-wallets/types/google-pay/google-pay-button-color.type.d.ts.map +1 -0
  86. package/bundles/types/open-wallets/types/google-pay/google-pay-button-size-mode.type.d.ts +2 -0
  87. package/bundles/types/open-wallets/types/google-pay/google-pay-button-size-mode.type.d.ts.map +1 -0
  88. package/bundles/types/open-wallets/types/google-pay/google-pay-button-type.type.d.ts +2 -0
  89. package/bundles/types/open-wallets/types/google-pay/google-pay-button-type.type.d.ts.map +1 -0
  90. package/bundles/types/open-wallets/types/google-pay/index.d.ts +4 -0
  91. package/bundles/types/open-wallets/types/google-pay/index.d.ts.map +1 -0
  92. package/bundles/types/open-wallets/types/index.d.ts +1 -2
  93. package/bundles/types/open-wallets/types/index.d.ts.map +1 -1
  94. package/bundles/types/open-wallets/types/on-shipping-address-change-event-data.interface.d.ts +21 -0
  95. package/bundles/types/open-wallets/types/on-shipping-address-change-event-data.interface.d.ts.map +1 -0
  96. package/bundles/types/open-wallets/types/on-shipping-address-change-event-response.interface.d.ts +6 -0
  97. package/bundles/types/open-wallets/types/on-shipping-address-change-event-response.interface.d.ts.map +1 -0
  98. package/bundles/types/open-wallets/types/on-shipping-option-change-event-data.interface.d.ts +13 -0
  99. package/bundles/types/open-wallets/types/on-shipping-option-change-event-data.interface.d.ts.map +1 -0
  100. package/bundles/types/open-wallets/types/on-shipping-option-change-event-response.interface.d.ts +4 -0
  101. package/bundles/types/open-wallets/types/on-shipping-option-change-event-response.interface.d.ts.map +1 -0
  102. package/bundles/types/open-wallets/types/payment-source.type.d.ts +85 -0
  103. package/bundles/types/open-wallets/types/payment-source.type.d.ts.map +1 -0
  104. package/bundles/types/open-wallets/types/shipping-event-to-response.type.d.ts +6 -0
  105. package/bundles/types/open-wallets/types/shipping-event-to-response.type.d.ts.map +1 -0
  106. package/bundles/types/open-wallets/types/wallet-type.type.d.ts +2 -2
  107. package/bundles/types/open-wallets/types/wallet-type.type.d.ts.map +1 -1
  108. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +16 -16
  109. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
  110. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +9 -9
  111. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -1
  112. package/bundles/types/widget/html-multi-widget.d.ts +13 -1
  113. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
  114. package/bundles/types/widget/multi-widget.d.ts +7 -4
  115. package/bundles/types/widget/multi-widget.d.ts.map +1 -1
  116. package/bundles/widget.umd.js +12754 -11064
  117. package/bundles/widget.umd.js.d.ts +1231 -905
  118. package/bundles/widget.umd.js.min.d.ts +1231 -905
  119. package/bundles/widget.umd.min.js +1 -1
  120. package/docs/afterpay-on-site-messaging-examples.md +60 -0
  121. package/docs/afterpay-on-site-messaging.md +104 -0
  122. package/docs/open-wallet-buttons-examples.md +1188 -0
  123. package/package.json +4 -1
  124. package/bundles/types/open-wallets/base/base-open-wallet.d.ts +0 -33
  125. package/bundles/types/open-wallets/base/base-open-wallet.d.ts.map +0 -1
  126. package/bundles/types/open-wallets/interfaces/base-service-config.interface.d.ts +0 -30
  127. package/bundles/types/open-wallets/interfaces/base-service-config.interface.d.ts.map +0 -1
  128. package/bundles/types/open-wallets/interfaces/base-wallet-meta.interface.d.ts +0 -5
  129. package/bundles/types/open-wallets/interfaces/base-wallet-meta.interface.d.ts.map +0 -1
  130. package/bundles/types/open-wallets/services/index.d.ts +0 -9
  131. package/bundles/types/open-wallets/services/index.d.ts.map +0 -1
  132. package/bundles/types/open-wallets/types/ott-backend.type.d.ts +0 -26
  133. package/bundles/types/open-wallets/types/ott-backend.type.d.ts.map +0 -1
  134. package/bundles/types/open-wallets/types/ott-response.type.d.ts +0 -8
  135. package/bundles/types/open-wallets/types/ott-response.type.d.ts.map +0 -1
@@ -0,0 +1,60 @@
1
+ ## AfterpayOnSiteMessaging
2
+
3
+ Afterpay On-Site Messaging informs customers that Afterpay had an available payment method on the website. Allows to have this features when implemented:
4
+ - An interactive icon ⓘ that shows a modal with some available information.
5
+ - Shows if an instalment is available and its amount.
6
+ - Displays the best payment option available on that particular product.
7
+
8
+ The general flow to use it is:
9
+ 1. Initialize the Afterpay On Site Messaging class, providing a HTML selector id, and configuration parameters that requires AfterPay. The general format is:
10
+ ```js
11
+ var afterpayOnSiteMessaging = new paydock.AfterpayOnSiteMessaging(
12
+ "#selector",
13
+ configParams,
14
+ );
15
+ ```
16
+ 2. Once all in place, just call load function to start the injection, like following:
17
+ ```js
18
+ afterpayOnSiteMessaging.load();
19
+ ```
20
+
21
+ ### AfterpayOnSiteMessaging example
22
+
23
+ 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.
24
+
25
+ ```html
26
+ <!DOCTYPE html>
27
+ <html lang="en">
28
+ <head>
29
+ <meta charset="UTF-8">
30
+ <title>Title</title>
31
+ </head>
32
+ <body>
33
+ <h2>Using PayDock AfterpayOnSiteMessaging!</h2>
34
+ <div id="afterpayOnSiteMessagingDiv"></div>
35
+ </body>
36
+ <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
37
+ <script>
38
+ const afterpayOnSiteMessaging = new paydock.AfterpayOnSiteMessaging(
39
+ '#afterpayOnSiteMessagingDiv',
40
+ {
41
+ mpid: "uuid-uuid-uuid-uuid-uuid",
42
+ placement_id: "uuid-uuid-uuid-uuid-uuid",
43
+ page_type: "product",
44
+ amount: "100",
45
+ currency: "AUD",
46
+ consumer_locale: "AU",
47
+ item_skus: "Test",
48
+ item_categories: "Test",
49
+ is_eligible: true
50
+ }
51
+ );
52
+
53
+ afterpayOnSiteMessaging.onError(function(error) {
54
+ console.log("On Error Callback", error);
55
+ });
56
+
57
+ afterpayOnSiteMessaging.load();
58
+ </script>
59
+ </html>
60
+ ```
@@ -0,0 +1,104 @@
1
+ ## Classes
2
+
3
+ <dl>
4
+ <dt><a href="#AfterpayOnSiteMessaging">AfterpayOnSiteMessaging</a></dt>
5
+ <dd><p>Afterpay On Site Messaging constructor</p>
6
+ </dd>
7
+ </dl>
8
+
9
+ ## Typedefs
10
+
11
+ <dl>
12
+ <dt><a href="#OnErrorCallback">OnErrorCallback</a> : <code>function</code></dt>
13
+ <dd><p>Callback for onError method.</p>
14
+ </dd>
15
+ </dl>
16
+
17
+ ## Interfaces
18
+
19
+ <dl>
20
+ <dt><a href="#IAfterpayOnSiteMessagingConfig">IAfterpayOnSiteMessagingConfig</a> : <code>object</code></dt>
21
+ <dd><p>Interface of data used for Afterpay On Site Messaging configuration.
22
+ 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>
23
+ </dd>
24
+ </dl>
25
+
26
+ <a name="IAfterpayOnSiteMessagingConfig" id="IAfterpayOnSiteMessagingConfig" href="#IAfterpayOnSiteMessagingConfig">&nbsp;</a>
27
+
28
+ ## IAfterpayOnSiteMessagingConfig : <code>object</code>
29
+ Interface of data used for Afterpay On Site Messaging configuration.
30
+ For further information refer to [the documentation](https://developers.afterpay.com/docs/api/afterpay-messaging/getting-started-with-afterpay-on-site-messaging).
31
+
32
+ **Kind**: global interface
33
+
34
+ | Param | Type | Description |
35
+ | --- | --- | --- |
36
+ | [mpid] | <code>string</code> | Used for indicating the MPID. |
37
+ | [placement_id] | <code>string</code> | Used for indicating the product Placement ID. |
38
+ | [page_type] | <code>&#x27;cart&#x27;</code> \| <code>&#x27;product&#x27;</code> | Used for indicating the page type. Allowed values are: cart, product. |
39
+ | [amount] | <code>string</code> | Used for indicating the amount. |
40
+ | [currency] | <code>string</code> | Used for indicating the currency. |
41
+ | [consumer_locale] | <code>string</code> | Used for indicating the consumer locale. |
42
+ | [item_skus] | <code>string</code> | Used for indicating the SKU. |
43
+ | [item_categories] | <code>string</code> | Used for indicating the category. |
44
+ | [is_eligible] | <code>boolean</code> | Used for indicating if the user is eligible. |
45
+
46
+ <a name="AfterpayOnSiteMessaging" id="AfterpayOnSiteMessaging" href="#AfterpayOnSiteMessaging">&nbsp;</a>
47
+
48
+ ## AfterpayOnSiteMessaging
49
+ Afterpay On Site Messaging constructor
50
+
51
+ **Kind**: global class
52
+
53
+ * [AfterpayOnSiteMessaging](#AfterpayOnSiteMessaging)
54
+ * [new exports.AfterpayOnSiteMessaging(selector, config)](#new_AfterpayOnSiteMessaging_new)
55
+ * [.load()](#AfterpayOnSiteMessaging+load)
56
+ * [.onError([callback])](#AfterpayOnSiteMessaging+onError)
57
+
58
+ <a name="new_AfterpayOnSiteMessaging_new" id="new_AfterpayOnSiteMessaging_new" href="#new_AfterpayOnSiteMessaging_new">&nbsp;</a>
59
+
60
+ ### new exports.AfterpayOnSiteMessaging(selector, config)
61
+
62
+ | Param | Type | Description |
63
+ | --- | --- | --- |
64
+ | selector | <code>string</code> | Selector of html element. Container for Afterpay On Site Messaging. |
65
+ | config | [<code>IAfterpayOnSiteMessagingConfig</code>](#IAfterpayOnSiteMessagingConfig) | Required configuration for the Afterpay On Site Messaging. |
66
+
67
+ **Example**
68
+ ```js
69
+ var afterpayOnSiteMessaging = new AfterpayOnSiteMessaging('#afterpayButton', config);
70
+ ```
71
+ <a name="AfterpayOnSiteMessaging+load" id="AfterpayOnSiteMessaging+load" href="#AfterpayOnSiteMessaging+load">&nbsp;</a>
72
+
73
+ ### afterpayOnSiteMessaging.load()
74
+ The final method after configuring the AfterpayOnSiteMessaging to
75
+ start the load process.
76
+
77
+ **Kind**: instance method of [<code>AfterpayOnSiteMessaging</code>](#AfterpayOnSiteMessaging)
78
+ <a name="AfterpayOnSiteMessaging+onError" id="AfterpayOnSiteMessaging+onError" href="#AfterpayOnSiteMessaging+onError">&nbsp;</a>
79
+
80
+ ### afterpayOnSiteMessaging.onError([callback])
81
+ If the process fails, the function passed as parameter will be called.
82
+ Important: Do not perform thread blocking operations in callback such as window.alert() calls.
83
+
84
+ **Kind**: instance method of [<code>AfterpayOnSiteMessaging</code>](#AfterpayOnSiteMessaging)
85
+
86
+ | Param | Type | Description |
87
+ | --- | --- | --- |
88
+ | [callback] | [<code>OnErrorCallback</code>](#OnErrorCallback) | Function to be called when there is an error in the flow. |
89
+
90
+ **Example**
91
+ ```js
92
+ AfterpayOnSiteMessaging.onError((eventData) => console.log('Some error occur'));
93
+ ```
94
+ <a name="OnErrorCallback" id="OnErrorCallback" href="#OnErrorCallback">&nbsp;</a>
95
+
96
+ ## OnErrorCallback : <code>function</code>
97
+ Callback for onError method.
98
+
99
+ **Kind**: global typedef
100
+
101
+ | Param | Type |
102
+ | --- | --- |
103
+ | data | <code>unknown</code> \| <code>null</code> |
104
+