diff --git a/src/types.ts b/src/types.ts index c4003f4..afb539d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -653,7 +653,7 @@ export interface RevolutCheckoutInstance { option: RevolutPaymentsModuleOptions ) => RevolutPaymentsModuleInstance /** The upsell SDK module */ - upsell: (option: RevolutUpsellModuleOptions) => RevolutPaymentsModuleInstance + upsell: (option: RevolutUpsellModuleOptions) => RevolutUpsellModuleInstance } export interface RevolutPaymentsModuleInstance { @@ -685,6 +685,8 @@ export interface RevolutUpsellModuleInstance { cardGatewayBanner: UpsellModuleCardGatewayBannerInstance /** Promotional banner */ promotionalBanner: UpsellModulePromotionalBannerInstance + /** Enrollment confirmation banner */ + enrollmentConfirmationBanner: UpsellModuleEnrollmentConfirmationBannerInstance /** Manually destroy the instance */ destroy: () => void /** Controls the language of the text in the widget */ @@ -729,6 +731,24 @@ export interface WidgetUpsellPromotionalBannerOptions { } } +export interface UpsellModuleEnrollmentConfirmationBannerInstance { + mount: ( + target: string | HTMLElement, + options: WidgetUpsellEnrollmentConfirmationBannerOptions + ) => void + destroy: () => void +} + +export interface WidgetUpsellEnrollmentConfirmationBannerOptions { + orderToken: string + /** Prefilled customer details within the banner */ + customer?: Partial + /** Whether promotional banner should be shown if user has not enrolled */ + promotionalBanner?: boolean + /** Style object for promotional banner customisation */ + promotionalBannerStyle?: WidgetUpsellPromotionalBannerOptions['style'] +} + export interface RevolutUpsellModuleOptions { publicToken: string locale?: string | 'auto'