2020-10-21 01:23:55 +02:00
|
|
|
import Plugin from '../Plugin';
|
|
|
|
import JoplinData from './JoplinData';
|
|
|
|
import JoplinPlugins from './JoplinPlugins';
|
|
|
|
import JoplinWorkspace from './JoplinWorkspace';
|
|
|
|
import JoplinFilters from './JoplinFilters';
|
|
|
|
import JoplinCommands from './JoplinCommands';
|
|
|
|
import JoplinViews from './JoplinViews';
|
|
|
|
import JoplinInterop from './JoplinInterop';
|
|
|
|
import JoplinSettings from './JoplinSettings';
|
2021-01-12 01:34:06 +02:00
|
|
|
import JoplinContentScripts from './JoplinContentScripts';
|
2021-08-10 12:34:49 +02:00
|
|
|
import JoplinClipboard from './JoplinClipboard';
|
|
|
|
import JoplinWindow from './JoplinWindow';
|
2020-10-21 01:23:55 +02:00
|
|
|
/**
|
|
|
|
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
|
2020-11-14 02:02:17 +02:00
|
|
|
*
|
2023-01-05 12:41:17 +02:00
|
|
|
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
|
2020-11-14 02:02:17 +02:00
|
|
|
*
|
2023-01-05 12:41:17 +02:00
|
|
|
* If a breaking change ever becomes needed, best effort will be done to:
|
2020-11-14 02:02:17 +02:00
|
|
|
*
|
2023-01-05 12:41:17 +02:00
|
|
|
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
|
2020-11-14 02:02:17 +02:00
|
|
|
* - Document breaking changes in the changelog;
|
|
|
|
*
|
2023-01-05 12:41:17 +02:00
|
|
|
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
|
2020-10-21 01:23:55 +02:00
|
|
|
*/
|
|
|
|
export default class Joplin {
|
|
|
|
private data_;
|
|
|
|
private plugins_;
|
|
|
|
private workspace_;
|
|
|
|
private filters_;
|
|
|
|
private commands_;
|
|
|
|
private views_;
|
|
|
|
private interop_;
|
|
|
|
private settings_;
|
2021-01-12 01:34:06 +02:00
|
|
|
private contentScripts_;
|
2021-08-10 12:34:49 +02:00
|
|
|
private clipboard_;
|
|
|
|
private window_;
|
2020-11-23 19:06:52 +02:00
|
|
|
constructor(implementation: any, plugin: Plugin, store: any);
|
2020-10-21 01:23:55 +02:00
|
|
|
get data(): JoplinData;
|
2021-08-10 12:34:49 +02:00
|
|
|
get clipboard(): JoplinClipboard;
|
|
|
|
get window(): JoplinWindow;
|
2020-10-21 01:23:55 +02:00
|
|
|
get plugins(): JoplinPlugins;
|
|
|
|
get workspace(): JoplinWorkspace;
|
2021-01-12 01:34:06 +02:00
|
|
|
get contentScripts(): JoplinContentScripts;
|
2020-10-21 01:23:55 +02:00
|
|
|
/**
|
|
|
|
* @ignore
|
|
|
|
*
|
|
|
|
* Not sure if it's the best way to hook into the app
|
|
|
|
* so for now disable filters.
|
|
|
|
*/
|
|
|
|
get filters(): JoplinFilters;
|
|
|
|
get commands(): JoplinCommands;
|
|
|
|
get views(): JoplinViews;
|
|
|
|
get interop(): JoplinInterop;
|
|
|
|
get settings(): JoplinSettings;
|
2021-01-27 14:48:47 +02:00
|
|
|
/**
|
|
|
|
* It is not possible to bundle native packages with a plugin, because they
|
|
|
|
* need to work cross-platforms. Instead access to certain useful native
|
|
|
|
* packages is provided using this function.
|
|
|
|
*
|
|
|
|
* Currently these packages are available:
|
|
|
|
*
|
|
|
|
* - [sqlite3](https://www.npmjs.com/package/sqlite3)
|
|
|
|
* - [fs-extra](https://www.npmjs.com/package/fs-extra)
|
|
|
|
*
|
|
|
|
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/nativeModule)
|
|
|
|
*/
|
|
|
|
require(_path: string): any;
|
2020-10-21 01:23:55 +02:00
|
|
|
}
|