Skip to main content

PersonalizationAdapter

The PersonalizationAdapter class is a class from which all custom personalization adapters inherit from. The default PersonalizationAdapter is connecting the client to our NodeJS personalization endpoints.

import { PersonalizationAdapter } from '@archibald/personalization';
export class ProjectPersonalizationAdapter extends PersonalizationAdapter {}

Options

NameTypeDescriptionDefault
clientPersonalizationClientThe personalization client instanceundefined
apiCreateApiThe api instance which is needed to make Http requestsundefined

getFeatureFlag

This method should return more infos for the specified feature flag

Signature:

getFeatureFlag(id: string, options?: FeatureFlagCustom): Promise<FeatureFlag>;

isFeatureFlagActive

This method should return a boolean value if the provided flag is active or not.

Signature:

isFeatureFlagActive(id: string, options?: FeatureFlagCustom): Promise<boolean>;