Skip to main content
Defined in: typescript/src/client/ApproverApi.ts:24

Constructors

Constructor

new ApproverApi(transport): ApproverApi
Defined in: typescript/src/client/ApproverApi.ts:25

Parameters

transport
Transport

Returns

ApproverApi

Methods

list()

list(): Promise<ApprovalIssuer[]>
Defined in: typescript/src/client/ApproverApi.ts:31 Every approver key the server trusts or trusted, revoked ones marked. Maps to GET /approval-issuers.

Returns

Promise<ApprovalIssuer[]>

proposeChange()

proposeChange(input): Promise<ApprovalIssuerChange>
Defined in: typescript/src/client/ApproverApi.ts:44 Proposes adding or revoking an approver key. Nothing changes until a different person approves it. Maps to POST /approval-issuers/changes.

Parameters

input
ProposeApproverChangeInput

Returns

Promise<ApprovalIssuerChange>

listChanges()

listChanges(status?): Promise<ApprovalIssuerChange[]>
Defined in: typescript/src/client/ApproverApi.ts:62 Lists approver changes, newest first. Maps to GET /approval-issuers/changes.

Parameters

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

Returns

Promise<ApprovalIssuerChange[]>

approveChange()

approveChange(changeId, stepUpAuthorization): Promise<ApprovalIssuerChange>
Defined in: typescript/src/client/ApproverApi.ts:85 Approves and applies an approver change. Maps to POST /approval-issuers/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<ApprovalIssuerChange>

rejectChange()

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

Parameters

changeId
string
rejectionReason
string
stepUpAuthorization
PolicyChangeStepUpAuthorization

Returns

Promise<ApprovalIssuerChange>