@doist/todoist-api-typescript 7.5.0 → 7.6.1

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.
Files changed (171) hide show
  1. package/dist/cjs/authentication.js +46 -2
  2. package/dist/cjs/consts/endpoints.js +54 -2
  3. package/dist/cjs/todoist-api.js +524 -6
  4. package/dist/cjs/types/activity/index.js +18 -0
  5. package/dist/cjs/types/activity/requests.js +2 -0
  6. package/dist/cjs/types/activity/types.js +28 -0
  7. package/dist/cjs/types/backups/index.js +18 -0
  8. package/dist/cjs/types/backups/requests.js +2 -0
  9. package/dist/cjs/types/backups/types.js +8 -0
  10. package/dist/cjs/types/comments/index.js +18 -0
  11. package/dist/cjs/types/comments/requests.js +2 -0
  12. package/dist/cjs/types/comments/types.js +60 -0
  13. package/dist/cjs/types/common.js +2 -0
  14. package/dist/cjs/types/emails/index.js +17 -0
  15. package/dist/cjs/types/emails/requests.js +5 -0
  16. package/dist/cjs/types/id-mappings/index.js +18 -0
  17. package/dist/cjs/types/id-mappings/requests.js +20 -0
  18. package/dist/cjs/types/id-mappings/types.js +12 -0
  19. package/dist/cjs/types/index.js +16 -2
  20. package/dist/cjs/types/insights/index.js +18 -0
  21. package/dist/cjs/types/insights/requests.js +2 -0
  22. package/dist/cjs/types/insights/types.js +84 -0
  23. package/dist/cjs/types/labels/index.js +18 -0
  24. package/dist/cjs/types/labels/requests.js +2 -0
  25. package/dist/cjs/types/labels/types.js +11 -0
  26. package/dist/cjs/types/productivity/index.js +17 -0
  27. package/dist/cjs/types/productivity/types.js +67 -0
  28. package/dist/cjs/types/projects/index.js +18 -0
  29. package/dist/cjs/types/projects/requests.js +2 -0
  30. package/dist/cjs/types/projects/types.js +56 -0
  31. package/dist/cjs/types/reminders/index.js +17 -0
  32. package/dist/cjs/types/sections/index.js +18 -0
  33. package/dist/cjs/types/sections/requests.js +2 -0
  34. package/dist/cjs/types/sections/types.js +22 -0
  35. package/dist/cjs/types/sync/commands/shared.js +2 -2
  36. package/dist/cjs/types/sync/resources/collaborators.js +2 -2
  37. package/dist/cjs/types/sync/resources/notes.js +2 -2
  38. package/dist/cjs/types/sync/resources/reminders.js +3 -3
  39. package/dist/cjs/types/sync/resources/user.js +2 -2
  40. package/dist/cjs/types/sync/resources/workspaces.js +5 -5
  41. package/dist/cjs/types/tasks/index.js +18 -0
  42. package/dist/cjs/types/tasks/requests.js +2 -0
  43. package/dist/cjs/types/tasks/types.js +59 -0
  44. package/dist/cjs/types/templates/index.js +17 -0
  45. package/dist/cjs/types/templates/requests.js +2 -0
  46. package/dist/cjs/types/uploads/index.js +17 -0
  47. package/dist/cjs/types/uploads/requests.js +2 -0
  48. package/dist/cjs/types/users/index.js +17 -0
  49. package/dist/cjs/types/users/types.js +51 -0
  50. package/dist/cjs/types/workspaces/index.js +18 -0
  51. package/dist/cjs/types/workspaces/requests.js +2 -0
  52. package/dist/cjs/types/workspaces/types.js +137 -0
  53. package/dist/cjs/utils/validators.js +47 -19
  54. package/dist/esm/authentication.js +46 -3
  55. package/dist/esm/consts/endpoints.js +43 -0
  56. package/dist/esm/todoist-api.js +522 -4
  57. package/dist/esm/types/activity/index.js +2 -0
  58. package/dist/esm/types/activity/requests.js +1 -0
  59. package/dist/esm/types/activity/types.js +25 -0
  60. package/dist/esm/types/backups/index.js +2 -0
  61. package/dist/esm/types/backups/requests.js +1 -0
  62. package/dist/esm/types/backups/types.js +5 -0
  63. package/dist/esm/types/comments/index.js +2 -0
  64. package/dist/esm/types/comments/requests.js +1 -0
  65. package/dist/esm/types/comments/types.js +57 -0
  66. package/dist/esm/types/common.js +1 -0
  67. package/dist/esm/types/emails/index.js +1 -0
  68. package/dist/esm/types/emails/requests.js +2 -0
  69. package/dist/esm/types/id-mappings/index.js +2 -0
  70. package/dist/esm/types/id-mappings/requests.js +17 -0
  71. package/dist/esm/types/id-mappings/types.js +9 -0
  72. package/dist/esm/types/index.js +16 -2
  73. package/dist/esm/types/insights/index.js +2 -0
  74. package/dist/esm/types/insights/requests.js +1 -0
  75. package/dist/esm/types/insights/types.js +81 -0
  76. package/dist/esm/types/labels/index.js +2 -0
  77. package/dist/esm/types/labels/requests.js +1 -0
  78. package/dist/esm/types/labels/types.js +8 -0
  79. package/dist/esm/types/productivity/index.js +1 -0
  80. package/dist/esm/types/productivity/types.js +64 -0
  81. package/dist/esm/types/projects/index.js +2 -0
  82. package/dist/esm/types/projects/requests.js +1 -0
  83. package/dist/esm/types/projects/types.js +53 -0
  84. package/dist/esm/types/reminders/index.js +1 -0
  85. package/dist/esm/types/sections/index.js +2 -0
  86. package/dist/esm/types/sections/requests.js +1 -0
  87. package/dist/esm/types/sections/types.js +19 -0
  88. package/dist/esm/types/sync/commands/shared.js +1 -1
  89. package/dist/esm/types/sync/resources/collaborators.js +1 -1
  90. package/dist/esm/types/sync/resources/notes.js +1 -1
  91. package/dist/esm/types/sync/resources/reminders.js +1 -1
  92. package/dist/esm/types/sync/resources/user.js +1 -1
  93. package/dist/esm/types/sync/resources/workspaces.js +1 -1
  94. package/dist/esm/types/tasks/index.js +2 -0
  95. package/dist/esm/types/tasks/requests.js +1 -0
  96. package/dist/esm/types/tasks/types.js +56 -0
  97. package/dist/esm/types/templates/index.js +1 -0
  98. package/dist/esm/types/templates/requests.js +1 -0
  99. package/dist/esm/types/uploads/index.js +1 -0
  100. package/dist/esm/types/uploads/requests.js +1 -0
  101. package/dist/esm/types/users/index.js +1 -0
  102. package/dist/esm/types/users/types.js +48 -0
  103. package/dist/esm/types/workspaces/index.js +2 -0
  104. package/dist/esm/types/workspaces/requests.js +1 -0
  105. package/dist/esm/types/workspaces/types.js +134 -0
  106. package/dist/esm/utils/validators.js +30 -2
  107. package/dist/types/authentication.d.ts +51 -6
  108. package/dist/types/consts/endpoints.d.ts +22 -0
  109. package/dist/types/test-utils/test-defaults.d.ts +5 -5
  110. package/dist/types/todoist-api.d.ts +209 -4
  111. package/dist/types/types/activity/index.d.ts +2 -0
  112. package/dist/types/types/activity/requests.d.ts +85 -0
  113. package/dist/types/types/activity/types.d.ts +49 -0
  114. package/dist/types/types/backups/index.d.ts +2 -0
  115. package/dist/types/types/backups/requests.d.ts +16 -0
  116. package/dist/types/types/backups/types.d.ts +7 -0
  117. package/dist/types/types/comments/index.d.ts +2 -0
  118. package/dist/types/types/comments/requests.d.ts +63 -0
  119. package/dist/types/types/comments/types.d.ts +141 -0
  120. package/dist/types/types/common.d.ts +6 -0
  121. package/dist/types/types/emails/index.d.ts +1 -0
  122. package/dist/types/types/emails/requests.d.ts +30 -0
  123. package/dist/types/types/id-mappings/index.d.ts +2 -0
  124. package/dist/types/types/id-mappings/requests.d.ts +28 -0
  125. package/dist/types/types/id-mappings/types.d.ts +13 -0
  126. package/dist/types/types/index.d.ts +16 -2
  127. package/dist/types/types/insights/index.d.ts +2 -0
  128. package/dist/types/types/insights/requests.d.ts +26 -0
  129. package/dist/types/types/insights/types.d.ts +186 -0
  130. package/dist/types/types/labels/index.d.ts +2 -0
  131. package/dist/types/types/labels/requests.d.ts +75 -0
  132. package/dist/types/types/labels/types.d.ts +13 -0
  133. package/dist/types/types/productivity/index.d.ts +1 -0
  134. package/dist/types/types/productivity/types.d.ts +115 -0
  135. package/dist/types/types/projects/index.d.ts +2 -0
  136. package/dist/types/types/projects/requests.d.ts +169 -0
  137. package/dist/types/types/projects/types.d.ts +201 -0
  138. package/dist/types/types/reminders/index.d.ts +1 -0
  139. package/dist/types/types/reminders/requests.d.ts +91 -0
  140. package/dist/types/types/sections/index.d.ts +2 -0
  141. package/dist/types/types/sections/requests.d.ts +41 -0
  142. package/dist/types/types/sections/types.d.ts +44 -0
  143. package/dist/types/types/sync/commands/projects.d.ts +2 -1
  144. package/dist/types/types/sync/commands/shared.d.ts +2 -2
  145. package/dist/types/types/sync/commands/workspaces.d.ts +1 -1
  146. package/dist/types/types/sync/resources/notes.d.ts +1 -1
  147. package/dist/types/types/sync/resources/user.d.ts +2 -2
  148. package/dist/types/types/sync/resources/view-options.d.ts +5 -5
  149. package/dist/types/types/sync/response.d.ts +5 -1
  150. package/dist/types/types/sync/user-preferences.d.ts +1 -1
  151. package/dist/types/types/tasks/index.d.ts +2 -0
  152. package/dist/types/types/tasks/requests.d.ts +197 -0
  153. package/dist/types/types/tasks/types.d.ts +162 -0
  154. package/dist/types/types/templates/index.d.ts +1 -0
  155. package/dist/types/types/templates/requests.d.ts +92 -0
  156. package/dist/types/types/uploads/index.d.ts +1 -0
  157. package/dist/types/types/uploads/requests.d.ts +32 -0
  158. package/dist/types/types/users/index.d.ts +1 -0
  159. package/dist/types/types/users/types.d.ts +66 -0
  160. package/dist/types/types/workspaces/index.d.ts +2 -0
  161. package/dist/types/types/workspaces/requests.d.ts +260 -0
  162. package/dist/types/types/workspaces/types.d.ts +225 -0
  163. package/dist/types/utils/colors.d.ts +1 -1
  164. package/dist/types/utils/validators.d.ts +205 -12
  165. package/package.json +1 -1
  166. package/dist/cjs/types/entities.js +0 -437
  167. package/dist/esm/types/entities.js +0 -434
  168. package/dist/types/types/entities.d.ts +0 -971
  169. package/dist/types/types/requests.d.ts +0 -856
  170. /package/dist/cjs/types/{requests.js → reminders/requests.js} +0 -0
  171. /package/dist/esm/types/{requests.js → reminders/requests.js} +0 -0
