straumur-web-component 2.0.0-alpha.21 → 2.0.0-alpha.23
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.cjs +16 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -8
- package/dist/index.d.ts +20 -8
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -135,16 +135,16 @@ type StraumurWebBaseConfiguration = {
|
|
|
135
135
|
placeholders?: Placeholders;
|
|
136
136
|
locale?: PublicLocale;
|
|
137
137
|
localizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>;
|
|
138
|
-
instantPayments?:
|
|
138
|
+
instantPayments?: InstantPaymentMethod[];
|
|
139
139
|
hideSubmitButton?: boolean;
|
|
140
140
|
onCardValidityChanged?: (isValid: boolean, isActive: boolean) => void;
|
|
141
141
|
allowedPaymentMethods?: PaymentMethod[];
|
|
142
142
|
/**
|
|
143
|
-
* Top-to-bottom order of the payment-method options. Tokens: "card", "storedcard", "
|
|
144
|
-
* "applepay", and "instantpayments" (the express
|
|
145
|
-
* renders only inside the "instantpayments" slot, never standalone, so its
|
|
146
|
-
* effectively ignored. Any available method you omit is appended in the
|
|
147
|
-
* ["instantpayments", "storedcard", "card", "googlepay", "applepay"].
|
|
143
|
+
* Top-to-bottom order of the payment-method options. Tokens: "card", "storedcard", "kortalan",
|
|
144
|
+
* "googlepay", "applepay", and "instantpayments" (the express row). A method listed in
|
|
145
|
+
* `instantPayments` renders only inside the "instantpayments" slot, never standalone, so its
|
|
146
|
+
* standalone token here is effectively ignored. Any available method you omit is appended in the
|
|
147
|
+
* default order. Defaults to ["instantpayments", "storedcard", "card", "kortalan", "googlepay", "applepay"].
|
|
148
148
|
*/
|
|
149
149
|
orderPaymentMethods?: PaymentMethodOrder[];
|
|
150
150
|
/**
|
|
@@ -202,6 +202,12 @@ type PaymentFlowResult = {
|
|
|
202
202
|
* instead of the generic localized one (advanced mode only).
|
|
203
203
|
*/
|
|
204
204
|
errorMessage?: string;
|
|
205
|
+
/**
|
|
206
|
+
* The per-attempt reference from the /payment response. In advanced mode the host surfaces it here so the
|
|
207
|
+
* component can auto-attach it to a native (in-component) 3DS /details continuation. Redirect continuations
|
|
208
|
+
* pass it explicitly via submitDetails instead.
|
|
209
|
+
*/
|
|
210
|
+
paymentCheckoutReference?: string;
|
|
205
211
|
};
|
|
206
212
|
interface PaymentFlow {
|
|
207
213
|
submitPayment(data: AdvancedSubmitState["data"]): Promise<PaymentFlowResult>;
|
|
@@ -214,7 +220,13 @@ type ResultMessage = {
|
|
|
214
220
|
} | {
|
|
215
221
|
text: string;
|
|
216
222
|
};
|
|
217
|
-
|
|
223
|
+
/**
|
|
224
|
+
* A payment method that can be placed in `instantPayments` to render as an express button at the top
|
|
225
|
+
* of the widget: the two Adyen wallets and Kortalán (a redirect method). Duplicates are ignored at
|
|
226
|
+
* runtime (the instant strip dedupes), so this is a plain array rather than a unique-tuple union —
|
|
227
|
+
* enumerating every permutation of three methods is unmaintainable.
|
|
228
|
+
*/
|
|
229
|
+
type InstantPaymentMethod = Extract<PaymentMethod, "googlepay" | "applepay" | "kortalan">;
|
|
218
230
|
type StraumurCheckoutConfiguration = {
|
|
219
231
|
mode: "session" | "advanced";
|
|
220
232
|
sessionId?: string;
|
|
@@ -226,7 +238,7 @@ type StraumurCheckoutConfiguration = {
|
|
|
226
238
|
placeholders?: Placeholders;
|
|
227
239
|
locale: Language;
|
|
228
240
|
customLocalizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>;
|
|
229
|
-
instantPayments?:
|
|
241
|
+
instantPayments?: InstantPaymentMethod[];
|
|
230
242
|
hideSubmitButton?: boolean;
|
|
231
243
|
onCardValidityChanged?: (isValid: boolean, isActive: boolean) => void;
|
|
232
244
|
allowedPaymentMethods?: PaymentMethod[];
|
package/dist/index.d.ts
CHANGED
|
@@ -135,16 +135,16 @@ type StraumurWebBaseConfiguration = {
|
|
|
135
135
|
placeholders?: Placeholders;
|
|
136
136
|
locale?: PublicLocale;
|
|
137
137
|
localizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>;
|
|
138
|
-
instantPayments?:
|
|
138
|
+
instantPayments?: InstantPaymentMethod[];
|
|
139
139
|
hideSubmitButton?: boolean;
|
|
140
140
|
onCardValidityChanged?: (isValid: boolean, isActive: boolean) => void;
|
|
141
141
|
allowedPaymentMethods?: PaymentMethod[];
|
|
142
142
|
/**
|
|
143
|
-
* Top-to-bottom order of the payment-method options. Tokens: "card", "storedcard", "
|
|
144
|
-
* "applepay", and "instantpayments" (the express
|
|
145
|
-
* renders only inside the "instantpayments" slot, never standalone, so its
|
|
146
|
-
* effectively ignored. Any available method you omit is appended in the
|
|
147
|
-
* ["instantpayments", "storedcard", "card", "googlepay", "applepay"].
|
|
143
|
+
* Top-to-bottom order of the payment-method options. Tokens: "card", "storedcard", "kortalan",
|
|
144
|
+
* "googlepay", "applepay", and "instantpayments" (the express row). A method listed in
|
|
145
|
+
* `instantPayments` renders only inside the "instantpayments" slot, never standalone, so its
|
|
146
|
+
* standalone token here is effectively ignored. Any available method you omit is appended in the
|
|
147
|
+
* default order. Defaults to ["instantpayments", "storedcard", "card", "kortalan", "googlepay", "applepay"].
|
|
148
148
|
*/
|
|
149
149
|
orderPaymentMethods?: PaymentMethodOrder[];
|
|
150
150
|
/**
|
|
@@ -202,6 +202,12 @@ type PaymentFlowResult = {
|
|
|
202
202
|
* instead of the generic localized one (advanced mode only).
|
|
203
203
|
*/
|
|
204
204
|
errorMessage?: string;
|
|
205
|
+
/**
|
|
206
|
+
* The per-attempt reference from the /payment response. In advanced mode the host surfaces it here so the
|
|
207
|
+
* component can auto-attach it to a native (in-component) 3DS /details continuation. Redirect continuations
|
|
208
|
+
* pass it explicitly via submitDetails instead.
|
|
209
|
+
*/
|
|
210
|
+
paymentCheckoutReference?: string;
|
|
205
211
|
};
|
|
206
212
|
interface PaymentFlow {
|
|
207
213
|
submitPayment(data: AdvancedSubmitState["data"]): Promise<PaymentFlowResult>;
|
|
@@ -214,7 +220,13 @@ type ResultMessage = {
|
|
|
214
220
|
} | {
|
|
215
221
|
text: string;
|
|
216
222
|
};
|
|
217
|
-
|
|
223
|
+
/**
|
|
224
|
+
* A payment method that can be placed in `instantPayments` to render as an express button at the top
|
|
225
|
+
* of the widget: the two Adyen wallets and Kortalán (a redirect method). Duplicates are ignored at
|
|
226
|
+
* runtime (the instant strip dedupes), so this is a plain array rather than a unique-tuple union —
|
|
227
|
+
* enumerating every permutation of three methods is unmaintainable.
|
|
228
|
+
*/
|
|
229
|
+
type InstantPaymentMethod = Extract<PaymentMethod, "googlepay" | "applepay" | "kortalan">;
|
|
218
230
|
type StraumurCheckoutConfiguration = {
|
|
219
231
|
mode: "session" | "advanced";
|
|
220
232
|
sessionId?: string;
|
|
@@ -226,7 +238,7 @@ type StraumurCheckoutConfiguration = {
|
|
|
226
238
|
placeholders?: Placeholders;
|
|
227
239
|
locale: Language;
|
|
228
240
|
customLocalizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>;
|
|
229
|
-
instantPayments?:
|
|
241
|
+
instantPayments?: InstantPaymentMethod[];
|
|
230
242
|
hideSubmitButton?: boolean;
|
|
231
243
|
onCardValidityChanged?: (isValid: boolean, isActive: boolean) => void;
|
|
232
244
|
allowedPaymentMethods?: PaymentMethod[];
|