import type { ComponentChildren } from 'preact'; /** * Experiments which are returned from a call made to onboardingcomponents for feature flags and experiments (see `useToggles`). * Experiments are used to toggle behavior for A/B testing purposes. * Defined using the Experimentation Platform in BO. * * Naming convention: `${ExperimentName}_${TreatmentGroupNameOrControl}` ex. `BankingVerificationExperiment_Treatment1` or `BusinessSearchExperiment_control` */ export declare const ExperimentNames: { /** * OXP-7319: Experiment with Forced Manual Payout Flow */ readonly BankingPayoutFlow_ForcedManualVerification: "BankingPayoutFlow_ForcedManualVerification"; }; export declare const FeatureNames: { /** * */ readonly EnableAgeVerification: "EnableAgeVerification"; /** * Allows users to specify a 'Country of Governing Law' for UK companies * within Business Details Task */ readonly EnableCountryOfGoverningLawForUKCompanies: "EnableCountryOfGoverningLawForUKCompanies"; /** * */ readonly EnableDoingBusinessAsNameV4: "EnableDoingBusinessAsNameV4"; /** * */ readonly EnableFinancialInformationComponentV4: "EnableFinancialInformationComponentV4"; /** * Enables localization for Japan */ readonly EnableJapanLocalization: "EnableJapanLocalization"; /** * */ readonly EnableNationalitySGHK: "EnableNationalitySGHK"; /** * */ readonly EnableRegistrationAndTaxAbsentStatesV4: "EnableRegistrationAndTaxAbsentStatesV4"; /** * OXP-7814: Allows businesses to declare that their registered business address * is a personal address or PO box */ readonly EnableResidentialAddressIndicator: "EnableResidentialAddressIndicator"; /** * */ readonly ShowCustomerSupportV4: "ShowCustomerSupportV4"; /** * */ readonly StrictNameAndAddressValidationV4: "StrictNameAndAddressValidationV4"; /** * OXP-7861: Enable Global Entry Flow */ readonly EnableGlobalEntryFlow: "EnableGlobalEntryFlow"; /** * OXP-6596: Enable Bank Document Classification in HO */ readonly EnableBankDocumentClassification: "EnableBankDocumentClassification"; /** * OXP-6596: Enable Bank Document Classification in ShadowMode in HO */ readonly EnableBankDocumentClassificationShadowMode: "EnableBankDocumentClassificationShadowMode"; /** * SOE-4062: Enable cross border payouts configuration for Bank Account task */ readonly EnableCrossBorderPayouts: "EnableCrossBorderPayouts"; /** * OXP-6032: Enable editing a single business line */ readonly EnableDeleteBusinessLines: "EnableDeleteBusinessLines"; /** * OXP-6799: Enable limit to a single business line */ readonly EnableLimitToSingleBusinessLine: "EnableLimitToSingleBusinessLine"; /** * OXP-6032: Enable editing a single business line */ readonly EnableModifyBusinessLines: "EnableModifyBusinessLines"; /** * Enable "Verify by Invite" flow for decision makers in Identity Verification */ readonly EnableVerifyByInvite: "EnableVerifyByInvite"; /** * Use the status calculated on the backend for the payout task. * If false, instead compute the status from capabilities and problems on the root LE. */ readonly UseTaskStatusApiForPayout: "UseTaskStatusApiForPayout"; /** OXP-6566: Create new payout intro screen */ readonly EnableBankAccountDetailsLandingPage: "EnableBankAccountDetailsLandingPage"; /** Enable AWE generated UI for PoC */ readonly EnableAdaptivePoc: "EnableAdaptivePoc"; /** * OXP-7774: Enable LEI field in Business Details Task */ readonly EnableLegalEntityIdentifierField: "EnableLegalEntityIdentifierField"; /** * OXP-7836: Enable bank account type selection for US payout details */ readonly EnableUSBankAccountTypeSelection: "EnableUSBankAccountTypeSelection"; /** * Passed in from uo sdk, TODO: move to settings */ readonly EnableEInvoicingCodeField: "EnableEInvoicingCodeField"; readonly HidePayoutAccountTask: "HidePayoutAccountTask"; readonly ShowExtraTaxExemptionReasons: "ShowExtraTaxExemptionReasons"; /** * Old features */ readonly AllowMoreRolesForMainRootTrustee: "AllowMoreRolesForMainRootTrustee"; readonly EnablePhoneFieldScenario: "EnablePhoneFieldScenario"; readonly ShowUnsupportedEntityType: "ShowUnsupportedEntityType"; }; export type ExperimentName = (typeof ExperimentNames)[keyof typeof ExperimentNames]; export type Experiments = { [key in ExperimentName]?: boolean; }; export type FeatureName = (typeof FeatureNames)[keyof typeof FeatureNames]; export type Features = { [key in FeatureName]?: boolean; }; export interface ToggleProps { children?: ComponentChildren; features: Features & Experiments; refreshExperiments?: () => void; } export interface ToggleContextValue { features: Features; isFeatureEnabled(key: FeatureName): boolean; experiments: Experiments; isExperimentEnabled(key: ExperimentName): boolean; refreshExperiments?: () => void; }