Class: API
api.API
Transport-agnostic interface defining communication between Client and Server instances.
Hierarchy
-
API↳
Client
Constructors
constructor
• new API()
Properties
handlerDefinitions
• handlerDefinitions: HandlerDefinition[]
Defined in
Methods
acceptInvite
▸ acceptInvite(_invite):
PromiseWithProgress<void>
Accept an Invite
authentication_required
Requires the authenticated account to be the recipient of the invite.
Parameters
| Name | Type |
|---|---|
_invite |
Invite |
Returns
PromiseWithProgress<void>
Defined in
completeAuthRequest
▸ completeAuthRequest(_params):
PromiseWithProgress<CompleteAuthRequestResponse>
Parameters
| Name | Type |
|---|---|
_params |
CompleteAuthRequestParams |
Returns
PromiseWithProgress<CompleteAuthRequestResponse>
Defined in
completeCreateSession
▸ completeCreateSession(_params):
PromiseWithProgress<Session>
Create new Session which can be used to authenticate future request
Parameters
| Name | Type |
|---|---|
_params |
CompleteCreateSessionParams |
Returns
Defined in
completeRegisterAuthenticator
▸ completeRegisterAuthenticator(_params):
PromiseWithProgress<CompleteRegisterMFAuthenticatorResponse>
Parameters
| Name | Type |
|---|---|
_params |
CompleteRegisterMFAuthenticatorParams |
Returns
PromiseWithProgress<CompleteRegisterMFAuthenticatorResponse>
Defined in
createAccount
▸ createAccount(_params):
PromiseWithProgress<Account>
Create a new Account
Parameters
| Name | Type |
|---|---|
_params |
CreateAccountParams |
Returns
Defined in
createAttachment
▸ createAttachment(_attachment):
PromiseWithProgress<string>
Parameters
| Name | Type |
|---|---|
_attachment |
Attachment |
Returns
PromiseWithProgress<string>
Defined in
createKeyStoreEntry
▸ createKeyStoreEntry(_params):
PromiseWithProgress<KeyStoreEntry>
Parameters
| Name | Type |
|---|---|
_params |
CreateKeyStoreEntryParams |
Returns
PromiseWithProgress<KeyStoreEntry>
Defined in
createOrg
▸ createOrg(_params):
PromiseWithProgress<Org>
Create a new Org
authentication_required
Parameters
| Name | Type |
|---|---|
_params |
Org |
Returns
Defined in
createVault
▸ createVault(_vault):
PromiseWithProgress<Vault>
Create a new vault
authentication_required
Requires the OrgRole.Admin role on the associated organization
Parameters
| Name | Type |
|---|---|
_vault |
Vault |
Returns
Defined in
deleteAccount
▸ deleteAccount():
PromiseWithProgress<void>
Delete current account
Returns
PromiseWithProgress<void>
Defined in
deleteAttachment
▸ deleteAttachment(_attachment):
PromiseWithProgress<void>
Parameters
| Name | Type |
|---|---|
_attachment |
DeleteAttachmentParams |
Returns
PromiseWithProgress<void>
Defined in
deleteAuthenticator
▸ deleteAuthenticator(_id):
PromiseWithProgress<void>
Parameters
| Name | Type |
|---|---|
_id |
string |
Returns
PromiseWithProgress<void>
Defined in
deleteKeyStoreEntry
▸ deleteKeyStoreEntry(_params): Promise<void>
Parameters
| Name | Type |
|---|---|
_params |
string |
Returns
Promise<void>
Defined in
deleteLegacyAccount
▸ deleteLegacyAccount():
PromiseWithProgress<void>
Returns
PromiseWithProgress<void>
Defined in
deleteOrg
▸ deleteOrg(_id):
PromiseWithProgress<void>
Parameters
| Name | Type |
|---|---|
_id |
string |
Returns
PromiseWithProgress<void>
Defined in
deleteVault
▸ deleteVault(_id):
PromiseWithProgress<void>
Delete the Vault with the given id
authentication_required
Requires at least the OrgRole.Admin role on the organization the vault belongs to. Private vaults cannot be deleted.
Parameters
| Name | Type |
|---|---|
_id |
string |
Returns
PromiseWithProgress<void>
Defined in
getAccount
▸ getAccount():
PromiseWithProgress<Account>
Get the Account associated with the current session
authentication_required
Returns
Defined in
getAttachment
▸ getAttachment(_attachment):
PromiseWithProgress<Attachment>
Parameters
| Name | Type |
|---|---|
_attachment |
GetAttachmentParams |
Returns
PromiseWithProgress<Attachment>
Defined in
getAuthInfo
▸ getAuthInfo(): Promise<AuthInfo>
Get the AuthInfo for the current account
Returns
Promise<AuthInfo>
Defined in
getInvite
▸ getInvite(_params):
PromiseWithProgress<Invite>
Get an Invite.
authentication_required
Requires the authenticated account to either be an OrgRole.Owner of the associated organization or the recipient of the invite.
Parameters
| Name | Type |
|---|---|
_params |
GetInviteParams |
Returns
Defined in
getKeyStoreEntry
▸ getKeyStoreEntry(_params):
Promise<KeyStoreEntry>
Parameters
| Name | Type |
|---|---|
_params |
GetKeyStoreEntryParams |
Returns
Promise<KeyStoreEntry>
Defined in
getLegacyData
▸ getLegacyData(_params):
PromiseWithProgress<PBES2Container>
Parameters
| Name | Type |
|---|---|
_params |
GetLegacyDataParams |
Returns
PromiseWithProgress<PBES2Container>
Defined in
getOrg
▸ getOrg(_id):
PromiseWithProgress<Org>
Get the Org for a given id.
authentication_required
Requires the authenticated account to be a member of the given organization
Parameters
| Name | Type |
|---|---|
_id |
string |
Returns
Defined in
getVault
▸ getVault(_id):
PromiseWithProgress<Vault>
Get the Vault with the given id
authentiation_required
If the vault belongs to an organization, the authenticated account needs to be assigned to the given vault either directly or through a Group. Otherwise, only access to the accounts private vault is allowed.
Parameters
| Name | Type |
|---|---|
_id |
string |
Returns
Defined in
recoverAccount
▸ recoverAccount(_params):
PromiseWithProgress<Account>
Initiate account recovery
Parameters
| Name | Type |
|---|---|
_params |
RecoverAccountParams |
Returns
Defined in
removeTrustedDevice
▸ removeTrustedDevice(_id):
PromiseWithProgress<void>
Parameters
| Name | Type |
|---|---|
_id |
string |
Returns
PromiseWithProgress<void>
Defined in
revokeSession
▸ revokeSession(_id):
PromiseWithProgress<void>
Revoke a Session, effectively logging out any client authenticated with it
Parameters
| Name | Type |
|---|---|
_id |
string |
Returns
PromiseWithProgress<void>
Defined in
startAuthRequest
▸ startAuthRequest(_params):
PromiseWithProgress<StartAuthRequestResponse>
Parameters
| Name | Type |
|---|---|
_params |
StartAuthRequestParams |
Returns
PromiseWithProgress<StartAuthRequestResponse>
Defined in
startCreateSession
▸ startCreateSession(_params):
PromiseWithProgress<StartCreateSessionResponse>
Initiate the login procedure for a given account by requesting the authentication params which are required for proceeding with [[createSession]].
Parameters
| Name | Type |
|---|---|
_params |
StartCreateSessionParams |
Returns
PromiseWithProgress<StartCreateSessionResponse>
Defined in
startRegisterAuthenticator
▸ startRegisterAuthenticator(_params):
PromiseWithProgress<StartRegisterAuthenticatorResponse>
Parameters
| Name | Type |
|---|---|
_params |
StartRegisterAuthenticatorParams |
Returns
PromiseWithProgress<StartRegisterAuthenticatorResponse>
Defined in
updateAccount
▸ updateAccount(_account):
PromiseWithProgress<Account>
Update the Account associated with the current session.
authentication_required
Parameters
| Name | Type |
|---|---|
_account |
Account |
Returns
Defined in
updateAuth
▸ updateAuth(_params):
PromiseWithProgress<void>
Update the authentication params stored on the server. This is usually used in case a users master password has changed.
Parameters
| Name | Type |
|---|---|
_params |
UpdateAuthParams |
Returns
PromiseWithProgress<void>
Defined in
updateOrg
▸ updateOrg(_org):
PromiseWithProgress<Org>
Updates a given Org
authentication_required
Updating members, organization name or pubic/private keys requires the OrgRole.Owner role, while any other changes require the OrgRole.Admin role.
Parameters
| Name | Type |
|---|---|
_org |
Org |
Returns
Defined in
updateVault
▸ updateVault(_vault):
PromiseWithProgress<Vault>
Update the given Vault
authentiation_required
If vault belongs to an organization, the authenticated account needs to be be assigned to the given vault either directly or through a Group and have explicit write access. Otherwise, only access to the accounts private vault is allowed.
Parameters
| Name | Type |
|---|---|
_vault |
Vault |