/** * This is a class that is used to standardize the Response that is sent by FreeSchema. * This is done so that we do not have to send a HttpResponse codes. */ export declare class FreeSchemaResponse { private message; private status; private data; private ok; private url; /** * * @param message this is the message for the response * @param ok this is the status can be true or false boolean in case that request succeds or fails * @param status this is the standard http codes 200 for ok, 500 for internal error etc. * @param data this is the standard data that can be anything. */ constructor(message: string, ok: boolean, status: number, data: any); /** * This function gets the message of the error * @returns */ getMessage(): string; /** * * @param message This allows you to set a message variable in the FreeSchemaResponse * @returns */ setMessage(message: string): FreeSchemaResponse; /** * * @returns status code of the FreeSchemaResponse */ getStatus(): number; /** * * @param status standard http error codes (200 ok , 401 unauthorized, 500 internal server error etc.) * @returns */ setStatus(status: number): FreeSchemaResponse; /** * * @returns returns the data for the request */ getData(): any; /** * * @param data any type of data can be given here * @returns FreeSchemaReponse */ setData(data: any): FreeSchemaResponse; /** * * @returns the status of the FreeSchemaReponse (either true or false) */ getOk(): boolean; /** * * @param status if the status is true then the response was successful else the success was not achieved. * @returns returns the FreeSchemaResponse */ setOk(ok: boolean): FreeSchemaResponse; /** * * @returns the url that caused the error */ getUrl(): string; /** * * @param url the url from which the error or response originates * @returns FreeSchemaResponse */ setUrl(url: string): FreeSchemaResponse; }