@ibm-cloud/cloudant
Version:
IBM Cloudant Node.js SDK
38 lines (37 loc) • 1.49 kB
TypeScript
/**
* © Copyright IBM Corporation 2022, 2025. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { PostChangesParams } from '../v1';
/** @internal */
export declare enum Mode {
FINITE = 0,
LISTEN = 1
}
export declare class ChangesParamsHelper {
/**
* Set minimum client timeout to 1 minute (= 60 000 ms).
* 1 minute is the sort of number that very likely to be used as a client timeout,
* so it makes sense to set as our minimum client timeout.
*/
static MIN_CLIENT_TIMEOUT: number;
/**
* Set longpoll timeout to {@link MIN_CLIENT_TIMEOUT} - 3 second (= 3000 ms).
* To give the changes request a chance to be answered before the client timeout
* it is set to 3 seconds less.
*/
static LONGPOLL_TIMEOUT: number;
static cloneParams(params: PostChangesParams, mode?: Mode, since?: string, limit?: number): PostChangesParams;
static validateParams(params: PostChangesParams): void;
}