import { APIService } from './api'; import { DataCreateResponse, DataResponse, GrantedLockboxes, LockboxDataRequest, LockboxGrantRequest, LockboxManifest, SharedSecretResponse, Uuid, EncryptedVaultIndex, IndexKey, EncryptedIndexEntry, Grant, LockboxCreateResponse } from '../models'; export declare class VaultService { private api; private baseURL; constructor(api: APIService, baseURL: string); lockboxCreate(): Promise; lockboxMetadataAdd(lockboxUuid: Uuid, lockboxMetadata: Object, lockboxOwnerUuid?: Uuid): Promise; lockboxSecretGet(lockboxUuid: Uuid, lockboxOwnerUuid?: Uuid): Promise; lockboxGrant(lockboxUuid: Uuid, req: LockboxGrantRequest, lockboxOwnerUuid?: Uuid): Promise; /** * Get all lockboxes granted to user * @param filter filter of lockbox metadata * @returns decrypted lockboxes granted to user */ grantsGet(): Promise; /** * This function create or update a data into the vault. * @note At creation it is necessary to have all `req` filled * @note When setting `previousDataUuid` you are updating the data. `req` metadata fields are optional. * @param lockboxUuid The lockbox uuid the data will be stored in * @param req The request (please see notes) * @param lockboxOwnerUuid The uuid of the owner of the lockbox (@deprecated) * @param previousDataUuid The data uuid of the data you want to update * @returns */ lockboxDataStore(lockboxUuid: Uuid, req: LockboxDataRequest, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise; lockboxDataGet(lockboxUuid: Uuid, dataUuid: Uuid, lockboxOwnerUuid?: Uuid, stream?: boolean): Promise; lockboxManifestGet(lockboxUuid: Uuid, filter?: Object, lockboxOwnerUuid?: Uuid): Promise; lockboxMetadataGet(lockboxUuid: Uuid, fields: string[], groupby: string[], filter?: Object, lockboxOwnerUuid?: Uuid): Promise; /** * inserts or updates encrypted index entries * @note if the index data is being inserted for a user other than the requester, use `indexOwnerUuid` * @note if a uuid for an entry is provided, the service will perform an update * @param entries the encrypted index data * @param indexOwnerUuid */ vaultIndexPut(entries: EncryptedVaultIndex, indexOwnerUuid?: Uuid): Promise; /** * inserts or updates index snapshot for the provided index owner * @note if the index data is being inserted for a user other than the requester, use `indexOwnerUuid` * @param entry the encrypted index snapshot */ vaultIndexSnapshotPut(entry: EncryptedIndexEntry): Promise; /** * Retrieves the encrypted index from the vault for the requesting user * @note index keys can be specified to narrow the scope of index being requested * @param indexKeys accepted index fields determined by vault * @param identifiers: an array of unique_hashes or consultation uuids used to identify an index entry * @param timestamp the minimum timestamp that index entries were created * @returns the encrypted index */ vaultIndexGet(indexKeys: IndexKey[], identifiers?: string[], timestamp?: Date): Promise; }