Documentation
    Preparing search index...

    Interface CatalogIntentResolver

    A IntentResolver backed by a catalog, with a host hook to announce catalog/default changes.

    interface CatalogIntentResolver {
        available(
            archetype: string,
        ): IntentAvailability | Promise<IntentAvailability>;
        handlers(): IntentAvailability[] | Promise<IntentAvailability[]>;
        invoke(
            request: IntentRequest,
            context: IntentResolverContext,
        ): IntentResult | Promise<IntentResult>;
        notifyChanged(archetype: string): void;
        onChanged?(
            listener: (availability: IntentAvailability) => void,
        ): () => void;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Announce that the catalog or default handler for archetype changed. The resolver recomputes availability and notifies onChanged listeners, which the intent service forwards to napplets as intent.changed pushes.

      Parameters

      • archetype: string

      Returns void

    • Register for availability changes (a napplet installed/removed, or a default handler changed). The service forwards each change to served napplets as an intent.changed push. Returns an unsubscribe handle. Resolvers whose catalog never changes at runtime MAY omit this.

      Parameters

      Returns () => void