From b9df7073691b1d06932ab41982339787e15605b6 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 21 May 2025 15:34:16 +0300 Subject: [PATCH] refactor(server): type errors due to change in API --- apps/server/src/services/backend_script_api.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/server/src/services/backend_script_api.ts b/apps/server/src/services/backend_script_api.ts index 2f3a68029..2d69ee608 100644 --- a/apps/server/src/services/backend_script_api.ts +++ b/apps/server/src/services/backend_script_api.ts @@ -224,14 +224,14 @@ export interface Api { * @param date in YYYY-MM-DD format * @param rootNote - specify calendar root note, normally leave empty to use the default calendar */ - getDayNote(date: string, rootNote?: BNote): Promise; + getDayNote(date: string, rootNote?: BNote): BNote | null; /** * Returns today's day note. If such note doesn't exist, it is created. * * @param rootNote specify calendar root note, normally leave empty to use the default calendar */ - getTodayNote(rootNote?: BNote): Promise; + getTodayNote(rootNote?: BNote): BNote | null; /** * Returns note for the first date of the week of the given date. @@ -239,7 +239,7 @@ export interface Api { * @param date in YYYY-MM-DD format * @param rootNote - specify calendar root note, normally leave empty to use the default calendar */ - getWeekFirstDayNote(date: string, rootNote: BNote): Promise; + getWeekFirstDayNote(date: string, rootNote: BNote): BNote | null; /** * Returns week note for given date. If such a note doesn't exist, it is created. @@ -247,7 +247,7 @@ export interface Api { * @param date in YYYY-MM-DD format * @param rootNote - specify calendar root note, normally leave empty to use the default calendar */ - getWeekNote(date: string, rootNote: BNote): Promise; + getWeekNote(date: string, rootNote: BNote): BNote | null; /** * Returns month note for given date. If such a note doesn't exist, it is created. @@ -255,7 +255,7 @@ export interface Api { * @param date in YYYY-MM format * @param rootNote - specify calendar root note, normally leave empty to use the default calendar */ - getMonthNote(date: string, rootNote: BNote): Promise; + getMonthNote(date: string, rootNote: BNote): BNote | null; /** * Returns quarter note for given date. If such a note doesn't exist, it is created. @@ -263,7 +263,7 @@ export interface Api { * @param date in YYYY-MM format * @param rootNote - specify calendar root note, normally leave empty to use the default calendar */ - getQuarterNote(date: string, rootNote: BNote): Promise; + getQuarterNote(date: string, rootNote: BNote): BNote | null; /** * Returns year note for given year. If such a note doesn't exist, it is created.