zcatalyst-integ-cliq
Version:
Node.js SDK for integrating Zoho Catalyst with Zoho Cliq
20 lines (19 loc) • 1.13 kB
TypeScript
/// <reference types="node" />
import { readFile } from 'fs';
import { IAPIResponse } from './cliq-api/api-util.js';
import { HTTP_METHOD, StringObjectMap } from './cliq-objects/common.js';
export declare const readAsync: typeof readFile.__promisify__;
export declare function readConfig(path: string): Promise<string>;
export declare function readConfigSync(path: string): string;
export declare function isEmpty(obj: unknown): boolean;
export declare function getFunctionRoot(): string;
/**
* Override a value with supplied environment variable if present.
*
* @param {string} envname The env key name.
* @param {string} value The value to use if key is not present.
* @param {Function} coerce Function to do manipulation of env value and given value.
* @return {any} Either the env value or the given value according the presence.
*/
export declare function envOverride<T>(envname: string, value: T, coerce?: (environmentValue: string | undefined, givenValue?: T) => T): T | string;
export declare function sendRequest(url: string, requestMethod: HTTP_METHOD, responseBody?: StringObjectMap): Promise<IAPIResponse>;