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.
Abstract class that provides a placeholder notifyUpdate
for data provider engine classes. If a
data provider engine class extends this class, it doesn't have to specify its own notifyUpdate
function in order to use notifyUpdate
.
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
Abstract class with partial implementation of IProjectDataProviderEngineFactory specifically for Layering PDPFs. You can extend this class to make creating a Layering PDPF easier.
Extending this class automatically fulfills the special requirements for Layering PDPfs, so we highly recommend extending this class. Please see IProjectDataProviderEngineFactory.getAvailableProjects for more information on the requirements.
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
Abstract class that provides a placeholder notifyUpdate
for Project Data Provider Engine
classes. If a Project Data Provider Engine class extends this class, it doesn't have to specify
its own notifyUpdate
function in order to use notifyUpdate
.
Additionally, extending this class informs Intellisense that you can run notifyUpdate
with the
Setting
data type if needed like so:
this.notifyUpdate('Setting');
Service that registers and 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.
Provides utility functions that project data providers should call when handling project settings
Provides functions related to scroll groups and Scripture references at those scroll groups
This service provides extensions in the extension host the ability to read/write data based on the extension identity and current user (as identified by the OS). This service will not work within the renderer.
A partial implementation of IWebViewProvider that includes creating WebViewControllers for each web view served by the web view provider. This class handles registering, disposing, and making sure there is only one web view controller for each web view for you.
You can create a new class extending this abstract class to create a web view provider that
serves web views and web view controllers of a specific webViewType
to facilitate interaction
between those web views and other extensions. You can register it with the PAPI using
papi.webViewProviders.register
.
If you want to change your existing IWebViewProvider
from a plain object to extending this
class, you will need to change your object's existing method named getWebView
(IWebViewProvider.getWebView) to be named getWebViewDefinition
(WebViewFactory.getWebViewDefinition), which is a drop-in replacement. You likely do NOT
want to overwrite this class's getWebView
because that will eliminate most of the benefits
associated with using this class.
Interface for registering webView providers, registering webView controllers, and performing privileged interactions with web views
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.
Abstract class that provides a placeholder
notifyUpdate
for Base Project Data Provider Engine classes. If a Base Project Data Provider Engine class extends this class, it doesn't have to specify its ownnotifyUpdate
function in order to usenotifyUpdate
.Additionally, extending this class informs Intellisense that you can run
notifyUpdate
with theSetting
data type if needed like so: