@doist/todoist-api-typescript 7.5.0 → 7.6.0

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.
@@ -1,2 +1,23 @@
1
1
  /** Available reminder delivery services. */
2
2
  export const REMINDER_DELIVERY_SERVICES = ['email', 'push'];
3
+ // Email forwarding types
4
+ /** Object types that support email forwarding. */
5
+ export const EMAIL_OBJECT_TYPES = ['project', 'project_comments', 'task'];
6
+ // ID mapping types
7
+ /** Object types that support ID mappings. */
8
+ export const ID_MAPPING_OBJECT_TYPES = [
9
+ 'sections',
10
+ 'tasks',
11
+ 'comments',
12
+ 'reminders',
13
+ 'location_reminders',
14
+ 'projects',
15
+ ];
16
+ /** Object types that support moved ID lookups. */
17
+ export const MOVED_ID_OBJECT_TYPES = [
18
+ 'sections',
19
+ 'tasks',
20
+ 'comments',
21
+ 'reminders',
22
+ 'location_reminders',
23
+ ];
@@ -1,5 +1,5 @@
1
- import { AttachmentSchema, SectionSchema, LabelSchema, CommentSchema, UserSchema, CurrentUserSchema, TaskSchema, PersonalProjectSchema, WorkspaceProjectSchema, ProductivityStatsSchema, ActivityEventSchema, WorkspaceUserSchema, WorkspaceInvitationSchema, WorkspacePlanDetailsSchema, JoinWorkspaceResultSchema, WorkspaceSchema, } from '../types/entities.js';
2
- import { FilterSchema, CollaboratorSchema, CollaboratorStateSchema, FolderSchema, NoteSchema, TooltipsSchema, WorkspaceFilterSchema, WorkspaceGoalSchema, CalendarSchema, CalendarAccountSchema, ReminderSchema, CompletedInfoSchema, ViewOptionsSchema, ProjectViewOptionsDefaultsSchema, UserPlanLimitsSchema, LiveNotificationSchema, SyncWorkspaceSchema, SyncUserSchema, UserSettingsSchema, SuggestionSchema, } from '../types/sync/resources/index.js';
1
+ import { AttachmentSchema, SectionSchema, LabelSchema, CommentSchema, UserSchema, CurrentUserSchema, TaskSchema, PersonalProjectSchema, WorkspaceProjectSchema, ProductivityStatsSchema, ActivityEventSchema, WorkspaceUserSchema, WorkspaceInvitationSchema, WorkspacePlanDetailsSchema, JoinWorkspaceResultSchema, WorkspaceSchema, MemberActivityInfoSchema, WorkspaceUserTaskSchema, ProjectActivityStatsSchema, ProjectHealthSchema, ProjectHealthContextSchema, ProjectProgressSchema, WorkspaceInsightsSchema, BackupSchema, IdMappingSchema, MovedIdSchema, } from '../types/entities.js';
2
+ import { FilterSchema, CollaboratorSchema, CollaboratorStateSchema, FolderSchema, NoteSchema, TooltipsSchema, WorkspaceFilterSchema, WorkspaceGoalSchema, CalendarSchema, CalendarAccountSchema, ReminderSchema, LocationReminderSchema, CompletedInfoSchema, ViewOptionsSchema, ProjectViewOptionsDefaultsSchema, UserPlanLimitsSchema, LiveNotificationSchema, SyncWorkspaceSchema, SyncUserSchema, UserSettingsSchema, SuggestionSchema, } from '../types/sync/resources/index.js';
3
3
  function createValidator(schema) {
4
4
  return (input) => schema.parse(input);
5
5
  }
