UNPKG

@zohocrm/typescript-sdk-2.1

Version:
32 lines (31 loc) 1.22 kB
import { Model } from "../../utils/util/model"; /** * This class is the common API response object. */ export declare class APIResponse<T = any> { private statusCode; private object; private headers; /** * Creates an APIResponse class instance with the specified parameters. * @param {Map} headers The map containing the API Response headers * @param {number} statusCode The integer containing the API response HTTP status code. * @param {Model | null | any} object The object containing the API response class instance. */ constructor(headers: Map<string, string>, statusCode: number, object: Model | null | any); /** * The method to get the API response HTTP status code. * @returns {number} The integer containing the API response HTTP status code. */ getStatusCode(): number; /** * The method to get the API Response headers * @returns {Map} The map containing the API Response headers */ getHeaders(): Map<string, string>; /** * The method to get the API response class instance. * @returns {Model | null | any} The object containing the API response class instance. */ getObject(): Model | null | any; }