Interface PodStore

Can be used to create new pods and find relevant information. Also keeps track of the owners of a pod. The visible parameter indicates if an owner should be publicly exposed or not.

Hierarchy

  • PodStore

Implemented by

Properties

create: ((accountId, settings, overwrite) => Promise<string>)

Type declaration

    • (accountId, settings, overwrite): Promise<string>
    • Creates a new pod and updates the account accordingly.

      Parameters

      • accountId: string

        Identifier of the account that is creating the account.

      • settings: PodSettings

        Settings to create a pod with.

      • overwrite: boolean

        If the pod is allowed to overwrite existing data.

      Returns Promise<string>

      The ID of the new pod resource.

findByBaseUrl: ((baseUrl) => Promise<undefined | {
    accountId: string;
    id: string;
}>)

Type declaration

    • (baseUrl): Promise<undefined | {
          accountId: string;
          id: string;
      }>
    • Find the ID of the account that created the given pod.

      Parameters

      • baseUrl: string

        The pod base URL.

      Returns Promise<undefined | {
          accountId: string;
          id: string;
      }>

findPods: ((accountId) => Promise<{
    baseUrl: string;
    id: string;
}[]>)

Type declaration

    • (accountId): Promise<{
          baseUrl: string;
          id: string;
      }[]>
    • Find all the pod resources created by the given account ID.

      Parameters

      • accountId: string

        Account ID to find pod resources for.

      Returns Promise<{
          baseUrl: string;
          id: string;
      }[]>

get: ((id) => Promise<undefined | {
    accountId: string;
    baseUrl: string;
}>)

Type declaration

    • (id): Promise<undefined | {
          accountId: string;
          baseUrl: string;
      }>
    • Returns the baseURl and account that created the pod for the given pod ID.

      Parameters

      • id: string

        ID of the pod.

      Returns Promise<undefined | {
          accountId: string;
          baseUrl: string;
      }>

getOwners: ((id) => Promise<undefined | {
    visible: boolean;
    webId: string;
}[]>)

Type declaration

    • (id): Promise<undefined | {
          visible: boolean;
          webId: string;
      }[]>
    • Find all owners for the given pod ID.

      Parameters

      • id: string

        ID of the pod.

      Returns Promise<undefined | {
          visible: boolean;
          webId: string;
      }[]>

removeOwner: ((id, webId) => Promise<void>)

Type declaration

updateOwner: ((id, webId, visible) => Promise<void>)

Type declaration

    • (id, webId, visible): Promise<void>
    • Add or update an owner of a pod. In case there already is an owner with this WebID, it will be updated, otherwise a new owner will be added.

      Parameters

      • id: string

        ID of the pod.

      • webId: string

        WebID of the owner.

      • visible: boolean

        Whether the owner wants to be exposed or not.

      Returns Promise<void>