@pod-os/core 0.2.1-da0e5dd.0 → 0.3.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 +254 -114
- package/lib/index.js +254 -114
- package/package.json +1 -1
- package/types/files/BinaryFile.d.ts +7 -0
- package/types/files/BrokenFile.d.ts +9 -0
- package/types/files/BrokenFile.spec.d.ts +1 -0
- package/types/files/FileFetcher.d.ts +2 -1
- package/types/files/HttpStatus.d.ts +6 -0
- package/types/files/HttpStatus.spec.d.ts +1 -0
- package/types/files/SolidFile.d.ts +4 -0
- package/types/files/index.d.ts +4 -0
- package/types/index.d.ts +3 -1
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpStatus } from "./HttpStatus";
|
|
2
|
+
import { SolidFile } from "./SolidFile";
|
|
3
|
+
export declare class BrokenFile implements SolidFile {
|
|
4
|
+
readonly url: string;
|
|
5
|
+
readonly status: HttpStatus;
|
|
6
|
+
constructor(url: string, status: HttpStatus);
|
|
7
|
+
toString(): string;
|
|
8
|
+
blob(): Blob | null;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PodOsSession } from "../authentication";
|
|
2
|
+
import { SolidFile } from "./SolidFile";
|
|
2
3
|
export declare class FileFetcher {
|
|
3
4
|
private session;
|
|
4
5
|
constructor(session: PodOsSession);
|
|
5
|
-
|
|
6
|
+
fetchFile(url: string): Promise<SolidFile>;
|
|
6
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ISessionInfo } from "@inrupt/solid-client-authn-browser";
|
|
2
|
+
import { SolidFile } from "./files";
|
|
2
3
|
import { Store } from "./Store";
|
|
3
4
|
export * from "./authentication";
|
|
5
|
+
export * from "./files";
|
|
4
6
|
export declare class PodOS {
|
|
5
7
|
private readonly session;
|
|
6
8
|
readonly store: Store;
|
|
@@ -8,7 +10,7 @@ export declare class PodOS {
|
|
|
8
10
|
constructor();
|
|
9
11
|
handleIncomingRedirect(): void;
|
|
10
12
|
fetch(uri: string): Promise<Response>;
|
|
11
|
-
|
|
13
|
+
fetchFile(url: string): Promise<SolidFile>;
|
|
12
14
|
trackSession(callback: (session: ISessionInfo) => unknown): void;
|
|
13
15
|
logout(): Promise<void>;
|
|
14
16
|
login(oidcIssuer?: string): Promise<void>;
|