Skip to content

Commit

Permalink
bookmarks-rdflib: documentation / changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
angelo-v committed Jul 25, 2024
1 parent 09c18ca commit 69172aa
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 16 deletions.
9 changes: 8 additions & 1 deletion bookmarks/rdflib/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

All notable changes to this module will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- [discoverStorage](https://solid-contrib.github.io/data-modules/bookmarks-rdflib-api/interfaces/BookmarksModule.html#discoverStorage)

## 0.1.0

Expand Down
58 changes: 43 additions & 15 deletions bookmarks/rdflib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,51 @@ export interface CreateBookmarkCommand {
url: string;
}

/**
* URLs of potential bookmark storages (documents and/or containers)
*/
export interface StorageLocations {
/**
* List of URLs pointing to documents containing bookmarks
*/
documentUrls: string[];
/**
* List of URLs pointing to containers containing bookmarks
*/
containerUrls: string[];
}

/**
* Object describing potential storage locations for bookmarks.
*
*/
export interface BookmarkStorage {
/**
* locations for personal use, not listed publicly
*/
private: StorageLocations;
/**
* Locations that can be discovered by the public
*/
public: StorageLocations;
}

export interface BookmarksModule {
/**
* Discover configured storages for Bookmarks (containers and/or documents) from private and public type indexes of the given WebID
* @param webId - The WebID whose indexes to search
*/
discoverStorage(webId: string): Promise<BookmarkStorage>;

/**
* Create a new bookmark at the given storage. Potential storage URLs can be discovered using {@link discoverStorage}.
* @param storageUrl
* @param title
* @param url
*/
createBookmark({
storageUrl,
title,
url
}: CreateBookmarkCommand): Promise<string>;
storageUrl,
title,
url,
}: CreateBookmarkCommand): Promise<string>;
}

export interface BookmarkStorage {
private: {
documentUrls: string[],
containerUrls: string[]
},
public: {
documentUrls: string[],
containerUrls: string[]
}
}

0 comments on commit 69172aa

Please sign in to comment.