@@ -65,6 +65,21 @@ export const validateWorkspacePlanDetails = createValidator(WorkspacePlanDetails
65
65
  export const validateJoinWorkspaceResult = createValidator(JoinWorkspaceResultSchema);
66
66
  export const validateWorkspace = createValidator(WorkspaceSchema);
67
67
  export const validateWorkspaceArray = createArrayValidator(validateWorkspace);
68
+ export const validateMemberActivityInfo = createValidator(MemberActivityInfoSchema);
69
+ export const validateMemberActivityInfoArray = createArrayValidator(validateMemberActivityInfo);
70
+ export const validateWorkspaceUserTask = createValidator(WorkspaceUserTaskSchema);
71
+ export const validateWorkspaceUserTaskArray = createArrayValidator(validateWorkspaceUserTask);
72
+ export const validateProjectActivityStats = createValidator(ProjectActivityStatsSchema);
73
+ export const validateProjectHealth = createValidator(ProjectHealthSchema);
74
+ export const validateProjectHealthContext = createValidator(ProjectHealthContextSchema);
75
+ export const validateProjectProgress = createValidator(ProjectProgressSchema);
76
+ export const validateWorkspaceInsights = createValidator(WorkspaceInsightsSchema);
77
+ export const validateBackup = createValidator(BackupSchema);
78
+ export const validateBackupArray = createArrayValidator(validateBackup);
79
+ export const validateIdMapping = createValidator(IdMappingSchema);
80
+ export const validateIdMappingArray = createArrayValidator(validateIdMapping);
81
+ export const validateMovedId = createValidator(MovedIdSchema);
82
+ export const validateMovedIdArray = createArrayValidator(validateMovedId);
68
83
  // Sync resource validators
69
84
  export const validateFilter = createValidator(FilterSchema);
70
85
  export const validateFilterArray = createArrayValidator(validateFilter);
@@ -87,6 +102,8 @@ export const validateCalendarAccount = createValidator(CalendarAccountSchema);
87
102
  export const validateCalendarAccountArray = createArrayValidator(validateCalendarAccount);
88
103
  export const validateReminder = createValidator(ReminderSchema);
89
104
  export const validateReminderArray = createArrayValidator(validateReminder);
105
+ export const validateLocationReminder = createValidator(LocationReminderSchema);
106
+ export const validateLocationReminderArray = createArrayValidator(validateLocationReminder);
90
107
  export const validateCompletedInfo = createValidator(CompletedInfoSchema);
91
108
  export const validateCompletedInfoArray = createArrayValidator(validateCompletedInfo);
92
109
  export const validateViewOptions = createValidator(ViewOptionsSchema);
@@ -10,12 +10,12 @@ export type AuthOptions = {
10
10
  export declare const PERMISSIONS: readonly ["task:add", "data:read", "data:read_write", "data:delete", "project:delete", "backups:read"];
11
11
  /**
12
12
  * Permission scope that can be requested during OAuth2 authorization.
13
- * @see {@link https://todoist.com/api/v1/docs#tag/Authorization}
13
+ * @see {@link https://developer.todoist.com/api/v1/#tag/Authorization}
14
14
  */
15
15
  export type Permission = (typeof PERMISSIONS)[number];
16
16
  /**
17
17
  * Parameters required to exchange an authorization code for an access token.
18
- * @see https://todoist.com/api/v1/docs#tag/Authorization/OAuth
18
+ * @see https://developer.todoist.com/api/v1/#tag/Authorization/OAuth
19
19
  */
20
20
  export type AuthTokenRequestArgs = {
21
21
  clientId: string;
@@ -24,7 +24,7 @@ export type AuthTokenRequestArgs = {
24
24
  };
25
25
  /**
26
26
  * Response from a successful OAuth2 token exchange.
27
- * @see https://todoist.com/api/v1/docs#tag/Authorization/OAuth
27
+ * @see https://developer.todoist.com/api/v1/#tag/Authorization/OAuth
28
28
  */
29
29
  export type AuthTokenResponse = {
30
30
  accessToken: string;
@@ -32,13 +32,37 @@ export type AuthTokenResponse = {
32
32
  };
33
33
  /**
34
34
  * Parameters required to revoke a token using RFC 7009 compliant endpoint.
35
- * @see https://todoist.com/api/v1/docs#tag/Authorization
35
+ * @see https://developer.todoist.com/api/v1/#tag/Authorization
36
36
  */
37
37
  export type RevokeTokenRequestArgs = {
38
38
  clientId: string;
39
39
  clientSecret: string;
40
40
  token: string;
41
41
  };
42
+ /**
43
+ * Parameters required to migrate a personal API token to an OAuth token.
44
+ */
45
+ export type MigratePersonalTokenArgs = {
46
+ /** The unique Client ID of the registered Todoist application. */
47
+ clientId: string;
48
+ /** The unique Client Secret of the registered Todoist application. */
49
+ clientSecret: string;
50
+ /** The personal API token obtained from email/password authentication. */
51
+ personalToken: string;
52
+ /** Scopes for the new OAuth token. */
53
+ scope: readonly Permission[];
54
+ };
55
+ /**
56
+ * Response from a successful personal token migration.
57
+ */
58
+ export type MigratePersonalTokenResponse = {
59
+ /** The new OAuth access token, or null if migration failed. */
60
+ accessToken: string | null;
61
+ /** The token type (always 'Bearer'). */
62
+ tokenType: string;
63
+ /** Token expiration time in seconds. */
64
+ expiresIn: number;
65
+ };
42
66
  /**
43
67
  * Generates a random state parameter for OAuth2 authorization.
44
68
  * The state parameter helps prevent CSRF attacks.
@@ -67,7 +91,7 @@ export declare function getAuthStateParameter(): string;
67
91
  * ```
68
92
  *
69
93
  * @returns The full authorization URL to redirect users to
70
- * @see https://todoist.com/api/v1/docs#tag/Authorization/OAuth
94
+ * @see https://developer.todoist.com/api/v1/#tag/Authorization/OAuth
71
95
  */
72
96
  export declare function getAuthorizationUrl({ clientId, permissions, state, baseUrl, }: {
73
97
  clientId: string;
@@ -108,6 +132,27 @@ export declare function getAuthToken(args: AuthTokenRequestArgs, options?: AuthO
108
132
  *
109
133
  * @returns True if revocation was successful
110
134
  * @see https://datatracker.ietf.org/doc/html/rfc7009
111
- * @see https://todoist.com/api/v1/docs#tag/Authorization
135
+ * @see https://developer.todoist.com/api/v1/#tag/Authorization
112
136
  */
113
137
  export declare function revokeToken(args: RevokeTokenRequestArgs, options?: AuthOptions): Promise<boolean>;
138
+ /**
139
+ * Migrates a personal API token to an OAuth access token.
140
+ *
141
+ * This allows applications to transition users from personal API tokens
142
+ * to proper OAuth tokens without requiring the user to go through the
143
+ * full OAuth authorization flow.
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * const { accessToken } = await migratePersonalToken({
148
+ * clientId: 'your-client-id',
149
+ * clientSecret: 'your-client-secret',
150
+ * personalToken: 'user-personal-token',
151
+ * scope: 'data:read_write,data:delete'
152
+ * })
153
+ * ```
154
+ *
155
+ * @returns The new OAuth token response
156
+ * @throws {@link TodoistRequestError} If the migration fails
157
+ */
158
+ export declare function migratePersonalToken(args: MigratePersonalTokenArgs, options?: AuthOptions): Promise<MigratePersonalTokenResponse>;
@@ -39,6 +39,18 @@ export declare const SECTION_ARCHIVE = "archive";
39
39
  export declare const SECTION_UNARCHIVE = "unarchive";
40
40
  export declare const ENDPOINT_REST_PROJECTS_MOVE_TO_WORKSPACE: string;
41
41
  export declare const ENDPOINT_REST_PROJECTS_MOVE_TO_PERSONAL: string;
42
+ export declare const ENDPOINT_REST_TASKS_COMPLETED: string;
43
+ export declare const ENDPOINT_REST_TEMPLATES_FILE = "templates/file";
44
+ export declare const ENDPOINT_REST_TEMPLATES_URL = "templates/url";
45
+ export declare const ENDPOINT_REST_TEMPLATES_CREATE_FROM_FILE = "templates/create_project_from_file";
46
+ export declare const ENDPOINT_REST_TEMPLATES_IMPORT_FROM_FILE = "templates/import_into_project_from_file";
47
+ export declare const ENDPOINT_REST_TEMPLATES_IMPORT_FROM_ID = "templates/import_into_project_from_template_id";
48
+ export declare const ENDPOINT_REST_ACCESS_TOKENS_MIGRATE = "access_tokens/migrate_personal_token";
49
+ export declare const ENDPOINT_REST_BACKUPS = "backups";
50
+ export declare const ENDPOINT_REST_BACKUPS_DOWNLOAD = "backups/download";
51
+ export declare const ENDPOINT_REST_EMAILS = "emails";
52
+ export declare const ENDPOINT_REST_ID_MAPPINGS = "id_mappings";
53
+ export declare const ENDPOINT_REST_MOVED_IDS = "moved_ids";
42
54
  export declare const ENDPOINT_SYNC_QUICK_ADD: string;
43
55
  export declare const ENDPOINT_SYNC = "sync";
44
56
  export declare const ENDPOINT_AUTHORIZATION = "authorize";
@@ -54,5 +66,15 @@ export declare const ENDPOINT_WORKSPACE_PLAN_DETAILS = "workspaces/plan_details"
54
66
  export declare const ENDPOINT_WORKSPACE_USERS = "workspaces/users";
55
67
  export declare function getWorkspaceInvitationAcceptEndpoint(inviteCode: string): string;
56
68
  export declare function getWorkspaceInvitationRejectEndpoint(inviteCode: string): string;
69
+ export declare function getProjectInsightsActivityStatsEndpoint(projectId: string): string;
70
+ export declare function getProjectInsightsHealthEndpoint(projectId: string): string;
71
+ export declare function getProjectInsightsHealthContextEndpoint(projectId: string): string;
72
+ export declare function getProjectInsightsProgressEndpoint(projectId: string): string;
73
+ export declare function getProjectInsightsHealthAnalyzeEndpoint(projectId: string): string;
74
+ export declare function getWorkspaceInsightsEndpoint(workspaceId: string): string;
75
+ export declare const ENDPOINT_WORKSPACE_MEMBERS = "workspaces/members";
76
+ export declare function getWorkspaceUserTasksEndpoint(workspaceId: string, userId: string): string;
77
+ export declare function getWorkspaceInviteUsersEndpoint(workspaceId: string): string;
78
+ export declare function getWorkspaceUserEndpoint(workspaceId: string, userId: string): string;
57
79
  export declare function getWorkspaceActiveProjectsEndpoint(workspaceId: number): string;
58
80
  export declare function getWorkspaceArchivedProjectsEndpoint(workspaceId: number): string;
@@ -1,5 +1,5 @@
1
- import { Attachment, PersonalProject, WorkspaceProject, Label, Section, Comment, Task, CurrentUser, ProductivityStats, WorkspaceInvitation, WorkspacePlanDetails, JoinWorkspaceResult, Workspace } from './types/entities.js';
2
- import { AddCommentArgs, AddLabelArgs, AddLocationReminderArgs, AddProjectArgs, AddReminderArgs, AddSectionArgs, AddTaskArgs, GetProjectCommentsArgs, GetTaskCommentsArgs, GetTasksArgs, GetTasksByFilterArgs, UpdateCommentArgs, UpdateLabelArgs, UpdateLocationReminderArgs, UpdateProjectArgs, UpdateReminderArgs, UpdateSectionArgs, UpdateTaskArgs, QuickAddTaskArgs, GetSharedLabelsArgs, RenameSharedLabelArgs, RemoveSharedLabelArgs, GetProjectsArgs, SearchProjectsArgs, GetProjectCollaboratorsArgs, GetLabelsArgs, SearchLabelsArgs, GetLabelsResponse, GetTasksResponse, GetProjectsResponse, GetProjectCollaboratorsResponse, GetSectionsArgs, SearchSectionsArgs, GetSectionsResponse, GetSharedLabelsResponse, GetCommentsResponse, type MoveTaskArgs, GetCompletedTasksByCompletionDateArgs, GetCompletedTasksByDueDateArgs, GetCompletedTasksResponse, GetArchivedProjectsArgs, GetArchivedProjectsResponse, SearchCompletedTasksArgs, GetActivityLogsArgs, GetActivityLogsResponse, UploadFileArgs, DeleteUploadArgs, GetWorkspaceInvitationsArgs, DeleteWorkspaceInvitationArgs, WorkspaceInvitationActionArgs, JoinWorkspaceArgs, WorkspaceLogoArgs, GetWorkspacePlanDetailsArgs, GetWorkspaceUsersArgs, GetWorkspaceUsersResponse, GetWorkspaceProjectsArgs, WorkspaceInvitationsResponse, AllWorkspaceInvitationsResponse, WorkspaceLogoResponse, MoveProjectToWorkspaceArgs, MoveProjectToPersonalArgs, GetArchivedProjectsCountArgs, GetArchivedProjectsCountResponse, GetProjectPermissionsResponse, GetFullProjectArgs, GetFullProjectResponse, AddWorkspaceArgs, UpdateWorkspaceArgs } from './types/requests.js';
1
+ import { Attachment, PersonalProject, WorkspaceProject, Label, Section, Comment, Task, CurrentUser, ProductivityStats, WorkspaceInvitation, WorkspacePlanDetails, JoinWorkspaceResult, Workspace, Backup, IdMapping, MovedId, ProjectActivityStats, ProjectHealth, ProjectHealthContext, ProjectProgress, WorkspaceInsights } from './types/entities.js';
2
+ import { AddCommentArgs, AddLabelArgs, AddLocationReminderArgs, AddProjectArgs, AddReminderArgs, AddSectionArgs, AddTaskArgs, GetProjectCommentsArgs, GetTaskCommentsArgs, GetTasksArgs, GetTasksByFilterArgs, UpdateCommentArgs, UpdateLabelArgs, UpdateLocationReminderArgs, UpdateProjectArgs, UpdateReminderArgs, UpdateSectionArgs, UpdateTaskArgs, QuickAddTaskArgs, GetSharedLabelsArgs, RenameSharedLabelArgs, RemoveSharedLabelArgs, GetProjectsArgs, SearchProjectsArgs, GetProjectCollaboratorsArgs, GetLabelsArgs, SearchLabelsArgs, GetLabelsResponse, GetTasksResponse, GetProjectsResponse, GetProjectCollaboratorsResponse, GetSectionsArgs, SearchSectionsArgs, GetSectionsResponse, GetSharedLabelsResponse, GetCommentsResponse, type MoveTaskArgs, GetCompletedTasksByCompletionDateArgs, GetCompletedTasksByDueDateArgs, GetCompletedTasksResponse, GetArchivedProjectsArgs, GetArchivedProjectsResponse, SearchCompletedTasksArgs, GetActivityLogsArgs, GetActivityLogsResponse, UploadFileArgs, DeleteUploadArgs, GetWorkspaceInvitationsArgs, DeleteWorkspaceInvitationArgs, WorkspaceInvitationActionArgs, JoinWorkspaceArgs, WorkspaceLogoArgs, GetWorkspacePlanDetailsArgs, GetWorkspaceUsersArgs, GetWorkspaceUsersResponse, GetWorkspaceProjectsArgs, WorkspaceInvitationsResponse, AllWorkspaceInvitationsResponse, WorkspaceLogoResponse, MoveProjectToWorkspaceArgs, MoveProjectToPersonalArgs, GetArchivedProjectsCountArgs, GetArchivedProjectsCountResponse, GetProjectPermissionsResponse, GetFullProjectArgs, GetFullProjectResponse, AddWorkspaceArgs, UpdateWorkspaceArgs, GetWorkspaceMembersActivityArgs, GetWorkspaceMembersActivityResponse, GetWorkspaceUserTasksArgs, GetWorkspaceUserTasksResponse, InviteWorkspaceUsersArgs, InviteWorkspaceUsersResponse, UpdateWorkspaceUserArgs, RemoveWorkspaceUserArgs, GetProjectActivityStatsArgs, GetWorkspaceInsightsArgs, GetRemindersArgs, GetRemindersResponse, GetLocationRemindersArgs, GetLocationRemindersResponse, GetAllCompletedTasksArgs, GetAllCompletedTasksResponse, ExportTemplateFileArgs, ExportTemplateUrlArgs, ExportTemplateUrlResponse, CreateProjectFromTemplateArgs, CreateProjectFromTemplateResponse, ImportTemplateIntoProjectArgs, ImportTemplateFromIdArgs, ImportTemplateResponse, GetBackupsArgs, DownloadBackupArgs, GetOrCreateEmailArgs, GetOrCreateEmailResponse, DisableEmailArgs, GetIdMappingsArgs, GetMovedIdsArgs } from './types/requests.js';
3
3
  import { CustomFetch, CustomFetchResponse } from './types/http.js';
4
4
  import type { Reminder } from './types/index.js';
5
5
  import { type SyncResponse, type SyncRequest } from './types/sync/index.js';
@@ -7,7 +7,7 @@ import { type SyncResponse, type SyncRequest } from './types/sync/index.js';
7
7
  * Response from viewAttachment, extending CustomFetchResponse with
8
8
  * arrayBuffer() support for binary file content.
9
9
  */
10
- export type ViewAttachmentResponse = CustomFetchResponse & {
10
+ export type FileResponse = CustomFetchResponse & {
11
11
  arrayBuffer(): Promise<ArrayBuffer>;
12
12
  };
13
13
  /**
@@ -119,6 +119,15 @@ export declare class TodoistApi {
119
119
  * @returns A promise that resolves to a paginated response of completed tasks.
120
120
  */
121
121
  searchCompletedTasks(args: SearchCompletedTasksArgs): Promise<GetCompletedTasksResponse>;
122
+ /**
123
+ * Retrieves all completed tasks with optional filters.
124
+ *
125
+ * Uses offset-based pagination rather than cursor-based.
126
+ *
127
+ * @param args - Optional parameters including project ID, label, date range, and pagination.
128
+ * @returns A promise that resolves to completed tasks with associated project and section data.
129
+ */
130
+ getAllCompletedTasks(args?: GetAllCompletedTasksArgs): Promise<GetAllCompletedTasksResponse>;
122
131
  /**
123
132
  * Creates a new task with the provided parameters.
124
133
  *
@@ -308,6 +317,51 @@ export declare class TodoistApi {
308
317
  * @returns A promise that resolves to an array of collaborators for the project.
309
318
  */
310
319
  getProjectCollaborators(projectId: string, args?: GetProjectCollaboratorsArgs): Promise<GetProjectCollaboratorsResponse>;
320
+ /**
321
+ * Retrieves activity statistics for a project.
322
+ *
323
+ * @param projectId - The unique identifier of the project.
324
+ * @param args - Optional parameters including weeks and weekly counts flag.
325
+ * @returns A promise that resolves to the project activity stats.
326
+ */
327
+ getProjectActivityStats(projectId: string, args?: GetProjectActivityStatsArgs): Promise<ProjectActivityStats>;
328
+ /**
329
+ * Retrieves the health status of a project.
330
+ *
331
+ * @param projectId - The unique identifier of the project.
332
+ * @returns A promise that resolves to the project health data.
333
+ */
334
+ getProjectHealth(projectId: string): Promise<ProjectHealth>;
335
+ /**
336
+ * Retrieves the health context for a project, including metrics and task details.
337
+ *
338
+ * @param projectId - The unique identifier of the project.
339
+ * @returns A promise that resolves to the project health context.
340
+ */
341
+ getProjectHealthContext(projectId: string): Promise<ProjectHealthContext>;
342
+ /**
343
+ * Retrieves progress information for a project.
344
+ *
345
+ * @param projectId - The unique identifier of the project.
346
+ * @returns A promise that resolves to the project progress data.
347
+ */
348
+ getProjectProgress(projectId: string): Promise<ProjectProgress>;
349
+ /**
350
+ * Retrieves insights for all projects in a workspace.
351
+ *
352
+ * @param workspaceId - The unique identifier of the workspace.
353
+ * @param args - Optional parameters including project IDs filter.
354
+ * @returns A promise that resolves to workspace insights data.
355
+ */
356
+ getWorkspaceInsights(workspaceId: string, args?: GetWorkspaceInsightsArgs): Promise<WorkspaceInsights>;
357
+ /**
358
+ * Triggers a health analysis for a project.
359
+ *
360
+ * @param projectId - The unique identifier of the project.
361
+ * @param requestId - Optional custom identifier for the request.
362
+ * @returns A promise that resolves to the updated project health data.
363
+ */
364
+ analyzeProjectHealth(projectId: string, requestId?: string): Promise<ProjectHealth>;
311
365
  /**
312
366
  * Retrieves all sections within a specific project or matching criteria.
313
367
  *
@@ -477,6 +531,20 @@ export declare class TodoistApi {
477
531
  * @returns A promise that resolves to `true` if successful.
478
532
  */
479
533
  deleteComment(id: string, requestId?: string): Promise<boolean>;
534
+ /**
535
+ * Retrieves a paginated list of time-based reminders.
536
+ *
537
+ * @param args - Optional parameters including task ID filter and pagination.
538
+ * @returns A promise that resolves to a paginated list of reminders.
539
+ */
540
+ getReminders(args?: GetRemindersArgs): Promise<GetRemindersResponse>;
541
+ /**
542
+ * Retrieves a paginated list of location-based reminders.
543
+ *
544
+ * @param args - Optional parameters including task ID filter and pagination.
545
+ * @returns A promise that resolves to a paginated list of location reminders.
546
+ */
547
+ getLocationReminders(args?: GetLocationRemindersArgs): Promise<GetLocationRemindersResponse>;
480
548
  /**
481
549
  * Retrieves a time-based reminder by its ID.
482
550
  *
@@ -631,7 +699,90 @@ export declare class TodoistApi {
631
699
  * const text = await response.text()
632
700
  * ```
633
701
  */
634
- viewAttachment(commentOrUrl: Comment | string): Promise<ViewAttachmentResponse>;
702
+ viewAttachment(commentOrUrl: Comment | string): Promise<FileResponse>;
703
+ /**
704
+ * Retrieves a list of available backups.
705
+ *
706
+ * @param args - Optional parameters including MFA token.
707
+ * @returns A promise that resolves to an array of backups.
708
+ */
709
+ getBackups(args?: GetBackupsArgs): Promise<Backup[]>;
710
+ /**
711
+ * Downloads a backup file as binary data.
712
+ *
713
+ * @param args - Arguments including the backup file URL (from getBackups).
714
+ * @returns A promise that resolves to a response with binary data accessible via arrayBuffer().
715
+ */
716
+ downloadBackup(args: DownloadBackupArgs): Promise<FileResponse>;
717
+ /**
718
+ * Gets or creates an email forwarding address for an object.
719
+ *
720
+ * @param args - Arguments including object type and ID.
721
+ * @param requestId - Optional custom identifier for the request.
722
+ * @returns A promise that resolves to the email address.
723
+ */
724
+ getOrCreateEmailForwarding(args: GetOrCreateEmailArgs, requestId?: string): Promise<GetOrCreateEmailResponse>;
725
+ /**
726
+ * Disables email forwarding for an object.
727
+ *
728
+ * @param args - Arguments including object type and ID.
729
+ * @param requestId - Optional custom identifier for the request.
730
+ * @returns A promise that resolves to `true` if successful.
731
+ */
732
+ disableEmailForwarding(args: DisableEmailArgs, requestId?: string): Promise<boolean>;
733
+ /**
734
+ * Retrieves ID mappings between old and new IDs.
735
+ *
736
+ * @param args - Arguments including object type and IDs to look up.
737
+ * @returns A promise that resolves to an array of ID mappings.
738
+ */
739
+ getIdMappings(args: GetIdMappingsArgs): Promise<IdMapping[]>;
740
+ /**
741
+ * Retrieves moved IDs for objects that have been migrated.
742
+ *
743
+ * @param args - Arguments including object type and optional old IDs to look up.
744
+ * @returns A promise that resolves to an array of moved ID pairs.
745
+ */
746
+ getMovedIds(args: GetMovedIdsArgs): Promise<MovedId[]>;
747
+ /**
748
+ * Exports a project as a template file (CSV format).
749
+ *
750
+ * @param args - Arguments including project ID and optional date format preference.
751
+ * @returns A promise that resolves to the template file content as a string.
752
+ */
753
+ exportTemplateAsFile(args: ExportTemplateFileArgs): Promise<string>;
754
+ /**
755
+ * Exports a project as a template URL.
756
+ *
757
+ * @param args - Arguments including project ID and optional date format preference.
758
+ * @returns A promise that resolves to the file name and URL.
759
+ */
760
+ exportTemplateAsUrl(args: ExportTemplateUrlArgs): Promise<ExportTemplateUrlResponse>;
761
+ /**
762
+ * Creates a new project from a template file.
763
+ *
764
+ * @param args - Arguments including project name, template file, and optional workspace ID.
765
+ * @param requestId - Optional custom identifier for the request.
766
+ * @returns A promise that resolves to the created project data.
767
+ */
768
+ createProjectFromTemplate(args: CreateProjectFromTemplateArgs, requestId?: string): Promise<CreateProjectFromTemplateResponse>;
769
+ /**
770
+ * Imports a template file into an existing project.
771
+ *
772
+ * @param args - Arguments including project ID and template file.
773
+ * @param requestId - Optional custom identifier for the request.
774
+ * @returns A promise that resolves to the import result.
775
+ */
776
+ importTemplateIntoProject(args: ImportTemplateIntoProjectArgs, requestId?: string): Promise<ImportTemplateResponse>;
777
+ /**
778
+ * Imports a template by ID into an existing project.
779
+ *
780
+ * @param args - Arguments including project ID, template ID, and optional locale.
781
+ * @param requestId - Optional custom identifier for the request.
782
+ * @returns A promise that resolves to the import result.
783
+ */
784
+ importTemplateFromId(args: ImportTemplateFromIdArgs, requestId?: string): Promise<ImportTemplateResponse>;
785
+ private validateTemplateResponse;
635
786
  /**
636
787
  * Gets pending invitations for a workspace.
637
788
  *
@@ -753,6 +904,46 @@ export declare class TodoistApi {
753
904
  * @returns A promise that resolves to `true` if successful.
754
905
  */
755
906
  deleteWorkspace(id: string, requestId?: string): Promise<boolean>;
907
+ /**
908
+ * Retrieves activity information for workspace members.
909
+ *
910
+ * @param args - Arguments including workspace ID and optional user/project filters.
911
+ * @param requestId - Optional custom identifier for the request.
912
+ * @returns A promise that resolves to workspace members activity data.
913
+ */
914
+ getWorkspaceMembersActivity(args: GetWorkspaceMembersActivityArgs, requestId?: string): Promise<GetWorkspaceMembersActivityResponse>;
915
+ /**
916
+ * Retrieves tasks assigned to a specific user in a workspace.
917
+ *
918
+ * @param args - Arguments including workspace ID, user ID, and optional project filter.
919
+ * @param requestId - Optional custom identifier for the request.
920
+ * @returns A promise that resolves to workspace user tasks.
921
+ */
922
+ getWorkspaceUserTasks(args: GetWorkspaceUserTasksArgs, requestId?: string): Promise<GetWorkspaceUserTasksResponse>;
923
+ /**
924
+ * Invites users to a workspace by email.
925
+ *
926
+ * @param args - Arguments including workspace ID, email list, and optional role.
927
+ * @param requestId - Optional custom identifier for the request.
928
+ * @returns A promise that resolves to the list of invited emails.
929
+ */
930
+ inviteWorkspaceUsers(args: InviteWorkspaceUsersArgs, requestId?: string): Promise<InviteWorkspaceUsersResponse>;
931
+ /**
932
+ * Updates a workspace user's role.
933
+ *
934
+ * @param args - Arguments including workspace ID, user ID, and new role.
935
+ * @param requestId - Optional custom identifier for the request.
936
+ * @returns A promise that resolves to the updated workspace user view.
937
+ */
938
+ updateWorkspaceUser(args: UpdateWorkspaceUserArgs, requestId?: string): Promise<JoinWorkspaceResult>;
939
+ /**
940
+ * Removes a user from a workspace.
941
+ *
942
+ * @param args - Arguments including workspace ID and user ID.
943
+ * @param requestId - Optional custom identifier for the request.
944
+ * @returns A promise that resolves to `true` if successful.
945
+ */
946
+ removeWorkspaceUser(args: RemoveWorkspaceUserArgs, requestId?: string): Promise<boolean>;
756
947
  /**
757
948
  * Gets active projects in a workspace with pagination.
758
949
  *