These APIs are available on pluginApi inside setup and inside activity render functions.
pluginApi.configRead and react to config values at runtime.
config.getReturns the current value of any config option, including custom ones registered by your plugin.
config.subscribeCalls a callback immediately with the current value and again whenever that config value changes. Returns an unsubscribe function. Subscriptions created during setup are cleaned up automatically when the plugin is unregistered. Subscriptions created inside an activity’s render function should be unsubscribed in that activity’s cleanup function.
Inside an activity’s render function, tie the subscription to that mount and unsubscribe in the returned cleanup function:
pluginApi.activityAccess the parameters passed to the currently active activity via setCurrentActivity.
activity.getParamsReturns the current activity parameters synchronously. Useful for reading params once at setup time or at the start of an activity render.
activity.subscribeToParamsSubscribes to parameter changes. The callback fires immediately with the current params, then on every subsequent update. Returns an unsubscribe function.
The render function receives params as its second argument for the initial mount, but if your activity can be re-activated with new params while already mounted, use subscribeToParams inside render to react to those updates:
pluginApi.filesMutate file entries in the upload collection.
files.updateUpdates mutable properties of a file entry by its internalId.