mirror of
https://github.com/bitwarden/clients.git
synced 2026-11-16 07:03:29 +00:00
[PM-44272] feat: add upgrade-nudge service abstraction and rollout flag (#24649)
* feat(billing): add premium upgrade-nudge service abstraction * feat(billing): register feature-based upgrade paths rollout flag * fix(billing): remove TOTP mentioning in comment
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
export interface PremiumUpgradeNudgeOptions {
|
||||
titleKey: string;
|
||||
descriptionKey: string;
|
||||
unlockedFeatureKeys?: string[];
|
||||
imagePath?: string; // bundled UI screenshot;
|
||||
checkoutFeatureNameKey?: string; // read only by the external-checkout service; web ignores it
|
||||
}
|
||||
|
||||
export abstract class PremiumUpgradeNudgeService {
|
||||
/**
|
||||
* Determines if the user has a Premium subscription or should be shown an upgrade nudge.
|
||||
* @param options The options for the premium upgrade nudge.
|
||||
* @returns A promise that resolves to true if the user has Premium, false if the nudge is shown.
|
||||
*/
|
||||
abstract hasPremiumOrShowUpgradeNudge(options: PremiumUpgradeNudgeOptions): Promise<boolean>;
|
||||
}
|
||||
@@ -55,6 +55,7 @@ export enum FeatureFlag {
|
||||
PM29593_PremiumToOrganizationUpgrade = "pm-29593-premium-to-organization-upgrade",
|
||||
PM38333_AnnualBillingSavings = "pm-38333-annual-billing-savings",
|
||||
PamBillingSupport = "pm-39883-pam-billing-support",
|
||||
PM42214_FeatureBasedUpgradePaths = "pm-42214-feature-based-upgrade-paths",
|
||||
|
||||
/* Key Management */
|
||||
PrivateKeyRegeneration = "pm-12241-private-key-regeneration",
|
||||
@@ -190,6 +191,7 @@ export const DefaultFeatureFlagValue = {
|
||||
[FeatureFlag.DebugDisableSelfHostPremiumCheck]: FALSE,
|
||||
[FeatureFlag.PM29593_PremiumToOrganizationUpgrade]: FALSE,
|
||||
[FeatureFlag.PM38333_AnnualBillingSavings]: FALSE,
|
||||
[FeatureFlag.PM42214_FeatureBasedUpgradePaths]: FALSE,
|
||||
|
||||
/* Key Management */
|
||||
[FeatureFlag.PrivateKeyRegeneration]: FALSE,
|
||||
|
||||
Reference in New Issue
Block a user