@inrupt/solid-client-access-grants / common/getters
Module: common/getters#
Classes#
Functions#
getAccessModes#
▸ getAccessModes(vc
): AccessModes
Get the access modes granted to a resources via an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
The access modes the grant recipient can exercise.
Example
const modes = getAccessModes(accessGrant);
Defined in#
getInbox#
▸ getInbox(vc
): string
| undefined
Get the inbox of the requestor of an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
| undefined
The requestors inbox
Example
const inbox = getInbox(accessGrant);
Defined in#
getInherit#
▸ getInherit(vc
): boolean
Check whether a given Access Grant applies recursively to child resources or not.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
boolean
true if the Grant applies to contained resources, false otherwise.
Example
const isInherited = getInherit(accessGrant);
Defined in#
getPurposes#
▸ getPurposes(vc
): string
[]
Get the purposes for which an Access Grant/Request applies.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
[]
The purpose IRIs
Example
const purposes = getPurposes(accessGrant);
Defined in#
getRequestor#
▸ getRequestor(vc
): string
Get the requestor asking for access to a resources with an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
The requestor WebID
Example
const requestorWebId = getRequestor(accessGrant);
Defined in#
getResourceOwner#
▸ getResourceOwner(vc
): string
Get the resource owner granting access to their resources from an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
The Access Grant/Request |
Returns#
string
The resource owner WebID
Example
const ownerWebId = getResourceOwner(accessGrant);
Defined in#
▸ getResourceOwner(vc
): string
| undefined
Parameters#
Name |
Type |
---|---|
|
|
Returns#
string
| undefined
Defined in#
getResources#
▸ getResources(vc
): string
[]
Get the resources to which an Access Grant/Request applies.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
[]
The resources IRIs
Example
const resources = getResources(accessGrant);
Defined in#
getSingleObject#
▸ getSingleObject(vc
, subject
, predicate
, type
, required
): NamedNode
| undefined
Parameters#
Name |
Type |
---|---|
|
|
|
|
|
|
|
|
|
|
Returns#
NamedNode
| undefined
Defined in#
▸ getSingleObject(vc
, subject
, predicate
, type
, required
): Literal
| undefined
Parameters#
Name |
Type |
---|---|
|
|
|
|
|
|
|
|
|
|
Returns#
Literal
| undefined
Defined in#
▸ getSingleObject(vc
, subject
, predicate
, type
): BlankNode
Parameters#
Name |
Type |
---|---|
|
|
|
|
|
|
|
|
Returns#
BlankNode
Defined in#
▸ getSingleObject(vc
, subject
, predicate
, type
): Literal
Parameters#
Name |
Type |
---|---|
|
|
|
|
|
|
|
|
Returns#
Literal
Defined in#
▸ getSingleObject(vc
, subject
, predicate
): NamedNode
| BlankNode
Parameters#
Name |
Type |
---|---|
|
|
|
|
|
|
Returns#
NamedNode
| BlankNode
Defined in#
▸ getSingleObject(vc
, subject
, predicate
, type
, required
): NamedNode
| BlankNode
| undefined
Parameters#
Name |
Type |
---|---|
|
|
|
|
|
|
|
|
|
|
Returns#
NamedNode
| BlankNode
| undefined
Defined in#
getTypes#
▸ getTypes(vc
): string
[]
Get the VC types of an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
[]
The VC types
Example
const types = getTypes(accessGrant);
Defined in#
isGConsentAccessGrant#
▸ isGConsentAccessGrant(vc
): boolean
Parameters#
Name |
Type |
---|---|
|
|
Returns#
boolean