@paydock/client-sdk 1.141.0 → 1.143.0-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 (37) hide show
  1. package/README.md +85 -0
  2. package/bundles/index.cjs +370 -204
  3. package/bundles/index.cjs.d.ts +535 -481
  4. package/bundles/index.mjs +205 -38
  5. package/bundles/index.mjs.d.ts +535 -481
  6. package/bundles/types/components/apple-pay-version.d.ts +29 -0
  7. package/bundles/types/components/apple-pay-version.d.ts.map +1 -0
  8. package/bundles/types/index.d.ts +2 -2
  9. package/bundles/types/index.d.ts.map +1 -1
  10. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts.map +1 -1
  11. package/bundles/types/open-wallets/index.d.ts +1 -1
  12. package/bundles/types/open-wallets/index.d.ts.map +1 -1
  13. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map +1 -1
  14. package/bundles/types/payment-source-widget/index.d.ts +1 -1
  15. package/bundles/types/payment-source-widget/index.d.ts.map +1 -1
  16. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -1
  17. package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts +1 -0
  18. package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -1
  19. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +16 -0
  20. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -1
  21. package/bundles/types/wallet-buttons-express/index.d.ts +36 -0
  22. package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -1
  23. package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -1
  24. package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts +1 -1
  25. package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map +1 -1
  26. package/bundles/types/widget/html-multi-widget.d.ts +4 -1
  27. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
  28. package/bundles/types/widget/index.d.ts +2 -1
  29. package/bundles/types/widget/index.d.ts.map +1 -1
  30. package/bundles/types/widget/widget-event-map.d.ts +37 -0
  31. package/bundles/types/widget/widget-event-map.d.ts.map +1 -0
  32. package/bundles/widget.umd.js +370 -204
  33. package/bundles/widget.umd.js.d.ts +535 -481
  34. package/bundles/widget.umd.js.min.d.ts +535 -481
  35. package/bundles/widget.umd.min.js +1 -1
  36. package/docs/wallet-buttons-express.md +85 -0
  37. package/package.json +12 -5
@@ -1361,76 +1361,169 @@ declare class MultiWidget {
1361
1361
  }): void;
1362
1362
  }
1363
1363
 
