Const
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.
Service that allows extensions to send and receive data to/from other extensions
Prompt the user for responses with dialogs
This is just an alias for internet.fetch
Service that provides a way to call fetch
since the original function is not available
Service that allows to get and store localizations
All extensions and services should use this logger to provide a unified output of logs
Service that allows to get and store menu data
Service that provides a way to send and receive network events
Network objects are distributed objects within PAPI for TS/JS objects.
https://en.wikipedia.org/wiki/Distributed_object
Objects registered via networkObjectService.set are retrievable using networkObjectService.get.
Function calls made on network objects retrieved via networkObjectService.get are proxied
and sent to the original objects registered via networkObjectService.set. All functions on
the registered object are proxied except for constructors, dispose
, and functions starting with
on
since those should be events (which are not intended to be proxied) based on our naming
convention. If you don't want a function to be proxied, don't make it a property of the
registered object.
Functions on a network object will be called asynchronously by other processes regardless of whether the functions are synchronous or asynchronous, so it is best to make them all asynchronous. All shared functions' arguments and return values must be serializable to be called across processes.
When a service registers an object via networkObjectService.set, it is the responsibility
of that service, and only that service, to call dispose
on that object when it is no longer
intended to be shared with other services.
When an object is disposed by calling dispose
, all functions registered with the onDidDispose
event handler will be called. After an object is disposed, calls to its functions will no longer
be proxied to the original object.
Provides functions related to the set of available network objects
Service that sends notifications to users in the UI
Service that gets project data providers
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 hooks that enable interacting with the papi
in React components more easily.
Provides functions related to scroll groups and Scripture references at those scroll groups
Service that allows to interact with the application theme.
When accessing papi.themes
from a WebView, it will have additional functionality. See
IThemeServiceLocal
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.
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.
Service that allows to interact with the main application window
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.
Provides information about this app like name and version.