@paydock/client-sdk 1.117.0 → 1.118.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 (47) hide show
  1. package/README.md +14 -11
  2. package/bundles/index.cjs +373 -68
  3. package/bundles/index.cjs.d.ts +46 -13
  4. package/bundles/index.mjs +373 -68
  5. package/bundles/index.mjs.d.ts +46 -13
  6. package/bundles/types/api/api-checkout-internal.d.ts +1 -0
  7. package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
  8. package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -1
  9. package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +1 -0
  10. package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -1
  11. package/bundles/types/components/param.d.ts +2 -0
  12. package/bundles/types/components/param.d.ts.map +1 -1
  13. package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
  14. package/bundles/types/index-cba.d.ts +2 -1
  15. package/bundles/types/index-cba.d.ts.map +1 -1
  16. package/bundles/types/index.d.ts +1 -1
  17. package/bundles/types/index.d.ts.map +1 -1
  18. package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts +4 -4
  19. package/bundles/types/secure-remote-commerce/index.d.ts +1 -0
  20. package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
  21. package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts +12 -0
  22. package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts.map +1 -0
  23. package/bundles/types/shared/services/configuration-validation/types.d.ts +73 -0
  24. package/bundles/types/shared/services/configuration-validation/types.d.ts.map +1 -0
  25. package/bundles/types/wallet-buttons/enums.d.ts +12 -0
  26. package/bundles/types/wallet-buttons/enums.d.ts.map +1 -0
  27. package/bundles/types/wallet-buttons/index.d.ts +2 -1
  28. package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
  29. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +28 -15
  30. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
  31. package/bundles/types/wallet-buttons-express/index.d.ts +1 -0
  32. package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -1
  33. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +1 -0
  34. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -1
  35. package/bundles/types/widget/configuration.d.ts +6 -2
  36. package/bundles/types/widget/configuration.d.ts.map +1 -1
  37. package/bundles/types/widget/multi-widget.d.ts +1 -0
  38. package/bundles/types/widget/multi-widget.d.ts.map +1 -1
  39. package/bundles/widget.umd.js +373 -68
  40. package/bundles/widget.umd.js.d.ts +46 -13
  41. package/bundles/widget.umd.js.min.d.ts +46 -13
  42. package/bundles/widget.umd.min.js +1 -61
  43. package/docs/paypal-data-collector-examples.md +6 -5
  44. package/docs/paypal-data-collector.md +6 -6
  45. package/docs/wallet-buttons-express.md +1 -0
  46. package/docs/wallet-buttons.md +1 -0
  47. package/package.json +2 -2
package/README.md CHANGED
@@ -5944,6 +5944,7 @@ Interface of data used by the wallet checkout and payment proccess.
5944
5944
  | [amount_label] | <code>string</code> | Label shown next to the total amount to be paid. Required for [Stripe, ApplePay, GooglePay]. N/A for [FlyPay, Flypay V2, PayPal, Afterpay]. |
5945
5945
  | [country] | <code>string</code> | Country of the user. 2 letter ISO code format. Required for [Stripe, ApplePay, GooglePay, Afterpay]. N/A for [FlyPay, Flypay V2, PayPal]. |
5946
5946
  | [pay_later] | <code>boolean</code> | Used to enable Pay Later feature in PayPal Smart Checkout WalletButton integration when available. Optional for [PayPal]. N/A for other wallets. |
5947
+ | [hide_message] | <code>boolean</code> | Used to hide Pay Later message in PayPal Smart Checkout WalletButton integration. Optional for [PayPal]. N/A for other wallets. |
5947
5948
  | [standalone] | <code>boolean</code> | Used to enable Standalone Buttons feature in PayPal Smart Checkout WalletButton integration. Used together with `pay_later`. Optional for [PayPal]. N/A for other wallets. |
5948
5949
  | [show_billing_address] | <code>boolean</code> | Used to hide/show the billing address on ApplePay and GooglePay popups. Default value is false. Optional for [ApplePay, GooglePay]. N/A for other wallets. |
5949
5950
  | [request_payer_name] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
