@studyportals/sp-lurch-interface 3.3.1 → 3.3.2-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +8 -1
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/lurch-client.d.ts +5 -0
- package/src/lurch-client.js +16 -0
- package/src/lurch-client.js.map +1 -1
- package/src/results/retrieve-survey-questions-result.class.d.ts +8 -0
- package/src/results/retrieve-survey-questions-result.class.js +19 -0
- package/src/results/retrieve-survey-questions-result.class.js.map +1 -0
- package/src/results/retrieve-survey-result.class.d.ts +8 -0
- package/src/results/retrieve-survey-result.class.js +19 -0
- package/src/results/retrieve-survey-result.class.js.map +1 -0
- package/src/survey/enums/survey-answer-type.enum.d.ts +7 -0
- package/src/survey/enums/survey-answer-type.enum.js +12 -0
- package/src/survey/enums/survey-answer-type.enum.js.map +1 -0
- package/src/survey/interfaces/i-retrieved-survey-answer.interface.d.ts +5 -0
- package/src/survey/interfaces/i-retrieved-survey-answer.interface.js +3 -0
- package/src/survey/interfaces/i-retrieved-survey-answer.interface.js.map +1 -0
- package/src/survey/interfaces/i-retrieved-survey-answered-question.interface.d.ts +7 -0
- package/src/survey/interfaces/i-retrieved-survey-answered-question.interface.js +3 -0
- package/src/survey/interfaces/i-retrieved-survey-answered-question.interface.js.map +1 -0
- package/src/survey/interfaces/i-survey-question-option.interface.d.ts +6 -0
- package/src/survey/interfaces/i-survey-question-option.interface.js +3 -0
- package/src/survey/interfaces/i-survey-question-option.interface.js.map +1 -0
- package/src/survey/interfaces/i-survey-question.interface.d.ts +13 -0
- package/src/survey/interfaces/i-survey-question.interface.js +3 -0
- package/src/survey/interfaces/i-survey-question.interface.js.map +1 -0
package/index.d.ts
CHANGED
|
@@ -19,7 +19,14 @@ import { RetrieveOrganisationsResult } from './src/results/retrieve-organisation
|
|
|
19
19
|
import { RetrieveInputBatchDomainOverviewResult } from './src/results/retrieve-input-batch-domain-overview-result.class';
|
|
20
20
|
import { IOrganisation } from './src/entities/organisation/i-organisation.interface';
|
|
21
21
|
import { OrganisationDto } from './src/entities/organisation/organisation-dto.class';
|
|
22
|
+
import { ISurveyQuestion } from './src/survey/interfaces/i-survey-question.interface';
|
|
23
|
+
import { ISurveyQuestionOption } from './src/survey/interfaces/i-survey-question-option.interface';
|
|
24
|
+
import { SurveyAnswerType } from './src/survey/enums/survey-answer-type.enum';
|
|
25
|
+
import { RetrieveSurveyQuestionsResult } from './src/results/retrieve-survey-questions-result.class';
|
|
22
26
|
import { IDomainCategoryOverview } from './src/input-batches/interfaces/i-domain-category-overview.interface';
|
|
23
27
|
import { DomainCategory } from './src/input-batches/domain-category';
|
|
24
28
|
import { ISubmitMatches } from './src/input-batches/interfaces/i-submit-matches.interface';
|
|
25
|
-
|
|
29
|
+
import { IRetrievedSurveyAnswer } from './src/survey/interfaces/i-retrieved-survey-answer.interface';
|
|
30
|
+
import { IRetrievedSurveyAnsweredQuestion } from './src/survey/interfaces/i-retrieved-survey-answered-question.interface';
|
|
31
|
+
import { RetrieveSurveyResult } from './src/results/retrieve-survey-result.class';
|
|
32
|
+
export { IIntake, IMatch, IInputBatch, IntakeDto, MatchDto, OrganisationDto, IOrganisation, InputBatchDto, SubmitMatchesResult, DiscardInputBatchresult, RetrieveIntakesResult, RetrieveIntakeResult, RetrieveInputBatchResult, RetrieveInputBatchesResult, InputBatchStatus, IntakeStageType, LurchClient, IMicrositeStudentProfile, MicrositeStudentProfileResult, RetrieveOrganisationsResult, RetrieveSurveyQuestionsResult, ISurveyQuestion, ISurveyQuestionOption, RetrieveSurveyResult, IRetrievedSurveyAnsweredQuestion, IRetrievedSurveyAnswer, SurveyAnswerType, RetrieveInputBatchDomainOverviewResult, IDomainCategoryOverview, DomainCategory, ISubmitMatches };
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DomainCategory = exports.RetrieveInputBatchDomainOverviewResult = exports.RetrieveOrganisationsResult = exports.MicrositeStudentProfileResult = exports.LurchClient = exports.IntakeStageType = exports.InputBatchStatus = exports.RetrieveInputBatchesResult = exports.RetrieveInputBatchResult = exports.RetrieveIntakeResult = exports.RetrieveIntakesResult = exports.DiscardInputBatchresult = exports.SubmitMatchesResult = exports.InputBatchDto = exports.OrganisationDto = exports.MatchDto = exports.IntakeDto = void 0;
|
|
3
|
+
exports.DomainCategory = exports.RetrieveInputBatchDomainOverviewResult = exports.SurveyAnswerType = exports.RetrieveSurveyResult = exports.RetrieveSurveyQuestionsResult = exports.RetrieveOrganisationsResult = exports.MicrositeStudentProfileResult = exports.LurchClient = exports.IntakeStageType = exports.InputBatchStatus = exports.RetrieveInputBatchesResult = exports.RetrieveInputBatchResult = exports.RetrieveIntakeResult = exports.RetrieveIntakesResult = exports.DiscardInputBatchresult = exports.SubmitMatchesResult = exports.InputBatchDto = exports.OrganisationDto = exports.MatchDto = exports.IntakeDto = void 0;
|
|
4
4
|
const input_batch_dto_class_1 = require("./src/input-batches/input-batch-dto.class");
|
|
5
5
|
Object.defineProperty(exports, "InputBatchDto", { enumerable: true, get: function () { return input_batch_dto_class_1.InputBatchDto; } });
|
|
6
6
|
const input_batch_status_1 = require("./src/input-batches/input-batch-status");
|
|
@@ -33,6 +33,12 @@ const retrieve_input_batch_domain_overview_result_class_1 = require("./src/resul
|
|
|
33
33
|
Object.defineProperty(exports, "RetrieveInputBatchDomainOverviewResult", { enumerable: true, get: function () { return retrieve_input_batch_domain_overview_result_class_1.RetrieveInputBatchDomainOverviewResult; } });
|
|
34
34
|
const organisation_dto_class_1 = require("./src/entities/organisation/organisation-dto.class");
|
|
35
35
|
Object.defineProperty(exports, "OrganisationDto", { enumerable: true, get: function () { return organisation_dto_class_1.OrganisationDto; } });
|
|
36
|
+
const survey_answer_type_enum_1 = require("./src/survey/enums/survey-answer-type.enum");
|
|
37
|
+
Object.defineProperty(exports, "SurveyAnswerType", { enumerable: true, get: function () { return survey_answer_type_enum_1.SurveyAnswerType; } });
|
|
38
|
+
const retrieve_survey_questions_result_class_1 = require("./src/results/retrieve-survey-questions-result.class");
|
|
39
|
+
Object.defineProperty(exports, "RetrieveSurveyQuestionsResult", { enumerable: true, get: function () { return retrieve_survey_questions_result_class_1.RetrieveSurveyQuestionsResult; } });
|
|
36
40
|
const domain_category_1 = require("./src/input-batches/domain-category");
|
|
37
41
|
Object.defineProperty(exports, "DomainCategory", { enumerable: true, get: function () { return domain_category_1.DomainCategory; } });
|
|
42
|
+
const retrieve_survey_result_class_1 = require("./src/results/retrieve-survey-result.class");
|
|
43
|
+
Object.defineProperty(exports, "RetrieveSurveyResult", { enumerable: true, get: function () { return retrieve_survey_result_class_1.RetrieveSurveyResult; } });
|
|
38
44
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,qFAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,qFAA0E;AAwCzE,8FAxCQ,qCAAa,OAwCR;AAvCd,+EAA0E;AA8CzE,iGA9CQ,qCAAgB,OA8CR;AA5CjB,qEAA2D;AAiC1D,0FAjCQ,4BAAS,OAiCR;AAhCV,uEAAkE;AA4CjE,gGA5CQ,mCAAe,OA4CR;AAzChB,mEAAyD;AA8BxD,yFA9BQ,0BAAQ,OA8BR;AA7BT,uGAA2F;AAqC1F,yGArCQ,4DAAwB,OAqCR;AApCzB,2GAA+F;AAqC9F,2GArCQ,gEAA0B,OAqCR;AApC3B,6FAAkF;AAkCjF,qGAlCQ,mDAAoB,OAkCR;AAjCrB,+FAAoF;AAgCnF,sGAhCQ,qDAAqB,OAgCR;AA/BtB,2FAAgF;AA6B/E,oGA7BQ,iDAAmB,OA6BR;AA5BpB,qGAAyF;AA6BxF,wGA7BQ,0DAAuB,OA6BR;AA5BxB,qDAAgD;AAmC/C,4FAnCQ,0BAAW,OAmCR;AAjCZ,iHAAqG;AAmCpG,8GAnCQ,sEAA6B,OAmCR;AAlC9B,2GAAgG;AAmC/F,4GAnCQ,iEAA2B,OAmCR;AAlC5B,uIAAyH;AA0CxH,uHA1CQ,0FAAsC,OA0CR;AAxCvC,+FAAqF;AAkBpF,gGAlBQ,wCAAe,OAkBR;AAfhB,wFAA8E;AAoC7E,iGApCQ,0CAAgB,OAoCR;AAnCjB,iHAAqG;AA6BpG,8GA7BQ,sEAA6B,OA6BR;AA3B9B,yEAAqE;AAoCpE,+FApCQ,gCAAc,OAoCR;AAhCf,6FAAkF;AA0BjF,qGA1BQ,mDAAoB,OA0BR"}
|
package/package.json
CHANGED
package/src/lurch-client.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { IInputBatch } from "./input-batches/interfaces/i-input-batch.interface"
|
|
|
3
3
|
import { IntakeStageType } from "./intakes/intake-stage-type";
|
|
4
4
|
import { IDomainCategoryOverview } from './input-batches/interfaces/i-domain-category-overview.interface';
|
|
5
5
|
import { OrganisationsDto } from "./entities/organisation/organisations-dto";
|
|
6
|
+
import { ISurveyQuestion } from "./survey/interfaces/i-survey-question.interface";
|
|
6
7
|
import { ISubmitMatches } from "./input-batches/interfaces/i-submit-matches.interface";
|
|
8
|
+
import { IRetrievedSurveyAnsweredQuestion } from "./survey/interfaces/i-retrieved-survey-answered-question.interface";
|
|
7
9
|
export declare class LurchClient {
|
|
8
10
|
private superAgentRequestFactory;
|
|
9
11
|
private requestSender;
|
|
@@ -16,6 +18,9 @@ export declare class LurchClient {
|
|
|
16
18
|
submitEnrollments(organisationId: string, representativeId: string, intakeStage: IntakeStageType, intakeMonth: number, intakeYear: number, inputs: string): Promise<ISubmitMatches>;
|
|
17
19
|
retrieveInputBatchDomainOverview(inputBatchIdentity: string, organisationId: string): Promise<IDomainCategoryOverview[]>;
|
|
18
20
|
retrieveOrganisationsFromUser(): Promise<OrganisationsDto>;
|
|
21
|
+
retrieveSurvey(): Promise<ISurveyQuestion[]>;
|
|
22
|
+
retrieveSurveyResult(inputBatchIdentity: string): Promise<IRetrievedSurveyAnsweredQuestion[]>;
|
|
23
|
+
submitSurvey<TSubmitSurveyRequest extends object>(payload: TSubmitSurveyRequest): Promise<void>;
|
|
19
24
|
private createGetRequest;
|
|
20
25
|
private createPostRequest;
|
|
21
26
|
private buildUrl;
|
package/src/lurch-client.js
CHANGED
|
@@ -53,6 +53,22 @@ class LurchClient {
|
|
|
53
53
|
const result = await this.requestSender.sendAndExtractBody(request);
|
|
54
54
|
return new organisations_dto_1.OrganisationsDto(result.userId, result.organisations);
|
|
55
55
|
}
|
|
56
|
+
async retrieveSurvey() {
|
|
57
|
+
const request = this.createGetRequest("/survey");
|
|
58
|
+
const result = await this.requestSender.sendAndExtractBody(request);
|
|
59
|
+
return result.questions;
|
|
60
|
+
}
|
|
61
|
+
async retrieveSurveyResult(inputBatchIdentity) {
|
|
62
|
+
const request = this.createGetRequest(`/survey/${inputBatchIdentity}`);
|
|
63
|
+
const result = await this.requestSender.sendAndExtractBody(request);
|
|
64
|
+
return result.answeredQuestions;
|
|
65
|
+
}
|
|
66
|
+
// TODO: TSubmitSurveyRequest is a placeholder type. Once we have the actual survey submission payload structure defined, we should replace this with a more specific type.
|
|
67
|
+
async submitSurvey(payload) {
|
|
68
|
+
const request = this.createPostRequest("/survey");
|
|
69
|
+
request.send(payload);
|
|
70
|
+
await this.requestSender.send(request);
|
|
71
|
+
}
|
|
56
72
|
createGetRequest(relative = '') {
|
|
57
73
|
return this.superAgentRequestFactory.get(this.buildUrl(relative));
|
|
58
74
|
}
|
package/src/lurch-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lurch-client.js","sourceRoot":"","sources":["../../src/lurch-client.ts"],"names":[],"mappings":";;;AASA,iFAA6E;
|
|
1
|
+
{"version":3,"file":"lurch-client.js","sourceRoot":"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O,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,kBAAkB,EAAE,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAuB,OAAO,CAAC,CAAC;QAE1F,OAAO,MAAM,CAAC,iBAAiB,CAAC;IACjC,CAAC;IAED,2KAA2K;IACpK,KAAK,CAAC,YAAY,CAAsC,OAA6B;QAC3F,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAElD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAGO,gBAAgB,CAAC,WAAmB,EAAE;QAC7C,OAAO,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnE,CAAC;IAEO,iBAAiB,CAAC,WAAmB,EAAE;QAC9C,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpE,CAAC;IAEO,QAAQ,CAAC,QAAgB;QAChC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,QAAQ,EAAE,CAAC;IACrC,CAAC;CACD;AAzGD,kCAyGC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SuccessResult } from "@studyportals/sp-r2d2-interface";
|
|
2
|
+
import { ISurveyQuestion } from "../survey/interfaces/i-survey-question.interface";
|
|
3
|
+
export declare class RetrieveSurveyQuestionsResult extends SuccessResult {
|
|
4
|
+
readonly questions: ISurveyQuestion[];
|
|
5
|
+
readonly __retrieve_survey_questions_result__: true;
|
|
6
|
+
constructor(questions: ISurveyQuestion[]);
|
|
7
|
+
protected toJSON(): object;
|
|
8
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetrieveSurveyQuestionsResult = void 0;
|
|
4
|
+
const sp_r2d2_interface_1 = require("@studyportals/sp-r2d2-interface");
|
|
5
|
+
class RetrieveSurveyQuestionsResult extends sp_r2d2_interface_1.SuccessResult {
|
|
6
|
+
constructor(questions) {
|
|
7
|
+
super();
|
|
8
|
+
this.questions = questions;
|
|
9
|
+
this.__retrieve_survey_questions_result__ = true;
|
|
10
|
+
}
|
|
11
|
+
toJSON() {
|
|
12
|
+
const obj = super.toJSON();
|
|
13
|
+
obj["__retrieve_survey_questions_result__"] = this.__retrieve_survey_questions_result__;
|
|
14
|
+
obj["questions"] = this.questions;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.RetrieveSurveyQuestionsResult = RetrieveSurveyQuestionsResult;
|
|
19
|
+
//# sourceMappingURL=retrieve-survey-questions-result.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-survey-questions-result.class.js","sourceRoot":"","sources":["../../../src/results/retrieve-survey-questions-result.class.ts"],"names":[],"mappings":";;;AAAA,uEAAgE;AAGhE,MAAa,6BAA8B,SAAQ,iCAAa;IAG/D,YAAmC,SAA4B;QAC9D,KAAK,EAAE,CAAC;QAD0B,cAAS,GAAT,SAAS,CAAmB;QAF/C,yCAAoC,GAAS,IAAI,CAAC;IAIlE,CAAC;IAES,MAAM;QACf,MAAM,GAAG,GAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;QAEhC,GAAG,CAAC,sCAAsC,CAAC,GAAG,IAAI,CAAC,oCAAoC,CAAC;QACxF,GAAG,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QAElC,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AAfD,sEAeC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SuccessResult } from "@studyportals/sp-r2d2-interface";
|
|
2
|
+
import { IRetrievedSurveyAnsweredQuestion } from "../survey/interfaces/i-retrieved-survey-answered-question.interface";
|
|
3
|
+
export declare class RetrieveSurveyResult extends SuccessResult {
|
|
4
|
+
readonly answeredQuestions: IRetrievedSurveyAnsweredQuestion[];
|
|
5
|
+
readonly __retrieve_survey_result__: true;
|
|
6
|
+
constructor(answeredQuestions: IRetrievedSurveyAnsweredQuestion[]);
|
|
7
|
+
protected toJSON(): object;
|
|
8
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetrieveSurveyResult = void 0;
|
|
4
|
+
const sp_r2d2_interface_1 = require("@studyportals/sp-r2d2-interface");
|
|
5
|
+
class RetrieveSurveyResult extends sp_r2d2_interface_1.SuccessResult {
|
|
6
|
+
constructor(answeredQuestions) {
|
|
7
|
+
super();
|
|
8
|
+
this.answeredQuestions = answeredQuestions;
|
|
9
|
+
this.__retrieve_survey_result__ = true;
|
|
10
|
+
}
|
|
11
|
+
toJSON() {
|
|
12
|
+
const obj = super.toJSON();
|
|
13
|
+
obj["__retrieve_survey_result__"] = this.__retrieve_survey_result__;
|
|
14
|
+
obj["answeredQuestions"] = this.answeredQuestions;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.RetrieveSurveyResult = RetrieveSurveyResult;
|
|
19
|
+
//# sourceMappingURL=retrieve-survey-result.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-survey-result.class.js","sourceRoot":"","sources":["../../../src/results/retrieve-survey-result.class.ts"],"names":[],"mappings":";;;AAAA,uEAAgE;AAGhE,MAAa,oBAAqB,SAAQ,iCAAa;IAGtD,YAAmC,iBAAqD;QACvF,KAAK,EAAE,CAAC;QAD0B,sBAAiB,GAAjB,iBAAiB,CAAoC;QAFxE,+BAA0B,GAAS,IAAI,CAAC;IAIxD,CAAC;IAES,MAAM;QACf,MAAM,GAAG,GAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;QAEhC,GAAG,CAAC,4BAA4B,CAAC,GAAG,IAAI,CAAC,0BAA0B,CAAC;QACpE,GAAG,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAElD,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AAfD,oDAeC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SurveyAnswerType = void 0;
|
|
4
|
+
var SurveyAnswerType;
|
|
5
|
+
(function (SurveyAnswerType) {
|
|
6
|
+
SurveyAnswerType["SingleSelect"] = "single_select";
|
|
7
|
+
SurveyAnswerType["MultiSelect"] = "multi_select";
|
|
8
|
+
SurveyAnswerType["Number"] = "number";
|
|
9
|
+
SurveyAnswerType["Text"] = "text";
|
|
10
|
+
SurveyAnswerType["Boolean"] = "boolean";
|
|
11
|
+
})(SurveyAnswerType || (exports.SurveyAnswerType = SurveyAnswerType = {}));
|
|
12
|
+
//# sourceMappingURL=survey-answer-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"survey-answer-type.enum.js","sourceRoot":"","sources":["../../../../src/survey/enums/survey-answer-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC3B,kDAA8B,CAAA;IAC9B,gDAA4B,CAAA;IAC5B,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,uCAAmB,CAAA;AACpB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-retrieved-survey-answer.interface.js","sourceRoot":"","sources":["../../../../src/survey/interfaces/i-retrieved-survey-answer.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-retrieved-survey-answered-question.interface.js","sourceRoot":"","sources":["../../../../src/survey/interfaces/i-retrieved-survey-answered-question.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-survey-question-option.interface.js","sourceRoot":"","sources":["../../../../src/survey/interfaces/i-survey-question-option.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SurveyAnswerType } from "../enums/survey-answer-type.enum";
|
|
2
|
+
import { ISurveyQuestionOption } from "./i-survey-question-option.interface";
|
|
3
|
+
export interface ISurveyQuestion {
|
|
4
|
+
questionId: string;
|
|
5
|
+
surveyVersion: number;
|
|
6
|
+
displayOrder: number;
|
|
7
|
+
label: string;
|
|
8
|
+
resultLabel: string;
|
|
9
|
+
answerType: SurveyAnswerType;
|
|
10
|
+
isRequired: boolean;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
options: ISurveyQuestionOption[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-survey-question.interface.js","sourceRoot":"","sources":["../../../../src/survey/interfaces/i-survey-question.interface.ts"],"names":[],"mappings":""}
|