Skip to main content
Defined in: typescript/src/client/AuthorityGrantApi.ts:25

Constructors

Constructor

new AuthorityGrantApi(transport): AuthorityGrantApi
Defined in: typescript/src/client/AuthorityGrantApi.ts:26

Parameters

transport
Transport

Returns

AuthorityGrantApi

Methods

list()

list(): Promise<AuthorityGrant[]>
Defined in: typescript/src/client/AuthorityGrantApi.ts:32 Every grant, active and revoked. Maps to GET /authority-grants.

Returns

Promise<AuthorityGrant[]>

proposeChange()

proposeChange(input): Promise<AuthorityGrantChange>
Defined in: typescript/src/client/AuthorityGrantApi.ts:48 Proposes granting or revoking an agent’s authority. Nothing changes until a different person approves it. Maps to POST /authority-grants/changes.

Parameters

input
ProposeAuthorityGrantChangeInput

Returns

Promise<AuthorityGrantChange>

listChanges()

listChanges(status?): Promise<AuthorityGrantChange[]>
Defined in: typescript/src/client/AuthorityGrantApi.ts:66 Lists authority grant changes, newest first. Maps to GET /authority-grants/changes.

Parameters

status?
PendingPolicyChangeStatus Only changes in this state. Omit for all.

Returns

Promise<AuthorityGrantChange[]>

approveChange()

approveChange(changeId, stepUpAuthorization): Promise<AuthorityGrantChange>
Defined in: typescript/src/client/AuthorityGrantApi.ts:89 Approves and applies an authority grant change. Maps to POST /authority-grants/changes//approve. The caller must not be the proposer and must have a registered step up key. Make stepUpAuthorization with signPolicyChangeStepUp(), the change id as pendingPolicyChangeId, and action “approve”.

Parameters

changeId
string
stepUpAuthorization
PolicyChangeStepUpAuthorization

Returns

Promise<AuthorityGrantChange>

rejectChange()

rejectChange(changeId, rejectionReason, stepUpAuthorization): Promise<AuthorityGrantChange>
Defined in: typescript/src/client/AuthorityGrantApi.ts:106 Rejects an authority grant change. Same caller rules as approveChange(); sign with action “reject”. A reason is required.

Parameters

changeId
string
rejectionReason
string
stepUpAuthorization
PolicyChangeStepUpAuthorization

Returns

Promise<AuthorityGrantChange>