@@ -6723,6 +6724,7 @@ For in-depth information, please refer to the [Paypal documentation](https://dev
6723
6724
  | amount | <code>number</code> | Total amount of the transaction. Represents the money to be charged. |
6724
6725
  | currency | <code>string</code> | Currency of the transaction in ISO 4217 currency code format. |
6725
6726
  | [pay_later] | <code>boolean</code> | Flag to enable Pay Later feature of PayPal, allowing Pay in 4. Default false. |
6727
+ | [hide_message] | <code>boolean</code> | Used to hide Pay Later message in PayPal Smart Checkout WalletButton integration. Optional for [PayPal]. N/A for other wallets. |
6726
6728
  | [standalone] | <code>boolean</code> | Flag to specify if the PayPal standalone button should be used. Default false. |
6727
6729
  | [capture] | <code>boolean</code> | Flag to specify if the transaction amount should be captured immediately or authorized for later capture. Default false. |
6728
6730
  | [style] | <code>object</code> | Styling configurations for the PayPal widget. |
@@ -8326,7 +8328,7 @@ A full description of the config parameters for [PayPalDataCollector](#PayPalDat
8326
8328
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
8327
8329
  <script>
8328
8330
  let payPalDataCollector = new paydock.PayPalDataCollector(
8329
- sourceWebsiteIdentifier,
8331
+ 'FLOW_ID',
8330
8332
  {
8331
8333
  mouse_movement: true
8332
8334
  }
@@ -8338,10 +8340,11 @@ A full description of the config parameters for [PayPalDataCollector](#PayPalDat
8338
8340
  console.log("On Error Callback", error);
8339
8341
  });
8340
8342
 
8341
- const collectedDeviceData = await payPalDataCollector.collectDeviceData();
8342
-
8343
- //Here when the promise is resolved, it should be able to see the correlation_id.
8344
- const correlationId = collectedDeviceData.correlation_id
8343
+ payPalDataCollector.collectDeviceData().then(function(collectedDeviceData) {
8344
+ //Here when the promise is resolved, it should be able to see the correlation_id.
8345
+ const correlationId = collectedDeviceData.correlation_id;
8346
+ console.log("On Success", correlationId);
8347
+ });
8345
8348
  </script>
8346
8349
  </html>
8347
8350
  ```
@@ -8417,19 +8420,19 @@ PayPal Data Collector Widget constructor
8417
8420
  **Kind**: global class
8418
8421
 
8419
8422
  * [PayPalDataCollector](#PayPalDataCollector)
8420
- * [new PayPalDataCollector(flowId, config)](#new_PayPalDataCollector_new)
8423
+ * [new PayPalDataCollector([flowId], [config])](#new_PayPalDataCollector_new)
8421
8424
  * [.collectDeviceData()](#PayPalDataCollector+collectDeviceData) ⇒ [<code>Promise.&lt;CollectedDeviceData&gt;</code>](#CollectedDeviceData)
8422
8425
  * [.onError([callback])](#PayPalDataCollector+onError)
8423
8426
  * [.setEnv(env)](#PayPalDataCollector+setEnv)
8424
8427
 
8425
8428
  <a name="new_PayPalDataCollector_new" id="new_PayPalDataCollector_new" href="#new_PayPalDataCollector_new">&nbsp;</a>
8426
8429
 
8427
- ### new PayPalDataCollector(flowId, config)
8430
+ ### new PayPalDataCollector([flowId], [config])
8428
8431
 
8429
8432
  | Param | Type | Description |
8430
8433
  | --- | --- | --- |
8431
- | flowId | <code>string</code> | This string identifies the source website of the FraudNet request. |
8432
- | config | [<code>PayPalDataCollectorConfig</code>](#PayPalDataCollectorConfig) | Extra configuration for the widget. |
8434
+ | [flowId] | <code>string</code> | This string identifies the source website of the FraudNet request. |
8435
+ | [config] | [<code>PayPalDataCollectorConfig</code>](#PayPalDataCollectorConfig) | Extra configuration for the widget. |
8433
8436
 
8434
8437
  **Example**
8435
8438
  ```js
@@ -8439,10 +8442,10 @@ var payPalDataCollector = new PayPalDataCollector('FLOW_ID', {});
8439
8442
 
8440
8443
  ### payPalDataCollector.collectDeviceData() ⇒ [<code>Promise.&lt;CollectedDeviceData&gt;</code>](#CollectedDeviceData)
8441
8444
  After configuring the PayPalDataCollector Widget, starts the process and returns
8442
- the correlation id used among the requests.
8445
+ the correlation id used among the requests asynchronously.
8443
8446
 
8444
8447
  **Kind**: instance method of [<code>PayPalDataCollector</code>](#PayPalDataCollector)
8445
- **Returns**: [<code>Promise.&lt;CollectedDeviceData&gt;</code>](#CollectedDeviceData) - Promise when resolved, returnsa an object
8448
+ **Returns**: [<code>Promise.&lt;CollectedDeviceData&gt;</code>](#CollectedDeviceData) - Promise when resolved, returns an object
8446
8449
  that contains the `correlation_id` key.
8447
8450
  **Example**
8448
8451
  ```js