outers
Version:
outers - a all in one package for your day to day use
15 lines (14 loc) • 1.17 kB
TypeScript
import JSONresponseInterface from "../Config/Interfaces/Response/JSON-Response.Interface";
/**
* Sends a JSON response with the specified status, status code, title, message, data, and optional cookie data.
* @param {JSONresponseInterface} options - An object containing parameters for sending the JSON response.
* @param {string} options.status - The status of the response (e.g., "success" or "error").
* @param {number} options.statusCode - The HTTP status code to be sent in the response.
* @param {string} options.Title - The title of the response (e.g., "Success" or "Error").
* @param {string} options.message - The message of the response (e.g., "The request was successful.").
* @param {Response} options.response - The Express response object.
* @param {Object} options.data - The data to be sent in the response.
* @param {Array} [options.cookieData] - An optional array of objects representing cookie data to be set.
* @param {string} [options.contentType] - The content type of the response.
*/
export declare const JSONSendResponse: ({ status, statusCode, Title, message, response, data, cookieData, contentType, }: JSONresponseInterface) => void;