import type { BackendRequest, CollectionManagementBackend } from '../backends'; import { CreateCollectionSettings, ScopeSpec, UpdateCollectionSettings } from '../collectionmanager'; import type { CollectionAdminServiceClient } from './generated/couchbase/admin/collection/v1/CollectionAdminService'; import type { CreateCollectionRequest as CreateCollectionRequestPb } from './generated/couchbase/admin/collection/v1/CreateCollectionRequest'; import type { ListCollectionsResponse__Output as ListCollectionsResponsePb } from './generated/couchbase/admin/collection/v1/ListCollectionsResponse'; import type { UpdateCollectionRequest as UpdateCollectionRequestPb } from './generated/couchbase/admin/collection/v1/UpdateCollectionRequest'; import type { Couchbase2Channel, Couchbase2Op } from './requestcontext'; /** * @internal */ export declare const SCOPE_GET_ALL: Couchbase2Op; /** * @internal */ export declare const SCOPE_CREATE: Couchbase2Op; /** * @internal */ export declare const SCOPE_DROP: Couchbase2Op; /** * @internal */ export declare const COLLECTION_CREATE: Couchbase2Op; /** * @internal */ export declare const COLLECTION_UPDATE: Couchbase2Op; /** * @internal */ export declare const COLLECTION_DROP: Couchbase2Op; /** * @internal */ export declare function createCollectionRequestToProto(bucketName: string, scopeName: string, collectionName: string, settings: CreateCollectionSettings): CreateCollectionRequestPb; /** * Throws `FeatureNotAvailableError` for a maximum expiry of zero: an update * with no maximum expiry leaves it unchanged, so there is no way to ask for * the bucket's. * * @internal */ export declare function updateCollectionRequestToProto(bucketName: string, scopeName: string, collectionName: string, settings: UpdateCollectionSettings): UpdateCollectionRequestPb; /** * @internal */ export declare function scopeSpecsFromProto(resp: ListCollectionsResponsePb): ScopeSpec[]; /** * Scope and collection management over the gateway's * `CollectionAdminService`. * * @internal */ export declare class Couchbase2Collections implements CollectionManagementBackend { private readonly _channel; private readonly _client; constructor(channel: Couchbase2Channel, client: CollectionAdminServiceClient); /** * Lists a bucket's scopes and their collections with * `CollectionAdminService.ListCollections`. */ getAllScopes(bucketName: string, req: BackendRequest): Promise; /** * Creates a scope with `CollectionAdminService.CreateScope`. */ createScope(bucketName: string, scopeName: string, req: BackendRequest): Promise; /** * Drops a scope with `CollectionAdminService.DeleteScope`. */ dropScope(bucketName: string, scopeName: string, req: BackendRequest): Promise; /** * Creates a collection with `CollectionAdminService.CreateCollection`. */ createCollection(bucketName: string, scopeName: string, collectionName: string, settings: CreateCollectionSettings, req: BackendRequest): Promise; /** * Updates a collection with `CollectionAdminService.UpdateCollection`. */ updateCollection(bucketName: string, scopeName: string, collectionName: string, settings: UpdateCollectionSettings, req: BackendRequest): Promise; /** * Drops a collection with `CollectionAdminService.DeleteCollection`. */ dropCollection(bucketName: string, scopeName: string, collectionName: string, req: BackendRequest): Promise; }