@bigcommerce/checkout-sdk 1.700.2 → 1.701.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.
@@ -3192,6 +3192,16 @@ declare class CheckoutService {
3192
3192
  * @returns A function that, when called, will deregister the command handler.
3193
3193
  */
3194
3194
  handleExtensionCommand<T extends keyof ExtensionCommandMap>(extensionId: string, command: T, handler: (command: ExtensionCommandMap[T]) => void): () => void;
3195
+ /**
3196
+ * Manages the query handler for an extension.
3197
+ *
3198
+ * @alpha
3199
+ * @param extensionId - The ID of the extension sending the query.
3200
+ * @param query - The query to be handled.
3201
+ * @param handler - The handler function for the extension query.
3202
+ * @returns A function that, when called, will deregister the query handler.
3203
+ */
3204
+ handleExtensionQuery<T extends keyof ExtensionQueryMap>(extensionId: string, query: T, handler: (command: ExtensionQueryMap[T]) => void): () => void;
3195
3205
  /**
3196
3206
  * Dispatches an action through the data store and returns the current state
3197
3207
  * once the action is dispatched.
@@ -4816,14 +4826,12 @@ declare interface ExtensionCommandMap {
4816
4826
  [ExtensionCommandType.ReloadCheckout]: ReloadCheckoutCommand;
4817
4827
  [ExtensionCommandType.ShowLoadingIndicator]: ShowLoadingIndicatorCommand;
4818
4828
  [ExtensionCommandType.SetIframeStyle]: SetIframeStyleCommand;
4819
- [ExtensionCommandType.GetConsignments]: GetConsignmentsCommand;
4820
4829
  }
4821
4830
 
4822
4831
  export declare enum ExtensionCommandType {
4823
4832
  ReloadCheckout = "EXTENSION:RELOAD_CHECKOUT",
4824
4833
  ShowLoadingIndicator = "EXTENSION:SHOW_LOADING_INDICATOR",
4825
- SetIframeStyle = "EXTENSION:SET_IFRAME_STYLE",
4826
- GetConsignments = "EXTENSION:GET_CONSIGNMENTS"
4834
+ SetIframeStyle = "EXTENSION:SET_IFRAME_STYLE"
4827
4835
  }
4828
4836
 
4829
4837
  declare type ExtensionEvent = ConsignmentsChangedEvent;
@@ -4838,6 +4846,14 @@ declare const enum ExtensionMessageType {
4838
4846
  GetConsignments = "EXTENSION:GET_CONSIGNMENTS"
4839
4847
  }
4840
4848
 
4849
+ export declare interface ExtensionQueryMap {
4850
+ [ExtensionQueryType.GetConsignments]: GetConsignmentsQuery;
4851
+ }
4852
+
4853
+ export declare enum ExtensionQueryType {
4854
+ GetConsignments = "EXTENSION:GET_CONSIGNMENTS"
4855
+ }
4856
+
4841
4857
  declare const enum ExtensionRegion {
4842
4858
  ShippingShippingAddressFormBefore = "shipping.shippingAddressForm.before",
4843
4859
  ShippingShippingAddressFormAfter = "shipping.shippingAddressForm.after",
@@ -4932,10 +4948,6 @@ declare interface GatewayOrderPayment extends OrderPayment {
4932
4948
  };
4933
4949
  }
4934
4950
 
4935
- declare interface GetConsignmentsCommand {
4936
- type: ExtensionCommandType.GetConsignments;
4937
- }
4938
-
4939
4951
  declare interface GetConsignmentsMessage {
4940
4952
  type: ExtensionMessageType.GetConsignments;
4941
4953
  payload: {
@@ -4943,6 +4955,13 @@ declare interface GetConsignmentsMessage {
4943
4955
  };
4944
4956
  }
4945
4957
 
4958
+ declare interface GetConsignmentsQuery {
4959
+ type: ExtensionQueryType.GetConsignments;
4960
+ payload?: {
4961
+ useCache?: boolean;
4962
+ };
4963
+ }
4964
+
4946
4965
  declare interface GiftCertificate {
4947
4966
  balance: number;
4948
4967
  remaining: number;