@pod-os/core 0.9.1-19b8fab.0 → 0.9.1-44dfad1.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/index.js CHANGED
@@ -40024,6 +40024,21 @@ var Store = class {
40024
40024
  }
40025
40025
  );
40026
40026
  }
40027
+ /**
40028
+ * Loads the preferences file for the given WebID
40029
+ * @param webId
40030
+ */
40031
+ loadPreferences(webId) {
40032
+ const preferences = this.graph.anyValue(
40033
+ namedNode2(webId),
40034
+ namedNode2("http://www.w3.org/ns/pim/space#preferencesFile"),
40035
+ void 0,
40036
+ namedNode2(webId).doc()
40037
+ );
40038
+ if (preferences) {
40039
+ return this.fetch(preferences);
40040
+ }
40041
+ }
40027
40042
  };
40028
40043
 
40029
40044
  // ../node_modules/rdf-namespaces/dist/index.es.js
@@ -60304,6 +60319,9 @@ var PodOS = class {
60304
60319
  callback(session4);
60305
60320
  });
60306
60321
  }
60322
+ loadPreferences(webId) {
60323
+ return this.store.loadPreferences(webId);
60324
+ }
60307
60325
  logout() {
60308
60326
  return this.session.logout();
60309
60327
  }
package/lib/index.js CHANGED
@@ -48456,6 +48456,21 @@ ${newlined}
48456
48456
  }
48457
48457
  );
48458
48458
  }
48459
+ /**
48460
+ * Loads the preferences file for the given WebID
48461
+ * @param webId
48462
+ */
48463
+ loadPreferences(webId) {
48464
+ const preferences = this.graph.anyValue(
48465
+ namedNode2(webId),
48466
+ namedNode2("http://www.w3.org/ns/pim/space#preferencesFile"),
48467
+ void 0,
48468
+ namedNode2(webId).doc()
48469
+ );
48470
+ if (preferences) {
48471
+ return this.fetch(preferences);
48472
+ }
48473
+ }
48459
48474
  };
48460
48475
 
48461
48476
  // ../node_modules/rdf-namespaces/dist/index.es.js
@@ -68736,6 +68751,9 @@ ${newlined}
68736
68751
  callback(session4);
68737
68752
  });
68738
68753
  }
68754
+ loadPreferences(webId) {
68755
+ return this.store.loadPreferences(webId);
68756
+ }
68739
68757
  logout() {
68740
68758
  return this.session.logout();
68741
68759
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pod-os/core",
3
- "version": "0.9.1-19b8fab.0",
3
+ "version": "0.9.1-44dfad1.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./types/index.d.ts",
6
6
  "files": [
@@ -29,11 +29,11 @@
29
29
  "@types/jest": "^29.5.3",
30
30
  "@types/jest-when": "^3.5.2",
31
31
  "@types/sparqljs": "^3.1.4",
32
- "@typescript-eslint/eslint-plugin": "^6.1.0",
33
- "@typescript-eslint/parser": "^6.1.0",
34
- "esbuild": "^0.18.14",
35
- "eslint": "^8.45.0",
36
- "jest": "^29.6.1",
32
+ "@typescript-eslint/eslint-plugin": "^6.2.1",
33
+ "@typescript-eslint/parser": "^6.2.1",
34
+ "esbuild": "^0.18.17",
35
+ "eslint": "^8.46.0",
36
+ "jest": "^29.6.2",
37
37
  "jest-when": "^3.5.2",
38
38
  "prettier": "^3.0.0",
39
39
  "rdf-namespaces": "^1.11.0",
package/types/Store.d.ts CHANGED
@@ -28,4 +28,9 @@ export declare class Store {
28
28
  */
29
29
  addPropertyValue(thing: Thing, property: string, value: string): Promise<void>;
30
30
  addNewThing(uri: string, name: string, type: string): Promise<void>;
31
+ /**
32
+ * Loads the preferences file for the given WebID
33
+ * @param webId
34
+ */
35
+ loadPreferences(webId: string): Promise<Response> | undefined;
31
36
  }
package/types/index.d.ts CHANGED
@@ -23,6 +23,7 @@ export declare class PodOS {
23
23
  addNewThing(uri: string, name: string, type: string): Promise<void>;
24
24
  proposeUriForNewThing(referenceUri: string, name: string): string;
25
25
  trackSession(callback: (session: ISessionInfo) => unknown): void;
26
+ loadPreferences(webId: string): Promise<Response> | undefined;
26
27
  logout(): Promise<void>;
27
28
  login(oidcIssuer?: string): Promise<void>;
28
29
  }
@@ -1 +1 @@
1
- export * from './RdfDocument';
1
+ export * from "./RdfDocument";