EntitlementsHookOptions
Defined in: src/flags.ts:148
Options for createEntitlementsHook.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
customerKey? |
string | ((context) => string | undefined) |
Where the customer id comes from: a context attribute name, or a function. Default: the OpenFeature targetingKey. |
- | src/flags.ts:153 |
features? |
readonly string[] |
Only these features (default: every feature in the catalog). | EntitlementsContextOptions.features |
src/flags.ts:74 |
onError? |
(error, customer) => void |
Problems loading entitlements (the evaluation proceeds without them). Default console.warn. |
- | src/flags.ts:155 |
prefix? |
string |
Prefix of per-feature attributes. Default "entitlement.". |
EntitlementsContextOptions.prefix |
src/flags.ts:70 |
usage? |
boolean |
Include .remaining, .used and usage-aware allowed (one counter read). Default true. |
EntitlementsContextOptions.usage |
src/flags.ts:72 |