Frodo Library - v5.0.0-47
    Preparing search index...

    Type Alias Feature

    type Feature = {
        hasFeature(featureId: string): Promise<boolean>;
        readFeatures(): Promise<FeatureInterface[]>;
    }
    Index
    • Check if feature is available. Unlike readFeatures, it does not fail when the list cannot be read: it answers false, because it is used to decide whether to offer a function, and a credential that may not read the list must not lose functions that it may use. The failure is written to the debug output and the list is not requested again for the same host.

      Parameters

      • featureId: string

        feature id (e.g. 'service-accounts')

      Returns Promise<boolean>

      a promise that resolves to true if the feature is available and to false otherwise (also when the list cannot be read)

    • Read all features. Fails with a FrodoError when the list cannot be read, for example when the credential lacks the scope fr:idc:feature:* (the platform answers 403): an empty list means that the tenant has no features. The list is read once per state and kept; a failed read is not kept, the next call asks again.

      Returns Promise<FeatureInterface[]>

      a promise that resolves to an array of feature objects