refactoring and adding capability to recognize more schedules
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
mightypanders
2022-04-13 21:38:59 +02:00
parent 9df18575fd
commit 180c467826
8 changed files with 165 additions and 98 deletions

View File

@ -0,0 +1,11 @@
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]