@bigcommerce/checkout-sdk 1.392.0 → 1.393.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.
@@ -2407,6 +2407,7 @@ declare class CheckoutService {
2407
2407
  private _storeCreditActionCreator;
2408
2408
  private _subscriptionsActionCreator;
2409
2409
  private _formFieldsActionCreator;
2410
+ private _extensionActionCreator;
2410
2411
  private _storeProjection;
2411
2412
  private _errorTransformer;
2412
2413
  private _selectorsFactory;
@@ -3349,6 +3350,21 @@ declare class CheckoutService {
3349
3350
  * @returns A promise that resolves to the current state.
3350
3351
  */
3351
3352
  executeSpamCheck(): Promise<CheckoutSelectors>;
3353
+ /**
3354
+ * Loads a list of extensions available for checkout.
3355
+ *
3356
+ * ```js
3357
+ * const state = service.loadExtensions();
3358
+ *
3359
+ * console.log(state.data.getExtensions());
3360
+ * ```
3361
+ *
3362
+ * @alpha
3363
+ * @param options - Options for loading the extensions that are
3364
+ * available to the current customer.
3365
+ * @returns A promise that resolves to the current state.
3366
+ */
3367
+ loadExtensions(options?: RequestOptions): Promise<CheckoutSelectors>;
3352
3368
  /**
3353
3369
  * Dispatches an action through the data store and returns the current state
3354
3370
  * once the action is dispatched.
@@ -3655,6 +3671,13 @@ declare interface CheckoutStoreErrorSelector {
3655
3671
  * @returns The error object if unable to fetch pickup options, otherwise undefined.
3656
3672
  */
3657
3673
  getPickupOptionsError(): Error | undefined;
3674
+ /**
3675
+ * Returns an error if unable to fetch extensions.
3676
+ *
3677
+ * @alpha
3678
+ * @returns The error object if unable to fetch extensions, otherwise undefined.
3679
+ */
3680
+ getLoadExtensionsError(): Error | undefined;
3658
3681
  }
3659
3682
 
3660
3683
  /**
@@ -3881,6 +3904,13 @@ declare interface CheckoutStoreSelector {
3881
3904
  * @returns The object of user experience settings if it is loaded, otherwise undefined.
3882
3905
  */
3883
3906
  getUserExperienceSettings(): UserExperienceSettings | undefined;
3907
+ /**
3908
+ * Gets a list of extensions available for checkout.
3909
+ *
3910
+ * @alpha
3911
+ * @returns The list of extensions if it is loaded, otherwise undefined.
3912
+ */
3913
+ getExtensions(): Extension[] | undefined;
3884
3914
  }
3885
3915
 
3886
3916
  /**
@@ -4859,6 +4889,18 @@ declare interface ExecutePaymentMethodCheckoutOptions extends CustomerRequestOpt
4859
4889
  continueWithCheckoutCallback?(): void;
4860
4890
  }
4861
4891
 
4892
+ declare interface Extension {
4893
+ id: string;
4894
+ name: string;
4895
+ region: ExtensionRegions;
4896
+ url: string;
4897
+ }
4898
+
4899
+ declare enum ExtensionRegions {
4900
+ ShippingShippingAddressFormBefore = "shipping.shippingAddressForm.before",
4901
+ ShippingShippingAddressFormAfter = "shipping.shippingAddressForm.after"
4902
+ }
4903
+
4862
4904
  declare interface FlashMessage {
4863
4905
  type: FlashMessageType;
4864
4906
  message: string;