@@ -0,0 +1,134 @@
1
+ import { z } from 'zod';
2
+ import { DueDateSchema, DeadlineSchema } from '../tasks/types.js';
3
+ /** Available project collaborator roles. */
4
+ export const COLLABORATOR_ROLES = [
5
+ 'CREATOR',
6
+ 'ADMIN',
7
+ 'READ_WRITE',
8
+ 'EDIT_ONLY',
9
+ 'COMPLETE_ONLY',
10
+ ];
11
+ /**
12
+ * Available workspace roles.
13
+ */
14
+ export const WORKSPACE_ROLES = ['ADMIN', 'MEMBER', 'GUEST'];
15
+ export const WorkspaceRoleSchema = z.enum(WORKSPACE_ROLES);
16
+ export const WorkspaceUserSchema = z.object({
17
+ userId: z.string(),
18
+ workspaceId: z.string(),
19
+ userEmail: z.string(),
20
+ fullName: z.string(),
21
+ timezone: z.string(),
22
+ role: WorkspaceRoleSchema,
23
+ imageId: z.string().nullable(),
24
+ isDeleted: z.boolean().default(false),
25
+ });
26
+ export const WorkspaceInvitationSchema = z.object({
27
+ id: z.string().default('0'),
28
+ inviterId: z.string(),
29
+ userEmail: z.string(),
30
+ workspaceId: z.string(),
31
+ role: WorkspaceRoleSchema,
32
+ isExistingUser: z.boolean(),
33
+ });
34
+ export const PlanPriceSchema = z.object({
35
+ currency: z.string(),
36
+ amount: z.union([z.number(), z.string()]),
37
+ interval: z.string().optional(),
38
+ });
39
+ export const FormattedPriceListingSchema = z.object({
40
+ currency: z.string().optional(),
41
+ amount: z.number().optional(),
42
+ interval: z.string().optional(),
43
+ formatted: z.string().optional(),
44
+ });
45
+ /** Available workspace plan names. */
46
+ export const WORKSPACE_CURRENT_PLANS = ['Business', 'Starter'];
47
+ /** Available workspace plan statuses. */
48
+ export const WORKSPACE_PLAN_STATUSES = [
49
+ 'Active',
50
+ 'Downgraded',
51
+ 'Cancelled',
52
+ 'NeverSubscribed',
53
+ ];
54
+ export const WorkspacePlanDetailsSchema = z.object({
55
+ currentMemberCount: z.number(),
56
+ currentPlan: z.enum(WORKSPACE_CURRENT_PLANS),
57
+ currentPlanStatus: z.enum(WORKSPACE_PLAN_STATUSES),
58
+ downgradeAt: z.string().nullable(),
59
+ currentActiveProjects: z.number(),
60
+ maximumActiveProjects: z.number(),
61
+ priceList: z.array(FormattedPriceListingSchema),
62
+ workspaceId: z.number(),
63
+ isTrialing: z.boolean(),
64
+ trialEndsAt: z.string().nullable(),
65
+ cancelAtPeriodEnd: z.boolean(),
66
+ hasTrialed: z.boolean(),
67
+ planPrice: PlanPriceSchema.nullable(),
68
+ hasBillingPortal: z.boolean(),
69
+ hasBillingPortalSwitchToAnnual: z.boolean(),
70
+ });
71
+ export const JoinWorkspaceResultSchema = z.object({
72
+ customSortingApplied: z.boolean(),
73
+ projectSortPreference: z.string(),
74
+ role: WorkspaceRoleSchema,
75
+ userId: z.string(),
76
+ workspaceId: z.string(),
77
+ });
78
+ /**
79
+ * Available workspace plans.
80
+ */
81
+ export const WORKSPACE_PLANS = ['STARTER', 'BUSINESS'];
82
+ export const WorkspacePlanSchema = z.enum(WORKSPACE_PLANS);
83
+ /**
84
+ * Workspace resource limits.
85
+ */
86
+ export const WorkspaceLimitsSchema = z
87
+ .object({
88
+ current: z.record(z.string(), z.any()).nullable(),
89
+ next: z.record(z.string(), z.any()).nullable(),
90
+ })
91
+ .catchall(z.any());
92
+ /**
93
+ * Workspace properties (flexible object for unknown fields).
94
+ */
95
+ export const WorkspacePropertiesSchema = z.record(z.string(), z.unknown());
96
+ /**
97
+ * Represents a workspace in Todoist.
98
+ */
99
+ export const WorkspaceSchema = z.object({
100
+ id: z.string(),
101
+ name: z.string(),
102
+ plan: WorkspacePlanSchema,
103
+ role: WorkspaceRoleSchema,
104
+ inviteCode: z.string(),
105
+ isLinkSharingEnabled: z.boolean(),
106
+ isGuestAllowed: z.boolean(),
107
+ limits: WorkspaceLimitsSchema,
108
+ logoBig: z.string().nullish(),
109
+ logoMedium: z.string().nullish(),
110
+ logoSmall: z.string().nullish(),
111
+ logoS640: z.string().nullish(),
112
+ createdAt: z.string(),
113
+ creatorId: z.string(),
114
+ properties: WorkspacePropertiesSchema,
115
+ });
116
+ export const MemberActivityInfoSchema = z.object({
117
+ userId: z.string(),
118
+ tasksAssigned: z.number().int(),
119
+ tasksOverdue: z.number().int(),
120
+ });
121
+ export const WorkspaceUserTaskSchema = z.object({
122
+ id: z.string(),
123
+ content: z.string(),
124
+ responsibleUid: z.string().nullable(),
125
+ due: DueDateSchema.nullable(),
126
+ deadline: DeadlineSchema.nullable(),
127
+ labels: z.array(z.string()),
128
+ notesCount: z.number().int(),
129
+ projectId: z.string(),
130
+ projectName: z.string(),
131
+ priority: z.number().int(),
132
+ description: z.string(),
133
+ isOverdue: z.boolean(),
134
+ });
@@ -1,5 +1,16 @@
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 { TaskSchema } from '../types/tasks/types.js';
2
+ import { PersonalProjectSchema, WorkspaceProjectSchema, } from '../types/projects/types.js';
3
+ import { SectionSchema } from '../types/sections/types.js';
4
+ import { LabelSchema } from '../types/labels/types.js';
5
+ import { AttachmentSchema, CommentSchema } from '../types/comments/types.js';
6
+ import { UserSchema, CurrentUserSchema } from '../types/users/types.js';
7
+ import { ProductivityStatsSchema } from '../types/productivity/types.js';
8
+ import { ActivityEventSchema } from '../types/activity/types.js';
9
+ import { WorkspaceUserSchema, WorkspaceInvitationSchema, WorkspacePlanDetailsSchema, JoinWorkspaceResultSchema, WorkspaceSchema, MemberActivityInfoSchema, WorkspaceUserTaskSchema, } from '../types/workspaces/types.js';
10
+ import { ProjectActivityStatsSchema, ProjectHealthSchema, ProjectHealthContextSchema, ProjectProgressSchema, WorkspaceInsightsSchema, } from '../types/insights/types.js';
11
+ import { BackupSchema } from '../types/backups/types.js';
12
+ import { IdMappingSchema, MovedIdSchema } from '../types/id-mappings/types.js';
13
+ 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
14
  function createValidator(schema) {
4
15
  return (input) => schema.parse(input);
5
16
  }