1364
- interface IEventMetaData extends IEventData$1 {
1365
- configuration_token: string;
1366
- type: string;
1367
- account_name?: string;
1368
- account_number?: string;
1364
+ /**
1365
+ *
1366
+ * Class PaymentSourceWidget include method for for creating iframe url
1367
+ * @constructor
1368
+ *
1369
+ * @param {string} publicKey - PayDock users public key
1370
+ * @param {string} customer - PayDock's customer_id or customer_reference (In order to use the customer_reference, you must explicitly specify useReference as true)
1371
+ * @param {boolean} [useReference=false]
1372
+ *
1373
+ * @example
1374
+ * var widget = new PaymentSourceWidget('publicKey','customerId');
1375
+ * // or
1376
+ * var widget = new PaymentSourceWidget('publicKey', customerReference, true);
1377
+ */
1378
+ declare class PaymentSourceWidget {
1379
+ protected link: Link;
1380
+ protected configs: Configuration[];
1381
+ protected configTokens: string[];
1382
+ protected publicKey: string;
1383
+ /** @constructs */ constructor(accessToken: string, queryToken: string);
1384
+ /**
1385
+ * Object contain styles for widget
1386
+ *
1387
+ * @example
1388
+ * widget.setStyles({
1389
+ * background_color: 'rgb(0, 0, 0)',
1390
+ * border_color: 'yellow',
1391
+ * text_color: '#FFFFAA',
1392
+ * icon_size: 'small',
1393
+ * font_size: '20px'
1394
+ * });
1395
+ * @param {IStyles} fields - name of styles which can be shown in widget [STYLE]{@link STYLE}
1396
+ */
1397
+ setStyles(styles: IStyles$1): void;
1398
+ setStyle(param: string, value: string): void;
1399
+ /**
1400
+ * Current method can set custom ID to identify the data in the future
1401
+ *
1402
+ * @example
1403
+ * widget.setRefId('id');
1404
+ *
1405
+ * @param {string} refId - custom id
1406
+ */
1407
+ setRefId(refId: string): void;
1408
+ /**
1409
+ * Current method can set limit for payment sources count. In case when limit sets less then general count will be shown pagination buttons prev and next.
1410
+ *
1411
+ * @param {string} count - payment source count
1412
+ */
1413
+ setLimit(count: number): void;
1414
+ /**
1415
+ * Current method can change environment. By default environment = sandbox
1416
+ * Also we can change domain alias for this environment. By default domain_alias = paydock.com
1417
+ *
1418
+ * @example
1419
+ * widget.setEnv('production');
1420
+ * @param {string} env - sandbox, production
1421
+ * @param {string} [alias] - Own domain alias
1422
+ */
1423
+ setEnv(env: string, alias?: string): void;
1424
+ getEnv(): void;
1425
+ /**
1426
+ * Method for getting iframe's url
1427
+ */
1428
+ getIFrameUrl(): string;
1429
+ /**
1430
+ * Show payment source inside widget only with requested gateway ids
1431
+ *
1432
+ *
1433
+ * @param {string[]} ids - List of gateway_id
1434
+ */
1435
+ filterByGatewayIds(ids: string[]): void;
1436
+ /**
1437
+ *
1438
+ * Show payment source inside widget only with requested payment source types
1439
+ *
1440
+ * @param types - List of payment source types. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
1441
+ */
1442
+ filterByTypes(types: string[]): void;
1443
+ /**
1444
+ * Method for setting a custom language code
1445
+ *
1446
+ * @example
1447
+ * config.setLanguage('en');
1448
+ * @param {string} code - ISO 639-1
1449
+ */
1450
+ setLanguage(code: any): void;
1451
+ }
1452
+
1453
+ interface IEventSelectData extends IEventData$1 {
1454
+ customer_id: string;
1455
+ payment_source_id: string;
1456
+ gateway_id: string;
1457
+ primary: boolean;
1369
1458
  card_number_last4?: string;
1370
- card_number_length?: number;
1371
1459
  card_scheme?: string;
1460
+ checkout_email?: string;
1372
1461
  gateway_type?: string;
1462
+ payment_source_type: string;
1463
+ account_name?: string;
1464
+ account_number?: string;
1373
1465
  }
1374
- interface IEventFinishData extends IEventData$1 {
1375
- address_city?: string;
1376
- address_country?: string;
1377
- address_line1?: string;
1378
- address_line2?: string;
1379
- address_postcode?: string;
1380
- address_state?: string;
1381
- card_scheme?: string;
1382
- email?: string;
1383
- expire_month?: string;
1384
- expire_year?: string;
1385
- first_name?: string;
1386
- last_name?: string;
1387
- payment_source: string;
1388
- payment_source_token?: string;
1389
- phone?: string;
1390
- save_card_consent_accepted?: boolean;
1466
+ interface IEventPaginationData extends IEventData$1 {
1467
+ total_item: number;
1468
+ skip: number;
1469
+ limit: number;
1470
+ }
1471
+ interface IEventAfterLoadData$1 extends IEventData$1 {
1472
+ total_item: number;
1473
+ skip: number;
1474
+ limit: number;
1475
+ }
1476
+ interface IEventSizeData extends IEventData$1 {
1477
+ height: number;
1478
+ width: number;
1391
1479
  }
1392
1480
  /**
1393
- * Interface of data from validation event.
1481
+ * Interface of data from event.
1394
1482
  *
1395
- * @interface IFormValidation
1483
+ * @interface IEventSelectData
1396
1484
  *
1397
- * @param {string} event The name of the event.
1398
- * @param {string} message_source A system variable that identifies the event source.
1399
- * @param {string} purpose A system variable that states the purpose of the event.
1400
- * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1401
- * @param {boolean} [form_valid] Indicates wether or not the form is valid.
1402
- * @param {Array<string>} [invalid_fields] Names of form fields with invalid data.
1403
- * @param {Array<string>} [invalid_showed_fields] Names of invalid form fields which are already displaying the error.
1404
- * @param {Partial<Record<CardValidatorValue | GenericValidatorValue, Array<string>>>} [validators] Object containing validator identifiers as keys and the fields subject to that validator as an array of form field names.
1405
- * See list of available [Generic Vallidators]{@link GENERIC_VALIDATORS} and [Card Validators]{@link CARD_VALIDATORS},
1406
- */
1485
+ * @param {string} event
1486
+ * @param {string} purpose
1487
+ * @param {string} message_source
1488
+ * @param {string} [ref_id]
1489
+ * @param {string} customer_id
1490
+ * @param {string} payment_source_id
1491
+ * @param {string} gateway_id
1492
+ * @param {boolean} primary
1493
+ * @param {string} [widget_id]
1494
+ * @param {string} [card_number_last4]
1495
+ * @param {string} [card_scheme]
1496
+ * @param {string} gateway_type
1497
+ * @param {string} [checkout_email]
1498
+ * @param {string} payment_source_type
1499
+ * @param {string} [account_name]
1500
+ * @param {string} [account_number]
1501
+ * */
1407
1502
  /**
1408
- * Contains basic information associated with the event and additional meta data
1409
- * specific to the event. E.g., card info, gateway info, etc.
1503
+ * Interface of data from event.
1410
1504
  *
1411
- * @interface IEventMetaData
1505
+ * @interface IEventPaginationData
1412
1506
  *
1413
- * @param {string} event The name of the event.
1414
- * @param {string} purpose A system variable that states the purpose of the event.
1415
- * @param {string} message_source A system variable that identifies the event source.
1416
- * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1417
- * @param {string} configuration_token Token received from our API with widget data
1418
- * @param {string} type Payment type 'card', 'bank_account'
1419
- * @param {string} gateway_type Gateway type
1420
- * @param {string} [card_number_last4] Last 4 digit of your card
1421
- * @param {string} [card_scheme] Card scheme, e.g., (Visa, Mastercard and American Express (AmEx))
1422
- * @param {number} [card_number_length] Card number length
1423
- * @param {string} [account_name] Bank account account name
1424
- * @param {string} [account_number] Bank account account number
1507
+ * @param {string} event
1508
+ * @param {string} purpose
1509
+ * @param {string} message_source
1510
+ * @param {string} [ref_id]
1511
+ * @param {number} total_item
1512
+ * @param {number} skip
1513
+ * @param {number} limit
1425
1514
  * */
1426
1515
  /**
1427
1516
  * Interface of data from event.
1517
+ *
1428
1518
  * @interface IEventAfterLoadData
1429
1519
  *
1430
1520
  * @param {string} event The name of the event.
1431
1521
  * @param {string} purpose A system variable that states the purpose of the event.
1432
1522
  * @param {string} message_source A system variable that identifies the event source.
1433
1523
  * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1524
+ * @param {number} total_item Pagination param. Total item count
1525
+ * @param {number} skip Pagination param. Skip items from first item
1526
+ * @param {number} limit Pagination param. Query limit
1434
1527
  * */
1435
1528
  /**
1436
1529
  * Interface of data from event.
@@ -1440,66 +1533,271 @@ interface IEventFinishData extends IEventData$1 {
1440
1533
  * @param {string} purpose A system variable that states the purpose of the event.
1441
1534
  * @param {string} message_source A system variable that identifies the event source.
1442
1535
  * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1443
- * @param {string} payment_source One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens)
1444
1536
  * */
1537
+ /**
1538
+ * Interface of data from event.
1539
+ * @interface IEventSizeData
1540
+ *
1541
+ * @param {number} event The name of the event.
1542
+ * @param {number} purpose A system variable that states the purpose of the event.
1543
+ * @param {string} message_source A system variable that identifies the event source.
1544
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1545
+ * @param {number} height Height of iFrame
1546
+ * @param {number} width Width of iFrame
1547
+ * */
1445
1548
  /**
1446
1549
  * List of available event's name
1550
+ *
1447
1551
  * @const EVENT
1448
1552
  *
1449
1553
  * @type {object}
1450
1554
  * @param {string} AFTER_LOAD=afterLoad
1451
- * @param {string} SUBMIT=submit
1452
- * @param {string} FINISH=finish
1453
- * @param {string} VALIDATION=validation
1454
- * @param {string} VALIDATION_ERROR=validationError
1455
1555
  * @param {string} SYSTEM_ERROR=systemError
1556
+ * @param {string} SELECT=select
1557
+ * @param {string} UNSELECT=unselect
1558
+ * @param {string} NEXT=next
1559
+ * @param {string} PREV=prev
1456
1560
  * @param {string} META_CHANGE=metaChange
1457
1561
  * @param {string} RESIZE=resize
1458
1562
  */
1459
1563
  /**
1460
- * List of available event's name
1461
- * @const VAULT_DISPLAY_EVENT
1462
- *
1463
- * @type {object}
1464
- * @param {string} AFTER_LOAD=afterLoad
1465
- * @param {string} SYSTEM_ERROR=system_error
1466
- * @param {string} CVV_SECURE_CODE_REQUESTED=cvv_secure_code_requested
1467
- * @param {string} CARD_NUMBER_SECURE_CODE_REQUESTED=card_number_secure_code_requested
1468
- * @param {string} ACCESS_FORBIDDEN=access_forbidden
1469
- * @param {string} SESSION_EXPIRED=systemError
1470
- * @param {string} SYSTEM_ERROR=session_expired
1471
- * @param {string} OPERATION_FORBIDDEN=operation_forbidden
1472
- */
1473
- /**
1474
- * Class HtmlMultiWidget include method for working with html
1564
+ * Class HtmlPaymentSourceWidget include method for working on html
1475
1565
  * @constructor
1476
- * @extends MultiWidget
1566
+ * @extends PaymentSourceWidget
1477
1567
  *
1478
1568
  * @param {string} selector - Selector of html element. Container for widget
1479
1569
  * @param {string} publicKey - PayDock users public key
1480
- * @param {(Configuration | string | Configuration[] | string[])} conf - exemplar[s] Configuration class OR configuration token
1570
+ * @param {string} queryToken - PayDock's query token that represents params to search customer by id or reference
1481
1571
  * @example
1482
- * var widget = new MultiWidget('#widget', 'publicKey','configurationToken'); // With a pre-created configuration token
1483
- *
1484
- * var widget = new MultiWidget('#widget', 'publicKey',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
1485
- *
1486
- * var widget = new MultiWidget('#widget', 'publicKey', new Configuration('gatewayId')); With Configuration
1487
- *
1488
- * var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
1489
- * Configuration(), // default gateway_id,
1490
- * Configuration('not_configured'), // without gateway,
1491
- * Configuration('gatewayId'),
1492
- * Configuration('gatewayId', 'bank_account')
1493
- * ]);
1572
+ * * var widget = new HtmlPaymentSourceWidget('#widget', 'publicKey','queryToken');
1573
+
1494
1574
  */
1495
- declare class HtmlMultiWidget extends MultiWidget {
1575
+ declare class HtmlPaymentSourceWidget extends PaymentSourceWidget {
1496
1576
  protected container: Container;
1497
1577
  protected iFrame: IFrame;
1498
- protected triggerElement: Trigger;
1499
- protected validationData: IFormValidation;
1500
- /** @constructs */ constructor(selector: string, publicKey: string, conf: any);
1578
+ protected event: IFrameEvent;
1579
+ /** @constructs */ constructor(selector: string, publicKey: string, queryToken: string);
1501
1580
  /**
1502
- * Loads the widget.
1581
+ * The final method to beginning, the load process of widget to html
1582
+ *
1583
+ */
1584
+ load(): void;
1585
+ /**
1586
+ * This callback will be called for each event in payment source widget
1587
+ *
1588
+ * @callback listener--PaymentSourceWidget
1589
+ * @param {IEventData | IEventSelectData | IEventPaginationData | IEventAfterLoadData} response
1590
+ */
1591
+ /**
1592
+ * Listen to events of widget
1593
+ *
1594
+ * @example
1595
+ *
1596
+ * widget.on('select', function (data) {
1597
+ * console.log(data);
1598
+ * });
1599
+ * @param {string} eventName - Available event names [EVENT]{@link EVENT}
1600
+ * @param {listener--PaymentSourceWidget} cb
1601
+ */
1602
+ on(eventName: string, cb: (data: IEventData$1 | IEventSelectData | IEventPaginationData | IEventAfterLoadData$1 | IEventSizeData) => void): void;
1603
+ /**
1604
+ * Using this method you can hide widget after load
1605
+ * @param {boolean} [saveSize=false] - using this param you can save iframe's size
1606
+ */
1607
+ hide(saveSize: boolean): void;
1608
+ /**
1609
+ * Using this method you can show widget after using hide method
1610
+ *
1611
+ */
1612
+ show(): void;
1613
+ /**
1614
+ * Using this method you can reload widget
1615
+ *
1616
+ */
1617
+ reload(): void;
1618
+ /**
1619
+ * After select event of widget, data (dataType) will be insert to input (selector)
1620
+ *
1621
+ * @param {string} selector - css selector . [] #
1622
+ * @param {string} dataType - data type of [IEventSelectData]{@link IEventSelectData}.
1623
+ */
1624
+ onSelectInsert(selector: string, dataType: string): void;
1625
+ }
1626
+
1627
+ /**
1628
+ * Maps widget event names to their callback data types.
1629
+ *
1630
+ * When using `widget.on(EVENT.FINISH, (data) => { ... })`, TypeScript will
1631
+ * automatically narrow `data` to `IEventFinishData` based on this map.
1632
+ */
1633
+ interface WidgetEventMap {
1634
+ afterLoad: IEventAfterLoadData;
1635
+ submit: IEventData$1;
1636
+ finish: IEventFinishData;
1637
+ validationError: IEventData$1;
1638
+ systemError: IEventData$1;
1639
+ error: IEventData$1;
1640
+ /** @deprecated Use checkoutReady instead */
1641
+ checkoutSuccess: IEventData$1;
1642
+ checkoutReady: IEventData$1;
1643
+ checkoutError: IEventData$1;
1644
+ checkoutCompleted: IEventData$1;
1645
+ checkoutPopupOpen: IEventData$1;
1646
+ checkoutPopupClose: IEventData$1;
1647
+ recognitionTokenRequested: IEventData$1;
1648
+ recognitionTokenDropped: IEventData$1;
1649
+ validation: IFormValidation;
1650
+ select: IEventData$1;
1651
+ unselect: IEventData$1;
1652
+ next: IEventData$1;
1653
+ prev: IEventData$1;
1654
+ metaChange: IEventMetaData;
1655
+ resize: IEventSizeData;
1656
+ }
1657
+ /** Union of all known widget event names */
1658
+ type WidgetEventName = keyof WidgetEventMap;
1659
+
1660
+ interface IEventMetaData extends IEventData$1 {
1661
+ configuration_token: string;
1662
+ type: string;
1663
+ account_name?: string;
1664
+ account_number?: string;
1665
+ card_number_last4?: string;
1666
+ card_number_length?: number;
1667
+ card_scheme?: string;
1668
+ gateway_type?: string;
1669
+ }
1670
+ interface IEventAfterLoadData extends IEventData$1 {
1671
+ }
1672
+ interface IEventFinishData extends IEventData$1 {
1673
+ address_city?: string;
1674
+ address_country?: string;
1675
+ address_line1?: string;
1676
+ address_line2?: string;
1677
+ address_postcode?: string;
1678
+ address_state?: string;
1679
+ card_scheme?: string;
1680
+ email?: string;
1681
+ expire_month?: string;
1682
+ expire_year?: string;
1683
+ first_name?: string;
1684
+ last_name?: string;
1685
+ payment_source: string;
1686
+ payment_source_token?: string;
1687
+ phone?: string;
1688
+ save_card_consent_accepted?: boolean;
1689
+ }
1690
+ /**
1691
+ * Interface of data from validation event.
1692
+ *
1693
+ * @interface IFormValidation
1694
+ *
1695
+ * @param {string} event The name of the event.
1696
+ * @param {string} message_source A system variable that identifies the event source.
1697
+ * @param {string} purpose A system variable that states the purpose of the event.
1698
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1699
+ * @param {boolean} [form_valid] Indicates wether or not the form is valid.
1700
+ * @param {Array<string>} [invalid_fields] Names of form fields with invalid data.
1701
+ * @param {Array<string>} [invalid_showed_fields] Names of invalid form fields which are already displaying the error.
1702
+ * @param {Partial<Record<CardValidatorValue | GenericValidatorValue, Array<string>>>} [validators] Object containing validator identifiers as keys and the fields subject to that validator as an array of form field names.
1703
+ * See list of available [Generic Vallidators]{@link GENERIC_VALIDATORS} and [Card Validators]{@link CARD_VALIDATORS},
1704
+ */
1705
+ /**
1706
+ * Contains basic information associated with the event and additional meta data
1707
+ * specific to the event. E.g., card info, gateway info, etc.
1708
+ *
1709
+ * @interface IEventMetaData
1710
+ *
1711
+ * @param {string} event The name of the event.
1712
+ * @param {string} purpose A system variable that states the purpose of the event.
1713
+ * @param {string} message_source A system variable that identifies the event source.
1714
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1715
+ * @param {string} configuration_token Token received from our API with widget data
1716
+ * @param {string} type Payment type 'card', 'bank_account'
1717
+ * @param {string} gateway_type Gateway type
1718
+ * @param {string} [card_number_last4] Last 4 digit of your card
1719
+ * @param {string} [card_scheme] Card scheme, e.g., (Visa, Mastercard and American Express (AmEx))
1720
+ * @param {number} [card_number_length] Card number length
1721
+ * @param {string} [account_name] Bank account account name
1722
+ * @param {string} [account_number] Bank account account number
1723
+ * */
1724
+ /**
1725
+ * Interface of data from event.
1726
+ * @interface IEventAfterLoadData
1727
+ *
1728
+ * @param {string} event The name of the event.
1729
+ * @param {string} purpose A system variable that states the purpose of the event.
1730
+ * @param {string} message_source A system variable that identifies the event source.
1731
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1732
+ * */
1733
+ /**
1734
+ * Interface of data from event.
1735
+ * @interface IEventFinishData
1736
+ *
1737
+ * @param {string} event The name of the event.
1738
+ * @param {string} purpose A system variable that states the purpose of the event.
1739
+ * @param {string} message_source A system variable that identifies the event source.
1740
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
1741
+ * @param {string} payment_source One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens)
1742
+ * */
1743
+ /**
1744
+ * List of available event's name
1745
+ * @const EVENT
1746
+ *
1747
+ * @type {object}
1748
+ * @param {string} AFTER_LOAD=afterLoad
1749
+ * @param {string} SUBMIT=submit
1750
+ * @param {string} FINISH=finish
1751
+ * @param {string} VALIDATION=validation
1752
+ * @param {string} VALIDATION_ERROR=validationError
1753
+ * @param {string} SYSTEM_ERROR=systemError
1754
+ * @param {string} META_CHANGE=metaChange
1755
+ * @param {string} RESIZE=resize
1756
+ */
1757
+ /**
1758
+ * List of available event's name
1759
+ * @const VAULT_DISPLAY_EVENT
1760
+ *
1761
+ * @type {object}
1762
+ * @param {string} AFTER_LOAD=afterLoad
1763
+ * @param {string} SYSTEM_ERROR=system_error
1764
+ * @param {string} CVV_SECURE_CODE_REQUESTED=cvv_secure_code_requested
1765
+ * @param {string} CARD_NUMBER_SECURE_CODE_REQUESTED=card_number_secure_code_requested
1766
+ * @param {string} ACCESS_FORBIDDEN=access_forbidden
1767
+ * @param {string} SESSION_EXPIRED=systemError
1768
+ * @param {string} SYSTEM_ERROR=session_expired
1769
+ * @param {string} OPERATION_FORBIDDEN=operation_forbidden
1770
+ */
1771
+ /**
1772
+ * Class HtmlMultiWidget include method for working with html
1773
+ * @constructor
1774
+ * @extends MultiWidget
1775
+ *
1776
+ * @param {string} selector - Selector of html element. Container for widget
1777
+ * @param {string} publicKey - PayDock users public key
1778
+ * @param {(Configuration | string | Configuration[] | string[])} conf - exemplar[s] Configuration class OR configuration token
1779
+ * @example
1780
+ * var widget = new MultiWidget('#widget', 'publicKey','configurationToken'); // With a pre-created configuration token
1781
+ *
1782
+ * var widget = new MultiWidget('#widget', 'publicKey',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
1783
+ *
1784
+ * var widget = new MultiWidget('#widget', 'publicKey', new Configuration('gatewayId')); With Configuration
1785
+ *
1786
+ * var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
1787
+ * Configuration(), // default gateway_id,
1788
+ * Configuration('not_configured'), // without gateway,
1789
+ * Configuration('gatewayId'),
1790
+ * Configuration('gatewayId', 'bank_account')
1791
+ * ]);
1792
+ */
1793
+ declare class HtmlMultiWidget extends MultiWidget {
1794
+ protected container: Container;
1795
+ protected iFrame: IFrame;
1796
+ protected triggerElement: Trigger;
1797
+ protected validationData: IFormValidation;
1798
+ /** @constructs */ constructor(selector: string, publicKey: string, conf: any);
1799
+ /**
1800
+ * Loads the widget.
1503
1801
  *
1504
1802
  * Calling this method results in an iframe element being inserted and rendered in the DOM.
1505
1803
  */
@@ -1534,8 +1832,10 @@ declare class HtmlMultiWidget extends MultiWidget {
1534
1832
  *
1535
1833
  * @return {Promise<IEventData | IEventMetaData | IEventFinishData | IFormValidation> | void}
1536
1834
  */
1835
+ on<E extends WidgetEventName>(eventName: E, cb: (data: WidgetEventMap[E]) => void): void;
1836
+ on<E extends WidgetEventName>(eventName: E): Promise<WidgetEventMap[E]>;
1837
+ on(eventName: string, cb: (data: IEventData$1 | IEventMetaData | IEventFinishData | IFormValidation) => void): void;
1537
1838
  on(eventName: string): Promise<IEventData$1 | IEventMetaData | IEventFinishData | IFormValidation>;
1538
- on(eventName: string, cb: (data: IEventData$1 | IEventMetaData | IEventFinishData | IFormValidation) => void): any;
1539
1839
  /**
1540
1840
  * Registers callback that will be invoked for every trigger.
1541
1841
  *
@@ -4470,354 +4770,91 @@ interface GooglePayCardConfig {
4470
4770
  type: 'DIRECT';
4471
4771
  parameters: {
4472
4772
  protocol_version: string;
4473
- public_key: string;
4474
- };
4475
- };
4476
- }
4477
-
4478
- /**
4479
- * @classdesc Google Pay wallet button that creates One-Time Tokens (OTT) via Google Pay.
4480
- *
4481
- * Provides a fully typed Google Pay integration with Google Pay-specific metadata
4482
- * and validates that the service configuration corresponds to a Google Pay service.
4483
- * On `load()`, the button fetches the service configuration and raises an error via `onError`
4484
- * if the service type does not match Google Pay.
4485
- *
4486
- * @class GooglePayOpenWalletButton
4487
- * @extends OpenWalletButtons
4488
- *
4489
- * @param {string} selector - CSS selector of the HTML element that will contain the Google Pay button.
4490
- * @param {string} publicKeyOrAccessToken - Public key or access token for API authentication.
4491
- * @param {string} serviceId - The Google Pay service ID configured in PayDock dashboard.
4492
- * @param {GooglePayOpenWalletMeta} meta - Google Pay-specific metadata (amount, currency, country, card_config, merchant_name, style, etc.).
4493
- *
4494
- * @example
4495
- * const button = new GooglePayOpenWalletButton(
4496
- * '#wallet-container',
4497
- * publicKeyOrAccessToken,
4498
- * serviceId,
4499
- * {
4500
- * amount: 100,
4501
- * currency: 'AUD',
4502
- * country: 'AU',
4503
- * merchant_name: 'Your Store',
4504
- * },
4505
- * );
4506
- * button.setEnv('sandbox');
4507
- * button.onSuccess((data) => console.log('OTT:', data.token));
4508
- * button.onError((error) => console.error('Error:', error));
4509
- * button.load();
4510
- */
4511
- declare class GooglePayOpenWalletButton extends OpenWalletButtons<GooglePayOpenWalletMeta> {
4512
- /** @private */
4513
- readonly walletType: WalletType;
4514
- /**
4515
- * Validates Google Pay-specific required metadata fields.
4516
- * Google Pay has no additional required fields beyond the base (amount, currency, country).
4517
- * @private
4518
- */
4519
- protected validateWalletMeta(): void;
4520
- /**
4521
- * Validates that the service configuration type is Google Pay.
4522
- *
4523
- * @private
4524
- * @param serviceConfig - The service configuration response from the API.
4525
- * @throws {Error} If the service type is not Google Pay.
4526
- */
4527
- protected validateServiceType(serviceConfig: GetConfigResponse): void;
4528
- /**
4529
- * Creates a Google Pay wallet service instance.
4530
- *
4531
- * @private
4532
- * @param serviceConfig - The service configuration response from the API.
4533
- * @returns The Google Pay wallet service instance.
4534
- */
4535
- protected createWalletService(serviceConfig: GetConfigResponse): OpenWalletService;
4536
- }
4537
-
4538
- declare const TYPE: {
4539
- EXTERNAL_CHECKOUT_TOKEN: string;
4540
- CHECKOUT_TOKEN: string;
4541
- BANK_ACCOUNT: string;
4542
- CARD: string;
4543
- };
4544
- interface IBody {
4545
- gateway_id: string;
4546
- type: string;
4547
- checkout_token?: string;
4548
- }
4549
- declare class Builder extends HttpCore {
4550
- private body;
4551
- constructor(gatewayID: string, checkoutToken: string, type: string);
4552
- constructor(gatewayID: string, externalCheckoutToken: string, type: string);
4553
- constructor(gatewayID: string, card: any, type: string);
4554
- constructor(gatewayID: string, bankAccount: any, type: string);
4555
- protected getLink(): string;
4556
- send(accessToken: string, cb: (token: string) => void, errorCb?: (error: any) => void): void;
4557
- getConfigs(): IBody;
4558
- }
4559
-
4560
- /**
4561
- *
4562
- * Class PaymentSourceWidget include method for for creating iframe url
4563
- * @constructor
4564
- *
4565
- * @param {string} publicKey - PayDock users public key
4566
- * @param {string} customer - PayDock's customer_id or customer_reference (In order to use the customer_reference, you must explicitly specify useReference as true)
4567
- * @param {boolean} [useReference=false]
4568
- *
4569
- * @example
4570
- * var widget = new PaymentSourceWidget('publicKey','customerId');
4571
- * // or
4572
- * var widget = new PaymentSourceWidget('publicKey', customerReference, true);
4573
- */
4574
- declare class PaymentSourceWidget {
4575
- protected link: Link;
4576
- protected configs: Configuration[];
4577
- protected configTokens: string[];
4578
- protected publicKey: string;
4579
- /** @constructs */ constructor(accessToken: string, queryToken: string);
4580
- /**
4581
- * Object contain styles for widget
4582
- *
4583
- * @example
4584
- * widget.setStyles({
4585
- * background_color: 'rgb(0, 0, 0)',
4586
- * border_color: 'yellow',
4587
- * text_color: '#FFFFAA',
4588
- * icon_size: 'small',
4589
- * font_size: '20px'
4590
- * });
4591
- * @param {IStyles} fields - name of styles which can be shown in widget [STYLE]{@link STYLE}
4592
- */
4593
- setStyles(styles: IStyles$1): void;
4594
- setStyle(param: string, value: string): void;
4595
- /**
4596
- * Current method can set custom ID to identify the data in the future
4597
- *
4598
- * @example
4599
- * widget.setRefId('id');
4600
- *
4601
- * @param {string} refId - custom id
4602
- */
4603
- setRefId(refId: string): void;
4604
- /**
4605
- * Current method can set limit for payment sources count. In case when limit sets less then general count will be shown pagination buttons prev and next.
4606
- *
4607
- * @param {string} count - payment source count
4608
- */
4609
- setLimit(count: number): void;
4610
- /**
4611
- * Current method can change environment. By default environment = sandbox
4612
- * Also we can change domain alias for this environment. By default domain_alias = paydock.com
4613
- *
4614
- * @example
4615
- * widget.setEnv('production');
4616
- * @param {string} env - sandbox, production
4617
- * @param {string} [alias] - Own domain alias
4618
- */
4619
- setEnv(env: string, alias?: string): void;
4620
- getEnv(): void;
4621
- /**
4622
- * Method for getting iframe's url
4623
- */
4624
- getIFrameUrl(): string;
4625
- /**
4626
- * Show payment source inside widget only with requested gateway ids
4627
- *
4628
- *
4629
- * @param {string[]} ids - List of gateway_id
4630
- */
4631
- filterByGatewayIds(ids: string[]): void;
4632
- /**
4633
- *
4634
- * Show payment source inside widget only with requested payment source types
4635
- *
4636
- * @param types - List of payment source types. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
4637
- */
4638
- filterByTypes(types: string[]): void;
4639
- /**
4640
- * Method for setting a custom language code
4641
- *
4642
- * @example
4643
- * config.setLanguage('en');
4644
- * @param {string} code - ISO 639-1
4645
- */
4646
- setLanguage(code: any): void;
4647
- }
4648
-
4649
- interface IEventSelectData extends IEventData$1 {
4650
- customer_id: string;
4651
- payment_source_id: string;
4652
- gateway_id: string;
4653
- primary: boolean;
4654
- card_number_last4?: string;
4655
- card_scheme?: string;
4656
- checkout_email?: string;
4657
- gateway_type?: string;
4658
- payment_source_type: string;
4659
- account_name?: string;
4660
- account_number?: string;
4661
- }
4662
- interface IEventPaginationData extends IEventData$1 {
4663
- total_item: number;
4664
- skip: number;
4665
- limit: number;
4666
- }
4667
- interface IEventAfterLoadData extends IEventData$1 {
4668
- total_item: number;
4669
- skip: number;
4670
- limit: number;
4671
- }
4672
- interface IEventSizeData extends IEventData$1 {
4673
- height: number;
4674
- width: number;
4675
- }
4676
- /**
4677
- * Interface of data from event.
4678
- *
4679
- * @interface IEventSelectData
4680
- *
4681
- * @param {string} event
4682
- * @param {string} purpose
4683
- * @param {string} message_source
4684
- * @param {string} [ref_id]
4685
- * @param {string} customer_id
4686
- * @param {string} payment_source_id
4687
- * @param {string} gateway_id
4688
- * @param {boolean} primary
4689
- * @param {string} [widget_id]
4690
- * @param {string} [card_number_last4]
4691
- * @param {string} [card_scheme]
4692
- * @param {string} gateway_type
4693
- * @param {string} [checkout_email]
4694
- * @param {string} payment_source_type
4695
- * @param {string} [account_name]
4696
- * @param {string} [account_number]
4697
- * */
4698
- /**
4699
- * Interface of data from event.
4700
- *
4701
- * @interface IEventPaginationData
4702
- *
4703
- * @param {string} event
4704
- * @param {string} purpose
4705
- * @param {string} message_source
4706
- * @param {string} [ref_id]
4707
- * @param {number} total_item
4708
- * @param {number} skip
4709
- * @param {number} limit
4710
- * */
4711
- /**
4712
- * Interface of data from event.
4713
- *
4714
- * @interface IEventAfterLoadData
4715
- *
4716
- * @param {string} event The name of the event.
4717
- * @param {string} purpose A system variable that states the purpose of the event.
4718
- * @param {string} message_source A system variable that identifies the event source.
4719
- * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
4720
- * @param {number} total_item Pagination param. Total item count
4721
- * @param {number} skip Pagination param. Skip items from first item
4722
- * @param {number} limit Pagination param. Query limit
4723
- * */
4724
- /**
4725
- * Interface of data from event.
4726
- * @interface IEventFinishData
4727
- *
4728
- * @param {string} event The name of the event.
4729
- * @param {string} purpose A system variable that states the purpose of the event.
4730
- * @param {string} message_source A system variable that identifies the event source.
4731
- * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
4732
- * */
4733
- /**
4734
- * Interface of data from event.
4735
- * @interface IEventSizeData
4736
- *
4737
- * @param {number} event The name of the event.
4738
- * @param {number} purpose A system variable that states the purpose of the event.
4739
- * @param {string} message_source A system variable that identifies the event source.
4740
- * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
4741
- * @param {number} height Height of iFrame
4742
- * @param {number} width Width of iFrame
4743
- * */
4773
+ public_key: string;
4774
+ };
4775
+ };
4776
+ }
4777
+
4744
4778
  /**
4745
- * List of available event's name
4779
+ * @classdesc Google Pay wallet button that creates One-Time Tokens (OTT) via Google Pay.
4746
4780
  *
4747
- * @const EVENT
4781
+ * Provides a fully typed Google Pay integration with Google Pay-specific metadata
4782
+ * and validates that the service configuration corresponds to a Google Pay service.
4783
+ * On `load()`, the button fetches the service configuration and raises an error via `onError`
4784
+ * if the service type does not match Google Pay.
4748
4785
  *
4749
- * @type {object}
4750
- * @param {string} AFTER_LOAD=afterLoad
4751
- * @param {string} SYSTEM_ERROR=systemError
4752
- * @param {string} SELECT=select
4753
- * @param {string} UNSELECT=unselect
4754
- * @param {string} NEXT=next
4755
- * @param {string} PREV=prev
4756
- * @param {string} META_CHANGE=metaChange
4757
- * @param {string} RESIZE=resize
4758
- */
4759
- /**
4760
- * Class HtmlPaymentSourceWidget include method for working on html
4761
- * @constructor
4762
- * @extends PaymentSourceWidget
4786
+ * @class GooglePayOpenWalletButton
4787
+ * @extends OpenWalletButtons
4788
+ *
4789
+ * @param {string} selector - CSS selector of the HTML element that will contain the Google Pay button.
4790
+ * @param {string} publicKeyOrAccessToken - Public key or access token for API authentication.
4791
+ * @param {string} serviceId - The Google Pay service ID configured in PayDock dashboard.
4792
+ * @param {GooglePayOpenWalletMeta} meta - Google Pay-specific metadata (amount, currency, country, card_config, merchant_name, style, etc.).
4763
4793
  *
4764
- * @param {string} selector - Selector of html element. Container for widget
4765
- * @param {string} publicKey - PayDock users public key
4766
- * @param {string} queryToken - PayDock's query token that represents params to search customer by id or reference
4767
4794
  * @example
4768
- * * var widget = new HtmlPaymentSourceWidget('#widget', 'publicKey','queryToken');
4769
-
4795
+ * const button = new GooglePayOpenWalletButton(
4796
+ * '#wallet-container',
4797
+ * publicKeyOrAccessToken,
4798
+ * serviceId,
4799
+ * {
4800
+ * amount: 100,
4801
+ * currency: 'AUD',
4802
+ * country: 'AU',
4803
+ * merchant_name: 'Your Store',
4804
+ * },
4805
+ * );
4806
+ * button.setEnv('sandbox');
4807
+ * button.onSuccess((data) => console.log('OTT:', data.token));
4808
+ * button.onError((error) => console.error('Error:', error));
4809
+ * button.load();
4770
4810
  */
4771
- declare class HtmlPaymentSourceWidget extends PaymentSourceWidget {
4772
- protected container: Container;
4773
- protected iFrame: IFrame;
4774
- protected event: IFrameEvent;
4775
- /** @constructs */ constructor(selector: string, publicKey: string, queryToken: string);
4776
- /**
4777
- * The final method to beginning, the load process of widget to html
4778
- *
4779
- */
4780
- load(): void;
4781
- /**
4782
- * This callback will be called for each event in payment source widget
4783
- *
4784
- * @callback listener--PaymentSourceWidget
4785
- * @param {IEventData | IEventSelectData | IEventPaginationData | IEventAfterLoadData} response
4786
- */
4787
- /**
4788
- * Listen to events of widget
4789
- *
4790
- * @example
4791
- *
4792
- * widget.on('select', function (data) {
4793
- * console.log(data);
4794
- * });
4795
- * @param {string} eventName - Available event names [EVENT]{@link EVENT}
4796
- * @param {listener--PaymentSourceWidget} cb
4797
- */
4798
- on(eventName: string, cb: (data: IEventData$1 | IEventSelectData | IEventPaginationData | IEventAfterLoadData | IEventSizeData) => void): void;
4799
- /**
4800
- * Using this method you can hide widget after load
4801
- * @param {boolean} [saveSize=false] - using this param you can save iframe's size
4802
- */
4803
- hide(saveSize: boolean): void;
4811
+ declare class GooglePayOpenWalletButton extends OpenWalletButtons<GooglePayOpenWalletMeta> {
4812
+ /** @private */
4813
+ readonly walletType: WalletType;
4804
4814
  /**
4805
- * Using this method you can show widget after using hide method
4806
- *
4815
+ * Validates Google Pay-specific required metadata fields.
4816
+ * Google Pay has no additional required fields beyond the base (amount, currency, country).
4817
+ * @private
4807
4818
  */
4808
- show(): void;
4819
+ protected validateWalletMeta(): void;
4809
4820
  /**
4810
- * Using this method you can reload widget
4821
+ * Validates that the service configuration type is Google Pay.
4811
4822
  *
4823
+ * @private
4824
+ * @param serviceConfig - The service configuration response from the API.
4825
+ * @throws {Error} If the service type is not Google Pay.
4812
4826
  */
4813
- reload(): void;
4827
+ protected validateServiceType(serviceConfig: GetConfigResponse): void;
4814
4828
  /**
4815
- * After select event of widget, data (dataType) will be insert to input (selector)
4829
+ * Creates a Google Pay wallet service instance.
4816
4830
  *
4817
- * @param {string} selector - css selector . [] #
4818
- * @param {string} dataType - data type of [IEventSelectData]{@link IEventSelectData}.
4831
+ * @private
4832
+ * @param serviceConfig - The service configuration response from the API.
4833
+ * @returns The Google Pay wallet service instance.
4819
4834
  */
4820
- onSelectInsert(selector: string, dataType: string): void;
4835
+ protected createWalletService(serviceConfig: GetConfigResponse): OpenWalletService;
4836
+ }
4837
+
4838
+ declare const TYPE: {
4839
+ EXTERNAL_CHECKOUT_TOKEN: string;
4840
+ CHECKOUT_TOKEN: string;
4841
+ BANK_ACCOUNT: string;
4842
+ CARD: string;
4843
+ };
4844
+ interface IBody {
4845
+ gateway_id: string;
4846
+ type: string;
4847
+ checkout_token?: string;
4848
+ }
4849
+ declare class Builder extends HttpCore {
4850
+ private body;
4851
+ constructor(gatewayID: string, checkoutToken: string, type: string);
4852
+ constructor(gatewayID: string, externalCheckoutToken: string, type: string);
4853
+ constructor(gatewayID: string, card: any, type: string);
4854
+ constructor(gatewayID: string, bankAccount: any, type: string);
4855
+ protected getLink(): string;
4856
+ send(accessToken: string, cb: (token: string) => void, errorCb?: (error: any) => void): void;
4857
+ getConfigs(): IBody;
4821
4858
  }
4822
4859
 
4823
4860
  declare enum ErrorCodes$1 {
@@ -5750,62 +5787,6 @@ declare class WalletButtons {
5750
5787
  private setupAuthTokensChangedCallback;
5751
5788
  }
5752
5789
 
5753
- interface BaseGatewayConfig<T> {
5754
- type: string;
5755
- mode: string;
5756
- credentials?: T;
5757
- }
5758
-
5759
- interface BaseWalletMeta {
5760
- amount: number;
5761
- currency: string;
5762
- }
5763
-
5764
- interface ChargeWalletTokenMeta {
5765
- charge: {
5766
- id: string;
5767
- amount: number;
5768
- currency: string;
5769
- capture?: boolean;
5770
- reference?: string;
5771
- shipping?: {
5772
- amount?: number;
5773
- currency?: string;
5774
- address_line1?: string;
5775
- address_line2?: string;
5776
- address_line3?: string;
5777
- address_city?: string;
5778
- address_postcode?: string;
5779
- address_state?: string;
5780
- address_country?: string;
5781
- address_country_code?: string;
5782
- address_company?: string;
5783
- address_origin_postcode?: string;
5784
- method?: string;
5785
- type?: string;
5786
- options?: Array<{
5787
- id?: string;
5788
- label?: string;
5789
- detail?: string;
5790
- amount?: string;
5791
- currency?: string;
5792
- type?: string;
5793
- }>;
5794
- contact?: {
5795
- first_name?: string;
5796
- last_name?: string;
5797
- email?: string;
5798
- phone?: string;
5799
- phone2?: string;
5800
- };
5801
- };
5802
- };
5803
- gateway: {
5804
- mode: string;
5805
- type: string;
5806
- };
5807
- }
5808
-
5809
5790
  declare enum EVENT {
5810
5791
  UNAVAILABLE = "unavailable",
5811
5792
  ERROR = "error",
@@ -5818,6 +5799,11 @@ declare enum EVENT {
5818
5799
  ON_SHIPPING_OPTIONS_CHANGE = "onShippingOptionsChange"
5819
5800
  }
5820
5801
 
5802
+ interface BaseWalletMeta {
5803
+ amount: number;
5804
+ currency: string;
5805
+ }
5806
+
5821
5807
  interface BaseEventData<T> {
5822
5808
  event: string;
5823
5809
  chargeId?: string;
@@ -5906,6 +5892,57 @@ interface OnUnavailableEventData extends BaseEventData<undefined> {
5906
5892
  event: EVENT.UNAVAILABLE;
5907
5893
  }
5908
5894
 
5895
+ interface BaseGatewayConfig<T> {
5896
+ type: string;
5897
+ mode: string;
5898
+ credentials?: T;
5899
+ }
5900
+
5901
+ interface ChargeWalletTokenMeta {
5902
+ charge: {
5903
+ id: string;
5904
+ amount: number;
5905
+ currency: string;
5906
+ capture?: boolean;
5907
+ reference?: string;
5908
+ shipping?: {
5909
+ amount?: number;
5910
+ currency?: string;
5911
+ address_line1?: string;
5912
+ address_line2?: string;
5913
+ address_line3?: string;
5914
+ address_city?: string;
5915
+ address_postcode?: string;
5916
+ address_state?: string;
5917
+ address_country?: string;
5918
+ address_country_code?: string;
5919
+ address_company?: string;
5920
+ address_origin_postcode?: string;
5921
+ method?: string;
5922
+ type?: string;
5923
+ options?: Array<{
5924
+ id?: string;
5925
+ label?: string;
5926
+ detail?: string;
5927
+ amount?: string;
5928
+ currency?: string;
5929
+ type?: string;
5930
+ }>;
5931
+ contact?: {
5932
+ first_name?: string;
5933
+ last_name?: string;
5934
+ email?: string;
5935
+ phone?: string;
5936
+ phone2?: string;
5937
+ };
5938
+ };
5939
+ };
5940
+ gateway: {
5941
+ mode: string;
5942
+ type: string;
5943
+ };
5944
+ }
5945
+
5909
5946
  interface Contact {
5910
5947
  first_name?: string;
5911
5948
  last_name?: string;
@@ -5957,6 +5994,7 @@ declare abstract class BaseWalletButton<T extends BaseWalletMeta> {
5957
5994
  protected meta: T;
5958
5995
  protected eventEmitter: EventEmitter;
5959
5996
  protected chargeWalletTokenMeta?: ChargeWalletTokenMeta;
5997
+ protected isDisabled: boolean;
5960
5998
  private onShippingOptionsChangeHandlerRegistered;
5961
5999
  constructor(selector: string, publicKeyOrAccessToken: string, gatewayId: string, meta: T, requiredMetaFields: string[]);
5962
6000
  private getApiAuthType;
@@ -5971,6 +6009,20 @@ declare abstract class BaseWalletButton<T extends BaseWalletMeta> {
5971
6009
  * @param {string} [alias] - Own domain alias
5972
6010
  */
5973
6011
  setEnv(env: string, alias?: string): void;
6012
+ /**
6013
+ * Enables the wallet button, restoring interactivity and visual appearance.
6014
+ *
6015
+ * @example
6016
+ * button.enable();
6017
+ */
6018
+ enable(): void;
6019
+ /**
6020
+ * Disables the wallet button, preventing clicks and applying a visual disabled state.
6021
+ *
6022
+ * @example
6023
+ * button.disable();
6024
+ */
6025
+ disable(): void;
5974
6026
  /**
5975
6027
  * Callback for onClick method.
5976
6028
  *
@@ -6178,6 +6230,7 @@ declare abstract class BaseWalletButton<T extends BaseWalletMeta> {
6178
6230
  protected handleOnUnavailable(): void;
6179
6231
  protected handleOnError(error?: Error): void;
6180
6232
  protected eventDataFromApiError(err: any): OnPaymentErrorEventData['data'];
6233
+ protected applyDisabledStyles(): void;
6181
6234
  protected validateRequiredMetaFields(requiredMetaFields: string[]): void;
6182
6235
  }
6183
6236
 
@@ -6555,4 +6608,5 @@ declare global {
6555
6608
  }
6556
6609
  }
6557
6610
 
6558
- export { AfterpayCheckoutButton, AfterpayOnSiteMessaging, Api, ApplePayOpenWalletButton, ApplePayWalletButtonExpress, type Billing, CHECKOUT_BUTTON_EVENT, Canvas3ds, Checkout, CheckoutActionCode, type CheckoutResponse, ClickToPay, Configuration, type CreateOTTData, type CreateOTTRequest, type CreateOTTResponse, type CreateSessionRequest, type CreateSessionResponse, ELEMENT, ERROR_OPERATION, EVENT$2 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, FRAUD_PREVENTION_EVENTS, type FraudPreventionEvent, type FraudPreventionEventType, type FraudPreventionProvider, FraudPreventionService, GooglePayOpenWalletButton, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IClickToPayMeta, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IEventData, type IOpenWalletProvider, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, type IWalletMeta, type IWalletOnClickEvent, type IWalletPaymentSuccessfulEvent, type IWalletUnavailableEvent, type IWalletUpdateData, type IWalletUpdateEvent, InstructionDebugger, MultiWidget, type OTTResponse, type OnCancelEventData, type OnClickEventData$1 as OnClickEventData, type OnCreateOTTErrorEventData, type OnCreateOTTErrorPayload, type OnCreateOTTSuccessPayload, type OnCreateOTTSuccessfulEventData, type OnErrorEventData$1 as OnErrorEventData, type OnErrorPayload, type OnLoadedEventData, type OnUnavailableDetails, type OnUnavailableEventData$1 as OnUnavailableEventData, type OnUnavailablePayload, type OpenWalletBaseEvent, OpenWalletButtons, type OpenWalletDataEvent, type OpenWalletEventType, type OpenWalletMeta, PAYMENT_TYPE, PURPOSE, PayPalDataCollector, PayPalSavePaymentSourceWidget, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, type Shipping, TEXT, TOKEN_TYPE, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WALLET_TYPES, WalletButtons, type WalletType, ZipmoneyCheckoutButton };
6611
+ export { AfterpayCheckoutButton, AfterpayOnSiteMessaging, Api, ApplePayOpenWalletButton, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, Checkout, CheckoutActionCode, ClickToPay, Configuration, ContactShippingEditingMode, ELEMENT, ERROR_OPERATION, EVENT$2 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, FRAUD_PREVENTION_EVENTS, FraudPreventionService, GooglePayOpenWalletButton, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, InstructionDebugger, MultiWidget, OpenWalletButtons, PAYMENT_TYPE, PURPOSE, PayPalDataCollector, PayPalSavePaymentSourceWidget, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TOKEN_TYPE, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, VaultDisplayWidget, EVENT as WALLET_BUTTONS_EXPRESS_EVENT, WALLET_TYPES, WalletButtons, ZipmoneyCheckoutButton };
6612
+ export type { ApplePayButtonStyle, ApplePayButtonType, ApplePayWalletMeta, AppleShippingType, BaseWalletMeta, Billing, CheckoutResponse, CreateOTTData, CreateOTTRequest, CreateOTTResponse, CreateSessionRequest, CreateSessionResponse, EventTypes, FraudPreventionEvent, FraudPreventionEventType, FraudPreventionProvider, IApplePayShippingOption, ICheckout, IClickToPayMeta, IDetails, IElementStyleInput, IEventAfterLoadData, IEventCheckoutFinishData, IEventData$1 as IEventData, IEventFinishData, IEventMetaData, IEventSizeData, IFormValidation, IOpenWalletProvider, IPayPalMeta, IStyles$1 as IStyles, ITexts, IWalletMeta, IWalletOnClickEvent, IWalletPaymentSuccessfulEvent, IWalletUnavailableEvent, IWalletUpdateData, IWalletUpdateEvent, OTTResponse, OnCancelEventData, OnClickEventData$1 as OnClickEventData, OnCreateOTTErrorEventData, OnCreateOTTErrorPayload, OnCreateOTTSuccessPayload, OnCreateOTTSuccessfulEventData, OnErrorEventData$1 as OnErrorEventData, OnErrorPayload, OnLoadedEventData, OnUnavailableDetails, OnUnavailableEventData$1 as OnUnavailableEventData, OnUnavailablePayload, OpenWalletBaseEvent, OpenWalletDataEvent, OpenWalletEventType, OpenWalletMeta, PaypalWalletMeta, Shipping, VaultDisplayStyle, OnClickEventData as WalletExpressOnClickEventData, OnCloseEventData as WalletExpressOnCloseEventData, OnErrorEventData as WalletExpressOnErrorEventData, OnPaymentErrorEventData as WalletExpressOnPaymentErrorEventData, OnPaymentInReviewEventData as WalletExpressOnPaymentInReviewEventData, OnPaymentSuccessfulEventData as WalletExpressOnPaymentSuccessfulEventData, OnShippingAddressChangeEventData as WalletExpressOnShippingAddressChangeEventData, OnShippingAddressChangeEventResponse as WalletExpressOnShippingAddressChangeEventResponse, OnShippingOptionChangeEventData as WalletExpressOnShippingOptionChangeEventData, OnShippingOptionChangeEventResponse as WalletExpressOnShippingOptionChangeEventResponse, OnUnavailableEventData as WalletExpressOnUnavailableEventData, WalletType, WidgetEventMap, WidgetEventName };