Skip to content

Commit 69172aa

Browse files
committed
bookmarks-rdflib: documentation / changelog
1 parent 09c18ca commit 69172aa

File tree

2 files changed

+51
-16
lines changed

2 files changed

+51
-16
lines changed

bookmarks/rdflib/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

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

5-
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).
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
6+
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## Unreleased
9+
10+
### Added
11+
12+
- [discoverStorage](https://solid-contrib.github.io/data-modules/bookmarks-rdflib-api/interfaces/BookmarksModule.html#discoverStorage)
613

714
## 0.1.0
815

bookmarks/rdflib/src/index.ts

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,51 @@ export interface CreateBookmarkCommand {
2020
url: string;
2121
}
2222

23+
/**
24+
* URLs of potential bookmark storages (documents and/or containers)
25+
*/
26+
export interface StorageLocations {
27+
/**
28+
* List of URLs pointing to documents containing bookmarks
29+
*/
30+
documentUrls: string[];
31+
/**
32+
* List of URLs pointing to containers containing bookmarks
33+
*/
34+
containerUrls: string[];
35+
}
36+
37+
/**
38+
* Object describing potential storage locations for bookmarks.
39+
*
40+
*/
41+
export interface BookmarkStorage {
42+
/**
43+
* locations for personal use, not listed publicly
44+
*/
45+
private: StorageLocations;
46+
/**
47+
* Locations that can be discovered by the public
48+
*/
49+
public: StorageLocations;
50+
}
51+
2352
export interface BookmarksModule {
53+
/**
54+
* Discover configured storages for Bookmarks (containers and/or documents) from private and public type indexes of the given WebID
55+
* @param webId - The WebID whose indexes to search
56+
*/
2457
discoverStorage(webId: string): Promise<BookmarkStorage>;
2558

59+
/**
60+
* Create a new bookmark at the given storage. Potential storage URLs can be discovered using {@link discoverStorage}.
61+
* @param storageUrl
62+
* @param title
63+
* @param url
64+
*/
2665
createBookmark({
27-
storageUrl,
28-
title,
29-
url
30-
}: CreateBookmarkCommand): Promise<string>;
66+
storageUrl,
67+
title,
68+
url,
69+
}: CreateBookmarkCommand): Promise<string>;
3170
}
32-
33-
export interface BookmarkStorage {
34-
private: {
35-
documentUrls: string[],
36-
containerUrls: string[]
37-
},
38-
public: {
39-
documentUrls: string[],
40-
containerUrls: string[]
41-
}
42-
}

0 commit comments

Comments
 (0)