Skip to content

@sourceloop/survey-service / Exports / QuestionDuplicateHelperService

Class: QuestionDuplicateHelperService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new QuestionDuplicateHelperService(questionRepository, optionsRepository, questionHelperService, logger)

Parameters

Name Type
questionRepository QuestionRepository
optionsRepository OptionsRepository
questionHelperService QuestionHelperService
logger ILogger

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:15

Properties

logger

logger: ILogger

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:22


optionsRepository

optionsRepository: OptionsRepository

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:19


questionHelperService

questionHelperService: QuestionHelperService

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:21


questionIdsUsed

questionIdsUsed: string[] = []

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:25


questionRepository

questionRepository: QuestionRepository

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:17

Methods

checkIfQuestionCanBeDuplicated

checkIfQuestionCanBeDuplicated(masterQuestion, surveyId?): void

Parameters

Name Type
masterQuestion Question
surveyId? string

Returns

void

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:92


duplicateQuestion

duplicateQuestion(questionId, body?, parentQuestionId?, rootQuestionId?, surveyId?): Promise<Question>

Parameters

Name Type
questionId string
body? QuestionDuplicateDto
parentQuestionId? string
rootQuestionId? string
surveyId? string

Returns

Promise<Question>

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:27


duplicateScaleOrTextFollowUpQuestion

duplicateScaleOrTextFollowUpQuestion(questionId?, masterQuestionId?, body?, rootQuestionId?, surveyId?): Promise<void>

Parameters

Name Type
questionId? string
masterQuestionId? string
body? QuestionDuplicateDto
rootQuestionId? string
surveyId? string

Returns

Promise<void>

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:104


getQuestionId

getQuestionId(): Promise<string>

Returns

Promise<string>

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:191


inheritOptions

inheritOptions(parentQuestionId, questionId, rootQuestionId?, body?, surveyId?): Promise<void>

Parameters

Name Type
parentQuestionId string
questionId string
rootQuestionId? string
body? QuestionDuplicateDto
surveyId? string

Returns

Promise<void>

Defined in

services/survey-service/src/services/question-duplicate-helper.service.ts:132