@paydock/client-sdk 1.143.0 → 1.144.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 (75) hide show
  1. package/README.md +158 -0
  2. package/bundles/index.cjs +920 -661
  3. package/bundles/index.cjs.d.ts +1046 -399
  4. package/bundles/index.mjs +915 -662
  5. package/bundles/index.mjs.d.ts +1046 -399
  6. package/bundles/types/api/api-base.d.ts +15 -2
  7. package/bundles/types/api/api-base.d.ts.map +1 -1
  8. package/bundles/types/api/api-charge-internal.d.ts +3 -49
  9. package/bundles/types/api/api-charge-internal.d.ts.map +1 -1
  10. package/bundles/types/api/api-checkout-internal.d.ts +1 -47
  11. package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
  12. package/bundles/types/api/api-shared-types.d.ts +53 -0
  13. package/bundles/types/api/api-shared-types.d.ts.map +1 -0
  14. package/bundles/types/canvas-3ds/canvas-3ds-event-map.d.ts +95 -0
  15. package/bundles/types/canvas-3ds/canvas-3ds-event-map.d.ts.map +1 -0
  16. package/bundles/types/canvas-3ds/canvas-3ds.d.ts +10 -7
  17. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -1
  18. package/bundles/types/canvas-3ds/index.d.ts +4 -0
  19. package/bundles/types/canvas-3ds/index.d.ts.map +1 -1
  20. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +41 -12
  21. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
  22. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts +20 -2
  23. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -1
  24. package/bundles/types/checkout/checkout-event-map.d.ts +43 -0
  25. package/bundles/types/checkout/checkout-event-map.d.ts.map +1 -0
  26. package/bundles/types/checkout/checkout.d.ts +25 -9
  27. package/bundles/types/checkout/checkout.d.ts.map +1 -1
  28. package/bundles/types/checkout/v1/instructions/instruction.canvas_3ds.show.d.ts.map +1 -1
  29. package/bundles/types/checkout/v3/instructions/instruction.canvas_3ds.show.d.ts.map +1 -1
  30. package/bundles/types/components/param.d.ts +29 -0
  31. package/bundles/types/components/param.d.ts.map +1 -1
  32. package/bundles/types/helper/event-error.d.ts +49 -1
  33. package/bundles/types/helper/event-error.d.ts.map +1 -1
  34. package/bundles/types/index-cba.d.ts +3 -1
  35. package/bundles/types/index-cba.d.ts.map +1 -1
  36. package/bundles/types/index.d.ts +12 -1
  37. package/bundles/types/index.d.ts.map +1 -1
  38. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts +37 -0
  39. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts.map +1 -1
  40. package/bundles/types/open-wallets/base/open-wallet.service.d.ts +12 -0
  41. package/bundles/types/open-wallets/base/open-wallet.service.d.ts.map +1 -1
  42. package/bundles/types/open-wallets/google-pay-open-wallet-button.d.ts.map +1 -1
  43. package/bundles/types/open-wallets/index.d.ts +25 -0
  44. package/bundles/types/open-wallets/index.d.ts.map +1 -1
  45. package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts +2 -2
  46. package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts.map +1 -1
  47. package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts +1 -1
  48. package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts.map +1 -1
  49. package/bundles/types/open-wallets/interfaces/events.interface.d.ts +1 -1
  50. package/bundles/types/open-wallets/interfaces/events.interface.d.ts.map +1 -1
  51. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts +46 -0
  52. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts.map +1 -1
  53. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts +48 -2
  54. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map +1 -1
  55. package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts.map +1 -1
  56. package/bundles/types/open-wallets/types/index.d.ts +1 -1
  57. package/bundles/types/open-wallets/types/index.d.ts.map +1 -1
  58. package/bundles/types/open-wallets/types/payment-source.type.d.ts +104 -0
  59. package/bundles/types/open-wallets/types/payment-source.type.d.ts.map +1 -1
  60. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
  61. package/bundles/types/wallet-buttons/interfaces.d.ts +55 -1
  62. package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -1
  63. package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts +7 -0
  64. package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts.map +1 -1
  65. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +23 -0
  66. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -1
  67. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +31 -0
  68. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -1
  69. package/bundles/widget.umd.js +920 -661
  70. package/bundles/widget.umd.js.d.ts +1046 -399
  71. package/bundles/widget.umd.js.min.d.ts +1046 -399
  72. package/bundles/widget.umd.min.js +1 -1
  73. package/docs/api-canvas3ds.md +19 -12
  74. package/docs/open-wallet-buttons.md +158 -0
  75. package/package.json +6 -2
