@doist/todoist-api-typescript 6.1.5 → 6.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -540,7 +540,8 @@ class TodoistApi {
540
540
  /**
541
541
  * Retrieves all sections within a specific project or matching criteria.
542
542
  *
543
- * @param args - Filter parameters such as project ID.
543
+ * @param args - Filter parameters such as project ID. If no projectId is provided,
544
+ * all sections are returned.
544
545
  * @returns A promise that resolves to an array of sections.
545
546
  */
546
547
  async getSections(args) {
@@ -197,6 +197,12 @@ exports.CurrentUserSchema = zod_1.z.object({
197
197
  avatarSmall: zod_1.z.string().nullish(),
198
198
  businessAccountId: zod_1.z.string().nullable(),
199
199
  isPremium: zod_1.z.boolean(),
200
+ premiumStatus: zod_1.z.enum([
201
+ 'not_premium',
202
+ 'current_personal_plan',
203
+ 'legacy_personal_plan',
204
+ 'teams_business_member',
205
+ ]),
200
206
  dateFormat: zod_1.z.number().int(),
201
207
  timeFormat: zod_1.z.number().int(),
202
208
  weeklyGoal: zod_1.z.number().int(),
@@ -537,7 +537,8 @@ export class TodoistApi {
537
537
  /**
538
538
  * Retrieves all sections within a specific project or matching criteria.
539
539
  *
540
- * @param args - Filter parameters such as project ID.
540
+ * @param args - Filter parameters such as project ID. If no projectId is provided,
541
+ * all sections are returned.
541
542
  * @returns A promise that resolves to an array of sections.
542
543
  */
543
544
  async getSections(args) {
@@ -194,6 +194,12 @@ export const CurrentUserSchema = z.object({
194
194
  avatarSmall: z.string().nullish(),
195
195
  businessAccountId: z.string().nullable(),
196
196
  isPremium: z.boolean(),
197
+ premiumStatus: z.enum([
198
+ 'not_premium',
199
+ 'current_personal_plan',
200
+ 'legacy_personal_plan',
201
+ 'teams_business_member',
202
+ ]),
197
203
  dateFormat: z.number().int(),
198
204
  timeFormat: z.number().int(),
199
205
  weeklyGoal: z.number().int(),
@@ -233,10 +233,11 @@ export declare class TodoistApi {
233
233
  /**
234
234
  * Retrieves all sections within a specific project or matching criteria.
235
235
  *
236
- * @param args - Filter parameters such as project ID.
236
+ * @param args - Filter parameters such as project ID. If no projectId is provided,
237
+ * all sections are returned.
237
238
  * @returns A promise that resolves to an array of sections.
238
239
  */
239
- getSections(args: GetSectionsArgs): Promise<GetSectionsResponse>;
240
+ getSections(args?: GetSectionsArgs): Promise<GetSectionsResponse>;
240
241
  /**
241
242
  * Retrieves a single section by its ID.
242
243
  *
@@ -549,6 +549,12 @@ export declare const CurrentUserSchema: z.ZodObject<{
549
549
  avatarSmall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
550
550
  businessAccountId: z.ZodNullable<z.ZodString>;
551
551
  isPremium: z.ZodBoolean;
552
+ premiumStatus: z.ZodEnum<{
553
+ not_premium: "not_premium";
554
+ current_personal_plan: "current_personal_plan";
555
+ legacy_personal_plan: "legacy_personal_plan";
556
+ teams_business_member: "teams_business_member";
557
+ }>;
552
558
  dateFormat: z.ZodNumber;
553
559
  timeFormat: z.ZodNumber;
554
560
  weeklyGoal: z.ZodNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-api-typescript",
3
- "version": "6.1.5",
3
+ "version": "6.1.7",
4
4
  "description": "A typescript wrapper for the Todoist REST API.",
5
5
  "author": "Doist developers",
6
6
  "repository": "git@github.com:doist/todoist-api-typescript.git",