Skip to content

Commit

Permalink
chore: update api version
Browse files Browse the repository at this point in the history
chore: update api version
  • Loading branch information
GeoffreyChen777 committed Jun 30, 2024
1 parent 993d482 commit 6f4f159
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
27 changes: 25 additions & 2 deletions paperlib-api/dist/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ declare class FileSystemService {
* Show a file picker.
* @returns {Promise<OpenDialogReturnValue>} The result of the file picker.
*/
showFilePicker(): Promise<OpenDialogReturnValue>;
showFilePicker(props?: Array<"openDirectory" | "multiSelections" | "showHiddenFiles" | "createDirectory" | "promptToCreate" | "noResolveAliases" | "treatPackageAsDirectory" | "dontAddToRecent">): Promise<OpenDialogReturnValue>;
/**
* Show a folder picker.
* @returns {Promise<OpenDialogReturnValue>} The result of the folder picker.
Expand Down Expand Up @@ -1199,6 +1199,7 @@ declare interface IContextMenuServiceState {
dataContextMenuShowInFinderClicked: number;
dataContextMenuEditClicked: number;
dataContextMenuScrapeClicked: number;
dataContextMenuFuzzyScrapeClicked: number;
dataContextMenuDeleteClicked: number;
dataContextMenuFlagClicked: number;
dataContextMenuExportBibTexClicked: number;
Expand Down Expand Up @@ -1425,6 +1426,7 @@ declare interface IMenuServiceState {
"View-next": number;
"View-previous": number;
"File-delete": number;
"File-importFrom": number;
}

declare type IPaperEntityCollection = Results<IPaperEntityObject> | List<IPaperEntityObject> | Array<IPaperEntityObject>;
Expand Down Expand Up @@ -1535,6 +1537,7 @@ declare interface IPreferenceStore {
shortcutFlag: string;
shortcutCopyKey: string;
shortcutDelete: string;
shortcutImportFrom: string;
sidebarWidth: number;
detailPanelWidth: number;
mainviewSortBy: string;
Expand Down Expand Up @@ -1605,6 +1608,8 @@ declare interface IUIStateServiceState {
selectedFeedEntities: Array<FeedEntity>;
selectedQuerySentenceIds: string[];
selectedFeed: string;
showingCandidatesId: string;
metadataCandidates: Record<string, PaperEntity[]>;
editingPaperSmartFilter: PaperSmartFilter;
querySentencesSidebar: Array<string>;
querySentenceCommandbar: string;
Expand Down Expand Up @@ -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<PaperEntity[]>;
/**
* Scrape a data source's metadata.
* @param payloads - data source payloads.
* @returns List of paper entities' candidates. */
fuzzyScrape(paperEntities: IPaperEntityCollection): Promise<Record<string, PaperEntity[]>>;
/**
* 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<PaperEntity[][]>;
}

declare interface ShortcutEvent {
Expand Down Expand Up @@ -2597,6 +2612,13 @@ declare class UISlotService extends Eventable<IUISlotState> {
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;
}

/**
Expand All @@ -2614,7 +2636,7 @@ declare class UIStateService extends Eventable<IUIStateServiceState> {
* @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<string, PaperEntity[]> | {
_id: string | {
_bsontype: "ObjectID";
id: {
Expand Down Expand Up @@ -4660,6 +4682,7 @@ declare class WindowProcessManagementService extends Eventable<IWindowProcessMan
* @param windowId - The id of the window to be set
*/
center(windowId: string): void;
download(windowId: string, url: string, options?: {}, headers?: {}): Promise<string>;
}

declare class WindowStorage {
Expand Down
2 changes: 1 addition & 1 deletion paperlib-api/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 4 additions & 0 deletions paperlib-api/release-note.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Paperlib API Release Note

## v0.1.10

- add `deleteSlotItem` for `PLAPI.uiSlotService`.

## v0.1.9

- add `supContextMenuRenameClicked` for `PLMainAPI.contextMenuService`.
Expand Down

0 comments on commit 6f4f159

Please sign in to comment.