straumur-web-component 1.1.1 → 1.1.2-alpha.3

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.
package/dist/index.d.ts CHANGED
@@ -82,7 +82,7 @@ type StraumurWebConfiguration = {
82
82
  placeholders?: Placeholders;
83
83
  locale?: "is" | "en";
84
84
  localizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>;
85
- instantPayments?: Extract<PaymentMethod, "googlepay" | "applepay">[];
85
+ instantPayments?: UniqueInstantPayments;
86
86
  };
87
87
  type ResultCode = "AuthenticationFinished" | "AuthenticationNotRequired" | "Authorised" | "Cancelled" | "ChallengeShopper" | "Error" | "IdentifyShopper" | "PartiallyAuthorised" | "Pending" | "PresentToShopper" | "Received" | "RedirectShopper" | "Refused";
88
88
  type PaymentCompletedData = {
@@ -91,6 +91,7 @@ type PaymentCompletedData = {
91
91
  type PaymentFailedData = {
92
92
  resultCode: ResultCode;
93
93
  };
94
+ type UniqueInstantPayments = [Extract<PaymentMethod, "googlepay">] | [Extract<PaymentMethod, "applepay">] | [Extract<PaymentMethod, "googlepay">, Extract<PaymentMethod, "applepay">] | [Extract<PaymentMethod, "applepay">, Extract<PaymentMethod, "googlepay">];
94
95
  type StraumurCheckoutConfiguration = {
95
96
  sessionId: string;
96
97
  environment: "test" | "live";
@@ -99,7 +100,7 @@ type StraumurCheckoutConfiguration = {
99
100
  placeholders?: Placeholders;
100
101
  locale: Language;
101
102
  customLocalizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>;
102
- instantPayments?: Extract<PaymentMethod, "googlepay" | "applepay">[];
103
+ instantPayments?: UniqueInstantPayments;
103
104
  };
104
105
  type PlaceholderKeys = "cardNumber" | "expiryDate" | "expiryMonth" | "expiryYear" | "securityCodeThreeDigits" | "securityCodeFourDigits";
105
106
  type Placeholders = Partial<Record<PlaceholderKeys, string>>;