KvdbApi
Class representing instance of KVDB API
Methods
createKvdb
Creates a new KVDB in given Context.
Params
contextId
string
ID of the Context to create the KVDB in
users
UserWithPubKey[]
array of UserWithPubKey structs which indicates who will have access to the created KVDB
managers
UserWithPubKey[]
array of UserWithPubKey structs which indicates who will have access (and management rights) to the created KVDB
publicMeta
Uint8Array
public (unencrypted) metadata
privateMeta
Uint8Array
private (encrypted) metadata
policies
ContainerPolicy
KVDB's policies
Returns
Promise<string>
·
ID of the created KVDB
updateKvdb
Updates an existing KVDB.
Params
kvdbId
string
ID of the KVDB to update
users
UserWithPubKey[]
array of UserWithPubKey structs which indicates who will have access to the created KVDB
managers
UserWithPubKey[]
array of UserWithPubKey structs which indicates who will have access (and management rights) to the created KVDB
publicMeta
Uint8Array
public (unencrypted) metadata
privateMeta
Uint8Array
private (encrypted) metadata
version
number
current version of the updated KVDB
force
boolean
force update (without checking version)
forceGenerateNewKey
boolean
force to regenerate a key for the KVDB
policies
ContainerPolicy
KVDB's policies
deleteKvdb
Deletes a KVDB by given KVDB ID.
Params
kvdbId
string
ID of the KVDB to delete
getKvdb
Gets a KVDB by given KVDB ID.
Params
kvdbId
string
ID of KVDB to get
Returns
Promise<Kvdb>
·
containing info about the KVDB
listKvdbs
Gets a list of Kvdbs in given Context.
Params
contextId
string
ID of the Context to get the Kvdbs from
pagingQuery
PagingQuery
with list query parameters
Returns
Promise<PagingList<Kvdb>>
·
containing a list of Kvdbs
getEntry
Gets a KVDB entry by given KVDB entry key and KVDB ID.
Params
kvdbId
string
KVDB ID of the KVDB entry to get
key
string
key of the KVDB entry to get
Returns
Promise<KvdbEntry>
·
containing the KVDB entry
hasEntry
Check whether the KVDB entry exists.
Params
kvdbId
string
KVDB ID of the KVDB entry to check
key
string
key of the KVDB entry to check
Returns
Promise<boolean>
·
'true' if the KVDB has an entry with given key, 'false' otherwise
listEntriesKeys
Gets a list of KVDB entries keys from a KVDB.
Params
kvdbId
string
ID of the KVDB to list KVDB entries from
pagingQuery
PagingQuery
with list query parameters
Returns
Promise<PagingList<string>>
·
containing a list of KVDB entries
listEntries
Gets a list of KVDB entries from a KVDB.
Params
kvdbId
string
ID of the KVDB to list KVDB entries from
pagingQuery
PagingQuery
with list query parameters
Returns
Promise<PagingList<KvdbEntry>>
·
containing a list of KVDB entries
setEntry
Sets a KVDB entry in the given KVDB.
Params
kvdbId
string
ID of the KVDB to set the entry to
key
string
KVDB entry key
publicMeta
Uint8Array
public KVDB entry metadata
privateMeta
Uint8Array
private KVDB entry metadata
data
Uint8Array
content of the KVDB entry
version
number
KVDB entry version (when updating the entry)
deleteEntry
Deletes a KVDB entry by given KVDB entry ID.
Params
kvdbId
string
KVDB ID of the KVDB entry to delete
key
string
key of the KVDB entry to delete
deleteEntries
Deletes KVDB entries by given KVDB IDs and the list of entry keys.
Params
kvdbId
string
ID of the KVDB database to delete from
keys
string[]
keys of the KVDB entries to delete
Returns
Promise<DeleteEntriesResult>
·
map with the statuses of deletion for every key
subscribeForKvdbEvents
Subscribes for the KVDB module main events.
unsubscribeFromKvdbEvents
Unsubscribes from the KVDB module main events.
subscribeForEntryEvents
Subscribes for events in given KVDB.
Params
kvdbId
string
ID of the KVDB to subscribe
unsubscribeFromEntryEvents
Unsubscribes from events in given KVDB.
Params
kvdbId
string
ID of the KVDB to unsubscribe
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.