@withjoy/sdk-js
Version:
Joy Javascript SDK
63 lines (62 loc) • 2.48 kB
TypeScript
import Questions from "./Questions";
import Choices from "./Choices";
import QuestionType from "./QuestionType";
import Answer from "./Answer";
declare class Question {
private _questions;
private _questionId;
constructor(questions: any, questionId: any);
readonly id: string;
readonly _q: any;
readonly _qDefault: any;
readonly _o: any;
readonly _s: any;
readonly _ds: any;
_updateProperty(propertyName: any, newPropertyValue: any, callback: any): any;
readonly title: any;
updateTitle(newQuestionText: any, callback: any): any;
readonly questionText: any;
updateQuestionText(newQuestionText: any, callback: any): any;
readonly isEnabled: any;
updateEnabled(newIsEnabled: any, callback: any): void;
readonly isAskedToPlusOnes: boolean;
updateAskedToPlusOnes(askPlusOnes: any, callback: any): any;
readonly allDependenciesEnabled: any;
readonly questions: Questions;
readonly type: QuestionType;
readonly sortKey: any;
updateSortKey(newSortKey: any, callback: any): void;
readonly dependencies: any;
addDependency(questionId: any, answer: any): any;
removeDependency(questionId: any, answer: any): Promise<[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]>;
dependenciesAnswered(person: any): any;
dependenciesFulfilled(person: any): any;
_sortKeyBetween(keyLess: any, keyMore: any): string;
updateSortKeyBetween(keyLess: any, keyMore: any, callback: any): void;
/**
* Gets you the hypothetical sortkey which will be after this question
* but before the next one
*/
readonly sortKeyHigher: string;
/**
* Gets you the hypothetical sortkey which will be after this question
* but before the previous one
*/
readonly sortKeyLower: string;
readonly answerKey: string;
readonly choices: Choices;
compare(q: any): 0 | 1 | -1;
answerObjToJson(answerObj: any): any;
answerJsonToObj(answerJson: any): any;
equals(q: any): boolean;
answerForPerson(person: any): Answer;
isAnsweredBy(person: any): boolean;
followUpsFor(person: any): Question[];
createNewNextQuestion(type: any, data: any): any;
createNewPreviousQuestion(type: any, data: any): any;
toString(): string;
readonly isAJoyQuestion: boolean;
shouldAskForPerson(person: any): any;
shouldCountForPerson(person: any): any;
}
export default Question;