Skip to content

@sourceloop/survey-service / Exports / SurveyCycleService

Class: SurveyCycleService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SurveyCycleService(surveyRepository, surveyCycleRepository, logger)

Parameters

Name Type
surveyRepository SurveyRepository
surveyCycleRepository SurveyCycleRepository
logger ILogger

Defined in

services/survey-service/src/services/survey-cycle.service.ts:13

Properties

logger

logger: ILogger

Defined in

services/survey-service/src/services/survey-cycle.service.ts:18


surveyCycleRepository

surveyCycleRepository: SurveyCycleRepository

Defined in

services/survey-service/src/services/survey-cycle.service.ts:17


surveyRepository

surveyRepository: SurveyRepository

Defined in

services/survey-service/src/services/survey-cycle.service.ts:15

Methods

checkIfResponderAddedInActiveCycle

checkIfResponderAddedInActiveCycle(surveyResponder): Promise<void>

Parameters

Name Type
surveyResponder SurveyResponder

Returns

Promise<void>

Defined in

services/survey-service/src/services/survey-cycle.service.ts:54


createFirstSurveyCycle

createFirstSurveyCycle(surveyId): Promise<[Count]>

Parameters

Name Type
surveyId string

Returns

Promise<[Count]>

Defined in

services/survey-service/src/services/survey-cycle.service.ts:76


createSurveyCycle

createSurveyCycle(surveyId, surveyCycle): Promise<SurveyCycle>

Parameters

Name Type
surveyId string
surveyCycle Omit<SurveyCycle, "id">

Returns

Promise<SurveyCycle>

Defined in

services/survey-service/src/services/survey-cycle.service.ts:21


validateSurveyCycle

validateSurveyCycle(surveyCycleId, surveyId): Promise<void>

Parameters

Name Type
surveyCycleId string
surveyId string

Returns

Promise<void>

Defined in

services/survey-service/src/services/survey-cycle.service.ts:43