Documentation
    Preparing search index...

    Interface ConfigService

    NAP-CONFIG reference service bundle — handler to register with the runtime, publishValues for the host app to push updates live to all subscribed napplets.

    interface ConfigService {
        handler: ServiceHandler;
        getSchema(windowId: string): NappletConfigSchema | null;
        getValues(windowId: string): ConfigValues | null;
        publishValues(values: ConfigValues, windowId?: string): void;
    }
    Index

    Properties

    Register this with the runtime via runtime.registerService('config', handler).

    Methods

    • Return the accepted schema for one live window, or null.

      Parameters

      • windowId: string

      Returns NappletConfigSchema | null

    • Return the current validated/defaulted values for one live window, or null.

      Parameters

      • windowId: string

      Returns ConfigValues | null

    • Broadcast a new values snapshot to every napplet with an active config.subscribe. Each subscriber receives a config.values envelope with no id (push form per wire spec — absence of id distinguishes push from correlated config.get response).

      Parameters

      • values: ConfigValues

        The new configuration snapshot (full object, not a diff)

      • OptionalwindowId: string

        Optional source window scope. Omit only for a host-wide update that should be independently validated for every subscriber.

      Returns void