node-event-bot/server/types/scheduledEventTypes.ts
mightypanders 180c467826
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
refactoring and adding capability to recognize more schedules
2022-04-13 21:38:59 +02:00

12 lines
434 B
TypeScript

export interface RepetitonInfo {
startDate?: Date, // If defined will take precedence over repetitonAmount
endDate?: Date,// If defined will take precedence over repetitonAmount
totalAmount: number,
alreadyOccured: number,
schedule: supportedSchedule
numberOfDays?: number
}
export const scheduleNames = ['daily', 'weekly', 'monthly', 'everyTwoWeeks', 'everyNDays']
export type supportedSchedule = typeof scheduleNames[number]