@studyportals/sp-lurch-interface 3.3.0 → 3.3.2-0
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 +5 -1
- package/index.js +5 -1
- package/index.js.map +1 -1
- package/package.json +45 -45
- package/src/lurch-client.d.ts +4 -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/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-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,11 @@ 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
|
-
export { IIntake, IMatch, IInputBatch, IntakeDto, MatchDto, OrganisationDto, IOrganisation, InputBatchDto, SubmitMatchesResult, DiscardInputBatchresult, RetrieveIntakesResult, RetrieveIntakeResult, RetrieveInputBatchResult, RetrieveInputBatchesResult, InputBatchStatus, IntakeStageType, LurchClient, IMicrositeStudentProfile, MicrositeStudentProfileResult, RetrieveOrganisationsResult, RetrieveInputBatchDomainOverviewResult, IDomainCategoryOverview, DomainCategory, ISubmitMatches };
|
|
29
|
+
export { IIntake, IMatch, IInputBatch, IntakeDto, MatchDto, OrganisationDto, IOrganisation, InputBatchDto, SubmitMatchesResult, DiscardInputBatchresult, RetrieveIntakesResult, RetrieveIntakeResult, RetrieveInputBatchResult, RetrieveInputBatchesResult, InputBatchStatus, IntakeStageType, LurchClient, IMicrositeStudentProfile, MicrositeStudentProfileResult, RetrieveOrganisationsResult, RetrieveSurveyQuestionsResult, ISurveyQuestion, ISurveyQuestionOption, 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.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,10 @@ 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; } });
|
|
38
42
|
//# 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;AAqCzE,8FArCQ,qCAAa,OAqCR;AApCd,+EAA0E;AA2CzE,iGA3CQ,qCAAgB,OA2CR;AAzCjB,qEAA2D;AA8B1D,0FA9BQ,4BAAS,OA8BR;AA7BV,uEAAkE;AAyCjE,gGAzCQ,mCAAe,OAyCR;AAtChB,mEAAyD;AA2BxD,yFA3BQ,0BAAQ,OA2BR;AA1BT,uGAA2F;AAkC1F,yGAlCQ,4DAAwB,OAkCR;AAjCzB,2GAA+F;AAkC9F,2GAlCQ,gEAA0B,OAkCR;AAjC3B,6FAAkF;AA+BjF,qGA/BQ,mDAAoB,OA+BR;AA9BrB,+FAAoF;AA6BnF,sGA7BQ,qDAAqB,OA6BR;AA5BtB,2FAAgF;AA0B/E,oGA1BQ,iDAAmB,OA0BR;AAzBpB,qGAAyF;AA0BxF,wGA1BQ,0DAAuB,OA0BR;AAzBxB,qDAAgD;AAgC/C,4FAhCQ,0BAAW,OAgCR;AA9BZ,iHAAqG;AAgCpG,8GAhCQ,sEAA6B,OAgCR;AA/B9B,2GAAgG;AAgC/F,4GAhCQ,iEAA2B,OAgCR;AA/B5B,uIAAyH;AAoCxH,uHApCQ,0FAAsC,OAoCR;AAlCvC,+FAAqF;AAepF,gGAfQ,wCAAe,OAeR;AAZhB,wFAA8E;AA8B7E,iGA9BQ,0CAAgB,OA8BR;AA7BjB,iHAAqG;AA0BpG,8GA1BQ,sEAA6B,OA0BR;AAxB9B,yEAAqE;AA8BpE,+FA9BQ,gCAAc,OA8BR"}
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@studyportals/sp-lurch-interface",
|
|
3
|
-
"version": "3.3.0",
|
|
4
|
-
"description": "Contains Data Transfer Objects required or provided by Lurch through its interface.",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "npm run test-u-o",
|
|
7
|
-
"test-u": "npm run test-u-o",
|
|
8
|
-
"test-u-o": "nyc mocha",
|
|
9
|
-
"prepare-deployment": "tsc && cp package.json ./bin/package.json",
|
|
10
|
-
"deploy": "npm test && npm run prepare-deployment && npm publish ./bin",
|
|
11
|
-
"lint": "tslint 'src/**/*.ts'",
|
|
12
|
-
"lint-fix": "tslint --fix 'src/**/*.ts'",
|
|
13
|
-
"coverage": "nyc report --reporter=lcov",
|
|
14
|
-
"deploy-patch": "npm version patch && npm run deploy",
|
|
15
|
-
"deploy-minor": "npm version minor && npm run deploy",
|
|
16
|
-
"deploy-major": "npm version major && npm run deploy",
|
|
17
|
-
"deploy-beta": "npm version prerelease && npm run deploy -- --tag beta"
|
|
18
|
-
},
|
|
19
|
-
"author": "SPAF",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
23
|
-
"@testdeck/mocha": "^0.3.3",
|
|
24
|
-
"@types/chai": "^5.2.3",
|
|
25
|
-
"@types/superagent": "^8.1.9",
|
|
26
|
-
"chai": "^6.2.2",
|
|
27
|
-
"mocha": "^11.7.5",
|
|
28
|
-
"mocha-typescript": "^1.1.17",
|
|
29
|
-
"nyc": "^18.0.0",
|
|
30
|
-
"ts-node": "^10.9.2",
|
|
31
|
-
"tslint": "^6.1.3",
|
|
32
|
-
"typemoq": "^2.1.0",
|
|
33
|
-
"typescript": "^
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@studyportals/mb-platform-http-requests": "^2.8.0",
|
|
37
|
-
"@studyportals/sp-r2d2-interface": "^2.2.0",
|
|
38
|
-
"@studyportals/sp-thing-interface": "^1.10.
|
|
39
|
-
"superagent": "^10.3.0"
|
|
40
|
-
},
|
|
41
|
-
"engines": {
|
|
42
|
-
"node": "22.x",
|
|
43
|
-
"npm": ">= 10.x"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@studyportals/sp-lurch-interface",
|
|
3
|
+
"version": "3.3.2-0",
|
|
4
|
+
"description": "Contains Data Transfer Objects required or provided by Lurch through its interface.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "npm run test-u-o",
|
|
7
|
+
"test-u": "npm run test-u-o",
|
|
8
|
+
"test-u-o": "nyc mocha",
|
|
9
|
+
"prepare-deployment": "tsc && cp package.json ./bin/package.json",
|
|
10
|
+
"deploy": "npm test && npm run prepare-deployment && npm publish ./bin",
|
|
11
|
+
"lint": "tslint 'src/**/*.ts'",
|
|
12
|
+
"lint-fix": "tslint --fix 'src/**/*.ts'",
|
|
13
|
+
"coverage": "nyc report --reporter=lcov",
|
|
14
|
+
"deploy-patch": "npm version patch && npm run deploy",
|
|
15
|
+
"deploy-minor": "npm version minor && npm run deploy",
|
|
16
|
+
"deploy-major": "npm version major && npm run deploy",
|
|
17
|
+
"deploy-beta": "npm version prerelease && npm run deploy -- --tag beta"
|
|
18
|
+
},
|
|
19
|
+
"author": "SPAF",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
23
|
+
"@testdeck/mocha": "^0.3.3",
|
|
24
|
+
"@types/chai": "^5.2.3",
|
|
25
|
+
"@types/superagent": "^8.1.9",
|
|
26
|
+
"chai": "^6.2.2",
|
|
27
|
+
"mocha": "^11.7.5",
|
|
28
|
+
"mocha-typescript": "^1.1.17",
|
|
29
|
+
"nyc": "^18.0.0",
|
|
30
|
+
"ts-node": "^10.9.2",
|
|
31
|
+
"tslint": "^6.1.3",
|
|
32
|
+
"typemoq": "^2.1.0",
|
|
33
|
+
"typescript": "^6.0.2"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@studyportals/mb-platform-http-requests": "^2.8.0",
|
|
37
|
+
"@studyportals/sp-r2d2-interface": "^2.2.0",
|
|
38
|
+
"@studyportals/sp-thing-interface": "^1.10.2",
|
|
39
|
+
"superagent": "^10.3.0"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": "22.x",
|
|
43
|
+
"npm": ">= 10.x"
|
|
44
|
+
}
|
|
45
|
+
}
|
package/src/lurch-client.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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";
|
|
7
8
|
export declare class LurchClient {
|
|
8
9
|
private superAgentRequestFactory;
|
|
@@ -16,6 +17,9 @@ export declare class LurchClient {
|
|
|
16
17
|
submitEnrollments(organisationId: string, representativeId: string, intakeStage: IntakeStageType, intakeMonth: number, intakeYear: number, inputs: string): Promise<ISubmitMatches>;
|
|
17
18
|
retrieveInputBatchDomainOverview(inputBatchIdentity: string, organisationId: string): Promise<IDomainCategoryOverview[]>;
|
|
18
19
|
retrieveOrganisationsFromUser(): Promise<OrganisationsDto>;
|
|
20
|
+
retrieveSurvey(): Promise<ISurveyQuestion[]>;
|
|
21
|
+
retrieveSurveyResult<TSurveyResult = unknown>(): Promise<TSurveyResult>;
|
|
22
|
+
submitSurvey<TSubmitSurveyRequest extends object>(payload: TSubmitSurveyRequest): Promise<void>;
|
|
19
23
|
private createGetRequest;
|
|
20
24
|
private createPostRequest;
|
|
21
25
|
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
|
+
// TODO: TSurveyResult is a placeholder type. Once we have the actual survey result structure defined, we should replace this with a more specific type.
|
|
62
|
+
async retrieveSurveyResult() {
|
|
63
|
+
const request = this.createGetRequest("/survey/result");
|
|
64
|
+
return this.requestSender.sendAndExtractBody(request);
|
|
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":"","sources":["../../src/lurch-client.ts"],"names":[],"mappings":";;;AASA,iFAA6E;AAK7E,MAAa,WAAW;IAGvB,IAAc,OAAO;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED,YACS,wBAAmD,EACnD,aAA6B,EACrC,UAAkB,EAAE;QAFZ,6BAAwB,GAAxB,wBAAwB,CAA2B;QACnD,kBAAa,GAAb,aAAa,CAAgB;QAGrC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC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C;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,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-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":""}
|