Skip to content

@sourceloop/scheduler-service / Exports / ValidatorService

Class: ValidatorService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ValidatorService(calendarRepository, eventRepository, subscriptionRepository, currentUser)

Parameters

Name Type
calendarRepository CalendarRepository
eventRepository EventRepository
subscriptionRepository SubscriptionRepository
currentUser IAuthUserWithPermissions<string, string, string>

Defined in

services/scheduler-service/src/services/validator.service.ts:20

Properties

calendarRepository

calendarRepository: CalendarRepository

Defined in

services/scheduler-service/src/services/validator.service.ts:22


currentUser

Private Readonly currentUser: IAuthUserWithPermissions<string, string, string>

Defined in

services/scheduler-service/src/services/validator.service.ts:28


eventRepository

eventRepository: EventRepository

Defined in

services/scheduler-service/src/services/validator.service.ts:24


schdulerConfig

Private Optional Readonly schdulerConfig: ISchedulerConfig

Defined in

services/scheduler-service/src/services/validator.service.ts:70


subscriptionRepository

subscriptionRepository: SubscriptionRepository

Defined in

services/scheduler-service/src/services/validator.service.ts:26

Methods

calendarExists

calendarExists(calendarId?): Promise<boolean>

Parameters

Name Type
calendarId? string

Returns

Promise<boolean>

Defined in

services/scheduler-service/src/services/validator.service.ts:31


eventExists

eventExists(eventId?): Promise<boolean>

Parameters

Name Type
eventId? string

Returns

Promise<boolean>

Defined in

services/scheduler-service/src/services/validator.service.ts:53


minMaxTime

minMaxTime(timeMin?, timeMax?): boolean

Parameters

Name Type
timeMin? Date
timeMax? Date

Returns

boolean

Defined in

services/scheduler-service/src/services/validator.service.ts:45


primaryToCalendarId

primaryToCalendarId(id): Promise<null | string>

Parameters

Name Type
id string

Returns

Promise<null | string>

Defined in

services/scheduler-service/src/services/validator.service.ts:71