@doist/todoist-api-typescript 7.6.0 → 7.7.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.
Files changed (162) hide show
  1. package/dist/cjs/todoist-api.js +8 -7
  2. package/dist/cjs/types/activity/index.js +18 -0
  3. package/dist/cjs/types/activity/requests.js +2 -0
  4. package/dist/cjs/types/activity/types.js +28 -0
  5. package/dist/cjs/types/backups/index.js +18 -0
  6. package/dist/cjs/types/backups/requests.js +2 -0
  7. package/dist/cjs/types/backups/types.js +8 -0
  8. package/dist/cjs/types/comments/index.js +18 -0
  9. package/dist/cjs/types/comments/requests.js +2 -0
  10. package/dist/cjs/types/comments/types.js +60 -0
  11. package/dist/cjs/types/common.js +2 -0
  12. package/dist/cjs/types/emails/index.js +17 -0
  13. package/dist/cjs/types/emails/requests.js +5 -0
  14. package/dist/cjs/types/id-mappings/index.js +18 -0
  15. package/dist/cjs/types/{requests.js → id-mappings/requests.js} +1 -7
  16. package/dist/cjs/types/id-mappings/types.js +12 -0
  17. package/dist/cjs/types/index.js +16 -2
  18. package/dist/cjs/types/insights/index.js +18 -0
  19. package/dist/cjs/types/insights/requests.js +2 -0
  20. package/dist/cjs/types/insights/types.js +84 -0
  21. package/dist/cjs/types/labels/index.js +18 -0
  22. package/dist/cjs/types/labels/requests.js +2 -0
  23. package/dist/cjs/types/labels/types.js +11 -0
  24. package/dist/cjs/types/productivity/index.js +17 -0
  25. package/dist/cjs/types/productivity/types.js +67 -0
  26. package/dist/cjs/types/projects/index.js +18 -0
  27. package/dist/cjs/types/projects/requests.js +2 -0
  28. package/dist/cjs/types/projects/types.js +56 -0
  29. package/dist/cjs/types/reminders/index.js +17 -0
  30. package/dist/cjs/types/reminders/requests.js +5 -0
  31. package/dist/cjs/types/sections/index.js +18 -0
  32. package/dist/cjs/types/sections/requests.js +2 -0
  33. package/dist/cjs/types/sections/types.js +22 -0
  34. package/dist/cjs/types/sync/commands/shared.js +2 -2
  35. package/dist/cjs/types/sync/resources/collaborators.js +2 -2
  36. package/dist/cjs/types/sync/resources/notes.js +2 -2
  37. package/dist/cjs/types/sync/resources/reminders.js +3 -3
  38. package/dist/cjs/types/sync/resources/user.js +2 -2
  39. package/dist/cjs/types/sync/resources/workspaces.js +5 -5
  40. package/dist/cjs/types/tasks/index.js +18 -0
  41. package/dist/cjs/types/tasks/requests.js +2 -0
  42. package/dist/cjs/types/tasks/types.js +59 -0
  43. package/dist/cjs/types/templates/index.js +17 -0
  44. package/dist/cjs/types/templates/requests.js +2 -0
  45. package/dist/cjs/types/uploads/index.js +17 -0
  46. package/dist/cjs/types/uploads/requests.js +2 -0
  47. package/dist/cjs/types/users/index.js +17 -0
  48. package/dist/cjs/types/users/types.js +51 -0
  49. package/dist/cjs/types/workspaces/index.js +18 -0
  50. package/dist/cjs/types/workspaces/requests.js +2 -0
  51. package/dist/cjs/types/workspaces/types.js +137 -0
  52. package/dist/cjs/utils/validators.js +38 -27
  53. package/dist/esm/todoist-api.js +4 -3
  54. package/dist/esm/types/activity/index.js +2 -0
  55. package/dist/esm/types/activity/requests.js +1 -0
  56. package/dist/esm/types/activity/types.js +25 -0
  57. package/dist/esm/types/backups/index.js +2 -0
  58. package/dist/esm/types/backups/requests.js +1 -0
  59. package/dist/esm/types/backups/types.js +5 -0
  60. package/dist/esm/types/comments/index.js +2 -0
  61. package/dist/esm/types/comments/requests.js +1 -0
  62. package/dist/esm/types/comments/types.js +57 -0
  63. package/dist/esm/types/common.js +1 -0
  64. package/dist/esm/types/emails/index.js +1 -0
  65. package/dist/esm/types/emails/requests.js +2 -0
  66. package/dist/esm/types/id-mappings/index.js +2 -0
  67. package/dist/esm/types/{requests.js → id-mappings/requests.js} +0 -6
  68. package/dist/esm/types/id-mappings/types.js +9 -0
  69. package/dist/esm/types/index.js +16 -2
  70. package/dist/esm/types/insights/index.js +2 -0
  71. package/dist/esm/types/insights/requests.js +1 -0
  72. package/dist/esm/types/insights/types.js +81 -0
  73. package/dist/esm/types/labels/index.js +2 -0
  74. package/dist/esm/types/labels/requests.js +1 -0
  75. package/dist/esm/types/labels/types.js +8 -0
  76. package/dist/esm/types/productivity/index.js +1 -0
  77. package/dist/esm/types/productivity/types.js +64 -0
  78. package/dist/esm/types/projects/index.js +2 -0
  79. package/dist/esm/types/projects/requests.js +1 -0
  80. package/dist/esm/types/projects/types.js +53 -0
  81. package/dist/esm/types/reminders/index.js +1 -0
  82. package/dist/esm/types/reminders/requests.js +2 -0
  83. package/dist/esm/types/sections/index.js +2 -0
  84. package/dist/esm/types/sections/requests.js +1 -0
  85. package/dist/esm/types/sections/types.js +19 -0
  86. package/dist/esm/types/sync/commands/shared.js +1 -1
  87. package/dist/esm/types/sync/resources/collaborators.js +1 -1
  88. package/dist/esm/types/sync/resources/notes.js +1 -1
  89. package/dist/esm/types/sync/resources/reminders.js +1 -1
  90. package/dist/esm/types/sync/resources/user.js +1 -1
  91. package/dist/esm/types/sync/resources/workspaces.js +1 -1
  92. package/dist/esm/types/tasks/index.js +2 -0
  93. package/dist/esm/types/tasks/requests.js +1 -0
  94. package/dist/esm/types/tasks/types.js +56 -0
  95. package/dist/esm/types/templates/index.js +1 -0
  96. package/dist/esm/types/templates/requests.js +1 -0
  97. package/dist/esm/types/uploads/index.js +1 -0
  98. package/dist/esm/types/uploads/requests.js +1 -0
  99. package/dist/esm/types/users/index.js +1 -0
  100. package/dist/esm/types/users/types.js +48 -0
  101. package/dist/esm/types/workspaces/index.js +2 -0
  102. package/dist/esm/types/workspaces/requests.js +1 -0
  103. package/dist/esm/types/workspaces/types.js +134 -0
  104. package/dist/esm/utils/validators.js +12 -1
  105. package/dist/types/test-utils/test-defaults.d.ts +5 -5
  106. package/dist/types/todoist-api.d.ts +16 -2
  107. package/dist/types/types/activity/index.d.ts +2 -0
  108. package/dist/types/types/activity/requests.d.ts +85 -0
  109. package/dist/types/types/activity/types.d.ts +49 -0
  110. package/dist/types/types/backups/index.d.ts +2 -0
  111. package/dist/types/types/backups/requests.d.ts +16 -0
  112. package/dist/types/types/backups/types.d.ts +7 -0
  113. package/dist/types/types/comments/index.d.ts +2 -0
  114. package/dist/types/types/comments/requests.d.ts +64 -0
  115. package/dist/types/types/comments/types.d.ts +141 -0
  116. package/dist/types/types/common.d.ts +6 -0
  117. package/dist/types/types/emails/index.d.ts +1 -0
  118. package/dist/types/types/emails/requests.d.ts +30 -0
  119. package/dist/types/types/id-mappings/index.d.ts +2 -0
  120. package/dist/types/types/id-mappings/requests.d.ts +28 -0
  121. package/dist/types/types/id-mappings/types.d.ts +13 -0
  122. package/dist/types/types/index.d.ts +16 -2
  123. package/dist/types/types/insights/index.d.ts +2 -0
  124. package/dist/types/types/insights/requests.d.ts +26 -0
  125. package/dist/types/types/insights/types.d.ts +186 -0
  126. package/dist/types/types/labels/index.d.ts +2 -0
  127. package/dist/types/types/labels/requests.d.ts +75 -0
  128. package/dist/types/types/labels/types.d.ts +13 -0
  129. package/dist/types/types/productivity/index.d.ts +1 -0
  130. package/dist/types/types/productivity/types.d.ts +115 -0
  131. package/dist/types/types/projects/index.d.ts +2 -0
  132. package/dist/types/types/projects/requests.d.ts +169 -0
  133. package/dist/types/types/projects/types.d.ts +201 -0
  134. package/dist/types/types/reminders/index.d.ts +1 -0
  135. package/dist/types/types/reminders/requests.d.ts +91 -0
  136. package/dist/types/types/sections/index.d.ts +2 -0
  137. package/dist/types/types/sections/requests.d.ts +41 -0
  138. package/dist/types/types/sections/types.d.ts +44 -0
  139. package/dist/types/types/sync/commands/projects.d.ts +2 -1
  140. package/dist/types/types/sync/commands/shared.d.ts +2 -2
  141. package/dist/types/types/sync/commands/workspaces.d.ts +1 -1
  142. package/dist/types/types/sync/resources/notes.d.ts +1 -1
  143. package/dist/types/types/sync/response.d.ts +5 -1
  144. package/dist/types/types/tasks/index.d.ts +2 -0
  145. package/dist/types/types/tasks/requests.d.ts +197 -0
  146. package/dist/types/types/tasks/types.d.ts +162 -0
  147. package/dist/types/types/templates/index.d.ts +1 -0
  148. package/dist/types/types/templates/requests.d.ts +92 -0
  149. package/dist/types/types/uploads/index.d.ts +1 -0
  150. package/dist/types/types/uploads/requests.d.ts +32 -0
  151. package/dist/types/types/users/index.d.ts +1 -0
  152. package/dist/types/types/users/types.d.ts +66 -0
  153. package/dist/types/types/workspaces/index.d.ts +2 -0
  154. package/dist/types/types/workspaces/requests.d.ts +260 -0
  155. package/dist/types/types/workspaces/types.d.ts +225 -0
  156. package/dist/types/utils/colors.d.ts +1 -1
  157. package/dist/types/utils/validators.d.ts +7 -6
  158. package/package.json +3 -3
  159. package/dist/cjs/types/entities.js +0 -552
  160. package/dist/esm/types/entities.js +0 -548
  161. package/dist/types/types/entities.d.ts +0 -1211
  162. package/dist/types/types/requests.d.ts +0 -1188
