@bigcommerce/checkout-sdk 1.274.0 → 1.275.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",