import { BucketName, CouchbaseClusterTypes, DefaultClusterTypes, ScopeName } from '@cbjsdev/shared'; import { Cluster } from './cluster.js'; import { DeployFunctionOptions, DropFunctionOptions, EventingFunction, EventingState, FunctionsStatusOptions, GetAllFunctionsOptions, GetFunctionOptions, PauseFunctionOptions, ResumeFunctionOptions, UpsertFunctionOptions } from './eventingfunctionmanager.js'; import { NodeCallback, VoidNodeCallback } from './utilities.js'; /** * ScopeEventingFunctionManager provides an interface for managing the * eventing functions on the scope. * Uncommitted: This API is subject to change in the future. * * @category Management */ export declare class ScopeEventingFunctionManager = BucketName, in out S extends ScopeName = ScopeName> { private _cluster; private _bucketName; private _scopeName; /** * @internal */ constructor(cluster: Cluster, bucketName: B, scopeName: S); /** * Creates or updates an eventing function. * * @param functionDefinition The description of the eventing function to upsert. * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ upsertFunction(functionDefinition: EventingFunction, options: UpsertFunctionOptions, callback?: VoidNodeCallback): Promise; /** * Creates or updates an eventing function. * * @param functionDefinition The description of the eventing function to upsert. * @param callback A node-style callback to be invoked after execution. */ upsertFunction(functionDefinition: EventingFunction, callback?: VoidNodeCallback): Promise; /** * Deletes an eventing function. * * @param name The name of the eventing function to delete. * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ dropFunction(name: string, options: DropFunctionOptions, callback?: VoidNodeCallback): Promise; /** * Deletes an eventing function. * * @param name The name of the eventing function to delete. * @param callback A node-style callback to be invoked after execution. */ dropFunction(name: string, callback?: VoidNodeCallback): Promise; /** * Fetches all eventing functions. * * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ getAllFunctions(options: GetAllFunctionsOptions, callback?: NodeCallback): Promise; /** * Fetches all eventing functions. * * @param callback A node-style callback to be invoked after execution. */ getAllFunctions(callback?: NodeCallback): Promise; /** * Fetches a specific eventing function. * * @param name The name of the eventing function to fetch. * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ getFunction(name: string, options: GetFunctionOptions, callback?: NodeCallback): Promise; /** * Fetches a specific eventing function. * * @param name The name of the eventing function to fetch. * @param callback A node-style callback to be invoked after execution. */ getFunction(name: string, callback?: NodeCallback): Promise; /** * Deploys an eventing function. * * @param name The name of the eventing function to deploy. * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ deployFunction(name: string, options: DeployFunctionOptions, callback?: VoidNodeCallback): Promise; /** * Deploys an eventing function. * * @param name The name of the eventing function to deploy. * @param callback A node-style callback to be invoked after execution. */ deployFunction(name: string, callback?: VoidNodeCallback): Promise; /** * Undeploys an eventing function. * * @param name The name of the eventing function to undeploy. * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ undeployFunction(name: string, options: DeployFunctionOptions, callback?: VoidNodeCallback): Promise; /** * Undeploys an eventing function. * * @param name The name of the eventing function to undeploy. * @param callback A node-style callback to be invoked after execution. */ undeployFunction(name: string, callback?: VoidNodeCallback): Promise; /** * Pauses an eventing function. * * @param name The name of the eventing function to pause. * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ pauseFunction(name: string, options: PauseFunctionOptions, callback?: VoidNodeCallback): Promise; /** * Pauses an eventing function. * * @param name The name of the eventing function to pause. * @param callback A node-style callback to be invoked after execution. */ pauseFunction(name: string, callback?: VoidNodeCallback): Promise; /** * Resumes an eventing function. * * @param name The name of the eventing function to resume. * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ resumeFunction(name: string, options: ResumeFunctionOptions, callback?: VoidNodeCallback): Promise; /** * Resumes an eventing function. * * @param name The name of the eventing function to resume. * @param callback A node-style callback to be invoked after execution. */ resumeFunction(name: string, callback?: VoidNodeCallback): Promise; /** * Fetches the status of all eventing functions. * * @param options Optional parameters for this operation. * @param callback A node-style callback to be invoked after execution. */ functionsStatus(options: FunctionsStatusOptions, callback?: NodeCallback): Promise; /** * Fetches the status of all eventing functions. * * @param callback A node-style callback to be invoked after execution. */ functionsStatus(callback?: NodeCallback): Promise; }