@@ -65,6 +76,21 @@ export const validateWorkspacePlanDetails = createValidator(WorkspacePlanDetails
65
76
  export const validateJoinWorkspaceResult = createValidator(JoinWorkspaceResultSchema);
66
77
  export const validateWorkspace = createValidator(WorkspaceSchema);
67
78
  export const validateWorkspaceArray = createArrayValidator(validateWorkspace);
79
+ export const validateMemberActivityInfo = createValidator(MemberActivityInfoSchema);
80
+ export const validateMemberActivityInfoArray = createArrayValidator(validateMemberActivityInfo);
81
+ export const validateWorkspaceUserTask = createValidator(WorkspaceUserTaskSchema);
82
+ export const validateWorkspaceUserTaskArray = createArrayValidator(validateWorkspaceUserTask);
83
+ export const validateProjectActivityStats = createValidator(ProjectActivityStatsSchema);
84
+ export const validateProjectHealth = createValidator(ProjectHealthSchema);
85
+ export const validateProjectHealthContext = createValidator(ProjectHealthContextSchema);
86
+ export const validateProjectProgress = createValidator(ProjectProgressSchema);
87
+ export const validateWorkspaceInsights = createValidator(WorkspaceInsightsSchema);
88
+ export const validateBackup = createValidator(BackupSchema);
89
+ export const validateBackupArray = createArrayValidator(validateBackup);
90
+ export const validateIdMapping = createValidator(IdMappingSchema);
91
+ export const validateIdMappingArray = createArrayValidator(validateIdMapping);
92
+ export const validateMovedId = createValidator(MovedIdSchema);
93
+ export const validateMovedIdArray = createArrayValidator(validateMovedId);
68
94
  // Sync resource validators
69
95
  export const validateFilter = createValidator(FilterSchema);
70
96
  export const validateFilterArray = createArrayValidator(validateFilter);
@@ -87,6 +113,8 @@ export const validateCalendarAccount = createValidator(CalendarAccountSchema);
87
113
  export const validateCalendarAccountArray = createArrayValidator(validateCalendarAccount);
88
114
  export const validateReminder = createValidator(ReminderSchema);
89
115
  export const validateReminderArray = createArrayValidator(validateReminder);
116
+ export const validateLocationReminder = createValidator(LocationReminderSchema);
117
+ export const validateLocationReminderArray = createArrayValidator(validateLocationReminder);
90
118
  export const validateCompletedInfo = createValidator(CompletedInfoSchema);
91
119
  export const validateCompletedInfoArray = createArrayValidator(validateCompletedInfo);
92
120
  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;
@@ -135,7 +135,7 @@ export declare const DEFAULT_COMMENT: {
135
135
  fileType?: string | null | undefined;
136
136
  fileUrl?: string | null | undefined;
137
137
  fileDuration?: number | null | undefined;
138
- uploadState?: "pending" | "completed" | null | undefined;
138
+ uploadState?: "completed" | "pending" | null | undefined;
139
139
  image?: string | null | undefined;
140
140
  imageWidth?: number | null | undefined;
141
141
  imageHeight?: number | null | undefined;
@@ -164,7 +164,7 @@ export declare const INVALID_COMMENT: {
164
164
  fileType?: string | null | undefined;
165
165
  fileUrl?: string | null | undefined;
166
166
  fileDuration?: number | null | undefined;
167
- uploadState?: "pending" | "completed" | null | undefined;
167
+ uploadState?: "completed" | "pending" | null | undefined;
168
168
  image?: string | null | undefined;
169
169
  imageWidth?: number | null | undefined;
170
170
  imageHeight?: number | null | undefined;
@@ -191,7 +191,7 @@ export declare const COMMENT_WITH_OPTIONALS_AS_NULL_TASK: {
191
191
  fileType?: string | null | undefined;
192
192
  fileUrl?: string | null | undefined;
193
193
  fileDuration?: number | null | undefined;
194
- uploadState?: "pending" | "completed" | null | undefined;
194
+ uploadState?: "completed" | "pending" | null | undefined;
195
195
  image?: string | null | undefined;
196
196
  imageWidth?: number | null | undefined;
197
197
  imageHeight?: number | null | undefined;
@@ -218,7 +218,7 @@ export declare const COMMENT_WITH_ATTACHMENT_WITH_OPTIONALS_AS_NULL: {
218
218
  fileType?: string | null | undefined;
219
219
  fileUrl?: string | null | undefined;
220
220
  fileDuration?: number | null | undefined;
221
- uploadState?: "pending" | "completed" | null | undefined;
221
+ uploadState?: "completed" | "pending" | null | undefined;
222
222
  image?: string | null | undefined;
223
223
  imageWidth?: number | null | undefined;
224
224
  imageHeight?: number | null | undefined;
@@ -244,7 +244,7 @@ export declare const COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT: {
244
244
  fileType?: string | null | undefined;
245
245
  fileUrl?: string | null | undefined;
246
246
  fileDuration?: number | null | undefined;
247
- uploadState?: "pending" | "completed" | null | undefined;
247
+ uploadState?: "completed" | "pending" | null | undefined;
248
248
  image?: string | null | undefined;
249
249
  imageWidth?: number | null | undefined;
250
250
  imageHeight?: number | null | undefined;
@@ -1,5 +1,19 @@
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 { Task, AddTaskArgs, GetTasksArgs, GetTasksByFilterArgs, UpdateTaskArgs, QuickAddTaskArgs, type MoveTaskArgs, GetCompletedTasksByCompletionDateArgs, GetCompletedTasksByDueDateArgs, GetCompletedTasksResponse, SearchCompletedTasksArgs, GetTasksResponse, GetAllCompletedTasksArgs, GetAllCompletedTasksResponse } from './types/tasks/index.js';
2
+ import { PersonalProject, WorkspaceProject, AddProjectArgs, UpdateProjectArgs, GetProjectsArgs, SearchProjectsArgs, GetProjectCollaboratorsArgs, GetProjectsResponse, GetProjectCollaboratorsResponse, GetArchivedProjectsArgs, GetArchivedProjectsResponse, MoveProjectToWorkspaceArgs, MoveProjectToPersonalArgs, GetArchivedProjectsCountArgs, GetArchivedProjectsCountResponse, GetProjectPermissionsResponse, GetFullProjectArgs, GetFullProjectResponse } from './types/projects/index.js';
3
+ import { Section, AddSectionArgs, UpdateSectionArgs, GetSectionsArgs, SearchSectionsArgs, GetSectionsResponse } from './types/sections/index.js';
4
+ import { Label, AddLabelArgs, UpdateLabelArgs, GetLabelsArgs, SearchLabelsArgs, GetLabelsResponse, GetSharedLabelsArgs, GetSharedLabelsResponse, RenameSharedLabelArgs, RemoveSharedLabelArgs } from './types/labels/index.js';
5
+ import { Attachment, Comment, AddCommentArgs, UpdateCommentArgs, GetProjectCommentsArgs, GetTaskCommentsArgs, GetCommentsResponse } from './types/comments/index.js';
6
+ import { AddReminderArgs, UpdateReminderArgs, AddLocationReminderArgs, UpdateLocationReminderArgs, GetRemindersArgs, GetRemindersResponse, GetLocationRemindersArgs, GetLocationRemindersResponse } from './types/reminders/index.js';
7
+ import { CurrentUser } from './types/users/index.js';
8
+ import { ProductivityStats } from './types/productivity/index.js';
9
+ import { GetActivityLogsArgs, GetActivityLogsResponse } from './types/activity/index.js';
10
+ import { WorkspaceInvitation, WorkspacePlanDetails, JoinWorkspaceResult, Workspace, AddWorkspaceArgs, UpdateWorkspaceArgs, GetWorkspaceMembersActivityArgs, GetWorkspaceMembersActivityResponse, GetWorkspaceUserTasksArgs, GetWorkspaceUserTasksResponse, InviteWorkspaceUsersArgs, InviteWorkspaceUsersResponse, UpdateWorkspaceUserArgs, RemoveWorkspaceUserArgs, GetWorkspaceInvitationsArgs, DeleteWorkspaceInvitationArgs, WorkspaceInvitationActionArgs, JoinWorkspaceArgs, WorkspaceLogoArgs, GetWorkspacePlanDetailsArgs, GetWorkspaceUsersArgs, GetWorkspaceUsersResponse, GetWorkspaceProjectsArgs, WorkspaceInvitationsResponse, AllWorkspaceInvitationsResponse, WorkspaceLogoResponse } from './types/workspaces/index.js';
11
+ import { ProjectActivityStats, ProjectHealth, ProjectHealthContext, ProjectProgress, WorkspaceInsights, GetProjectActivityStatsArgs, GetWorkspaceInsightsArgs } from './types/insights/index.js';
12
+ import { Backup, GetBackupsArgs, DownloadBackupArgs } from './types/backups/index.js';
13
+ import { IdMapping, MovedId, GetIdMappingsArgs, GetMovedIdsArgs } from './types/id-mappings/index.js';
14
+ import { GetOrCreateEmailArgs, GetOrCreateEmailResponse, DisableEmailArgs } from './types/emails/index.js';
15
+ import { UploadFileArgs, DeleteUploadArgs } from './types/uploads/index.js';
16
+ import { ExportTemplateFileArgs, ExportTemplateUrlArgs, ExportTemplateUrlResponse, CreateProjectFromTemplateArgs, CreateProjectFromTemplateResponse, ImportTemplateIntoProjectArgs, ImportTemplateFromIdArgs, ImportTemplateResponse } from './types/templates/index.js';
3
17
  import { CustomFetch, CustomFetchResponse } from './types/http.js';
4
18
  import type { Reminder } from './types/index.js';
5
19
  import { type SyncResponse, type SyncRequest } from './types/sync/index.js';
@@ -7,7 +21,7 @@ import { type SyncResponse, type SyncRequest } from './types/sync/index.js';
7
21
  * Response from viewAttachment, extending CustomFetchResponse with
8
22
  * arrayBuffer() support for binary file content.
9
23
  */
10
- export type ViewAttachmentResponse = CustomFetchResponse & {
24
+ export type FileResponse = CustomFetchResponse & {
11
25
  arrayBuffer(): Promise<ArrayBuffer>;
12
26
  };
13
27
  /**
@@ -119,6 +133,15 @@ export declare class TodoistApi {
119
133
  * @returns A promise that resolves to a paginated response of completed tasks.
120
134
  */
121
135
  searchCompletedTasks(args: SearchCompletedTasksArgs): Promise<GetCompletedTasksResponse>;
136
+ /**
137
+ * Retrieves all completed tasks with optional filters.
138
+ *
139
+ * Uses offset-based pagination rather than cursor-based.
140
+ *
141
+ * @param args - Optional parameters including project ID, label, date range, and pagination.
142
+ * @returns A promise that resolves to completed tasks with associated project and section data.
143
+ */
144
+ getAllCompletedTasks(args?: GetAllCompletedTasksArgs): Promise<GetAllCompletedTasksResponse>;
122
145
  /**
123
146
  * Creates a new task with the provided parameters.
124
147
  *
@@ -308,6 +331,51 @@ export declare class TodoistApi {
308
331
  * @returns A promise that resolves to an array of collaborators for the project.
309
332
  */
310
333
  getProjectCollaborators(projectId: string, args?: GetProjectCollaboratorsArgs): Promise<GetProjectCollaboratorsResponse>;
334
+ /**
335
+ * Retrieves activity statistics for a project.
336
+ *
337
+ * @param projectId - The unique identifier of the project.
338
+ * @param args - Optional parameters including weeks and weekly counts flag.
339
+ * @returns A promise that resolves to the project activity stats.
340
+ */
341
+ getProjectActivityStats(projectId: string, args?: GetProjectActivityStatsArgs): Promise<ProjectActivityStats>;
342
+ /**
343
+ * Retrieves the health status of a project.
344
+ *
345
+ * @param projectId - The unique identifier of the project.
346
+ * @returns A promise that resolves to the project health data.
347
+ */
348
+ getProjectHealth(projectId: string): Promise<ProjectHealth>;
349
+ /**
350
+ * Retrieves the health context for a project, including metrics and task details.
351
+ *
352
+ * @param projectId - The unique identifier of the project.
353
+ * @returns A promise that resolves to the project health context.
354
+ */
355
+ getProjectHealthContext(projectId: string): Promise<ProjectHealthContext>;
356
+ /**
357
+ * Retrieves progress information for a project.
358
+ *
359
+ * @param projectId - The unique identifier of the project.
360
+ * @returns A promise that resolves to the project progress data.
361
+ */
362
+ getProjectProgress(projectId: string): Promise<ProjectProgress>;
363
+ /**
364
+ * Retrieves insights for all projects in a workspace.
365
+ *
366
+ * @param workspaceId - The unique identifier of the workspace.
367
+ * @param args - Optional parameters including project IDs filter.
368
+ * @returns A promise that resolves to workspace insights data.
369
+ */
370
+ getWorkspaceInsights(workspaceId: string, args?: GetWorkspaceInsightsArgs): Promise<WorkspaceInsights>;
371
+ /**
372
+ * Triggers a health analysis for a project.
373
+ *
374
+ * @param projectId - The unique identifier of the project.
375
+ * @param requestId - Optional custom identifier for the request.
376
+ * @returns A promise that resolves to the updated project health data.
377
+ */
378
+ analyzeProjectHealth(projectId: string, requestId?: string): Promise<ProjectHealth>;
311
379
  /**
312
380
  * Retrieves all sections within a specific project or matching criteria.
313
381
  *
@@ -477,6 +545,20 @@ export declare class TodoistApi {
477
545
  * @returns A promise that resolves to `true` if successful.
478
546
  */
479
547
  deleteComment(id: string, requestId?: string): Promise<boolean>;
548
+ /**
549
+ * Retrieves a paginated list of time-based reminders.
550
+ *
551
+ * @param args - Optional parameters including task ID filter and pagination.
552
+ * @returns A promise that resolves to a paginated list of reminders.
553
+ */
554
+ getReminders(args?: GetRemindersArgs): Promise<GetRemindersResponse>;
555
+ /**
556
+ * Retrieves a paginated list of location-based reminders.
557
+ *
558
+ * @param args - Optional parameters including task ID filter and pagination.
559
+ * @returns A promise that resolves to a paginated list of location reminders.
560
+ */
561
+ getLocationReminders(args?: GetLocationRemindersArgs): Promise<GetLocationRemindersResponse>;
480
562
  /**
481
563
  * Retrieves a time-based reminder by its ID.
482
564
  *
@@ -631,7 +713,90 @@ export declare class TodoistApi {
631
713
  * const text = await response.text()
632
714
  * ```
633
715
  */
634
- viewAttachment(commentOrUrl: Comment | string): Promise<ViewAttachmentResponse>;
716
+ viewAttachment(commentOrUrl: Comment | string): Promise<FileResponse>;
717
+ /**
718
+ * Retrieves a list of available backups.
719
+ *
720
+ * @param args - Optional parameters including MFA token.
721
+ * @returns A promise that resolves to an array of backups.
722
+ */
723
+ getBackups(args?: GetBackupsArgs): Promise<Backup[]>;
724
+ /**
725
+ * Downloads a backup file as binary data.
726
+ *
727
+ * @param args - Arguments including the backup file URL (from getBackups).
728
+ * @returns A promise that resolves to a response with binary data accessible via arrayBuffer().
729
+ */
730
+ downloadBackup(args: DownloadBackupArgs): Promise<FileResponse>;
731
+ /**
732
+ * Gets or creates an email forwarding address for an object.
733
+ *
734
+ * @param args - Arguments including object type and ID.
735
+ * @param requestId - Optional custom identifier for the request.
736
+ * @returns A promise that resolves to the email address.
737
+ */
738
+ getOrCreateEmailForwarding(args: GetOrCreateEmailArgs, requestId?: string): Promise<GetOrCreateEmailResponse>;
739
+ /**
740
+ * Disables email forwarding for an object.
741
+ *
742
+ * @param args - Arguments including object type and ID.
743
+ * @param requestId - Optional custom identifier for the request.
744
+ * @returns A promise that resolves to `true` if successful.
745
+ */
746
+ disableEmailForwarding(args: DisableEmailArgs, requestId?: string): Promise<boolean>;
747
+ /**
748
+ * Retrieves ID mappings between old and new IDs.
749
+ *
750
+ * @param args - Arguments including object type and IDs to look up.
751
+ * @returns A promise that resolves to an array of ID mappings.
752
+ */
753
+ getIdMappings(args: GetIdMappingsArgs): Promise<IdMapping[]>;
754
+ /**
755
+ * Retrieves moved IDs for objects that have been migrated.
756
+ *
757
+ * @param args - Arguments including object type and optional old IDs to look up.
758
+ * @returns A promise that resolves to an array of moved ID pairs.
759
+ */
760
+ getMovedIds(args: GetMovedIdsArgs): Promise<MovedId[]>;
761
+ /**
762
+ * Exports a project as a template file (CSV format).
763
+ *
764
+ * @param args - Arguments including project ID and optional date format preference.
765
+ * @returns A promise that resolves to the template file content as a string.
766
+ */
767
+ exportTemplateAsFile(args: ExportTemplateFileArgs): Promise<string>;
768
+ /**
769
+ * Exports a project as a template URL.
770
+ *
771
+ * @param args - Arguments including project ID and optional date format preference.
772
+ * @returns A promise that resolves to the file name and URL.
773
+ */
774
+ exportTemplateAsUrl(args: ExportTemplateUrlArgs): Promise<ExportTemplateUrlResponse>;
775
+ /**
776
+ * Creates a new project from a template file.
777
+ *
778
+ * @param args - Arguments including project name, template file, and optional workspace ID.
779
+ * @param requestId - Optional custom identifier for the request.
780
+ * @returns A promise that resolves to the created project data.
781
+ */
782
+ createProjectFromTemplate(args: CreateProjectFromTemplateArgs, requestId?: string): Promise<CreateProjectFromTemplateResponse>;
783
+ /**
784
+ * Imports a template file into an existing project.
785
+ *
786
+ * @param args - Arguments including project ID and template file.
787
+ * @param requestId - Optional custom identifier for the request.
788
+ * @returns A promise that resolves to the import result.
789
+ */
790
+ importTemplateIntoProject(args: ImportTemplateIntoProjectArgs, requestId?: string): Promise<ImportTemplateResponse>;
791
+ /**
792
+ * Imports a template by ID into an existing project.
793
+ *
794
+ * @param args - Arguments including project ID, template ID, and optional locale.
795
+ * @param requestId - Optional custom identifier for the request.
796
+ * @returns A promise that resolves to the import result.
797
+ */
798
+ importTemplateFromId(args: ImportTemplateFromIdArgs, requestId?: string): Promise<ImportTemplateResponse>;
799
+ private validateTemplateResponse;
635
800
  /**
636
801
  * Gets pending invitations for a workspace.
637
802
  *
@@ -753,6 +918,46 @@ export declare class TodoistApi {
753
918
  * @returns A promise that resolves to `true` if successful.
754
919
  */
755
920
  deleteWorkspace(id: string, requestId?: string): Promise<boolean>;
921
+ /**
922
+ * Retrieves activity information for workspace members.
923
+ *
924
+ * @param args - Arguments including workspace ID and optional user/project filters.
925
+ * @param requestId - Optional custom identifier for the request.
926
+ * @returns A promise that resolves to workspace members activity data.
927
+ */
928
+ getWorkspaceMembersActivity(args: GetWorkspaceMembersActivityArgs, requestId?: string): Promise<GetWorkspaceMembersActivityResponse>;
929
+ /**
930
+ * Retrieves tasks assigned to a specific user in a workspace.
931
+ *
932
+ * @param args - Arguments including workspace ID, user ID, and optional project filter.
933
+ * @param requestId - Optional custom identifier for the request.
934
+ * @returns A promise that resolves to workspace user tasks.
935
+ */
936
+ getWorkspaceUserTasks(args: GetWorkspaceUserTasksArgs, requestId?: string): Promise<GetWorkspaceUserTasksResponse>;
937
+ /**
938
+ * Invites users to a workspace by email.
939
+ *
940
+ * @param args - Arguments including workspace ID, email list, and optional role.
941
+ * @param requestId - Optional custom identifier for the request.
942
+ * @returns A promise that resolves to the list of invited emails.
943
+ */
944
+ inviteWorkspaceUsers(args: InviteWorkspaceUsersArgs, requestId?: string): Promise<InviteWorkspaceUsersResponse>;
945
+ /**
946
+ * Updates a workspace user's role.
947
+ *
948
+ * @param args - Arguments including workspace ID, user ID, and new role.
949
+ * @param requestId - Optional custom identifier for the request.
950
+ * @returns A promise that resolves to the updated workspace user view.
951
+ */
952
+ updateWorkspaceUser(args: UpdateWorkspaceUserArgs, requestId?: string): Promise<JoinWorkspaceResult>;
953
+ /**
954
+ * Removes a user from a workspace.
955
+ *
956
+ * @param args - Arguments including workspace ID and user ID.
957
+ * @param requestId - Optional custom identifier for the request.
958
+ * @returns A promise that resolves to `true` if successful.
959
+ */
960
+ removeWorkspaceUser(args: RemoveWorkspaceUserArgs, requestId?: string): Promise<boolean>;
756
961
  /**
757
962
  * Gets active projects in a workspace with pagination.
758
963
  *
@@ -0,0 +1,2 @@
1
+ export * from './types.js';
2
+ export * from './requests.js';