@@ -28,7 +28,7 @@ Class Canvas3ds include method for working on html
28
28
  * [new Canvas3ds(selector, token)](#new_Canvas3ds_new)
29
29
  * [.load()](#Canvas3ds+load)
30
30
  * [.setEnv(env, [alias])](#Canvas3ds+setEnv)
31
- * [.on(eventName, [cb])](#Canvas3ds+on) ⇒ <code>Promise.&lt;IEventData&gt;</code> \| <code>void</code>
31
+ * [.on(eventName, cb)](#Canvas3ds+on) ⇒
32
32
  * [.hide([saveSize])](#Canvas3ds+hide)
33
33
  * [.show()](#Canvas3ds+show)
34
34
  * [.reload()](#Canvas3ds+reload)
@@ -71,24 +71,31 @@ widget.setEnv('production');
71
71
  ```
72
72
  <a name="Canvas3ds+on" id="Canvas3ds+on" href="#Canvas3ds+on">&nbsp;</a>
73
73
 
74
- ### canvas3ds.on(eventName, [cb]) ⇒ <code>Promise.&lt;IEventData&gt;</code> \| <code>void</code>
75
- Listen to events of widget
74
+ ### canvas3ds.on(eventName, cb) ⇒
75
+ Listen to events of widget.
76
+
77
+ Available event names are defined in [Canvas3dsEventMap](Canvas3dsEventMap) (typed) and
78
+ [CANVAS_3DS_EVENT](CANVAS_3DS_EVENT) (string constants). Using a literal event name
79
+ narrows the callback payload via the typed overloads.
76
80
 
77
81
  **Kind**: instance method of [<code>Canvas3ds</code>](#Canvas3ds)
82
+ **Returns**: `void` when a callback is provided; otherwise a Promise that resolves with the event payload.
78
83
 
79
- | Param | Type | Description |
80
- | --- | --- | --- |
81
- | eventName | <code>string</code> | Available event names [EVENT](#EVENT) [STANDALONE_3DS_EVENT](#STANDALONE_3DS_EVENT) |
82
- | [cb] | <code>listener</code> | |
84
+ | Param | Description |
85
+ | --- | --- |
86
+ | eventName | Event name from [Canvas3dsEventMap](Canvas3dsEventMap) or any string for dynamic events. |
87
+ | cb | Optional listener callback. If omitted, returns a Promise that resolves on the next emission. |
83
88
 
84
89
  **Example**
85
90
  ```js
86
- widget.on('chargeAuthReject', function (data) {
87
- console.log(data);
91
+ // Callback form — payload is narrowed by the event name
92
+ widget.on('chargeAuthReject', (data) => {
93
+ console.log(data); // data is Canvas3dsAuthPayload | Canvas3dsChargeAuthEventPayload
88
94
  });
89
- // or
90
- widget.on('chargeAuthReject').then(function (data) {
91
- console.log(data);
95
+
96
+ // Promise form
97
+ widget.on('chargeAuthReject').then((data) => {
98
+ console.log(data);
92
99
  });
93
100
  ```
94
101
  <a name="Canvas3ds+hide" id="Canvas3ds+hide" href="#Canvas3ds+hide">&nbsp;</a>
@@ -45,6 +45,24 @@ Used in the <code>context.operation</code> field of <a href="#OnErrorEventData">
45
45
  </dd>
46
46
  </dl>
47
47
 
48
+ ## Functions
49
+
50
+ <dl>
51
+ <dt><a href="#enable">enable()</a></dt>
52
+ <dd><p>Enables the wallet button, restoring interactivity and visual appearance.
53
+ Available on both ApplePayOpenWalletButton and GooglePayOpenWalletButton.</p>
54
+ <p>Idempotent — calling on an already-enabled button has no effect.</p>
55
+ </dd>
56
+ <dt><a href="#disable">disable()</a></dt>
57
+ <dd><p>Disables the wallet button, preventing clicks and applying a visual disabled state.
58
+ When disabled, the button appears grayed out and does not respond to user interaction.
59
+ Available on both ApplePayOpenWalletButton and GooglePayOpenWalletButton.</p>
60
+ <p>Idempotent — calling on an already-disabled button has no effect.
61
+ Safe to call before <code>load()</code> (no-throw); the disabled styles are applied
62
+ once the container element exists.</p>
63
+ </dd>
64
+ </dl>
65
+
48
66
  ## Typedefs
49
67
 
50
68
  <dl>
@@ -470,6 +488,8 @@ if the service type does not match Apple Pay.
470
488
  * [ApplePayOpenWalletButton](#ApplePayOpenWalletButton) ⇐ [<code>OpenWalletButtons</code>](#OpenWalletButtons)
471
489
  * [new ApplePayOpenWalletButton(selector, publicKeyOrAccessToken, serviceId, meta)](#new_ApplePayOpenWalletButton_new)
472
490
  * [.load()](#OpenWalletButtons+load)
491
+ * [.enable()](#OpenWalletButtons+enable)
492
+ * [.disable()](#OpenWalletButtons+disable)
473
493
  * [.setEnv(env, [alias])](#OpenWalletButtons+setEnv)
474
494
  * [.setMeta(meta)](#OpenWalletButtons+setMeta)
475
495
  * [.destroy()](#OpenWalletButtons+destroy)
@@ -529,6 +549,41 @@ button.onSuccess((data) => { ... });
529
549
  button.onError((error) => { ... });
530
550
  button.load();
531
551
  ```
552
+ <a name="OpenWalletButtons+enable" id="OpenWalletButtons+enable" href="#OpenWalletButtons+enable">&nbsp;</a>
553
+
554
+ ### applePayOpenWalletButton.enable()
555
+ Enables the wallet button, restoring interactivity and visual appearance.
556
+ If the button was previously disabled via `disable()`, calling this method
557
+ re-enables clicks and removes the disabled visual state.
558
+
559
+ Idempotent — calling on an already-enabled button has no effect.
560
+
561
+ **Kind**: instance method of [<code>ApplePayOpenWalletButton</code>](#ApplePayOpenWalletButton)
562
+ **Example**
563
+ ```js
564
+ button.enable();
565
+ ```
566
+ <a name="OpenWalletButtons+disable" id="OpenWalletButtons+disable" href="#OpenWalletButtons+disable">&nbsp;</a>
567
+
568
+ ### applePayOpenWalletButton.disable()
569
+ Disables the wallet button, preventing clicks and applying a visual disabled state.
570
+ When disabled, the button appears grayed out (`opacity: 0.5`) and does not
571
+ respond to user interaction (`pointer-events: none`). For accessibility, the
572
+ `aria-disabled="true"` attribute is also set on the container.
573
+
574
+ Programmatic clicks (e.g. invoked by the wallet provider's SDK) are blocked
575
+ by an explicit guard inside the click handler — the button's wallet service
576
+ checks the disabled state before processing.
577
+
578
+ Idempotent — calling on an already-disabled button has no effect.
579
+ Safe to call before `load()` (no-throw); the styles are applied once the
580
+ container element exists.
581
+
582
+ **Kind**: instance method of [<code>ApplePayOpenWalletButton</code>](#ApplePayOpenWalletButton)
583
+ **Example**
584
+ ```js
585
+ button.disable();
586
+ ```
532
587
  <a name="OpenWalletButtons+setEnv" id="OpenWalletButtons+setEnv" href="#OpenWalletButtons+setEnv">&nbsp;</a>
533
588
 
534
589
  ### applePayOpenWalletButton.setEnv(env, [alias])
@@ -834,6 +889,8 @@ if the service type does not match Google Pay.
834
889
  * [GooglePayOpenWalletButton](#GooglePayOpenWalletButton) ⇐ [<code>OpenWalletButtons</code>](#OpenWalletButtons)
835
890
  * [new GooglePayOpenWalletButton(selector, publicKeyOrAccessToken, serviceId, meta)](#new_GooglePayOpenWalletButton_new)
836
891
  * [.load()](#OpenWalletButtons+load)
892
+ * [.enable()](#OpenWalletButtons+enable)
893
+ * [.disable()](#OpenWalletButtons+disable)
837
894
  * [.setEnv(env, [alias])](#OpenWalletButtons+setEnv)
838
895
  * [.setMeta(meta)](#OpenWalletButtons+setMeta)
839
896
  * [.destroy()](#OpenWalletButtons+destroy)
@@ -891,6 +948,41 @@ button.onSuccess((data) => { ... });
891
948
  button.onError((error) => { ... });
892
949
  button.load();
893
950
  ```
951
+ <a name="OpenWalletButtons+enable" id="OpenWalletButtons+enable" href="#OpenWalletButtons+enable">&nbsp;</a>
952
+
953
+ ### googlePayOpenWalletButton.enable()
954
+ Enables the wallet button, restoring interactivity and visual appearance.
955
+ If the button was previously disabled via `disable()`, calling this method
956
+ re-enables clicks and removes the disabled visual state.
957
+
958
+ Idempotent — calling on an already-enabled button has no effect.
959
+
960
+ **Kind**: instance method of [<code>GooglePayOpenWalletButton</code>](#GooglePayOpenWalletButton)
961
+ **Example**
962
+ ```js
963
+ button.enable();
964
+ ```
965
+ <a name="OpenWalletButtons+disable" id="OpenWalletButtons+disable" href="#OpenWalletButtons+disable">&nbsp;</a>
966
+
967
+ ### googlePayOpenWalletButton.disable()
968
+ Disables the wallet button, preventing clicks and applying a visual disabled state.
969
+ When disabled, the button appears grayed out (`opacity: 0.5`) and does not
970
+ respond to user interaction (`pointer-events: none`). For accessibility, the
971
+ `aria-disabled="true"` attribute is also set on the container.
972
+
973
+ Programmatic clicks (e.g. invoked by the wallet provider's SDK) are blocked
974
+ by an explicit guard inside the click handler — the button's wallet service
975
+ checks the disabled state before processing.
976
+
977
+ Idempotent — calling on an already-disabled button has no effect.
978
+ Safe to call before `load()` (no-throw); the styles are applied once the
979
+ container element exists.
980
+
981
+ **Kind**: instance method of [<code>GooglePayOpenWalletButton</code>](#GooglePayOpenWalletButton)
982
+ **Example**
983
+ ```js
984
+ button.disable();
985
+ ```
894
986
  <a name="OpenWalletButtons+setEnv" id="OpenWalletButtons+setEnv" href="#OpenWalletButtons+setEnv">&nbsp;</a>
895
987
 
896
988
  ### googlePayOpenWalletButton.setEnv(env, [alias])
@@ -1196,6 +1288,8 @@ These subclasses inherit all event handlers and lifecycle methods documented bel
1196
1288
 
1197
1289
  * *[OpenWalletButtons](#OpenWalletButtons)*
1198
1290
  * *[.load()](#OpenWalletButtons+load)*
1291
+ * *[.enable()](#OpenWalletButtons+enable)*
1292
+ * *[.disable()](#OpenWalletButtons+disable)*
1199
1293
  * *[.setEnv(env, [alias])](#OpenWalletButtons+setEnv)*
1200
1294
  * *[.setMeta(meta)](#OpenWalletButtons+setMeta)*
1201
1295
  * *[.destroy()](#OpenWalletButtons+destroy)*
@@ -1224,6 +1318,41 @@ button.onSuccess((data) => { ... });
1224
1318
  button.onError((error) => { ... });
1225
1319
  button.load();
1226
1320
  ```
1321
+ <a name="OpenWalletButtons+enable" id="OpenWalletButtons+enable" href="#OpenWalletButtons+enable">&nbsp;</a>
1322
+
1323
+ ### *openWalletButtons.enable()*
1324
+ Enables the wallet button, restoring interactivity and visual appearance.
1325
+ If the button was previously disabled via `disable()`, calling this method
1326
+ re-enables clicks and removes the disabled visual state.
1327
+
1328
+ Idempotent — calling on an already-enabled button has no effect.
1329
+
1330
+ **Kind**: instance method of [<code>OpenWalletButtons</code>](#OpenWalletButtons)
1331
+ **Example**
1332
+ ```js
1333
+ button.enable();
1334
+ ```
1335
+ <a name="OpenWalletButtons+disable" id="OpenWalletButtons+disable" href="#OpenWalletButtons+disable">&nbsp;</a>
1336
+
1337
+ ### *openWalletButtons.disable()*
1338
+ Disables the wallet button, preventing clicks and applying a visual disabled state.
1339
+ When disabled, the button appears grayed out (`opacity: 0.5`) and does not
1340
+ respond to user interaction (`pointer-events: none`). For accessibility, the
1341
+ `aria-disabled="true"` attribute is also set on the container.
1342
+
1343
+ Programmatic clicks (e.g. invoked by the wallet provider's SDK) are blocked
1344
+ by an explicit guard inside the click handler — the button's wallet service
1345
+ checks the disabled state before processing.
1346
+
1347
+ Idempotent — calling on an already-disabled button has no effect.
1348
+ Safe to call before `load()` (no-throw); the styles are applied once the
1349
+ container element exists.
1350
+
1351
+ **Kind**: instance method of [<code>OpenWalletButtons</code>](#OpenWalletButtons)
1352
+ **Example**
1353
+ ```js
1354
+ button.disable();
1355
+ ```
1227
1356
  <a name="OpenWalletButtons+setEnv" id="OpenWalletButtons+setEnv" href="#OpenWalletButtons+setEnv">&nbsp;</a>
1228
1357
 
1229
1358
  ### *openWalletButtons.setEnv(env, [alias])*
@@ -1570,6 +1699,35 @@ Used in the `context.operation` field of [OnErrorEventData](#OnErrorEventData).
1570
1699
  | HANDLER_REGISTRATION | <code>string</code> | <code>&quot;handler_registration&quot;</code> | A required event handler was not registered before calling load(). |
1571
1700
  | SHIPPING_UPDATE | <code>string</code> | <code>&quot;shipping_update&quot;</code> | Processing a shipping address or shipping option update failed. |
1572
1701
 
1702
+ <a name="enable" id="enable" href="#enable">&nbsp;</a>
1703
+
1704
+ ## enable()
1705
+ Enables the wallet button, restoring interactivity and visual appearance.
1706
+ Available on both ApplePayOpenWalletButton and GooglePayOpenWalletButton.
1707
+
1708
+ Idempotent — calling on an already-enabled button has no effect.
1709
+
1710
+ **Kind**: global function
1711
+ **Example**
1712
+ ```js
1713
+ button.enable();
1714
+ ```
1715
+ <a name="disable" id="disable" href="#disable">&nbsp;</a>
1716
+
1717
+ ## disable()
1718
+ Disables the wallet button, preventing clicks and applying a visual disabled state.
1719
+ When disabled, the button appears grayed out and does not respond to user interaction.
1720
+ Available on both ApplePayOpenWalletButton and GooglePayOpenWalletButton.
1721
+
1722
+ Idempotent — calling on an already-disabled button has no effect.
1723
+ Safe to call before `load()` (no-throw); the disabled styles are applied
1724
+ once the container element exists.
1725
+
1726
+ **Kind**: global function
1727
+ **Example**
1728
+ ```js
1729
+ button.disable();
1730
+ ```
1573
1731
  <a name="OnClickCallback" id="OnClickCallback" href="#OnClickCallback">&nbsp;</a>
1574
1732
 
1575
1733
  ## OnClickCallback ⇒ <code>boolean</code> \| <code>void</code> \| <code>Promise.&lt;(boolean\|void)&gt;</code>
package/package.json CHANGED
@@ -104,7 +104,7 @@
104
104
  }
105
105
  },
106
106
  "name": "@paydock/client-sdk",
107
- "version": "1.143.0",
107
+ "version": "1.144.1-beta",
108
108
  "scripts": {
109
109
  "build:doc": "node docs/html/marked.js",
110
110
  "build:js": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
@@ -221,7 +221,11 @@
221
221
  "sha.js@>=2.0.0 <=2.4.11": "2.4.12",
222
222
  "pbkdf2": ">=3.1.3",
223
223
  "form-data": ">=4.0.4",
224
- "qs": ">=6.14.1",
224
+ "qs": ">=6.15.2",
225
+ "@babel/plugin-transform-modules-systemjs": ">=7.29.4",
226
+ "fast-uri": ">=3.1.2",
227
+ "tmp": ">=0.2.6",
228
+ "ws": ">=8.20.1",
225
229
  "minimatch@^3": "3.1.5",
226
230
  "minimatch@^5": "5.1.9",
227
231
  "minimatch@^9": "9.0.9",