papi-dts
    Preparing search index...

    Variable defaultConst

    default: {
        app: IAppService;
        commands: typeof shared/services/command.service;
        dataProviders: DataProviderService;
        dialogs: DialogService;
        fetch: typeof __type;
        internet: InternetService;
        localization: ILocalizationService;
        logger: MainLogger & { default: MainLogger };
        menuData: IMenuDataService;
        network: PapiNetworkService;
        notifications: INotificationService;
        projectDataProviders: PapiFrontendProjectDataProviderService;
        projectLookup: ProjectLookupServiceType;
        react: typeof @papi/frontend/react;
        scrollGroups: IScrollGroupService;
        settings: ISettingsService;
        themes: IThemeServiceLocal;
        WebSocket: typeof PapiRendererWebSocket;
        webViews: WebViewServiceType;
        XMLHttpRequest: typeof PapiRendererXMLHttpRequest;
    }

    Type declaration

    • app: IAppService

      Provides information about this app like name and version.

    • commands: typeof shared/services/command.service

      The command service allows you to exchange messages with other components in the platform. You can register a command that other services and extensions can send you. You can send commands to other services and extensions that have registered commands.

    • dataProviders: DataProviderService

      Service that allows extensions to send and receive data to/from other extensions

    • dialogs: DialogService

      Prompt the user for responses with dialogs

    • fetch: typeof __type

      This is just an alias for internet.fetch

    • internet: InternetService

      Service that provides a way to call fetch since the original function is not available

    • localization: ILocalizationService

      Service that allows to get and store localizations

    • logger: MainLogger & { default: MainLogger }

      All extensions and services should use this logger to provide a unified output of logs

    • Service that allows to get and store menu data

    • network: PapiNetworkService

      Service that provides a way to send and receive network events

    • notifications: INotificationService

      Service that sends notifications to users in the UI

    • projectDataProviders: PapiFrontendProjectDataProviderService

      Service that gets project data providers

    • projectLookup: ProjectLookupServiceType

      Provides metadata for projects known by the platform

      Note: this service runs locally everywhere in the TypeScript processes. It is also exposed on the PAPI websocket. Note these functions are all asynchronous on the PAPI websocket regardless of if their types are synchronous locally.

    • react: typeof @papi/frontend/react

      React hooks that enable interacting with the papi in React components more easily.

    • scrollGroups: IScrollGroupService

      Provides functions related to scroll groups and Scripture references at those scroll groups

    • settings: ISettingsService
    • themes: IThemeServiceLocal

      Service that allows to interact with the application theme.

      When accessing papi.themes from a WebView, it will have additional functionality. See IThemeServiceLocal

    • WebSocket: typeof PapiRendererWebSocket

      This wraps the browser's WebSocket implementation to provide better control over internet access. It is isomorphic with the standard WebSocket, so it should act as a drop-in replacement.

      Note that the Node WebSocket implementation is different and not wrapped here.

    • webViews: WebViewServiceType

      Service exposing various functions related to using webViews

      WebViews are iframes in the Platform.Bible UI into which extensions load frontend code, either HTML or React components.

    • XMLHttpRequest: typeof PapiRendererXMLHttpRequest

      This wraps the browser's XMLHttpRequest implementation to provide better control over internet access. It is isomorphic with the standard XMLHttpRequest, so it should act as a drop-in replacement.

      Note that Node doesn't have a native implementation, so this is only for the renderer.