import { BucketName, CollectionName, CouchbaseClusterTypes, DocDefMatchingBody, ScopeName } from '@cbjsdev/shared'; import type { Collection } from '../../../collection.js'; import { type NodeCallback, type VoidNodeCallback } from '../../../utilities.js'; /** * CouchbaseSet provides a simplified interface for storing a set * within a Couchbase document. * * @see {Collection.set} * @category Datastructures */ export declare class CouchbaseSet, S extends ScopeName, C extends CollectionName, Key extends DocDefMatchingBody, T, B, S, C>['Key'], Item> { private _coll; private _key; /** * @internal */ constructor(collection: Collection, key: Key); private _get; /** * Adds a new item to the set. * Returns whether the item already existed in the set or not. * * @param item The item to add. * @param callback A node-style callback to be invoked after execution. */ add(item: Item, callback?: NodeCallback): Promise; /** * Returns whether a specific value already exists in the set. * * @param item The value to search for. * @param callback A node-style callback to be invoked after execution. */ contains(item: Item, callback?: NodeCallback): Promise; /** * Removes a specific value from the set. * * @param item The value to remove. * @param callback A node-style callback to be invoked after execution. */ remove(item: Item, callback?: VoidNodeCallback): Promise; /** * Returns a list of all values in the set. * * @param callback A node-style callback to be invoked after execution. */ values(callback?: NodeCallback): Promise; /** * Returns the number of elements in this set. * * @param callback A node-style callback to be invoked after execution. */ size(callback?: NodeCallback): Promise; }