@@ -0,0 +1,260 @@
1
+ import type { MemberActivityInfo, WorkspaceInvitation, WorkspaceRole, WorkspaceUser, WorkspaceUserTask } from './types.js';
2
+ /**
3
+ * Arguments for creating a new workspace.
4
+ * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/create_workspace_api_v1_workspaces_post
5
+ */
6
+ export type AddWorkspaceArgs = {
7
+ /** Name of the workspace. */
8
+ name: string;
9
+ /** Description of the workspace. */
10
+ description?: string | null;
11
+ /** Whether link sharing is enabled for the workspace. */
12
+ isLinkSharingEnabled?: boolean;
13
+ /** Whether guests are allowed in the workspace. */
14
+ isGuestAllowed?: boolean;
15
+ /** Workspace email domain. */
16
+ domainName?: string | null;
17
+ /** Whether users with matching email domains can discover this workspace. */
18
+ domainDiscovery?: boolean;
19
+ /** Whether workspace invites are restricted to workspace domain. */
20
+ restrictEmailDomains?: boolean;
21
+ /** Workspace properties. */
22
+ properties?: Record<string, unknown> | null;
23
+ };
24
+ /**
25
+ * Arguments for updating an existing workspace.
26
+ * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/update_workspace_api_v1_workspaces__workspace_id__post
27
+ */
28
+ export type UpdateWorkspaceArgs = {
29
+ /** Updated workspace name. */
30
+ name?: string;
31
+ /** Updated workspace description. */
32
+ description?: string | null;
33
+ /** Updated link sharing status. */
34
+ isLinkSharingEnabled?: boolean;
35
+ /** Updated guest access status. */
36
+ isGuestAllowed?: boolean | null;
37
+ /** Updated workspace email domain. */
38
+ domainName?: string | null;
39
+ /** Updated domain discovery setting. */
40
+ domainDiscovery?: boolean;
41
+ /** Updated email domain restriction setting. */
42
+ restrictEmailDomains?: boolean;
43
+ /** Updated workspace properties. */
44
+ properties?: Record<string, unknown> | null;
45
+ /** Updated collapse state for current user. */
46
+ isCollapsed?: boolean;
47
+ };
48
+ /**
49
+ * Arguments for getting workspace members activity.
50
+ * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/get_workspace_members_activity_api_v1_workspaces_members_get
51
+ */
52
+ export type GetWorkspaceMembersActivityArgs = {
53
+ /** The workspace ID. */
54
+ workspaceId: string;
55
+ /** Comma-separated list of user IDs to filter by. */
56
+ userIds?: string | null;
57
+ /** Comma-separated list of project IDs to filter by. */
58
+ projectIds?: string | null;
59
+ };
60
+ /**
61
+ * Response from getting workspace members activity.
62
+ */
63
+ export type GetWorkspaceMembersActivityResponse = {
64
+ members: MemberActivityInfo[];
65
+ };
66
+ /**
67
+ * Arguments for getting tasks assigned to a workspace user.
68
+ * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/get_workspace_user_tasks_api_v1_workspaces__workspace_id__users__user_id__tasks_get
69
+ */
70
+ export type GetWorkspaceUserTasksArgs = {
71
+ /** The workspace ID. */
72
+ workspaceId: string;
73
+ /** The user ID. */
74
+ userId: string;
75
+ /** Comma-separated list of project IDs to filter by. */
76
+ projectIds?: string | null;
77
+ };
78
+ /**
79
+ * Response from getting workspace user tasks.
80
+ */
81
+ export type GetWorkspaceUserTasksResponse = {
82
+ tasks: WorkspaceUserTask[];
83
+ };
84
+ /**
85
+ * Arguments for inviting users to a workspace.
86
+ * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/invite_workspace_users_api_v1_workspaces__workspace_id__users_invite_post
87
+ */
88
+ export type InviteWorkspaceUsersArgs = {
89
+ /** The workspace ID. */
90
+ workspaceId: string;
91
+ /** List of user emails to invite. */
92
+ emailList: string[];
93
+ /** Role assigned to invited users. */
94
+ role?: WorkspaceRole;
95
+ };
96
+ /**
97
+ * Response from inviting workspace users.
98
+ */
99
+ export type InviteWorkspaceUsersResponse = {
100
+ invitedEmails: string[];
101
+ };
102
+ /**
103
+ * Arguments for updating a workspace user's role.
104
+ * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/update_workspace_user_api_v1_workspaces__workspace_id__users__user_id__post
105
+ */
106
+ export type UpdateWorkspaceUserArgs = {
107
+ /** The workspace ID. */
108
+ workspaceId: string;
109
+ /** The user ID. */
110
+ userId: string;
111
+ /** Updated role for the user. */
112
+ role: WorkspaceRole;
113
+ };
114
+ /**
115
+ * Arguments for removing a user from a workspace.
116
+ * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/remove_workspace_user_api_v1_workspaces__workspace_id__users__user_id__delete
117
+ */
118
+ export type RemoveWorkspaceUserArgs = {
119
+ /** The workspace ID. */
120
+ workspaceId: string;
121
+ /** The user ID. */
122
+ userId: string;
123
+ };
124
+ /**
125
+ * Arguments for getting workspace invitations.
126
+ */
127
+ export type GetWorkspaceInvitationsArgs = {
128
+ /**
129
+ * The workspace ID to get invitations for.
130
+ */
131
+ workspaceId: number;
132
+ };
133
+ /**
134
+ * Arguments for deleting a workspace invitation.
135
+ */
136
+ export type DeleteWorkspaceInvitationArgs = {
137
+ /**
138
+ * The workspace ID.
139
+ */
140
+ workspaceId: number;
141
+ /**
142
+ * The email address of the invitation to delete.
143
+ */
144
+ userEmail: string;
145
+ };
146
+ /**
147
+ * Arguments for accepting/rejecting a workspace invitation.
148
+ */
149
+ export type WorkspaceInvitationActionArgs = {
150
+ /**
151
+ * The invitation code from the email.
152
+ */
153
+ inviteCode: string;
154
+ };
155
+ /**
156
+ * Arguments for joining a workspace.
157
+ */
158
+ export type JoinWorkspaceArgs = {
159
+ /**
160
+ * Optional invitation code/link to join via.
161
+ */
162
+ inviteCode?: string | null;
163
+ /**
164
+ * Optional workspace ID to join via domain auto-join.
165
+ */
166
+ workspaceId?: number | null;
167
+ };
168
+ /**
169
+ * Arguments for uploading/updating workspace logo.
170
+ */
171
+ export type WorkspaceLogoArgs = {
172
+ /**
173
+ * The workspace ID.
174
+ */
175
+ workspaceId: number;
176
+ /**
177
+ * The image file to upload (Buffer, Stream, or file path).
178
+ */
179
+ file?: Buffer | NodeJS.ReadableStream | string | Blob;
180
+ /**
181
+ * The file name (required for Buffer/Stream uploads).
182
+ */
183
+ fileName?: string;
184
+ /**
185
+ * Whether to delete the logo instead of updating it.
186
+ */
187
+ delete?: boolean;
188
+ };
189
+ /**
190
+ * Arguments for getting workspace plan details.
191
+ */
192
+ export type GetWorkspacePlanDetailsArgs = {
193
+ /**
194
+ * The workspace ID.
195
+ */
196
+ workspaceId: number;
197
+ };
198
+ /**
199
+ * Arguments for getting workspace users (paginated).
200
+ */
201
+ export type GetWorkspaceUsersArgs = {
202
+ /**
203
+ * Optional workspace ID. If not provided, returns users for all workspaces.
204
+ */
205
+ workspaceId?: number | null;
206
+ /**
207
+ * Cursor for pagination.
208
+ */
209
+ cursor?: string | null;
210
+ /**
211
+ * Maximum number of users to return (default: 100).
212
+ */
213
+ limit?: number;
214
+ };
215
+ /**
216
+ * Arguments for getting workspace projects (paginated).
217
+ */
218
+ export type GetWorkspaceProjectsArgs = {
219
+ /**
220
+ * The workspace ID.
221
+ */
222
+ workspaceId: number;
223
+ /**
224
+ * Cursor for pagination.
225
+ */
226
+ cursor?: string | null;
227
+ /**
228
+ * Maximum number of projects to return (default: 100).
229
+ */
230
+ limit?: number;
231
+ };
232
+ /**
233
+ * Paginated response for workspace users.
234
+ */
235
+ export type GetWorkspaceUsersResponse = {
236
+ /**
237
+ * Whether there are more users available.
238
+ */
239
+ hasMore: boolean;
240
+ /**
241
+ * Cursor for the next page of results.
242
+ */
243
+ nextCursor?: string;
244
+ /**
245
+ * Array of workspace users.
246
+ */
247
+ workspaceUsers: WorkspaceUser[];
248
+ };
249
+ /**
250
+ * Response type for workspace invitations endpoint (simple email list).
251
+ */
252
+ export type WorkspaceInvitationsResponse = string[];
253
+ /**
254
+ * Response type for all workspace invitations endpoint (detailed objects).
255
+ */
256
+ export type AllWorkspaceInvitationsResponse = WorkspaceInvitation[];
257
+ /**
258
+ * Response type for workspace logo upload.
259
+ */
260
+ export type WorkspaceLogoResponse = Record<string, unknown> | null;
@@ -0,0 +1,225 @@
1
+ import { z } from 'zod';
2
+ /** Available project collaborator roles. */
3
+ export declare const COLLABORATOR_ROLES: readonly ["CREATOR", "ADMIN", "READ_WRITE", "EDIT_ONLY", "COMPLETE_ONLY"];
4
+ /** Role of a collaborator in a project. */
5
+ export type CollaboratorRole = (typeof COLLABORATOR_ROLES)[number];
6
+ /**
7
+ * Available workspace roles.
8
+ */
9
+ export declare const WORKSPACE_ROLES: readonly ["ADMIN", "MEMBER", "GUEST"];
10
+ /**
11
+ * Role of a user within a workspace.
12
+ */
13
+ export type WorkspaceRole = (typeof WORKSPACE_ROLES)[number];
14
+ export declare const WorkspaceRoleSchema: z.ZodEnum<{
15
+ ADMIN: "ADMIN";
16
+ MEMBER: "MEMBER";
17
+ GUEST: "GUEST";
18
+ }>;
19
+ export declare const WorkspaceUserSchema: z.ZodObject<{
20
+ userId: z.ZodString;
21
+ workspaceId: z.ZodString;
22
+ userEmail: z.ZodString;
23
+ fullName: z.ZodString;
24
+ timezone: z.ZodString;
25
+ role: z.ZodEnum<{
26
+ ADMIN: "ADMIN";
27
+ MEMBER: "MEMBER";
28
+ GUEST: "GUEST";
29
+ }>;
30
+ imageId: z.ZodNullable<z.ZodString>;
31
+ isDeleted: z.ZodDefault<z.ZodBoolean>;
32
+ }, z.core.$strip>;
33
+ /**
34
+ * Represents a user within a workspace (MemberView from API).
35
+ */
36
+ export type WorkspaceUser = z.infer<typeof WorkspaceUserSchema>;
37
+ export declare const WorkspaceInvitationSchema: z.ZodObject<{
38
+ id: z.ZodDefault<z.ZodString>;
39
+ inviterId: z.ZodString;
40
+ userEmail: z.ZodString;
41
+ workspaceId: z.ZodString;
42
+ role: z.ZodEnum<{
43
+ ADMIN: "ADMIN";
44
+ MEMBER: "MEMBER";
45
+ GUEST: "GUEST";
46
+ }>;
47
+ isExistingUser: z.ZodBoolean;
48
+ }, z.core.$strip>;
49
+ /**
50
+ * Represents a workspace invitation.
51
+ */
52
+ export type WorkspaceInvitation = z.infer<typeof WorkspaceInvitationSchema>;
53
+ export declare const PlanPriceSchema: z.ZodObject<{
54
+ currency: z.ZodString;
55
+ amount: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
56
+ interval: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>;
58
+ /**
59
+ * Plan pricing information.
60
+ */
61
+ export type PlanPrice = z.infer<typeof PlanPriceSchema>;
62
+ export declare const FormattedPriceListingSchema: z.ZodObject<{
63
+ currency: z.ZodOptional<z.ZodString>;
64
+ amount: z.ZodOptional<z.ZodNumber>;
65
+ interval: z.ZodOptional<z.ZodString>;
66
+ formatted: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>;
68
+ /**
69
+ * Formatted price listing for workspace plans.
70
+ */
71
+ export type FormattedPriceListing = z.infer<typeof FormattedPriceListingSchema>;
72
+ /** Available workspace plan names. */
73
+ export declare const WORKSPACE_CURRENT_PLANS: readonly ["Business", "Starter"];
74
+ /** Display name of a workspace plan. */
75
+ export type WorkspaceCurrentPlan = (typeof WORKSPACE_CURRENT_PLANS)[number];
76
+ /** Available workspace plan statuses. */
77
+ export declare const WORKSPACE_PLAN_STATUSES: readonly ["Active", "Downgraded", "Cancelled", "NeverSubscribed"];
78
+ /** Subscription status of a workspace plan. */
79
+ export type WorkspacePlanStatus = (typeof WORKSPACE_PLAN_STATUSES)[number];
80
+ export declare const WorkspacePlanDetailsSchema: z.ZodObject<{
81
+ currentMemberCount: z.ZodNumber;
82
+ currentPlan: z.ZodEnum<{
83
+ Business: "Business";
84
+ Starter: "Starter";
85
+ }>;
86
+ currentPlanStatus: z.ZodEnum<{
87
+ Active: "Active";
88
+ Downgraded: "Downgraded";
89
+ Cancelled: "Cancelled";
90
+ NeverSubscribed: "NeverSubscribed";
91
+ }>;
92
+ downgradeAt: z.ZodNullable<z.ZodString>;
93
+ currentActiveProjects: z.ZodNumber;
94
+ maximumActiveProjects: z.ZodNumber;
95
+ priceList: z.ZodArray<z.ZodObject<{
96
+ currency: z.ZodOptional<z.ZodString>;
97
+ amount: z.ZodOptional<z.ZodNumber>;
98
+ interval: z.ZodOptional<z.ZodString>;
99
+ formatted: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strip>>;
101
+ workspaceId: z.ZodNumber;
102
+ isTrialing: z.ZodBoolean;
103
+ trialEndsAt: z.ZodNullable<z.ZodString>;
104
+ cancelAtPeriodEnd: z.ZodBoolean;
105
+ hasTrialed: z.ZodBoolean;
106
+ planPrice: z.ZodNullable<z.ZodObject<{
107
+ currency: z.ZodString;
108
+ amount: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
109
+ interval: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strip>>;
111
+ hasBillingPortal: z.ZodBoolean;
112
+ hasBillingPortalSwitchToAnnual: z.ZodBoolean;
113
+ }, z.core.$strip>;
114
+ /**
115
+ * Represents workspace plan and billing details.
116
+ */
117
+ export type WorkspacePlanDetails = z.infer<typeof WorkspacePlanDetailsSchema>;
118
+ export declare const JoinWorkspaceResultSchema: z.ZodObject<{
119
+ customSortingApplied: z.ZodBoolean;
120
+ projectSortPreference: z.ZodString;
121
+ role: z.ZodEnum<{
122
+ ADMIN: "ADMIN";
123
+ MEMBER: "MEMBER";
124
+ GUEST: "GUEST";
125
+ }>;
126
+ userId: z.ZodString;
127
+ workspaceId: z.ZodString;
128
+ }, z.core.$strip>;
129
+ /**
130
+ * Result returned when successfully joining a workspace.
131
+ */
132
+ export type JoinWorkspaceResult = z.infer<typeof JoinWorkspaceResultSchema>;
133
+ /**
134
+ * Available workspace plans.
135
+ */
136
+ export declare const WORKSPACE_PLANS: readonly ["STARTER", "BUSINESS"];
137
+ /**
138
+ * Workspace plan type.
139
+ */
140
+ export type WorkspacePlan = (typeof WORKSPACE_PLANS)[number];
141
+ export declare const WorkspacePlanSchema: z.ZodEnum<{
142
+ STARTER: "STARTER";
143
+ BUSINESS: "BUSINESS";
144
+ }>;
145
+ /**
146
+ * Workspace resource limits.
147
+ */
148
+ export declare const WorkspaceLimitsSchema: z.ZodObject<{
149
+ current: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
150
+ next: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
151
+ }, z.core.$catchall<z.ZodAny>>;
152
+ export type WorkspaceLimits = z.infer<typeof WorkspaceLimitsSchema>;
153
+ /**
154
+ * Workspace properties (flexible object for unknown fields).
155
+ */
156
+ export declare const WorkspacePropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
157
+ export type WorkspaceProperties = z.infer<typeof WorkspacePropertiesSchema>;
158
+ /**
159
+ * Represents a workspace in Todoist.
160
+ */
161
+ export declare const WorkspaceSchema: z.ZodObject<{
162
+ id: z.ZodString;
163
+ name: z.ZodString;
164
+ plan: z.ZodEnum<{
165
+ STARTER: "STARTER";
166
+ BUSINESS: "BUSINESS";
167
+ }>;
168
+ role: z.ZodEnum<{
169
+ ADMIN: "ADMIN";
170
+ MEMBER: "MEMBER";
171
+ GUEST: "GUEST";
172
+ }>;
173
+ inviteCode: z.ZodString;
174
+ isLinkSharingEnabled: z.ZodBoolean;
175
+ isGuestAllowed: z.ZodBoolean;
176
+ limits: z.ZodObject<{
177
+ current: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
178
+ next: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
179
+ }, z.core.$catchall<z.ZodAny>>;
180
+ logoBig: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
+ logoMedium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
+ logoSmall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
+ logoS640: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
+ createdAt: z.ZodString;
185
+ creatorId: z.ZodString;
186
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
187
+ }, z.core.$strip>;
188
+ export type Workspace = z.infer<typeof WorkspaceSchema>;
189
+ export declare const MemberActivityInfoSchema: z.ZodObject<{
190
+ userId: z.ZodString;
191
+ tasksAssigned: z.ZodNumber;
192
+ tasksOverdue: z.ZodNumber;
193
+ }, z.core.$strip>;
194
+ /**
195
+ * Represents activity information for a workspace member.
196
+ */
197
+ export type MemberActivityInfo = z.infer<typeof MemberActivityInfoSchema>;
198
+ export declare const WorkspaceUserTaskSchema: z.ZodObject<{
199
+ id: z.ZodString;
200
+ content: z.ZodString;
201
+ responsibleUid: z.ZodNullable<z.ZodString>;
202
+ due: z.ZodNullable<z.ZodObject<{
203
+ isRecurring: z.ZodBoolean;
204
+ string: z.ZodString;
205
+ date: z.ZodString;
206
+ datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
+ timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
+ lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
209
+ }, z.core.$strip>>;
210
+ deadline: z.ZodNullable<z.ZodObject<{
211
+ date: z.ZodString;
212
+ lang: z.ZodString;
213
+ }, z.core.$strip>>;
214
+ labels: z.ZodArray<z.ZodString>;
215
+ notesCount: z.ZodNumber;
216
+ projectId: z.ZodString;
217
+ projectName: z.ZodString;
218
+ priority: z.ZodNumber;
219
+ description: z.ZodString;
220
+ isOverdue: z.ZodBoolean;
221
+ }, z.core.$strip>;
222
+ /**
223
+ * Represents a task assigned to a workspace user.
224
+ */
225
+ export type WorkspaceUserTask = z.infer<typeof WorkspaceUserTaskSchema>;
@@ -1,4 +1,4 @@
1
- import type { Color } from '../types/entities.js';
1
+ import type { Color } from '../types/productivity/types.js';
2
2
  export declare const berryRed: {
3
3
  readonly key: "berry_red";
4
4
  readonly displayName: "Berry Red";
@@ -1,4 +1,5 @@
1
- import { type WorkspaceProject, type PersonalProject, type WorkspaceUser } from '../types/entities.js';
1
+ import { type WorkspaceProject, type PersonalProject } from '../types/projects/types.js';
2
+ import { type WorkspaceUser } from '../types/workspaces/types.js';
2
3
  export declare const validateTask: (input: unknown) => {
3
4
  isUncompletable: boolean;
4
5
  url: string;
@@ -152,7 +153,7 @@ export declare const validateComment: (input: unknown) => {
152
153
  fileType?: string | null | undefined;
153
154
  fileUrl?: string | null | undefined;
154
155
  fileDuration?: number | null | undefined;
155
- uploadState?: "pending" | "completed" | null | undefined;
156
+ uploadState?: "completed" | "pending" | null | undefined;
156
157
  image?: string | null | undefined;
157
158
  imageWidth?: number | null | undefined;
158
159
  imageHeight?: number | null | undefined;
@@ -177,7 +178,7 @@ export declare const validateCommentArray: (input: unknown[]) => {
177
178
  fileType?: string | null | undefined;
178
179
  fileUrl?: string | null | undefined;
179
180
  fileDuration?: number | null | undefined;
180
- uploadState?: "pending" | "completed" | null | undefined;
181
+ uploadState?: "completed" | "pending" | null | undefined;
181
182
  image?: string | null | undefined;
182
183
  imageWidth?: number | null | undefined;
183
184
  imageHeight?: number | null | undefined;
@@ -340,7 +341,7 @@ export declare const validateAttachment: (input: unknown) => {
340
341
  fileType?: string | null | undefined;
341
342
  fileUrl?: string | null | undefined;
342
343
  fileDuration?: number | null | undefined;
343
- uploadState?: "pending" | "completed" | null | undefined;
344
+ uploadState?: "completed" | "pending" | null | undefined;
344
345
  image?: string | null | undefined;
345
346
  imageWidth?: number | null | undefined;
346
347
  imageHeight?: number | null | undefined;
@@ -697,7 +698,7 @@ export declare const validateNote: (input: unknown) => {
697
698
  fileType?: string | null | undefined;
698
699
  fileUrl?: string | null | undefined;
699
700
  fileDuration?: number | null | undefined;
700
- uploadState?: "pending" | "completed" | null | undefined;
701
+ uploadState?: "completed" | "pending" | null | undefined;
701
702
  image?: string | null | undefined;
702
703
  imageWidth?: number | null | undefined;
703
704
  imageHeight?: number | null | undefined;
@@ -723,7 +724,7 @@ export declare const validateNoteArray: (input: unknown[]) => {
723
724
  fileType?: string | null | undefined;
724
725
  fileUrl?: string | null | undefined;
725
726
  fileDuration?: number | null | undefined;
726
- uploadState?: "pending" | "completed" | null | undefined;
727
+ uploadState?: "completed" | "pending" | null | undefined;
727
728
  image?: string | null | undefined;
728
729
  imageWidth?: number | null | undefined;
729
730
  imageHeight?: number | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-api-typescript",
3
- "version": "7.6.0",
3
+ "version": "7.7.0",
4
4
  "description": "A typescript wrapper for the Todoist REST API.",
5
5
  "author": "Doist developers",
6
6
  "repository": "https://github.com/Doist/todoist-api-typescript",
@@ -12,9 +12,9 @@
12
12
  "types": "dist/types/index.d.ts",
13
13
  "exports": {
14
14
  ".": {
15
+ "types": "./dist/types/index.d.ts",
15
16
  "import": "./dist/esm/index.js",
16
- "require": "./dist/cjs/index.js",
17
- "types": "./dist/types/index.d.ts"
17
+ "require": "./dist/cjs/index.js"
18
18
  }
19
19
  },
20
20
  "sideEffects": false,