mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
removed deprecated API methods
This commit is contained in:
@@ -38,18 +38,16 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
this[key] = apiParams[key];
|
||||
}
|
||||
|
||||
/** @property {axios} Axios library for HTTP requests. See {@link https://axios-http.com} for documentation */
|
||||
/**
|
||||
* @property {axios} Axios library for HTTP requests. See {@link https://axios-http.com} for documentation
|
||||
* @deprecated use native (browser compatible) fetch() instead
|
||||
*/
|
||||
this.axios = axios;
|
||||
/** @property {dayjs} day.js library for date manipulation. See {@link https://day.js.org} for documentation */
|
||||
this.dayjs = dayjs;
|
||||
/** @property {axios} xml2js library for XML parsing. See {@link https://github.com/Leonidas-from-XIV/node-xml2js} for documentation */
|
||||
this.xml2js = xml2js;
|
||||
|
||||
// DEPRECATED - use direct api.unescapeHtml
|
||||
this.utils = {
|
||||
unescapeHtml: utils.unescapeHtml
|
||||
};
|
||||
|
||||
/**
|
||||
* Instance name identifies particular Trilium instance. It can be useful for scripts
|
||||
* if some action needs to happen on only one specific instance.
|
||||
@@ -315,17 +313,6 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
*/
|
||||
this.getRootCalendarNote = dateNoteService.getRootCalendarNote;
|
||||
|
||||
/**
|
||||
* Returns day note for given date. If such note doesn't exist, it is created.
|
||||
*
|
||||
* @method
|
||||
* @param {string} date in YYYY-MM-DD format
|
||||
* @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
|
||||
* @returns {BNote|null}
|
||||
* @deprecated use getDayNote instead
|
||||
*/
|
||||
this.getDateNote = dateNoteService.getDayNote;
|
||||
|
||||
/**
|
||||
* Returns day note for given date. If such note doesn't exist, it is created.
|
||||
*
|
||||
@@ -377,14 +364,6 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
*/
|
||||
this.getYearNote = dateNoteService.getYearNote;
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @deprecated use sortNotes instead
|
||||
* @param {string} parentNoteId - this note's child notes will be sorted
|
||||
* @returns {void}
|
||||
*/
|
||||
this.sortNotesByTitle = parentNoteId => treeService.sortNotes(parentNoteId);
|
||||
|
||||
/**
|
||||
* Sort child notes of a given note.
|
||||
*
|
||||
@@ -457,15 +436,6 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
*/
|
||||
this.sql = sql;
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @deprecated this is now no-op since all the changes should be gracefully handled per widget
|
||||
* @returns {void}
|
||||
*/
|
||||
this.refreshTree = () => {
|
||||
console.warn("api.refreshTree() is a NO-OP and can be removed from your script.")
|
||||
};
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @returns {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
|
||||
|
||||
Reference in New Issue
Block a user