export declare class IndexHelperBase { indexes: any; compoundIndexes: any; constructor(); /** * Ensures that future documents inserted or updated using this client * instance will be indexed according to the given attribute, provided that * they contain that attribute. Compound indexes can be specified by * providing an array for `attribute`. * * Queries may be performed using compound indexes without specifying all * attributes in the compound index so long as there is at least one value * (or the attribute name for "has" queries) specified for consecutive * attributes starting with the first. This allows for querying using only * a prefix of a compound index. However, uniqueness will not be enforced * unless all attributes in the compound index are present in a document. * * @param {object} options - The options to use. * @param {string|string[]} options.attribute - The attribute name or an * array of attribute names to create a unique compound index. * @param {boolean} [options.unique=false] - Set to `true` if the index * should be considered unique, `false` if not. */ ensureIndex({ attribute, unique }?: any): void; /** * Creates an indexable entry of blinded attributes for the given document * using the HMAC associated with this instance. * * @param {object} options - The options to use. * @param {object} options.hmac - An HMAC API with `id`, `sign`, and `verify` * properties. * @param {object} options.doc - The document to create the indexable entry * for. * * @returns {Promise} - Resolves to the new indexable entry. */ createEntry({ hmac, doc }: any): Promise<{ hmac: { id: any; type: any; }; sequence: any; attributes: any[]; }>; /** * Returns a shallow copy of the array of indexed entries for the given * document where any existing entry matching the HMAC associated with this * instance is updated to include the current document attributes. If no * existing entry is found, a new entry is appended to the shallow copy * prior to its return. * * @param {object} options - The options to use. * @param {object} options.hmac - An HMAC API with `id`, `sign`, and `verify` * properties. * @param {object} options.doc - The document to create or update an indexable * entry for. * * @returns {Promise} - Resolves to the updated array of indexable * entries. */ updateEntry({ hmac, doc }: any): Promise; /** * Builds a query that can be submitted to an EDV index service. * * @param {object} options - The options to use. * @param {object} options.hmac - An HMAC API with `id`, `sign`, and `verify` * properties. * @param {object|Array} [options.equals] - An object with key-value * attribute pairs to match or an array of such objects. * @param {string|Array} [options.has] - A string with an attribute name to * match or an array of such strings. * * @returns {Promise} - Resolves to the built query. */ buildQuery({ hmac, equals, has }: any): Promise; /** * Builds the blinded attributes for a document or query. Implemented by each * attribute-version subclass; the base intentionally has no blinding logic. * * @param {object} options - The options to use (`hmac` plus one of `doc`, * `equal`, or `has`). * * @returns {Promise} - Resolves to the blinded attributes. */ _buildBlindAttributes(_options: any): Promise; _getMatchingIndexes({ doc, equal, has }?: any): { attributeValues: Map; simpleMatches: { attribute: any; unique: any; }[]; compoundMatches: any[]; }; _matchIndexes({ matchFn }?: any): { simpleMatches: { attribute: any; unique: any; }[]; compoundMatches: any[]; }; _matchDocument({ attribute, attributeValues, doc }: any): boolean; _parseAttribute(attribute: any): string[]; _dereferenceAttribute({ attribute, keys, doc }: any): any; } export declare function assertHmac(hmac: any): void; //# sourceMappingURL=IndexHelperBase.d.ts.map