@bigcommerce/checkout-sdk 1.415.0 → 1.416.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.
@@ -1533,7 +1533,7 @@ declare interface BoltPaymentInitializeOptions {
1533
1533
 
1534
1534
  declare interface BraintreeAcceleratedCheckoutCustomer {
1535
1535
  authenticationState?: string;
1536
- addresses?: AddressRequestBody[];
1536
+ addresses?: Address[];
1537
1537
  instruments?: CardInstrument[];
1538
1538
  }
1539
1539
 
@@ -3489,7 +3489,7 @@ declare class CheckoutService {
3489
3489
  * @param handler - The handler function for the extension command.
3490
3490
  * @returns A function that, when called, will deregister the command handler.
3491
3491
  */
3492
- handleExtensionCommand(extensionId: string, command: ExtensionCommandType, handler: ExtensionCommandHandler): () => void;
3492
+ handleExtensionCommand<T extends keyof ExtensionCommandMap>(extensionId: string, command: T, handler: (command: ExtensionCommandMap[T]) => void): () => void;
3493
3493
  /**
3494
3494
  * Dispatches an action through the data store and returns the current state
3495
3495
  * once the action is dispatched.
@@ -4043,6 +4043,14 @@ declare interface CheckoutStoreSelector {
4043
4043
  * @returns The object with payment provider customer data
4044
4044
  */
4045
4045
  getPaymentProviderCustomer(): PaymentProviderCustomer | undefined;
4046
+ /**
4047
+ * Gets the extension associated with a given region.
4048
+ *
4049
+ * @alpha
4050
+ * @param region - A checkout extension region.
4051
+ * @returns The extension corresponding to the specified region, otherwise undefined.
4052
+ */
4053
+ getExtensionByRegion(region: ExtensionRegion): Extension | undefined;
4046
4054
  }
4047
4055
 
4048
4056
  /**
@@ -5028,9 +5036,12 @@ declare interface Extension {
5028
5036
  url: string;
5029
5037
  }
5030
5038
 
5031
- declare type ExtensionCommand = ReloadCheckoutCommand | ShowLoadingIndicatorCommand | SetIframeStyleCommand | FrameLoadedCommand;
5032
-
5033
- declare type ExtensionCommandHandler = (data: ExtensionCommand) => void;
5039
+ declare interface ExtensionCommandMap {
5040
+ [ExtensionCommandType.FrameLoaded]: FrameLoadedCommand;
5041
+ [ExtensionCommandType.ReloadCheckout]: ReloadCheckoutCommand;
5042
+ [ExtensionCommandType.ShowLoadingIndicator]: ShowLoadingIndicatorCommand;
5043
+ [ExtensionCommandType.SetIframeStyle]: SetIframeStyleCommand;
5044
+ }
5034
5045
 
5035
5046
  declare const enum ExtensionCommandType {
5036
5047
  FrameLoaded = "FRAME_LOADED",