Skip to content

@sourceloop/survey-service / Exports / SurveyResponderService

Class: SurveyResponderService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SurveyResponderService(logger, surveyResponderRepository, surveyCycleRepository, surveyRepository, surveyService, surveyCycleService)

Parameters

Name Type
logger ILogger
surveyResponderRepository SurveyResponderRepository
surveyCycleRepository SurveyCycleRepository
surveyRepository SurveyRepository
surveyService SurveyService
surveyCycleService SurveyCycleService

Defined in

services/survey-service/src/services/survey-responder.service.ts:19

Properties

logger

logger: ILogger

Defined in

services/survey-service/src/services/survey-responder.service.ts:20


surveyCycleRepository

Protected surveyCycleRepository: SurveyCycleRepository

Defined in

services/survey-service/src/services/survey-responder.service.ts:24


surveyCycleService

surveyCycleService: SurveyCycleService

Defined in

services/survey-service/src/services/survey-responder.service.ts:30


surveyRepository

Protected surveyRepository: SurveyRepository

Defined in

services/survey-service/src/services/survey-responder.service.ts:26


surveyResponderRepository

Protected surveyResponderRepository: SurveyResponderRepository

Defined in

services/survey-service/src/services/survey-responder.service.ts:22


surveyService

surveyService: SurveyService

Defined in

services/survey-service/src/services/survey-responder.service.ts:28

Methods

_getExpiresInSeconds

Private _getExpiresInSeconds(endDate): number

Parameters

Name Type
endDate string

Returns

number

Defined in

services/survey-service/src/services/survey-responder.service.ts:118


createSurveyResponder

createSurveyResponder(surveyId, surveyResponder): Promise<SurveyResponder>

Parameters

Name Type
surveyId string
surveyResponder Omit<SurveyResponder, "id">

Returns

Promise<SurveyResponder>

Defined in

services/survey-service/src/services/survey-responder.service.ts:33


getAccessToken

getAccessToken(surveyResponders, surveyId): Promise<undefined | { tokens: string[] }>

Parameters

Name Type
surveyResponders SurveyResponder[]
surveyId string

Returns

Promise<undefined | { tokens: string[] }>

Defined in

services/survey-service/src/services/survey-responder.service.ts:74