@doist/todoist-sdk 13.0.2 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkspaceInsightsSchema = exports.ProjectInsightSchema = exports.ProjectProgressSchema = exports.ProjectHealthContextSchema = exports.TaskContextSchema = exports.ProjectMetricsSchema = exports.ProjectHealthSchema = exports.
|
|
3
|
+
exports.WorkspaceInsightsSchema = exports.ProjectInsightSchema = exports.ProjectProgressSchema = exports.ProjectHealthContextSchema = exports.TaskContextSchema = exports.ProjectMetricsSchema = exports.ProjectHealthSchema = exports.HEALTH_STATUSES = exports.ProjectActivityStatsSchema = exports.WeekRollupSchema = exports.DayActivitySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.DayActivitySchema = zod_1.z.object({
|
|
6
6
|
// Kept as string: this is a calendar-day bucket (e.g. '2025-01-13'), not a timestamp.
|
|
@@ -26,15 +26,10 @@ exports.HEALTH_STATUSES = [
|
|
|
26
26
|
'EXCELLENT',
|
|
27
27
|
'ERROR',
|
|
28
28
|
];
|
|
29
|
-
exports.TaskRecommendationSchema = zod_1.z.object({
|
|
30
|
-
taskId: zod_1.z.string(),
|
|
31
|
-
recommendation: zod_1.z.string(),
|
|
32
|
-
});
|
|
33
29
|
exports.ProjectHealthSchema = zod_1.z.object({
|
|
34
30
|
status: zod_1.z.enum(exports.HEALTH_STATUSES),
|
|
35
31
|
description: zod_1.z.string().nullable().optional(),
|
|
36
32
|
descriptionSummary: zod_1.z.string().nullable().optional(),
|
|
37
|
-
taskRecommendations: zod_1.z.array(exports.TaskRecommendationSchema).nullable().optional(),
|
|
38
33
|
projectId: zod_1.z.string().nullable().optional(),
|
|
39
34
|
updatedAt: zod_1.z.coerce.date().nullable().optional(),
|
|
40
35
|
isStale: zod_1.z.boolean().default(false),
|
|
@@ -81,6 +76,5 @@ exports.ProjectInsightSchema = zod_1.z.object({
|
|
|
81
76
|
progress: exports.ProjectProgressSchema.nullable(),
|
|
82
77
|
});
|
|
83
78
|
exports.WorkspaceInsightsSchema = zod_1.z.object({
|
|
84
|
-
folderId: zod_1.z.string().nullable().optional(),
|
|
85
79
|
projectInsights: zod_1.z.array(exports.ProjectInsightSchema),
|
|
86
80
|
});
|
|
@@ -23,15 +23,10 @@ export const HEALTH_STATUSES = [
|
|
|
23
23
|
'EXCELLENT',
|
|
24
24
|
'ERROR',
|
|
25
25
|
];
|
|
26
|
-
export const TaskRecommendationSchema = z.object({
|
|
27
|
-
taskId: z.string(),
|
|
28
|
-
recommendation: z.string(),
|
|
29
|
-
});
|
|
30
26
|
export const ProjectHealthSchema = z.object({
|
|
31
27
|
status: z.enum(HEALTH_STATUSES),
|
|
32
28
|
description: z.string().nullable().optional(),
|
|
33
29
|
descriptionSummary: z.string().nullable().optional(),
|
|
34
|
-
taskRecommendations: z.array(TaskRecommendationSchema).nullable().optional(),
|
|
35
30
|
projectId: z.string().nullable().optional(),
|
|
36
31
|
updatedAt: z.coerce.date().nullable().optional(),
|
|
37
32
|
isStale: z.boolean().default(false),
|
|
@@ -78,6 +73,5 @@ export const ProjectInsightSchema = z.object({
|
|
|
78
73
|
progress: ProjectProgressSchema.nullable(),
|
|
79
74
|
});
|
|
80
75
|
export const WorkspaceInsightsSchema = z.object({
|
|
81
|
-
folderId: z.string().nullable().optional(),
|
|
82
76
|
projectInsights: z.array(ProjectInsightSchema),
|
|
83
77
|
});
|
|
@@ -29,12 +29,6 @@ export type ProjectActivityStats = z.infer<typeof ProjectActivityStatsSchema>;
|
|
|
29
29
|
export declare const HEALTH_STATUSES: readonly ["UNKNOWN", "ON_TRACK", "AT_RISK", "CRITICAL", "EXCELLENT", "ERROR"];
|
|
30
30
|
/** Health status of a project. */
|
|
31
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
32
|
export declare const ProjectHealthSchema: z.ZodObject<{
|
|
39
33
|
status: z.ZodEnum<{
|
|
40
34
|
UNKNOWN: "UNKNOWN";
|
|
@@ -46,16 +40,12 @@ export declare const ProjectHealthSchema: z.ZodObject<{
|
|
|
46
40
|
}>;
|
|
47
41
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
42
|
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
43
|
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
44
|
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
55
45
|
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
56
46
|
updateInProgress: z.ZodDefault<z.ZodBoolean>;
|
|
57
47
|
}, z.core.$strip>;
|
|
58
|
-
/** Project health status
|
|
48
|
+
/** Project health status. */
|
|
59
49
|
export type ProjectHealth = z.infer<typeof ProjectHealthSchema>;
|
|
60
50
|
export declare const ProjectMetricsSchema: z.ZodObject<{
|
|
61
51
|
totalTasks: z.ZodNumber;
|
|
@@ -132,10 +122,6 @@ export declare const ProjectInsightSchema: z.ZodObject<{
|
|
|
132
122
|
}>;
|
|
133
123
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
134
124
|
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
125
|
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
126
|
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
141
127
|
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -151,7 +137,6 @@ export declare const ProjectInsightSchema: z.ZodObject<{
|
|
|
151
137
|
/** Insight data for a single project within a workspace. */
|
|
152
138
|
export type ProjectInsight = z.infer<typeof ProjectInsightSchema>;
|
|
153
139
|
export declare const WorkspaceInsightsSchema: z.ZodObject<{
|
|
154
|
-
folderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
140
|
projectInsights: z.ZodArray<z.ZodObject<{
|
|
156
141
|
projectId: z.ZodString;
|
|
157
142
|
health: z.ZodNullable<z.ZodObject<{
|
|
@@ -165,10 +150,6 @@ export declare const WorkspaceInsightsSchema: z.ZodObject<{
|
|
|
165
150
|
}>;
|
|
166
151
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
152
|
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
153
|
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
154
|
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
174
155
|
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -182,5 +163,5 @@ export declare const WorkspaceInsightsSchema: z.ZodObject<{
|
|
|
182
163
|
}, z.core.$strip>>;
|
|
183
164
|
}, z.core.$strip>>;
|
|
184
165
|
}, z.core.$strip>;
|
|
185
|
-
/**
|
|
166
|
+
/** Insights for the projects in a workspace. */
|
|
186
167
|
export type WorkspaceInsights = z.infer<typeof WorkspaceInsightsSchema>;
|
|
@@ -664,10 +664,6 @@ export declare const validateProjectHealth: (input: unknown) => {
|
|
|
664
664
|
updateInProgress: boolean;
|
|
665
665
|
description?: string | null | undefined;
|
|
666
666
|
descriptionSummary?: string | null | undefined;
|
|
667
|
-
taskRecommendations?: {
|
|
668
|
-
taskId: string;
|
|
669
|
-
recommendation: string;
|
|
670
|
-
}[] | null | undefined;
|
|
671
667
|
projectId?: string | null | undefined;
|
|
672
668
|
updatedAt?: Date | null | undefined;
|
|
673
669
|
};
|
|
@@ -713,10 +709,6 @@ export declare const validateWorkspaceInsights: (input: unknown) => {
|
|
|
713
709
|
updateInProgress: boolean;
|
|
714
710
|
description?: string | null | undefined;
|
|
715
711
|
descriptionSummary?: string | null | undefined;
|
|
716
|
-
taskRecommendations?: {
|
|
717
|
-
taskId: string;
|
|
718
|
-
recommendation: string;
|
|
719
|
-
}[] | null | undefined;
|
|
720
712
|
projectId?: string | null | undefined;
|
|
721
713
|
updatedAt?: Date | null | undefined;
|
|
722
714
|
} | null;
|
|
@@ -727,7 +719,6 @@ export declare const validateWorkspaceInsights: (input: unknown) => {
|
|
|
727
719
|
progressPercent: number;
|
|
728
720
|
} | null;
|
|
729
721
|
}[];
|
|
730
|
-
folderId?: string | null | undefined;
|
|
731
722
|
};
|
|
732
723
|
export declare const validateBackup: (input: unknown) => {
|
|
733
724
|
version: string;
|
package/package.json
CHANGED