@pod-os/core 0.14.0 → 0.14.1-01c71c6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XBA7NYKJ.js → chunk-RI2OJWF3.js} +9880 -12611
- package/dist/{dist-5TZZFAHE.js → dist-SZGBZENE.js} +1 -1
- package/dist/index.js +83 -17
- package/dist/{jsonld-ECVURSS6.js → jsonld-RY2OHZTS.js} +2 -2
- package/lib/index.js +10136 -12906
- package/package.json +1 -1
- package/types/Store.d.ts +2 -2
- package/types/index.d.ts +10 -2
- package/types/namespaces/index.d.ts +1 -0
- package/types/search/SearchGateway.d.ts +16 -0
- package/types/search/SearchGateway.integration.spec.d.ts +1 -0
- package/types/search/SearchIndex.d.ts +6 -1
- package/types/search/createDefaultLabelIndex.d.ts +5 -0
- package/types/search/createDefaultLabelIndex.spec.d.ts +1 -0
- package/types/search/index.d.ts +1 -0
package/package.json
CHANGED
package/types/Store.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fetcher, IndexedFormula, UpdateManager } from "rdflib";
|
|
2
2
|
import { PodOsSession } from "./authentication";
|
|
3
3
|
import { Thing } from "./thing";
|
|
4
|
-
import {
|
|
4
|
+
import { UpdateOperation } from "@solid-data-modules/rdflib-utils";
|
|
5
5
|
/**
|
|
6
6
|
* The store contains all data that is known locally.
|
|
7
7
|
* It can be used to fetch additional data from the web and also update data and sync it back to editable resources.
|
|
@@ -34,5 +34,5 @@ export declare class Store {
|
|
|
34
34
|
*/
|
|
35
35
|
addPropertyValue(thing: Thing, property: string, value: string): Promise<void>;
|
|
36
36
|
addNewThing(uri: string, name: string, type: string): Promise<void>;
|
|
37
|
-
|
|
37
|
+
executeUpdate(operation: UpdateOperation): Promise<void>;
|
|
38
38
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { BehaviorSubject } from "rxjs";
|
|
|
3
3
|
import { SessionInfo } from "./authentication";
|
|
4
4
|
import { SolidFile } from "./files";
|
|
5
5
|
import { WebIdProfile } from "./profile";
|
|
6
|
-
import { LabelIndex
|
|
6
|
+
import { LabelIndex } from "./search";
|
|
7
7
|
import { Store } from "./Store";
|
|
8
8
|
import { Term } from "./terms";
|
|
9
9
|
import { Thing } from "./thing";
|
|
@@ -20,6 +20,7 @@ export declare class PodOS {
|
|
|
20
20
|
readonly store: Store;
|
|
21
21
|
readonly uriService: UriService;
|
|
22
22
|
private fileFetcher;
|
|
23
|
+
private searchGateway;
|
|
23
24
|
constructor();
|
|
24
25
|
private flagAuthorizationMetaDataOnSessionChange;
|
|
25
26
|
handleIncomingRedirect(restorePreviousSession?: boolean): void;
|
|
@@ -53,7 +54,7 @@ export declare class PodOS {
|
|
|
53
54
|
* Fetch the private label index for the given profile and build a search index from it
|
|
54
55
|
* @param webId
|
|
55
56
|
*/
|
|
56
|
-
buildSearchIndex(profile: WebIdProfile): Promise<SearchIndex>;
|
|
57
|
+
buildSearchIndex(profile: WebIdProfile): Promise<import("./search").SearchIndex>;
|
|
57
58
|
logout(): Promise<void>;
|
|
58
59
|
login(oidcIssuer?: string): Promise<void>;
|
|
59
60
|
loadContactsModule(): Promise<ContactsModule>;
|
|
@@ -63,4 +64,11 @@ export declare class PodOS {
|
|
|
63
64
|
* @param labelIndex - The index to update
|
|
64
65
|
*/
|
|
65
66
|
addToLabelIndex(thing: Thing, labelIndex: LabelIndex): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a new label index document at a default location and links it to the user's profile or preferences document
|
|
69
|
+
*
|
|
70
|
+
* @param profile - The profile for that to create the index
|
|
71
|
+
* @returns the newly created label index
|
|
72
|
+
*/
|
|
73
|
+
createDefaultLabelIndex(profile: WebIdProfile): Promise<LabelIndex>;
|
|
66
74
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WebIdProfile } from "../profile";
|
|
2
|
+
import { Store } from "../Store";
|
|
3
|
+
import { LabelIndex } from "./LabelIndex";
|
|
4
|
+
import { Thing } from "../thing";
|
|
5
|
+
import { SearchIndex } from "./SearchIndex";
|
|
6
|
+
export declare class SearchGateway {
|
|
7
|
+
private store;
|
|
8
|
+
constructor(store: Store);
|
|
9
|
+
/**
|
|
10
|
+
* Fetch the private label index for the given profile and build a search index from it
|
|
11
|
+
* @param webId
|
|
12
|
+
*/
|
|
13
|
+
buildSearchIndex(profile: WebIdProfile): Promise<SearchIndex>;
|
|
14
|
+
addToLabelIndex(thing: Thing, labelIndex: LabelIndex): Promise<void>;
|
|
15
|
+
createDefaultLabelIndex(profile: WebIdProfile): Promise<LabelIndex>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,8 +4,13 @@ import { Index } from "lunr";
|
|
|
4
4
|
* A fast, in-memory search index based on data from label indexes. Both labels and URIs are indexed.
|
|
5
5
|
*/
|
|
6
6
|
export declare class SearchIndex {
|
|
7
|
+
private labelIndexes;
|
|
7
8
|
private index;
|
|
8
|
-
constructor(
|
|
9
|
+
constructor(labelIndexes: LabelIndex[]);
|
|
10
|
+
/**
|
|
11
|
+
* Recreates the search index with the current data from all label indexes
|
|
12
|
+
*/
|
|
13
|
+
rebuild(): this;
|
|
9
14
|
/**
|
|
10
15
|
* Search the index for a given term. It finds partial matches, but will rank exact matches higher.
|
|
11
16
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/search/index.d.ts
CHANGED