@pod-os/core 0.17.1-rc.b9287e0.0 → 0.17.1-rc.d403278.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 +4462 -13081
- package/lib/index.js +915 -9534
- package/package.json +2 -2
- package/types/authentication/BrowserSession.d.ts +15 -0
- package/types/authentication/index.d.ts +5 -19
- package/types/index.d.ts +1 -6
- package/types/thing/Thing.d.ts +1 -1
- package/types/authentication/observeSession.d.ts +0 -4
- /package/types/authentication/{observeSession.spec.d.ts → BrowserSession.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pod-os/core",
|
|
3
|
-
"version": "0.17.1-rc.
|
|
3
|
+
"version": "0.17.1-rc.d403278.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"typescript-eslint": "^8.35.1"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@inrupt/solid-client-authn-browser": "^2.3.0",
|
|
45
44
|
"@solid-data-modules/contacts-rdflib": "^0.7.0",
|
|
46
45
|
"@solid-data-modules/rdflib-utils": "^0.6.0",
|
|
47
46
|
"@types/lunr": "^2.3.7",
|
|
47
|
+
"@uvdsl/solid-oidc-client-browser": "^0.1.1",
|
|
48
48
|
"buffer": "^6.0.3",
|
|
49
49
|
"lunr": "^2.3.9",
|
|
50
50
|
"rdflib": "^2.2.37",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BehaviorSubject } from "rxjs";
|
|
2
|
+
import { PodOsSession, SessionInfo } from "./index";
|
|
3
|
+
export declare class BrowserSession implements PodOsSession {
|
|
4
|
+
private readonly session;
|
|
5
|
+
private onSessionRestoreCallback;
|
|
6
|
+
private readonly _authenticatedFetch;
|
|
7
|
+
private readonly sessionInfo$;
|
|
8
|
+
get authenticatedFetch(): (url: RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
|
|
9
|
+
constructor();
|
|
10
|
+
handleIncomingRedirect(restorePreviousSession?: boolean): Promise<void>;
|
|
11
|
+
login(oidcIssuer: string): Promise<void>;
|
|
12
|
+
logout(): Promise<void>;
|
|
13
|
+
observeSession(): BehaviorSubject<SessionInfo>;
|
|
14
|
+
onSessionRestore(callback: (url: string) => void): void;
|
|
15
|
+
}
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
import { ISessionInfo } from "@inrupt/solid-client-authn-browser";
|
|
2
|
-
import { BehaviorSubject } from "rxjs";
|
|
3
1
|
export type AuthenticatedFetch = (url: RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
|
|
4
|
-
export type SessionInfo =
|
|
2
|
+
export type SessionInfo = {
|
|
3
|
+
isLoggedIn: boolean;
|
|
4
|
+
webId?: string;
|
|
5
|
+
};
|
|
5
6
|
export interface PodOsSession {
|
|
6
7
|
authenticatedFetch: AuthenticatedFetch;
|
|
7
8
|
}
|
|
8
|
-
export
|
|
9
|
-
private readonly session;
|
|
10
|
-
private readonly _authenticatedFetch;
|
|
11
|
-
private readonly sessionInfo$;
|
|
12
|
-
get authenticatedFetch(): (url: RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
|
|
13
|
-
constructor();
|
|
14
|
-
handleIncomingRedirect(restorePreviousSession?: boolean): Promise<ISessionInfo | undefined>;
|
|
15
|
-
login(oidcIssuer: string): Promise<void>;
|
|
16
|
-
logout(): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated use observeSession instead
|
|
19
|
-
*/
|
|
20
|
-
trackSession(callback: (session: SessionInfo) => unknown): void;
|
|
21
|
-
observeSession(): BehaviorSubject<SessionInfo>;
|
|
22
|
-
onSessionRestore(callback: (url: string) => void): void;
|
|
23
|
-
}
|
|
9
|
+
export * from "./BrowserSession";
|
package/types/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class PodOS {
|
|
|
31
31
|
private readonly offlineCache;
|
|
32
32
|
constructor({ session, offlineCache, onlineStatus, }?: PodOsConfiguration);
|
|
33
33
|
private flagAuthorizationMetaDataOnSessionChange;
|
|
34
|
-
handleIncomingRedirect(restorePreviousSession?: boolean): void
|
|
34
|
+
handleIncomingRedirect(restorePreviousSession?: boolean): Promise<void>;
|
|
35
35
|
fetch(uri: string): Promise<Response>;
|
|
36
36
|
fetchAll(uris: string[]): Promise<PromiseSettledResult<Response>[]>;
|
|
37
37
|
fetchFile(url: string): Promise<SolidFile>;
|
|
@@ -39,11 +39,6 @@ export declare class PodOS {
|
|
|
39
39
|
listKnownTerms(): Term[];
|
|
40
40
|
addNewThing(uri: string, name: string, type: string): Promise<void>;
|
|
41
41
|
proposeUriForNewThing(referenceUri: string, name: string): string;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated use observeSession instead
|
|
44
|
-
* @param callback
|
|
45
|
-
*/
|
|
46
|
-
trackSession(callback: (session: SessionInfo) => unknown): void;
|
|
47
42
|
/**
|
|
48
43
|
* returns a behavior subject that can be used to observe changes in the session state
|
|
49
44
|
*/
|
package/types/thing/Thing.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class Thing {
|
|
|
28
28
|
label(): string;
|
|
29
29
|
literals(): Literal[];
|
|
30
30
|
relations(predicate?: string): Relation[];
|
|
31
|
-
reverseRelations(): Relation[];
|
|
31
|
+
reverseRelations(predicate?: string): Relation[];
|
|
32
32
|
anyValue(...predicateUris: string[]): undefined;
|
|
33
33
|
description(): undefined;
|
|
34
34
|
picture(): {
|
|
File without changes
|