Skip to content

Commit

Permalink
Add informational banners variants to upsell promotional banner options
Browse files Browse the repository at this point in the history
  • Loading branch information
atsikov committed Sep 6, 2024
1 parent b556481 commit 4cee6ec
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,15 @@ export interface UpsellModulePromotionalBannerInstance {
destroy: () => void
}

export interface WidgetUpsellPromotionalBannerOptions {
export type WidgetUpsellPromotionalBannerOptions =
| WidgetUpsellPromotionalBannerSignUpBannerOptions
| WidgetUpsellPromotionalBannerInformationalBannerOptions
| WidgetUpsellPromotionalBannerInformationalLinkOptions
| WidgetUpsellPromotionalBannerInformationalIconOptions

export interface WidgetUpsellPromotionalBannerSignUpBannerOptions {
/** Promotional banner which allows your customer to join Revolut and get rewards if applicable */
variant?: 'sign_up'
/** Unique id of transaction user has just performed */
transactionId: string
/** Max cashback amount */
Expand All @@ -765,6 +773,33 @@ export interface WidgetUpsellPromotionalBannerOptions {
}
}

export interface WidgetUpsellPromotionalBannerInformationalBannerOptions {
/** Promotional banner with a summary of Revolut Pay benefits, allowing to view more details on click */
variant: 'banner'
/** Max cashback amount */
amount?: number
/** Cashback currency */
currency: string
}

export interface WidgetUpsellPromotionalBannerInformationalLinkOptions {
/** Promotional banner displayed as a link, allowing to view Revolut Pay details on click */
variant: 'link'
/** Max cashback amount */
amount?: number
/** Cashback currency */
currency: string
}

export interface WidgetUpsellPromotionalBannerInformationalIconOptions {
/** Promotional banner displayed as an icon, allowing to view Revolut Pay details on click */
variant: 'icon'
/** Max cashback amount */
amount?: number
/** Cashback currency */
currency: string
}

export interface UpsellModuleEnrollmentConfirmationBannerInstance {
mount: (
target: string | HTMLElement,
Expand All @@ -783,7 +818,7 @@ export interface WidgetUpsellEnrollmentConfirmationBannerOptions {
/** Whether promotional banner should be shown if user has not enrolled */
promotionalBanner?: boolean
/** Style object for promotional banner customisation */
promotionalBannerStyle?: WidgetUpsellPromotionalBannerOptions['style']
promotionalBannerStyle?: WidgetUpsellPromotionalBannerSignUpBannerOptions['style']
}

export interface RevolutUpsellModuleOptions {
Expand Down

0 comments on commit 4cee6ec

Please sign in to comment.