diff --git a/paperlib-api/dist/api.d.ts b/paperlib-api/dist/api.d.ts index 3ed34c66..d3253357 100644 --- a/paperlib-api/dist/api.d.ts +++ b/paperlib-api/dist/api.d.ts @@ -1070,7 +1070,7 @@ declare class FileSystemService { * Show a file picker. * @returns {Promise} The result of the file picker. */ - showFilePicker(): Promise; + showFilePicker(props?: Array<"openDirectory" | "multiSelections" | "showHiddenFiles" | "createDirectory" | "promptToCreate" | "noResolveAliases" | "treatPackageAsDirectory" | "dontAddToRecent">): Promise; /** * Show a folder picker. * @returns {Promise} The result of the folder picker. @@ -1199,6 +1199,7 @@ declare interface IContextMenuServiceState { dataContextMenuShowInFinderClicked: number; dataContextMenuEditClicked: number; dataContextMenuScrapeClicked: number; + dataContextMenuFuzzyScrapeClicked: number; dataContextMenuDeleteClicked: number; dataContextMenuFlagClicked: number; dataContextMenuExportBibTexClicked: number; @@ -1425,6 +1426,7 @@ declare interface IMenuServiceState { "View-next": number; "View-previous": number; "File-delete": number; + "File-importFrom": number; } declare type IPaperEntityCollection = Results | List | Array; @@ -1535,6 +1537,7 @@ declare interface IPreferenceStore { shortcutFlag: string; shortcutCopyKey: string; shortcutDelete: string; + shortcutImportFrom: string; sidebarWidth: number; detailPanelWidth: number; mainviewSortBy: string; @@ -1605,6 +1608,8 @@ declare interface IUIStateServiceState { selectedFeedEntities: Array; selectedQuerySentenceIds: string[]; selectedFeed: string; + showingCandidatesId: string; + metadataCandidates: Record; editingPaperSmartFilter: PaperSmartFilter; querySentencesSidebar: Array; querySentenceCommandbar: string; @@ -2470,6 +2475,16 @@ declare class ScrapeService extends Eventable<{}> { * @param force - force scraping metadata. * @returns List of paper entities. */ scrapeMetadata(paperEntityDrafts: PaperEntity[], scrapers: string[], force?: boolean): Promise; + /** + * Scrape a data source's metadata. + * @param payloads - data source payloads. + * @returns List of paper entities' candidates. */ + fuzzyScrape(paperEntities: IPaperEntityCollection): Promise>; + /** + * Scrape all entry scrapers to transform data source payloads into a PaperEntity list. + * @param payloads - data source payloads. + * @returns List of paper entities. */ + _fuzzyScrape(paperEntities: IPaperEntityCollection): Promise; } declare interface ShortcutEvent { @@ -2597,6 +2612,13 @@ declare class UISlotService extends Eventable { updateSlot(slotID: keyof IUISlotState, patch: { [id: string]: any; }): void; + /** + * Delete an item from a slot + * @param slotID - The slot to delete from + * @param itemID - The item to delete + * @returns + */ + deleteSlotItem(slotID: keyof IUISlotState, itemID: string): void; } /** @@ -2614,7 +2636,7 @@ declare class UIStateService extends Eventable { * @param stateKey - key of the state * @returns The state */ - getState(stateKey: keyof IUIStateServiceState): string | number | boolean | string[] | number[] | { + getState(stateKey: keyof IUIStateServiceState): string | number | boolean | string[] | number[] | Record | { _id: string | { _bsontype: "ObjectID"; id: { @@ -4660,6 +4682,7 @@ declare class WindowProcessManagementService extends Eventable; } declare class WindowStorage { diff --git a/paperlib-api/package.json b/paperlib-api/package.json index a0883ca0..c6b1e4a7 100644 --- a/paperlib-api/package.json +++ b/paperlib-api/package.json @@ -1,6 +1,6 @@ { "name": "paperlib-api", - "version": "0.1.9", + "version": "0.1.10", "author": "Paperlib", "description": "The API for paperlib extension development.", "exports": { diff --git a/paperlib-api/release-note.md b/paperlib-api/release-note.md index e45c883b..b15f53b5 100644 --- a/paperlib-api/release-note.md +++ b/paperlib-api/release-note.md @@ -1,5 +1,9 @@ # Paperlib API Release Note +## v0.1.10 + +- add `deleteSlotItem` for `PLAPI.uiSlotService`. + ## v0.1.9 - add `supContextMenuRenameClicked` for `PLMainAPI.contextMenuService`.