@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.
- package/dist/cjs/authentication.js +46 -2
- package/dist/cjs/consts/endpoints.js +54 -2
- package/dist/cjs/todoist-api.js +524 -6
- package/dist/cjs/types/activity/index.js +18 -0
- package/dist/cjs/types/activity/requests.js +2 -0
- package/dist/cjs/types/activity/types.js +28 -0
- package/dist/cjs/types/backups/index.js +18 -0
- package/dist/cjs/types/backups/requests.js +2 -0
- package/dist/cjs/types/backups/types.js +8 -0
- package/dist/cjs/types/comments/index.js +18 -0
- package/dist/cjs/types/comments/requests.js +2 -0
- package/dist/cjs/types/comments/types.js +60 -0
- package/dist/cjs/types/common.js +2 -0
- package/dist/cjs/types/emails/index.js +17 -0
- package/dist/cjs/types/emails/requests.js +5 -0
- package/dist/cjs/types/id-mappings/index.js +18 -0
- package/dist/cjs/types/id-mappings/requests.js +20 -0
- package/dist/cjs/types/id-mappings/types.js +12 -0
- package/dist/cjs/types/index.js +16 -2
- package/dist/cjs/types/insights/index.js +18 -0
- package/dist/cjs/types/insights/requests.js +2 -0
- package/dist/cjs/types/insights/types.js +84 -0
- package/dist/cjs/types/labels/index.js +18 -0
- package/dist/cjs/types/labels/requests.js +2 -0
- package/dist/cjs/types/labels/types.js +11 -0
- package/dist/cjs/types/productivity/index.js +17 -0
- package/dist/cjs/types/productivity/types.js +67 -0
- package/dist/cjs/types/projects/index.js +18 -0
- package/dist/cjs/types/projects/requests.js +2 -0
- package/dist/cjs/types/projects/types.js +56 -0
- package/dist/cjs/types/reminders/index.js +17 -0
- package/dist/cjs/types/sections/index.js +18 -0
- package/dist/cjs/types/sections/requests.js +2 -0
- package/dist/cjs/types/sections/types.js +22 -0
- package/dist/cjs/types/sync/commands/shared.js +2 -2
- package/dist/cjs/types/sync/resources/collaborators.js +2 -2
- package/dist/cjs/types/sync/resources/notes.js +2 -2
- package/dist/cjs/types/sync/resources/reminders.js +3 -3
- package/dist/cjs/types/sync/resources/user.js +2 -2
- package/dist/cjs/types/sync/resources/workspaces.js +5 -5
- package/dist/cjs/types/tasks/index.js +18 -0
- package/dist/cjs/types/tasks/requests.js +2 -0
- package/dist/cjs/types/tasks/types.js +59 -0
- package/dist/cjs/types/templates/index.js +17 -0
- package/dist/cjs/types/templates/requests.js +2 -0
- package/dist/cjs/types/uploads/index.js +17 -0
- package/dist/cjs/types/uploads/requests.js +2 -0
- package/dist/cjs/types/users/index.js +17 -0
- package/dist/cjs/types/users/types.js +51 -0
- package/dist/cjs/types/workspaces/index.js +18 -0
- package/dist/cjs/types/workspaces/requests.js +2 -0
- package/dist/cjs/types/workspaces/types.js +137 -0
- package/dist/cjs/utils/validators.js +47 -19
- package/dist/esm/authentication.js +46 -3
- package/dist/esm/consts/endpoints.js +43 -0
- package/dist/esm/todoist-api.js +522 -4
- package/dist/esm/types/activity/index.js +2 -0
- package/dist/esm/types/activity/requests.js +1 -0
- package/dist/esm/types/activity/types.js +25 -0
- package/dist/esm/types/backups/index.js +2 -0
- package/dist/esm/types/backups/requests.js +1 -0
- package/dist/esm/types/backups/types.js +5 -0
- package/dist/esm/types/comments/index.js +2 -0
- package/dist/esm/types/comments/requests.js +1 -0
- package/dist/esm/types/comments/types.js +57 -0
- package/dist/esm/types/common.js +1 -0
- package/dist/esm/types/emails/index.js +1 -0
- package/dist/esm/types/emails/requests.js +2 -0
- package/dist/esm/types/id-mappings/index.js +2 -0
- package/dist/esm/types/id-mappings/requests.js +17 -0
- package/dist/esm/types/id-mappings/types.js +9 -0
- package/dist/esm/types/index.js +16 -2
- package/dist/esm/types/insights/index.js +2 -0
- package/dist/esm/types/insights/requests.js +1 -0
- package/dist/esm/types/insights/types.js +81 -0
- package/dist/esm/types/labels/index.js +2 -0
- package/dist/esm/types/labels/requests.js +1 -0
- package/dist/esm/types/labels/types.js +8 -0
- package/dist/esm/types/productivity/index.js +1 -0
- package/dist/esm/types/productivity/types.js +64 -0
- package/dist/esm/types/projects/index.js +2 -0
- package/dist/esm/types/projects/requests.js +1 -0
- package/dist/esm/types/projects/types.js +53 -0
- package/dist/esm/types/reminders/index.js +1 -0
- package/dist/esm/types/sections/index.js +2 -0
- package/dist/esm/types/sections/requests.js +1 -0
- package/dist/esm/types/sections/types.js +19 -0
- package/dist/esm/types/sync/commands/shared.js +1 -1
- package/dist/esm/types/sync/resources/collaborators.js +1 -1
- package/dist/esm/types/sync/resources/notes.js +1 -1
- package/dist/esm/types/sync/resources/reminders.js +1 -1
- package/dist/esm/types/sync/resources/user.js +1 -1
- package/dist/esm/types/sync/resources/workspaces.js +1 -1
- package/dist/esm/types/tasks/index.js +2 -0
- package/dist/esm/types/tasks/requests.js +1 -0
- package/dist/esm/types/tasks/types.js +56 -0
- package/dist/esm/types/templates/index.js +1 -0
- package/dist/esm/types/templates/requests.js +1 -0
- package/dist/esm/types/uploads/index.js +1 -0
- package/dist/esm/types/uploads/requests.js +1 -0
- package/dist/esm/types/users/index.js +1 -0
- package/dist/esm/types/users/types.js +48 -0
- package/dist/esm/types/workspaces/index.js +2 -0
- package/dist/esm/types/workspaces/requests.js +1 -0
- package/dist/esm/types/workspaces/types.js +134 -0
- package/dist/esm/utils/validators.js +30 -2
- package/dist/types/authentication.d.ts +51 -6
- package/dist/types/consts/endpoints.d.ts +22 -0
- package/dist/types/test-utils/test-defaults.d.ts +5 -5
- package/dist/types/todoist-api.d.ts +209 -4
- package/dist/types/types/activity/index.d.ts +2 -0
- package/dist/types/types/activity/requests.d.ts +85 -0
- package/dist/types/types/activity/types.d.ts +49 -0
- package/dist/types/types/backups/index.d.ts +2 -0
- package/dist/types/types/backups/requests.d.ts +16 -0
- package/dist/types/types/backups/types.d.ts +7 -0
- package/dist/types/types/comments/index.d.ts +2 -0
- package/dist/types/types/comments/requests.d.ts +63 -0
- package/dist/types/types/comments/types.d.ts +141 -0
- package/dist/types/types/common.d.ts +6 -0
- package/dist/types/types/emails/index.d.ts +1 -0
- package/dist/types/types/emails/requests.d.ts +30 -0
- package/dist/types/types/id-mappings/index.d.ts +2 -0
- package/dist/types/types/id-mappings/requests.d.ts +28 -0
- package/dist/types/types/id-mappings/types.d.ts +13 -0
- package/dist/types/types/index.d.ts +16 -2
- package/dist/types/types/insights/index.d.ts +2 -0
- package/dist/types/types/insights/requests.d.ts +26 -0
- package/dist/types/types/insights/types.d.ts +186 -0
- package/dist/types/types/labels/index.d.ts +2 -0
- package/dist/types/types/labels/requests.d.ts +75 -0
- package/dist/types/types/labels/types.d.ts +13 -0
- package/dist/types/types/productivity/index.d.ts +1 -0
- package/dist/types/types/productivity/types.d.ts +115 -0
- package/dist/types/types/projects/index.d.ts +2 -0
- package/dist/types/types/projects/requests.d.ts +169 -0
- package/dist/types/types/projects/types.d.ts +201 -0
- package/dist/types/types/reminders/index.d.ts +1 -0
- package/dist/types/types/reminders/requests.d.ts +91 -0
- package/dist/types/types/sections/index.d.ts +2 -0
- package/dist/types/types/sections/requests.d.ts +41 -0
- package/dist/types/types/sections/types.d.ts +44 -0
- package/dist/types/types/sync/commands/projects.d.ts +2 -1
- package/dist/types/types/sync/commands/shared.d.ts +2 -2
- package/dist/types/types/sync/commands/workspaces.d.ts +1 -1
- package/dist/types/types/sync/resources/notes.d.ts +1 -1
- package/dist/types/types/sync/resources/user.d.ts +2 -2
- package/dist/types/types/sync/resources/view-options.d.ts +5 -5
- package/dist/types/types/sync/response.d.ts +5 -1
- package/dist/types/types/sync/user-preferences.d.ts +1 -1
- package/dist/types/types/tasks/index.d.ts +2 -0
- package/dist/types/types/tasks/requests.d.ts +197 -0
- package/dist/types/types/tasks/types.d.ts +162 -0
- package/dist/types/types/templates/index.d.ts +1 -0
- package/dist/types/types/templates/requests.d.ts +92 -0
- package/dist/types/types/uploads/index.d.ts +1 -0
- package/dist/types/types/uploads/requests.d.ts +32 -0
- package/dist/types/types/users/index.d.ts +1 -0
- package/dist/types/types/users/types.d.ts +66 -0
- package/dist/types/types/workspaces/index.d.ts +2 -0
- package/dist/types/types/workspaces/requests.d.ts +260 -0
- package/dist/types/types/workspaces/types.d.ts +225 -0
- package/dist/types/utils/colors.d.ts +1 -1
- package/dist/types/utils/validators.d.ts +205 -12
- package/package.json +1 -1
- package/dist/cjs/types/entities.js +0 -437
- package/dist/esm/types/entities.js +0 -434
- package/dist/types/types/entities.d.ts +0 -971
- package/dist/types/types/requests.d.ts +0 -856
- /package/dist/cjs/types/{requests.js → reminders/requests.js} +0 -0
- /package/dist/esm/types/{requests.js → reminders/requests.js} +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Base schema for all project types in Todoist.
|
|
4
|
+
* Contains common fields shared between personal and workspace projects.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BaseProjectSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
canAssignTasks: z.ZodBoolean;
|
|
9
|
+
childOrder: z.ZodNumber;
|
|
10
|
+
color: z.ZodString;
|
|
11
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
12
|
+
isArchived: z.ZodBoolean;
|
|
13
|
+
isDeleted: z.ZodBoolean;
|
|
14
|
+
isFavorite: z.ZodBoolean;
|
|
15
|
+
isFrozen: z.ZodBoolean;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
18
|
+
viewStyle: z.ZodString;
|
|
19
|
+
defaultOrder: z.ZodNumber;
|
|
20
|
+
description: z.ZodString;
|
|
21
|
+
isCollapsed: z.ZodBoolean;
|
|
22
|
+
isShared: z.ZodBoolean;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
/**
|
|
25
|
+
* Schema for personal projects in Todoist.
|
|
26
|
+
*/
|
|
27
|
+
export declare const PersonalProjectSchema: z.ZodPipe<z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
canAssignTasks: z.ZodBoolean;
|
|
30
|
+
childOrder: z.ZodNumber;
|
|
31
|
+
color: z.ZodString;
|
|
32
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
33
|
+
isArchived: z.ZodBoolean;
|
|
34
|
+
isDeleted: z.ZodBoolean;
|
|
35
|
+
isFavorite: z.ZodBoolean;
|
|
36
|
+
isFrozen: z.ZodBoolean;
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
39
|
+
viewStyle: z.ZodString;
|
|
40
|
+
defaultOrder: z.ZodNumber;
|
|
41
|
+
description: z.ZodString;
|
|
42
|
+
isCollapsed: z.ZodBoolean;
|
|
43
|
+
isShared: z.ZodBoolean;
|
|
44
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
45
|
+
inboxProject: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
46
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
47
|
+
url: string;
|
|
48
|
+
id: string;
|
|
49
|
+
canAssignTasks: boolean;
|
|
50
|
+
childOrder: number;
|
|
51
|
+
color: string;
|
|
52
|
+
createdAt: string | null;
|
|
53
|
+
isArchived: boolean;
|
|
54
|
+
isDeleted: boolean;
|
|
55
|
+
isFavorite: boolean;
|
|
56
|
+
isFrozen: boolean;
|
|
57
|
+
name: string;
|
|
58
|
+
updatedAt: string | null;
|
|
59
|
+
viewStyle: string;
|
|
60
|
+
defaultOrder: number;
|
|
61
|
+
description: string;
|
|
62
|
+
isCollapsed: boolean;
|
|
63
|
+
isShared: boolean;
|
|
64
|
+
parentId: string | null;
|
|
65
|
+
inboxProject: boolean;
|
|
66
|
+
}, {
|
|
67
|
+
id: string;
|
|
68
|
+
canAssignTasks: boolean;
|
|
69
|
+
childOrder: number;
|
|
70
|
+
color: string;
|
|
71
|
+
createdAt: string | null;
|
|
72
|
+
isArchived: boolean;
|
|
73
|
+
isDeleted: boolean;
|
|
74
|
+
isFavorite: boolean;
|
|
75
|
+
isFrozen: boolean;
|
|
76
|
+
name: string;
|
|
77
|
+
updatedAt: string | null;
|
|
78
|
+
viewStyle: string;
|
|
79
|
+
defaultOrder: number;
|
|
80
|
+
description: string;
|
|
81
|
+
isCollapsed: boolean;
|
|
82
|
+
isShared: boolean;
|
|
83
|
+
parentId: string | null;
|
|
84
|
+
inboxProject: boolean;
|
|
85
|
+
}>>;
|
|
86
|
+
/** Available project visibility levels. */
|
|
87
|
+
export declare const PROJECT_VISIBILITIES: readonly ["restricted", "team", "public"];
|
|
88
|
+
/** Visibility level of a workspace project. */
|
|
89
|
+
export type ProjectVisibility = (typeof PROJECT_VISIBILITIES)[number];
|
|
90
|
+
export declare const ProjectVisibilitySchema: z.ZodEnum<{
|
|
91
|
+
restricted: "restricted";
|
|
92
|
+
team: "team";
|
|
93
|
+
public: "public";
|
|
94
|
+
}>;
|
|
95
|
+
/**
|
|
96
|
+
* Schema for workspace projects in Todoist.
|
|
97
|
+
*/
|
|
98
|
+
export declare const WorkspaceProjectSchema: z.ZodPipe<z.ZodObject<{
|
|
99
|
+
id: z.ZodString;
|
|
100
|
+
canAssignTasks: z.ZodBoolean;
|
|
101
|
+
childOrder: z.ZodNumber;
|
|
102
|
+
color: z.ZodString;
|
|
103
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
104
|
+
isArchived: z.ZodBoolean;
|
|
105
|
+
isDeleted: z.ZodBoolean;
|
|
106
|
+
isFavorite: z.ZodBoolean;
|
|
107
|
+
isFrozen: z.ZodBoolean;
|
|
108
|
+
name: z.ZodString;
|
|
109
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
110
|
+
viewStyle: z.ZodString;
|
|
111
|
+
defaultOrder: z.ZodNumber;
|
|
112
|
+
description: z.ZodString;
|
|
113
|
+
isCollapsed: z.ZodBoolean;
|
|
114
|
+
isShared: z.ZodBoolean;
|
|
115
|
+
access: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
visibility: z.ZodEnum<{
|
|
117
|
+
restricted: "restricted";
|
|
118
|
+
team: "team";
|
|
119
|
+
public: "public";
|
|
120
|
+
}>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
collaboratorRoleDefault: z.ZodString;
|
|
123
|
+
folderId: z.ZodNullable<z.ZodString>;
|
|
124
|
+
isInviteOnly: z.ZodNullable<z.ZodBoolean>;
|
|
125
|
+
isLinkSharingEnabled: z.ZodBoolean;
|
|
126
|
+
role: z.ZodNullable<z.ZodString>;
|
|
127
|
+
status: z.ZodString;
|
|
128
|
+
workspaceId: z.ZodString;
|
|
129
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
130
|
+
url: string;
|
|
131
|
+
id: string;
|
|
132
|
+
canAssignTasks: boolean;
|
|
133
|
+
childOrder: number;
|
|
134
|
+
color: string;
|
|
135
|
+
createdAt: string | null;
|
|
136
|
+
isArchived: boolean;
|
|
137
|
+
isDeleted: boolean;
|
|
138
|
+
isFavorite: boolean;
|
|
139
|
+
isFrozen: boolean;
|
|
140
|
+
name: string;
|
|
141
|
+
updatedAt: string | null;
|
|
142
|
+
viewStyle: string;
|
|
143
|
+
defaultOrder: number;
|
|
144
|
+
description: string;
|
|
145
|
+
isCollapsed: boolean;
|
|
146
|
+
isShared: boolean;
|
|
147
|
+
collaboratorRoleDefault: string;
|
|
148
|
+
folderId: string | null;
|
|
149
|
+
isInviteOnly: boolean | null;
|
|
150
|
+
isLinkSharingEnabled: boolean;
|
|
151
|
+
role: string | null;
|
|
152
|
+
status: string;
|
|
153
|
+
workspaceId: string;
|
|
154
|
+
access?: {
|
|
155
|
+
visibility: "restricted" | "team" | "public";
|
|
156
|
+
} | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
id: string;
|
|
159
|
+
canAssignTasks: boolean;
|
|
160
|
+
childOrder: number;
|
|
161
|
+
color: string;
|
|
162
|
+
createdAt: string | null;
|
|
163
|
+
isArchived: boolean;
|
|
164
|
+
isDeleted: boolean;
|
|
165
|
+
isFavorite: boolean;
|
|
166
|
+
isFrozen: boolean;
|
|
167
|
+
name: string;
|
|
168
|
+
updatedAt: string | null;
|
|
169
|
+
viewStyle: string;
|
|
170
|
+
defaultOrder: number;
|
|
171
|
+
description: string;
|
|
172
|
+
isCollapsed: boolean;
|
|
173
|
+
isShared: boolean;
|
|
174
|
+
collaboratorRoleDefault: string;
|
|
175
|
+
folderId: string | null;
|
|
176
|
+
isInviteOnly: boolean | null;
|
|
177
|
+
isLinkSharingEnabled: boolean;
|
|
178
|
+
role: string | null;
|
|
179
|
+
status: string;
|
|
180
|
+
workspaceId: string;
|
|
181
|
+
access?: {
|
|
182
|
+
visibility: "restricted" | "team" | "public";
|
|
183
|
+
} | undefined;
|
|
184
|
+
}>>;
|
|
185
|
+
/**
|
|
186
|
+
* Represents a personal project in Todoist.
|
|
187
|
+
* @see https://developer.todoist.com/api/v1/#tag/Projects
|
|
188
|
+
*/
|
|
189
|
+
export type PersonalProject = z.infer<typeof PersonalProjectSchema>;
|
|
190
|
+
/**
|
|
191
|
+
* Represents a workspace project in Todoist.
|
|
192
|
+
* @see https://developer.todoist.com/api/v1/#tag/Projects
|
|
193
|
+
*/
|
|
194
|
+
export type WorkspaceProject = z.infer<typeof WorkspaceProjectSchema>;
|
|
195
|
+
/** Available project view styles. */
|
|
196
|
+
export declare const PROJECT_VIEW_STYLES: readonly ["list", "board", "calendar"];
|
|
197
|
+
/**
|
|
198
|
+
* View style for a project.
|
|
199
|
+
* @see https://developer.todoist.com/api/v1/#tag/Projects
|
|
200
|
+
*/
|
|
201
|
+
export type ProjectViewStyle = (typeof PROJECT_VIEW_STYLES)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './requests.js';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { DueDate } from '../tasks/types.js';
|
|
2
|
+
import type { LocationTrigger, Reminder, LocationReminder } from '../sync/resources/reminders.js';
|
|
3
|
+
/** Available reminder delivery services. */
|
|
4
|
+
export declare const REMINDER_DELIVERY_SERVICES: readonly ["email", "push"];
|
|
5
|
+
/** Delivery service for a reminder notification. */
|
|
6
|
+
export type ReminderDeliveryService = (typeof REMINDER_DELIVERY_SERVICES)[number];
|
|
7
|
+
export type ReminderDueDate = Partial<Pick<DueDate, 'date' | 'string' | 'timezone' | 'lang' | 'isRecurring'>>;
|
|
8
|
+
type ReminderTaskArgs = {
|
|
9
|
+
taskId: string;
|
|
10
|
+
};
|
|
11
|
+
type TimeBasedReminderArgs = {
|
|
12
|
+
service?: ReminderDeliveryService;
|
|
13
|
+
notifyUid?: string;
|
|
14
|
+
isUrgent?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type AddLocationReminderFields = {
|
|
17
|
+
notifyUid?: string;
|
|
18
|
+
name: string;
|
|
19
|
+
locLat: string;
|
|
20
|
+
locLong: string;
|
|
21
|
+
locTrigger: LocationTrigger;
|
|
22
|
+
radius?: number;
|
|
23
|
+
};
|
|
24
|
+
export type AddRelativeReminderArgs = ReminderTaskArgs & {
|
|
25
|
+
reminderType?: 'relative';
|
|
26
|
+
minuteOffset: number;
|
|
27
|
+
} & TimeBasedReminderArgs;
|
|
28
|
+
export type AddAbsoluteReminderArgs = ReminderTaskArgs & {
|
|
29
|
+
reminderType: 'absolute';
|
|
30
|
+
due: ReminderDueDate;
|
|
31
|
+
} & TimeBasedReminderArgs;
|
|
32
|
+
export type AddLocationReminderArgs = ReminderTaskArgs & AddLocationReminderFields;
|
|
33
|
+
/**
|
|
34
|
+
* Arguments for creating a new reminder.
|
|
35
|
+
* @see https://developer.todoist.com/api/v1/#tag/Reminders/operation/create_reminder_api_v1_reminders_post
|
|
36
|
+
*/
|
|
37
|
+
export type AddReminderArgs = AddRelativeReminderArgs | AddAbsoluteReminderArgs;
|
|
38
|
+
export type UpdateRelativeReminderArgs = {
|
|
39
|
+
reminderType: 'relative';
|
|
40
|
+
} & Partial<Omit<AddRelativeReminderArgs, 'taskId' | 'reminderType'>>;
|
|
41
|
+
export type UpdateAbsoluteReminderArgs = {
|
|
42
|
+
reminderType: 'absolute';
|
|
43
|
+
} & Partial<Omit<AddAbsoluteReminderArgs, 'taskId' | 'reminderType'>>;
|
|
44
|
+
/**
|
|
45
|
+
* Arguments for updating an existing reminder.
|
|
46
|
+
* @see https://developer.todoist.com/api/v1/#tag/Reminders/operation/update_reminder_api_v1_reminders__reminder_id__post
|
|
47
|
+
*/
|
|
48
|
+
export type UpdateReminderArgs = UpdateRelativeReminderArgs | UpdateAbsoluteReminderArgs;
|
|
49
|
+
/**
|
|
50
|
+
* Arguments for updating an existing location reminder.
|
|
51
|
+
*/
|
|
52
|
+
export type UpdateLocationReminderArgs = Partial<Omit<AddLocationReminderArgs, 'taskId'>>;
|
|
53
|
+
/**
|
|
54
|
+
* Arguments for listing reminders.
|
|
55
|
+
* @see https://developer.todoist.com/api/v1/#tag/Reminders/operation/get_reminders_api_v1_reminders_get
|
|
56
|
+
*/
|
|
57
|
+
export type GetRemindersArgs = {
|
|
58
|
+
/** Filter by task ID. */
|
|
59
|
+
taskId?: string | null;
|
|
60
|
+
/** Cursor for pagination. */
|
|
61
|
+
cursor?: string | null;
|
|
62
|
+
/** Number of results per page (max 200, default 50). */
|
|
63
|
+
limit?: number;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Paginated response for reminders.
|
|
67
|
+
*/
|
|
68
|
+
export type GetRemindersResponse = {
|
|
69
|
+
results: Reminder[];
|
|
70
|
+
nextCursor: string | null;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Arguments for listing location reminders.
|
|
74
|
+
* @see https://developer.todoist.com/api/v1/#tag/Location-reminders/operation/get_location_reminders_api_v1_location_reminders_get
|
|
75
|
+
*/
|
|
76
|
+
export type GetLocationRemindersArgs = {
|
|
77
|
+
/** Filter by task ID. */
|
|
78
|
+
taskId?: string | null;
|
|
79
|
+
/** Cursor for pagination. */
|
|
80
|
+
cursor?: string | null;
|
|
81
|
+
/** Number of results per page (max 200, default 50). */
|
|
82
|
+
limit?: number;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Paginated response for location reminders.
|
|
86
|
+
*/
|
|
87
|
+
export type GetLocationRemindersResponse = {
|
|
88
|
+
results: LocationReminder[];
|
|
89
|
+
nextCursor: string | null;
|
|
90
|
+
};
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SearchArgs } from '../common.js';
|
|
2
|
+
import type { Section } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for retrieving sections.
|
|
5
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections/operation/get_sections_api_v1_sections_get
|
|
6
|
+
*/
|
|
7
|
+
export type GetSectionsArgs = {
|
|
8
|
+
projectId?: string | null;
|
|
9
|
+
cursor?: string | null;
|
|
10
|
+
limit?: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Arguments for searching sections.
|
|
14
|
+
*/
|
|
15
|
+
export type SearchSectionsArgs = SearchArgs & {
|
|
16
|
+
projectId?: string | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Response from retrieving sections.
|
|
20
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections/operation/get_sections_api_v1_sections_get
|
|
21
|
+
*/
|
|
22
|
+
export type GetSectionsResponse = {
|
|
23
|
+
results: Section[];
|
|
24
|
+
nextCursor: string | null;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Arguments for creating a new section.
|
|
28
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections/operation/create_section_api_v1_sections_post
|
|
29
|
+
*/
|
|
30
|
+
export type AddSectionArgs = {
|
|
31
|
+
name: string;
|
|
32
|
+
projectId: string;
|
|
33
|
+
order?: number | null;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Arguments for updating a section.
|
|
37
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections/operation/update_section_api_v1_sections__section_id__post
|
|
38
|
+
*/
|
|
39
|
+
export type UpdateSectionArgs = {
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SectionSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
userId: z.ZodString;
|
|
5
|
+
projectId: z.ZodString;
|
|
6
|
+
addedAt: z.ZodString;
|
|
7
|
+
updatedAt: z.ZodString;
|
|
8
|
+
archivedAt: z.ZodNullable<z.ZodString>;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
sectionOrder: z.ZodNumber;
|
|
11
|
+
isArchived: z.ZodBoolean;
|
|
12
|
+
isDeleted: z.ZodBoolean;
|
|
13
|
+
isCollapsed: z.ZodBoolean;
|
|
14
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
15
|
+
url: string;
|
|
16
|
+
id: string;
|
|
17
|
+
userId: string;
|
|
18
|
+
projectId: string;
|
|
19
|
+
addedAt: string;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
archivedAt: string | null;
|
|
22
|
+
name: string;
|
|
23
|
+
sectionOrder: number;
|
|
24
|
+
isArchived: boolean;
|
|
25
|
+
isDeleted: boolean;
|
|
26
|
+
isCollapsed: boolean;
|
|
27
|
+
}, {
|
|
28
|
+
id: string;
|
|
29
|
+
userId: string;
|
|
30
|
+
projectId: string;
|
|
31
|
+
addedAt: string;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
archivedAt: string | null;
|
|
34
|
+
name: string;
|
|
35
|
+
sectionOrder: number;
|
|
36
|
+
isArchived: boolean;
|
|
37
|
+
isDeleted: boolean;
|
|
38
|
+
isCollapsed: boolean;
|
|
39
|
+
}>>;
|
|
40
|
+
/**
|
|
41
|
+
* Represents a section in a Todoist project.
|
|
42
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections
|
|
43
|
+
*/
|
|
44
|
+
export type Section = z.infer<typeof SectionSchema>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ProjectViewStyle, ProjectVisibility
|
|
1
|
+
import type { ProjectViewStyle, ProjectVisibility } from '../../projects/types.js';
|
|
2
|
+
import type { WorkspaceRole, CollaboratorRole } from '../../workspaces/types.js';
|
|
2
3
|
import type { ProjectStatus } from './shared.js';
|
|
3
4
|
import type { ColorKey } from '../../../utils/colors.js';
|
|
4
5
|
export type ProjectAccessConfig = {
|
|
@@ -35,7 +35,7 @@ export type TaskPriority = 1 | 2 | 3 | 4;
|
|
|
35
35
|
export declare const PROJECT_STATUSES: readonly ["PLANNED", "IN_PROGRESS", "PAUSED", "COMPLETED", "CANCELED"];
|
|
36
36
|
/** Project workflow status. */
|
|
37
37
|
export type ProjectStatus = (typeof PROJECT_STATUSES)[number];
|
|
38
|
-
export { COLLABORATOR_ROLES, type CollaboratorRole } from '../../
|
|
38
|
+
export { COLLABORATOR_ROLES, type CollaboratorRole } from '../../workspaces/types.js';
|
|
39
39
|
/** Available reminder notification services. */
|
|
40
40
|
export declare const REMINDER_SERVICES: readonly ["default", "email", "mobile", "push", "no_default"];
|
|
41
41
|
/** Reminder notification service. */
|
|
@@ -44,7 +44,7 @@ export type ReminderService = (typeof REMINDER_SERVICES)[number];
|
|
|
44
44
|
* Default access level for workspaces.
|
|
45
45
|
* Same values as {@link ProjectVisibility} from entities.
|
|
46
46
|
*/
|
|
47
|
-
export { type ProjectVisibility as DefaultAccessLevel } from '../../
|
|
47
|
+
export { type ProjectVisibility as DefaultAccessLevel } from '../../projects/types.js';
|
|
48
48
|
/** Available workspace project sort orders. */
|
|
49
49
|
export declare const WORKSPACE_PROJECT_SORT_ORDERS: readonly ["MANUAL", "A_TO_Z", "Z_TO_A"];
|
|
50
50
|
/** Workspace project sort order preference. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WorkspaceRole } from '../../
|
|
1
|
+
import type { WorkspaceRole } from '../../workspaces/types.js';
|
|
2
2
|
import type { DefaultAccessLevel, WorkspaceProjectSortOrder } from './shared.js';
|
|
3
3
|
export type SyncWorkspaceProperties = {
|
|
4
4
|
organizationSize?: string;
|
|
@@ -17,8 +17,8 @@ export declare const NoteSchema: z.ZodObject<{
|
|
|
17
17
|
fileUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
18
|
fileDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
19
19
|
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
20
|
-
pending: "pending";
|
|
21
20
|
completed: "completed";
|
|
21
|
+
pending: "pending";
|
|
22
22
|
}>>>;
|
|
23
23
|
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
24
|
imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -89,7 +89,7 @@ export declare const SyncUserSchema: z.ZodObject<{
|
|
|
89
89
|
mfaEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
90
90
|
mobileHost: z.ZodNullable<z.ZodString>;
|
|
91
91
|
mobileNumber: z.ZodNullable<z.ZodString>;
|
|
92
|
-
nextWeek: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 |
|
|
92
|
+
nextWeek: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 | 6 | 7>>;
|
|
93
93
|
onboardingLevel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
94
|
onboardingRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
95
|
onboardingPersona: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -113,7 +113,7 @@ export declare const SyncUserSchema: z.ZodObject<{
|
|
|
113
113
|
}, z.core.$strip>>>;
|
|
114
114
|
shareLimit: z.ZodNumber;
|
|
115
115
|
sortOrder: z.ZodNumber;
|
|
116
|
-
startDay: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 |
|
|
116
|
+
startDay: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 | 6 | 7>>;
|
|
117
117
|
startPage: z.ZodString;
|
|
118
118
|
themeId: z.ZodString;
|
|
119
119
|
timeFormat: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"24h" | "12h", 0 | 1>>;
|
|
@@ -4,9 +4,9 @@ export declare const VIEW_TYPES: readonly ["TODAY", "UPCOMING", "PROJECT", "LABE
|
|
|
4
4
|
/** Type of view in the Todoist UI. */
|
|
5
5
|
export type ViewType = (typeof VIEW_TYPES)[number];
|
|
6
6
|
export declare const ViewTypeSchema: z.ZodEnum<{
|
|
7
|
+
PROJECT: "PROJECT";
|
|
7
8
|
TODAY: "TODAY";
|
|
8
9
|
UPCOMING: "UPCOMING";
|
|
9
|
-
PROJECT: "PROJECT";
|
|
10
10
|
LABEL: "LABEL";
|
|
11
11
|
FILTER: "FILTER";
|
|
12
12
|
WORKSPACE_FILTER: "WORKSPACE_FILTER";
|
|
@@ -46,8 +46,8 @@ export declare const SORTED_BY_OPTIONS: readonly ["MANUAL", "ALPHABETICALLY", "A
|
|
|
46
46
|
/** Field to sort tasks by. */
|
|
47
47
|
export type SortedBy = (typeof SORTED_BY_OPTIONS)[number];
|
|
48
48
|
export declare const SortedBySchema: z.ZodNullable<z.ZodEnum<{
|
|
49
|
-
MANUAL: "MANUAL";
|
|
50
49
|
PROJECT: "PROJECT";
|
|
50
|
+
MANUAL: "MANUAL";
|
|
51
51
|
ASSIGNEE: "ASSIGNEE";
|
|
52
52
|
ADDED_DATE: "ADDED_DATE";
|
|
53
53
|
DUE_DATE: "DUE_DATE";
|
|
@@ -76,9 +76,9 @@ export declare const CalendarSettingsSchema: z.ZodObject<{
|
|
|
76
76
|
}, z.core.$loose>;
|
|
77
77
|
export declare const ViewOptionsSchema: z.ZodObject<{
|
|
78
78
|
viewType: z.ZodEnum<{
|
|
79
|
+
PROJECT: "PROJECT";
|
|
79
80
|
TODAY: "TODAY";
|
|
80
81
|
UPCOMING: "UPCOMING";
|
|
81
|
-
PROJECT: "PROJECT";
|
|
82
82
|
LABEL: "LABEL";
|
|
83
83
|
FILTER: "FILTER";
|
|
84
84
|
WORKSPACE_FILTER: "WORKSPACE_FILTER";
|
|
@@ -109,8 +109,8 @@ export declare const ViewOptionsSchema: z.ZodObject<{
|
|
|
109
109
|
}>>;
|
|
110
110
|
showCompletedTasks: z.ZodOptional<z.ZodBoolean>;
|
|
111
111
|
sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
112
|
-
MANUAL: "MANUAL";
|
|
113
112
|
PROJECT: "PROJECT";
|
|
113
|
+
MANUAL: "MANUAL";
|
|
114
114
|
ASSIGNEE: "ASSIGNEE";
|
|
115
115
|
ADDED_DATE: "ADDED_DATE";
|
|
116
116
|
DUE_DATE: "DUE_DATE";
|
|
@@ -143,8 +143,8 @@ export declare const ProjectViewOptionsDefaultsSchema: z.ZodObject<{
|
|
|
143
143
|
WORKSPACE: "WORKSPACE";
|
|
144
144
|
}>>>;
|
|
145
145
|
sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
146
|
-
MANUAL: "MANUAL";
|
|
147
146
|
PROJECT: "PROJECT";
|
|
147
|
+
MANUAL: "MANUAL";
|
|
148
148
|
ASSIGNEE: "ASSIGNEE";
|
|
149
149
|
ADDED_DATE: "ADDED_DATE";
|
|
150
150
|
DUE_DATE: "DUE_DATE";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type { Task
|
|
1
|
+
import type { Task } from '../tasks/types.js';
|
|
2
|
+
import type { PersonalProject, WorkspaceProject } from '../projects/types.js';
|
|
3
|
+
import type { Section } from '../sections/types.js';
|
|
4
|
+
import type { Label } from '../labels/types.js';
|
|
5
|
+
import type { WorkspaceUser } from '../workspaces/types.js';
|
|
2
6
|
import type { Filter, Collaborator, CollaboratorState, Folder, Note, Tooltips, WorkspaceFilter, WorkspaceGoal, Calendar, CalendarAccount, Reminder, CompletedInfo, ViewOptions, ProjectViewOptionsDefaults, UserPlanLimits, LiveNotification, SyncWorkspace, SyncUser, UserSettings, LocationReminder, Suggestion } from './resources/index.js';
|
|
3
7
|
export type SyncError = {
|
|
4
8
|
error: string;
|
|
@@ -36,4 +36,4 @@ export declare const BooleanFromZeroOneSchema: z.ZodPipe<z.ZodUnion<readonly [z.
|
|
|
36
36
|
/** Zod read-schemas: parse API numbers, emit descriptive strings */
|
|
37
37
|
export declare const DateFormatSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"DD/MM/YYYY" | "MM/DD/YYYY", 0 | 1>>;
|
|
38
38
|
export declare const TimeFormatSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"24h" | "12h", 0 | 1>>;
|
|
39
|
-
export declare const DayOfWeekSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 |
|
|
39
|
+
export declare const DayOfWeekSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 | 6 | 7>>;
|