@bigcommerce/checkout-sdk 1.274.0 → 1.276.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.
@@ -632,20 +632,17 @@ declare interface AmazonPayShippingInitializeOptions {
632
632
  onReady?(reference: AmazonPayOrderReference): void;
633
633
  }
634
634
 
635
- /**
636
- * The required config to render the AmazonPayV2 buttton.
637
- */
638
- declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParams;
635
+ declare enum AmazonPayV2ButtonColor {
636
+ Gold = "Gold",
637
+ LightGray = "LightGray",
638
+ DarkGray = "DarkGray"
639
+ }
639
640
 
640
- declare interface AmazonPayV2ButtonParams {
641
+ declare interface AmazonPayV2ButtonConfig {
641
642
  /**
642
643
  * Amazon Pay merchant account identifier.
643
644
  */
644
645
  merchantId: string;
645
- /**
646
- * Configuration for calling the endpoint to Create Checkout Session.
647
- */
648
- createCheckoutSession: AmazonPayV2CheckoutSession;
649
646
  /**
650
647
  * Placement of the Amazon Pay button on your website.
651
648
  */
@@ -658,16 +655,35 @@ declare interface AmazonPayV2ButtonParams {
658
655
  * Product type selected for checkout. Default is 'PayAndShip'.
659
656
  */
660
657
  productType?: AmazonPayV2PayOptions;
658
+ /**
659
+ * Color of the Amazon Pay button.
660
+ */
661
+ buttonColor?: AmazonPayV2ButtonColor;
661
662
  /**
662
663
  * Language used to render the button and text on Amazon Pay hosted pages.
663
664
  */
664
665
  checkoutLanguage?: AmazonPayV2CheckoutLanguage;
665
666
  /**
666
- * Sets button to Sandbox environment. Default is false.
667
+ * Sets button to Sandbox environment. You do not have to set this parameter
668
+ * if your `publicKeyId` has an environment prefix. Default is false.
667
669
  */
668
670
  sandbox?: boolean;
669
671
  }
670
672
 
673
+ /**
674
+ * The required config to render the AmazonPayV2 buttton.
675
+ */
676
+ declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParameters;
677
+
678
+ declare type AmazonPayV2ButtonParameters = AmazonPayV2ButtonParams | AmazonPayV2NewButtonParams;
679
+
680
+ declare interface AmazonPayV2ButtonParams extends AmazonPayV2ButtonConfig {
681
+ /**
682
+ * Configuration for calling the endpoint to Create Checkout Session.
683
+ */
684
+ createCheckoutSession: AmazonPayV2CheckoutSession;
685
+ }
686
+
671
687
  declare enum AmazonPayV2CheckoutLanguage {
672
688
  en_US = "en_US",
673
689
  en_GB = "en_GB",
@@ -693,6 +709,22 @@ declare interface AmazonPayV2CheckoutSession {
693
709
  extractAmazonCheckoutSessionId?: string;
694
710
  }
695
711
 
712
+ declare interface AmazonPayV2CheckoutSessionConfig {
713
+ /**
714
+ * A payload that Amazon Pay will use to create a Checkout Session object.
715
+ */
716
+ payloadJSON: string;
717
+ /**
718
+ * Payload's signature.
719
+ */
720
+ signature: string;
721
+ /**
722
+ * Credential provided by Amazon Pay. You do not have to set this parameter
723
+ * if your `publicKeyId` has an environment prefix.
724
+ */
725
+ publicKeyId?: string;
726
+ }
727
+
696
728
  /**
697
729
  * A set of options that are required to initialize the customer step of
698
730
  * checkout in order to support AmazonPayV2.
@@ -715,6 +747,18 @@ declare enum AmazonPayV2LedgerCurrency {
715
747
  JPY = "JPY"
716
748
  }
717
749
 
750
+ declare interface AmazonPayV2NewButtonParams extends AmazonPayV2ButtonConfig {
751
+ /**
752
+ * Credential provided by Amazon Pay. You must also set the `sandbox`
753
+ * parameter if your `publicKeyId` does not have an environment prefix.
754
+ */
755
+ publicKeyId?: string;
756
+ /**
757
+ * Create Checkout Session configuration.
758
+ */
759
+ createCheckoutSessionConfig: AmazonPayV2CheckoutSessionConfig;
760
+ }
761
+
718
762
  declare enum AmazonPayV2PayOptions {
719
763
  /** Select this product type if you need the buyer's shipping details. */
720
764
  PayAndShip = "PayAndShip",
@@ -1007,6 +1051,7 @@ declare interface BaseCheckoutButtonInitializeOptions extends CheckoutButtonOpti
1007
1051
  * information in order to initialize the customer step of checkout.
1008
1052
  */
1009
1053
  declare interface BaseCustomerInitializeOptions extends CustomerRequestOptions {
1054
+ [key: string]: unknown;
1010
1055
  /**
1011
1056
  * The options that are required to initialize the customer step of checkout
1012
1057
  * when using Amazon Pay.
@@ -4538,6 +4583,10 @@ declare interface Discount {
4538
4583
  discountedAmount: number;
4539
4584
  }
4540
4585
 
4586
+ declare interface DisplaySettings {
4587
+ hidePriceFromGuests: boolean;
4588
+ }
4589
+
4541
4590
  declare class EmbeddedCheckout {
4542
4591
  private _iframeCreator;
4543
4592
  private _messageListener;
@@ -5688,7 +5737,7 @@ declare interface Order {
5688
5737
  billingAddress: BillingAddress;
5689
5738
  cartId: string;
5690
5739
  coupons: Coupon[];
5691
- consignments: OrderConsignment[];
5740
+ consignments: OrderConsignment;
5692
5741
  currency: Currency;
5693
5742
  customerCanBeCreated: boolean;
5694
5743
  customerId: number;
@@ -6660,6 +6709,7 @@ declare interface StoreConfig {
6660
6709
  checkoutSettings: CheckoutSettings;
6661
6710
  currency: StoreCurrency;
6662
6711
  displayDateFormat: string;
6712
+ displaySettings: DisplaySettings;
6663
6713
  inputDateFormat: string;
6664
6714
  /**
6665
6715
  * @deprecated Please use instead the data selectors