Skip to content

@pod-os/core


@pod-os/core / PodOS

Class: PodOS

Defined in: index.ts:40

Constructors

Constructor

new PodOS(__namedParameters): PodOS

Defined in: index.ts:48

Parameters

__namedParameters

PodOsConfiguration = {}

Returns

PodOS

Properties

store

readonly store: Store

Defined in: index.ts:42


uriService

readonly uriService: UriService

Defined in: index.ts:43

Methods

addNewThing()

addNewThing(uri, name, type): Promise\<void>

Defined in: index.ts:123

Parameters

uri

string

name

string

type

string

Returns

Promise\<void>


addPropertyValue()

addPropertyValue(thing, property, value): Promise\<void>

Defined in: index.ts:111

Parameters

thing

Thing

property

string

value

string

Returns

Promise\<void>


addToLabelIndex()

addToLabelIndex(thing, labelIndex): Promise\<void>

Defined in: index.ts:178

Adds a label of the given thing to the label index, so that it can be found after the search index has been rebuilt

Parameters

thing

Thing

The thing to index

labelIndex

LabelIndex

The index to update

Returns

Promise\<void>


buildSearchIndex()

buildSearchIndex(profile): Promise\<SearchIndex>

Defined in: index.ts:156

Fetch the private label index for the given profile and build a search index from it

Parameters

profile

WebIdProfile

Returns

Promise\<SearchIndex>


createDefaultLabelIndex()

createDefaultLabelIndex(profile): Promise\<LabelIndex>

Defined in: index.ts:188

Creates a new label index document at a default location and links it to the user's profile or preferences document

Parameters

profile

WebIdProfile

The profile for that to create the index

Returns

Promise\<LabelIndex>

the newly created label index


fetch()

fetch(uri): Promise\<Response>

Defined in: index.ts:86

Parameters

uri

string

Returns

Promise\<Response>


fetchAll()

fetchAll(uris): Promise\<PromiseSettledResult\<Response>[]>

Defined in: index.ts:90

Parameters

uris

string[]

Returns

Promise\<PromiseSettledResult\<Response>[]>


~~fetchFile()~~

fetchFile(url): Promise\<SolidFile>

Defined in: index.ts:99

Parameters

url

string

URL identifying the file

Returns

Promise\<SolidFile>

An object representing the fetched file

Deprecated

Use FileFetcher.fetchFile via PodOS.files instead


fetchProfile()

fetchProfile(webId): Promise\<WebIdProfile>

Defined in: index.ts:142

Fetch the WebId profile and preferences file for the given WebID

Parameters

webId

string

Returns

Promise\<WebIdProfile>


files()

files(): FileFetcher

Defined in: index.ts:107

Provides access to file operations such as fetching and updating files in the pod

Returns

FileFetcher

An instance of FileFetcher that handles file operations


listKnownTerms()

listKnownTerms(): Term[]

Defined in: index.ts:119

Returns

Term[]


loadContactsModule()

loadContactsModule(): Promise\<ContactsModule>

Defined in: index.ts:169

Returns

Promise\<ContactsModule>


login()

login(oidcIssuer): Promise\<void>

Defined in: index.ts:165

Parameters

oidcIssuer

string = "http://localhost:3000"

Returns

Promise\<void>


logout()

logout(): Promise\<void>

Defined in: index.ts:160

Returns

Promise\<void>


observeSession()

observeSession(): BehaviorSubject\<SessionInfo>

Defined in: index.ts:134

returns a behavior subject that can be used to observe changes in the session state

Returns

BehaviorSubject\<SessionInfo>


proposeUriForNewThing()

proposeUriForNewThing(referenceUri, name): string

Defined in: index.ts:127

Parameters

referenceUri

string

name

string

Returns

string