import { Resource } from "../../common";
import { APIQuestion, AnswerRequest, AnswerType, QuestionType, StoreAnswer, StoreOption, StoreQuestion, StoreConstraint } from "./interfaces";
export declare class Question extends Resource {
    /**
     * Type of question
     */
    questionType: QuestionType;
    /**
     * Type of options of the question
     */
    answerType: AnswerType;
    /**
     * Text to display before the question
     */
    leadingText: string;
    /**
     * Actual text of the question
     */
    questionText: string;
    /**
     * Follow up that's displayed when the question is answered
     */
    followupText: string;
    /**
     * Order of the question in the questionnaire
     */
    order: number;
    /**
     * Id of the category of this question
     */
    category: string;
    /**
     * Options that the question has
     */
    answerOptions: Array<StoreOption>;
    /**
     * Ids of the questions that depend on the response of this one
     */
    dependentQuestions: Array<string>;
    /**
     * Do the user have to answer this question (based on previous answers)
     */
    constraints: Array<StoreConstraint>;
    isAvailable?: boolean | undefined;
    constructor(
    /**
     * Type of question
     */
    questionType: QuestionType, 
    /**
     * Type of options of the question
     */
    answerType: AnswerType, 
    /**
     * Text to display before the question
     */
    leadingText: string, 
    /**
     * Actual text of the question
     */
    questionText: string, 
    /**
     * Follow up that's displayed when the question is answered
     */
    followupText: string, 
    /**
     * Order of the question in the questionnaire
     */
    order: number, 
    /**
     * Id of the category of this question
     */
    category: string, 
    /**
     * Options that the question has
     */
    answerOptions: Array<StoreOption>, 
    /**
     * Ids of the questions that depend on the response of this one
     */
    dependentQuestions: Array<string>, 
    /**
     * Do the user have to answer this question (based on previous answers)
     */
    constraints: Array<StoreConstraint>, isAvailable?: boolean | undefined);
    /**
     * The name of the question resource on the API server.
     */
    static get resourceName(): string;
    /**
     * The name of the service containing the question resource.
     */
    static get serviceName(): string;
    /**
     * Convert the question into a JSON serializable object for the API server.
     */
    serializeAPI(): APIQuestion;
    /**
     * Deserialize the data from the API server.
     *
     * @param data The question data from the API server.
     */
    deserializeAPI(data: APIQuestion): void;
    /**
     * Serialize the question into a format for storing in the Redux store.
     */
    serializeRedux(): StoreQuestion;
    /**
     * Create a question from the API server data.
     *
     * @param data Data from the api server.
     *
     * @returns The question object.
     */
    static apiFactory(data: APIQuestion): Question;
    /**
     * Create a question from the Redux store data.
     *
     * @param data Data from the api server.
     *
     * @returns The question object.
     */
    static reduxFactory(data: StoreQuestion): Question;
    /**
     * Action to send an answer to this question
     */
    answerQuestion(answer: AnswerRequest): Promise<StoreAnswer>;
    /**
     * Action to delete an answer to this question
     */
    deleteAnswer(answerId: string): Promise<void>;
    /**
     * Convert the given list of options to camel case.
     * id field will always available in APIOption get directly from server.
     * But id is optional as pro users can create Option from frontend.
     */
    private static convertOptionsToCamelCase;
    private static convertConstraintsToCamelCase;
}
