From 54d7d505c53f8eb59dfe0544cbd4fb354191cc92 Mon Sep 17 00:00:00 2001 From: Scott Lovegrove Date: Tue, 11 Nov 2025 15:31:29 +0000 Subject: [PATCH] fix: Don't force `projectId` for fetching sections --- src/todoist-api.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/todoist-api.ts b/src/todoist-api.ts index 6730d49..5369ce9 100644 --- a/src/todoist-api.ts +++ b/src/todoist-api.ts @@ -819,10 +819,11 @@ export class TodoistApi { /** * Retrieves all sections within a specific project or matching criteria. * - * @param args - Filter parameters such as project ID. + * @param args - Filter parameters such as project ID. If no projectId is provided, + * all sections are returned. * @returns A promise that resolves to an array of sections. */ - async getSections(args: GetSectionsArgs): Promise { + async getSections(args?: GetSectionsArgs): Promise { const { data: { results, nextCursor }, } = await request({