@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.
- package/dist/cjs/todoist-api.js +8 -7
- 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/{requests.js → id-mappings/requests.js} +1 -7
- 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/reminders/requests.js +5 -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 +38 -27
- package/dist/esm/todoist-api.js +4 -3
- 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/{requests.js → id-mappings/requests.js} +0 -6
- 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/reminders/requests.js +2 -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 +12 -1
- package/dist/types/test-utils/test-defaults.d.ts +5 -5
- package/dist/types/todoist-api.d.ts +16 -2
- 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 +64 -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/response.d.ts +5 -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 +7 -6
- package/package.json +3 -3
- package/dist/cjs/types/entities.js +0 -552
- package/dist/esm/types/entities.js +0 -548
- package/dist/types/types/entities.d.ts +0 -1211
- package/dist/types/types/requests.d.ts +0 -1188
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './requests.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Object types that support email forwarding. */
|
|
2
|
+
export declare const EMAIL_OBJECT_TYPES: readonly ["project", "project_comments", "task"];
|
|
3
|
+
/** Object type that supports email forwarding. */
|
|
4
|
+
export type EmailObjectType = (typeof EMAIL_OBJECT_TYPES)[number];
|
|
5
|
+
/**
|
|
6
|
+
* Arguments for getting or creating an email forwarding address.
|
|
7
|
+
* @see https://developer.todoist.com/api/v1/#tag/Emails/operation/email_get_or_create_api_v1_emails_put
|
|
8
|
+
*/
|
|
9
|
+
export type GetOrCreateEmailArgs = {
|
|
10
|
+
/** The type of object to forward emails to. */
|
|
11
|
+
objType: EmailObjectType;
|
|
12
|
+
/** The ID of the object. */
|
|
13
|
+
objId: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Response from getting or creating an email forwarding address.
|
|
17
|
+
*/
|
|
18
|
+
export type GetOrCreateEmailResponse = {
|
|
19
|
+
email: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Arguments for disabling email forwarding.
|
|
23
|
+
* @see https://developer.todoist.com/api/v1/#tag/Emails/operation/email_disable_api_v1_emails_delete
|
|
24
|
+
*/
|
|
25
|
+
export type DisableEmailArgs = {
|
|
26
|
+
/** The type of object to disable forwarding for. */
|
|
27
|
+
objType: EmailObjectType;
|
|
28
|
+
/** The ID of the object. */
|
|
29
|
+
objId: string;
|
|
30
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Object types that support ID mappings. */
|
|
2
|
+
export declare const ID_MAPPING_OBJECT_TYPES: readonly ["sections", "tasks", "comments", "reminders", "location_reminders", "projects"];
|
|
3
|
+
/** Object type that supports ID mappings. */
|
|
4
|
+
export type IdMappingObjectType = (typeof ID_MAPPING_OBJECT_TYPES)[number];
|
|
5
|
+
/** Object types that support moved ID lookups. */
|
|
6
|
+
export declare const MOVED_ID_OBJECT_TYPES: readonly ["sections", "tasks", "comments", "reminders", "location_reminders"];
|
|
7
|
+
/** Object type that supports moved ID lookups. */
|
|
8
|
+
export type MovedIdObjectType = (typeof MOVED_ID_OBJECT_TYPES)[number];
|
|
9
|
+
/**
|
|
10
|
+
* Arguments for getting ID mappings between old and new IDs.
|
|
11
|
+
* @see https://developer.todoist.com/api/v1/#tag/Ids/operation/id_mappings_api_v1_id_mappings__obj_name___obj_ids__get
|
|
12
|
+
*/
|
|
13
|
+
export type GetIdMappingsArgs = {
|
|
14
|
+
/** The type of object to look up. */
|
|
15
|
+
objName: IdMappingObjectType;
|
|
16
|
+
/** Array of IDs to look up. */
|
|
17
|
+
objIds: [string, ...string[]];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Arguments for getting moved IDs.
|
|
21
|
+
* @see https://developer.todoist.com/api/v1/#tag/Ids/operation/moved_ids_api_v1_moved_ids__obj_name__get
|
|
22
|
+
*/
|
|
23
|
+
export type GetMovedIdsArgs = {
|
|
24
|
+
/** The type of object to look up. */
|
|
25
|
+
objName: MovedIdObjectType;
|
|
26
|
+
/** Array of old IDs to look up. */
|
|
27
|
+
oldIds?: string[];
|
|
28
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const IdMappingSchema: z.ZodObject<{
|
|
3
|
+
oldId: z.ZodNullable<z.ZodString>;
|
|
4
|
+
newId: z.ZodNullable<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
/** Mapping between old and new IDs after migration. */
|
|
7
|
+
export type IdMapping = z.infer<typeof IdMappingSchema>;
|
|
8
|
+
export declare const MovedIdSchema: z.ZodObject<{
|
|
9
|
+
oldId: z.ZodString;
|
|
10
|
+
newId: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
/** A moved ID pair (old to new). */
|
|
13
|
+
export type MovedId = z.infer<typeof MovedIdSchema>;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './tasks/index.js';
|
|
2
|
+
export * from './projects/index.js';
|
|
3
|
+
export * from './sections/index.js';
|
|
4
|
+
export * from './labels/index.js';
|
|
5
|
+
export * from './comments/index.js';
|
|
6
|
+
export * from './reminders/index.js';
|
|
7
|
+
export * from './users/index.js';
|
|
8
|
+
export * from './productivity/index.js';
|
|
9
|
+
export * from './activity/index.js';
|
|
10
|
+
export * from './workspaces/index.js';
|
|
11
|
+
export * from './insights/index.js';
|
|
12
|
+
export * from './backups/index.js';
|
|
13
|
+
export * from './id-mappings/index.js';
|
|
14
|
+
export * from './emails/index.js';
|
|
15
|
+
export * from './uploads/index.js';
|
|
16
|
+
export * from './templates/index.js';
|
|
2
17
|
export * from './errors.js';
|
|
3
|
-
export * from './requests.js';
|
|
4
18
|
export * from './http.js';
|
|
5
19
|
export * from './sync/index.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Known activity object types. Accepts any string for forward compatibility. */
|
|
2
|
+
export type InsightsObjectType = 'ITEM' | 'PROJECT' | 'NOTE' | (string & Record<string, never>);
|
|
3
|
+
/** Known activity event types. Accepts any string for forward compatibility. */
|
|
4
|
+
export type InsightsEventType = 'ADDED' | 'DELETED' | 'UPDATED' | 'ARCHIVED' | 'UNARCHIVED' | 'COMPLETED' | 'UNCOMPLETED' | 'SHARED' | 'LEFT' | (string & Record<string, never>);
|
|
5
|
+
/**
|
|
6
|
+
* Arguments for getting project activity stats.
|
|
7
|
+
* @see https://developer.todoist.com/api/v1/#tag/Insights/operation/get_project_activity_stats_api_v1_projects__project_id__insights_activity_stats_get
|
|
8
|
+
*/
|
|
9
|
+
export type GetProjectActivityStatsArgs = {
|
|
10
|
+
/** The type of object to get activity counts for (default: 'ITEM'). */
|
|
11
|
+
objectType?: InsightsObjectType;
|
|
12
|
+
/** The type of event to count (default: 'COMPLETED'). */
|
|
13
|
+
eventType?: InsightsEventType;
|
|
14
|
+
/** Number of weeks of activity counts to retrieve (1-12, default 2). */
|
|
15
|
+
weeks?: number;
|
|
16
|
+
/** Whether to include weekly rollup counts in the response. */
|
|
17
|
+
includeWeeklyCounts?: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Arguments for getting workspace insights.
|
|
21
|
+
* @see https://developer.todoist.com/api/v1/#tag/Insights/operation/get_workspace_insights_api_v1_workspaces__workspace_id__insights_get
|
|
22
|
+
*/
|
|
23
|
+
export type GetWorkspaceInsightsArgs = {
|
|
24
|
+
/** Project IDs to get insights for. */
|
|
25
|
+
projectIds?: string[];
|
|
26
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DayActivitySchema: z.ZodObject<{
|
|
3
|
+
date: z.ZodString;
|
|
4
|
+
totalCount: z.ZodNumber;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
/** Daily activity count for a specific date. */
|
|
7
|
+
export type DayActivity = z.infer<typeof DayActivitySchema>;
|
|
8
|
+
export declare const WeekRollupSchema: z.ZodObject<{
|
|
9
|
+
fromDate: z.ZodString;
|
|
10
|
+
toDate: z.ZodString;
|
|
11
|
+
totalCount: z.ZodNumber;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
/** Weekly rollup of activity data. */
|
|
14
|
+
export type WeekRollup = z.infer<typeof WeekRollupSchema>;
|
|
15
|
+
export declare const ProjectActivityStatsSchema: z.ZodObject<{
|
|
16
|
+
dayItems: z.ZodArray<z.ZodObject<{
|
|
17
|
+
date: z.ZodString;
|
|
18
|
+
totalCount: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
weekItems: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
21
|
+
fromDate: z.ZodString;
|
|
22
|
+
toDate: z.ZodString;
|
|
23
|
+
totalCount: z.ZodNumber;
|
|
24
|
+
}, z.core.$strip>>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
/** Project activity statistics with daily and optional weekly rollups. */
|
|
27
|
+
export type ProjectActivityStats = z.infer<typeof ProjectActivityStatsSchema>;
|
|
28
|
+
/** Available project health statuses. */
|
|
29
|
+
export declare const HEALTH_STATUSES: readonly ["UNKNOWN", "ON_TRACK", "AT_RISK", "CRITICAL", "EXCELLENT", "ERROR"];
|
|
30
|
+
/** Health status of a project. */
|
|
31
|
+
export type HealthStatus = (typeof HEALTH_STATUSES)[number];
|
|
32
|
+
export declare const TaskRecommendationSchema: z.ZodObject<{
|
|
33
|
+
taskId: z.ZodString;
|
|
34
|
+
recommendation: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
/** A recommendation for a specific task. */
|
|
37
|
+
export type TaskRecommendation = z.infer<typeof TaskRecommendationSchema>;
|
|
38
|
+
export declare const ProjectHealthSchema: z.ZodObject<{
|
|
39
|
+
status: z.ZodEnum<{
|
|
40
|
+
UNKNOWN: "UNKNOWN";
|
|
41
|
+
ON_TRACK: "ON_TRACK";
|
|
42
|
+
AT_RISK: "AT_RISK";
|
|
43
|
+
CRITICAL: "CRITICAL";
|
|
44
|
+
EXCELLENT: "EXCELLENT";
|
|
45
|
+
ERROR: "ERROR";
|
|
46
|
+
}>;
|
|
47
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
+
descriptionSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
taskRecommendations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
50
|
+
taskId: z.ZodString;
|
|
51
|
+
recommendation: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>>>;
|
|
53
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
+
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
+
updateInProgress: z.ZodDefault<z.ZodBoolean>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
/** Project health status and recommendations. */
|
|
59
|
+
export type ProjectHealth = z.infer<typeof ProjectHealthSchema>;
|
|
60
|
+
export declare const ProjectMetricsSchema: z.ZodObject<{
|
|
61
|
+
totalTasks: z.ZodNumber;
|
|
62
|
+
completedTasks: z.ZodNumber;
|
|
63
|
+
overdueTasks: z.ZodNumber;
|
|
64
|
+
tasksCreatedThisWeek: z.ZodNumber;
|
|
65
|
+
tasksCompletedThisWeek: z.ZodNumber;
|
|
66
|
+
averageCompletionTime: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
/** Project metrics summary. */
|
|
69
|
+
export type ProjectMetrics = z.infer<typeof ProjectMetricsSchema>;
|
|
70
|
+
export declare const TaskContextSchema: z.ZodObject<{
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
content: z.ZodString;
|
|
73
|
+
due: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
deadline: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
priority: z.ZodString;
|
|
76
|
+
isCompleted: z.ZodBoolean;
|
|
77
|
+
createdAt: z.ZodString;
|
|
78
|
+
updatedAt: z.ZodString;
|
|
79
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
80
|
+
completedByUid: z.ZodNullable<z.ZodString>;
|
|
81
|
+
labels: z.ZodArray<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
/** Task context used in health analysis. */
|
|
84
|
+
export type TaskContext = z.infer<typeof TaskContextSchema>;
|
|
85
|
+
export declare const ProjectHealthContextSchema: z.ZodObject<{
|
|
86
|
+
projectId: z.ZodString;
|
|
87
|
+
projectName: z.ZodString;
|
|
88
|
+
projectDescription: z.ZodNullable<z.ZodString>;
|
|
89
|
+
projectMetrics: z.ZodObject<{
|
|
90
|
+
totalTasks: z.ZodNumber;
|
|
91
|
+
completedTasks: z.ZodNumber;
|
|
92
|
+
overdueTasks: z.ZodNumber;
|
|
93
|
+
tasksCreatedThisWeek: z.ZodNumber;
|
|
94
|
+
tasksCompletedThisWeek: z.ZodNumber;
|
|
95
|
+
averageCompletionTime: z.ZodNullable<z.ZodNumber>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
content: z.ZodString;
|
|
100
|
+
due: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
deadline: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
priority: z.ZodString;
|
|
103
|
+
isCompleted: z.ZodBoolean;
|
|
104
|
+
createdAt: z.ZodString;
|
|
105
|
+
updatedAt: z.ZodString;
|
|
106
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
107
|
+
completedByUid: z.ZodNullable<z.ZodString>;
|
|
108
|
+
labels: z.ZodArray<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
/** Full project context for health analysis. */
|
|
113
|
+
export type ProjectHealthContext = z.infer<typeof ProjectHealthContextSchema>;
|
|
114
|
+
export declare const ProjectProgressSchema: z.ZodObject<{
|
|
115
|
+
projectId: z.ZodString;
|
|
116
|
+
completedCount: z.ZodNumber;
|
|
117
|
+
activeCount: z.ZodNumber;
|
|
118
|
+
progressPercent: z.ZodNumber;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
/** Project progress with completion counts and percentage. */
|
|
121
|
+
export type ProjectProgress = z.infer<typeof ProjectProgressSchema>;
|
|
122
|
+
export declare const ProjectInsightSchema: z.ZodObject<{
|
|
123
|
+
projectId: z.ZodString;
|
|
124
|
+
health: z.ZodNullable<z.ZodObject<{
|
|
125
|
+
status: z.ZodEnum<{
|
|
126
|
+
UNKNOWN: "UNKNOWN";
|
|
127
|
+
ON_TRACK: "ON_TRACK";
|
|
128
|
+
AT_RISK: "AT_RISK";
|
|
129
|
+
CRITICAL: "CRITICAL";
|
|
130
|
+
EXCELLENT: "EXCELLENT";
|
|
131
|
+
ERROR: "ERROR";
|
|
132
|
+
}>;
|
|
133
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
descriptionSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
135
|
+
taskRecommendations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
136
|
+
taskId: z.ZodString;
|
|
137
|
+
recommendation: z.ZodString;
|
|
138
|
+
}, z.core.$strip>>>>;
|
|
139
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
142
|
+
updateInProgress: z.ZodDefault<z.ZodBoolean>;
|
|
143
|
+
}, z.core.$strip>>;
|
|
144
|
+
progress: z.ZodNullable<z.ZodObject<{
|
|
145
|
+
projectId: z.ZodString;
|
|
146
|
+
completedCount: z.ZodNumber;
|
|
147
|
+
activeCount: z.ZodNumber;
|
|
148
|
+
progressPercent: z.ZodNumber;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
/** Insight data for a single project within a workspace. */
|
|
152
|
+
export type ProjectInsight = z.infer<typeof ProjectInsightSchema>;
|
|
153
|
+
export declare const WorkspaceInsightsSchema: z.ZodObject<{
|
|
154
|
+
folderId: z.ZodNullable<z.ZodString>;
|
|
155
|
+
projectInsights: z.ZodArray<z.ZodObject<{
|
|
156
|
+
projectId: z.ZodString;
|
|
157
|
+
health: z.ZodNullable<z.ZodObject<{
|
|
158
|
+
status: z.ZodEnum<{
|
|
159
|
+
UNKNOWN: "UNKNOWN";
|
|
160
|
+
ON_TRACK: "ON_TRACK";
|
|
161
|
+
AT_RISK: "AT_RISK";
|
|
162
|
+
CRITICAL: "CRITICAL";
|
|
163
|
+
EXCELLENT: "EXCELLENT";
|
|
164
|
+
ERROR: "ERROR";
|
|
165
|
+
}>;
|
|
166
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
|
+
descriptionSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
168
|
+
taskRecommendations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
169
|
+
taskId: z.ZodString;
|
|
170
|
+
recommendation: z.ZodString;
|
|
171
|
+
}, z.core.$strip>>>>;
|
|
172
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
+
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
175
|
+
updateInProgress: z.ZodDefault<z.ZodBoolean>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
progress: z.ZodNullable<z.ZodObject<{
|
|
178
|
+
projectId: z.ZodString;
|
|
179
|
+
completedCount: z.ZodNumber;
|
|
180
|
+
activeCount: z.ZodNumber;
|
|
181
|
+
progressPercent: z.ZodNumber;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
/** Workspace insights grouped by folder. */
|
|
186
|
+
export type WorkspaceInsights = z.infer<typeof WorkspaceInsightsSchema>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ColorKey } from '../../utils/colors.js';
|
|
2
|
+
import type { SearchArgs } from '../common.js';
|
|
3
|
+
import type { Label } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Arguments for retrieving labels.
|
|
6
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/get_labels_api_v1_labels_get
|
|
7
|
+
*/
|
|
8
|
+
export type GetLabelsArgs = {
|
|
9
|
+
cursor?: string | null;
|
|
10
|
+
limit?: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Arguments for searching labels.
|
|
14
|
+
*/
|
|
15
|
+
export type SearchLabelsArgs = SearchArgs;
|
|
16
|
+
/**
|
|
17
|
+
* Response from retrieving labels.
|
|
18
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/get_labels_api_v1_labels_get
|
|
19
|
+
*/
|
|
20
|
+
export type GetLabelsResponse = {
|
|
21
|
+
results: Label[];
|
|
22
|
+
nextCursor: string | null;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Arguments for creating a new label.
|
|
26
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/create_label_api_v1_labels_post
|
|
27
|
+
*/
|
|
28
|
+
export type AddLabelArgs = {
|
|
29
|
+
name: string;
|
|
30
|
+
order?: number | null;
|
|
31
|
+
color?: ColorKey;
|
|
32
|
+
isFavorite?: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Arguments for updating a label.
|
|
36
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/update_label_api_v1_labels__label_id__post
|
|
37
|
+
*/
|
|
38
|
+
export type UpdateLabelArgs = {
|
|
39
|
+
name?: string;
|
|
40
|
+
order?: number | null;
|
|
41
|
+
color?: ColorKey;
|
|
42
|
+
isFavorite?: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Arguments for retrieving shared labels.
|
|
46
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/shared_labels_api_v1_labels_shared_get
|
|
47
|
+
*/
|
|
48
|
+
export type GetSharedLabelsArgs = {
|
|
49
|
+
omitPersonal?: boolean;
|
|
50
|
+
cursor?: string | null;
|
|
51
|
+
limit?: number;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Response from retrieving shared labels.
|
|
55
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/shared_labels_api_v1_labels_shared_get
|
|
56
|
+
*/
|
|
57
|
+
export type GetSharedLabelsResponse = {
|
|
58
|
+
results: string[];
|
|
59
|
+
nextCursor: string | null;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Arguments for renaming a shared label.
|
|
63
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/shared_labels_rename_api_v1_labels_shared_rename_post
|
|
64
|
+
*/
|
|
65
|
+
export type RenameSharedLabelArgs = {
|
|
66
|
+
name: string;
|
|
67
|
+
newName: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Arguments for removing a shared label.
|
|
71
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/shared_labels_remove_api_v1_labels_shared_remove_post
|
|
72
|
+
*/
|
|
73
|
+
export type RemoveSharedLabelArgs = {
|
|
74
|
+
name: string;
|
|
75
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LabelSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
order: z.ZodNullable<z.ZodNumber>;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
color: z.ZodString;
|
|
7
|
+
isFavorite: z.ZodBoolean;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
/**
|
|
10
|
+
* Represents a label in Todoist.
|
|
11
|
+
* @see https://developer.todoist.com/api/v1/#tag/Labels
|
|
12
|
+
*/
|
|
13
|
+
export type Label = z.infer<typeof LabelSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types.js';
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StreakSchema: z.ZodObject<{
|
|
3
|
+
count: z.ZodNumber;
|
|
4
|
+
start: z.ZodString;
|
|
5
|
+
end: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const CompletedItemSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
completed: z.ZodNumber;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const ItemsWithDateSchema: z.ZodObject<{
|
|
12
|
+
items: z.ZodArray<z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
completed: z.ZodNumber;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
totalCompleted: z.ZodNumber;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const KarmaUpdateSchema: z.ZodObject<{
|
|
19
|
+
time: z.ZodString;
|
|
20
|
+
newKarma: z.ZodNumber;
|
|
21
|
+
positiveKarma: z.ZodNumber;
|
|
22
|
+
negativeKarma: z.ZodNumber;
|
|
23
|
+
positiveKarmaReasons: z.ZodArray<z.ZodAny>;
|
|
24
|
+
negativeKarmaReasons: z.ZodArray<z.ZodAny>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export declare const ProductivityStatsSchema: z.ZodObject<{
|
|
27
|
+
completedCount: z.ZodNumber;
|
|
28
|
+
daysItems: z.ZodArray<z.ZodObject<{
|
|
29
|
+
items: z.ZodArray<z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
completed: z.ZodNumber;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
totalCompleted: z.ZodNumber;
|
|
34
|
+
date: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
goals: z.ZodObject<{
|
|
37
|
+
currentDailyStreak: z.ZodObject<{
|
|
38
|
+
count: z.ZodNumber;
|
|
39
|
+
start: z.ZodString;
|
|
40
|
+
end: z.ZodString;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
currentWeeklyStreak: z.ZodObject<{
|
|
43
|
+
count: z.ZodNumber;
|
|
44
|
+
start: z.ZodString;
|
|
45
|
+
end: z.ZodString;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
dailyGoal: z.ZodNumber;
|
|
48
|
+
ignoreDays: z.ZodArray<z.ZodNumber>;
|
|
49
|
+
karmaDisabled: z.ZodNumber;
|
|
50
|
+
lastDailyStreak: z.ZodObject<{
|
|
51
|
+
count: z.ZodNumber;
|
|
52
|
+
start: z.ZodString;
|
|
53
|
+
end: z.ZodString;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
lastWeeklyStreak: z.ZodObject<{
|
|
56
|
+
count: z.ZodNumber;
|
|
57
|
+
start: z.ZodString;
|
|
58
|
+
end: z.ZodString;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
maxDailyStreak: z.ZodObject<{
|
|
61
|
+
count: z.ZodNumber;
|
|
62
|
+
start: z.ZodString;
|
|
63
|
+
end: z.ZodString;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
maxWeeklyStreak: z.ZodObject<{
|
|
66
|
+
count: z.ZodNumber;
|
|
67
|
+
start: z.ZodString;
|
|
68
|
+
end: z.ZodString;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
user: z.ZodString;
|
|
71
|
+
userId: z.ZodString;
|
|
72
|
+
vacationMode: z.ZodNumber;
|
|
73
|
+
weeklyGoal: z.ZodNumber;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
karma: z.ZodNumber;
|
|
76
|
+
karmaGraphData: z.ZodArray<z.ZodObject<{
|
|
77
|
+
date: z.ZodString;
|
|
78
|
+
karmaAvg: z.ZodNumber;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
karmaLastUpdate: z.ZodNumber;
|
|
81
|
+
karmaTrend: z.ZodString;
|
|
82
|
+
karmaUpdateReasons: z.ZodArray<z.ZodObject<{
|
|
83
|
+
time: z.ZodString;
|
|
84
|
+
newKarma: z.ZodNumber;
|
|
85
|
+
positiveKarma: z.ZodNumber;
|
|
86
|
+
negativeKarma: z.ZodNumber;
|
|
87
|
+
positiveKarmaReasons: z.ZodArray<z.ZodAny>;
|
|
88
|
+
negativeKarmaReasons: z.ZodArray<z.ZodAny>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
projectColors: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
91
|
+
weekItems: z.ZodArray<z.ZodObject<{
|
|
92
|
+
items: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
completed: z.ZodNumber;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
totalCompleted: z.ZodNumber;
|
|
97
|
+
from: z.ZodString;
|
|
98
|
+
to: z.ZodString;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
/**
|
|
102
|
+
* Represents the Productivity stats for the authenticated user.
|
|
103
|
+
* @see https://developer.todoist.com/api/v1/#tag/User/operation/get_productivity_stats_api_v1_tasks_completed_stats_get
|
|
104
|
+
*/
|
|
105
|
+
export type ProductivityStats = z.infer<typeof ProductivityStatsSchema>;
|
|
106
|
+
export declare const ColorSchema: z.ZodObject<{
|
|
107
|
+
key: z.ZodString;
|
|
108
|
+
displayName: z.ZodString;
|
|
109
|
+
hexValue: z.ZodString;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
/**
|
|
112
|
+
* Represents a color in Todoist.
|
|
113
|
+
* @see https://developer.todoist.com/api/v1/#tag/Colors
|
|
114
|
+
*/
|
|
115
|
+
export type Color = z.infer<typeof ColorSchema>;
|