@doist/todoist-api-typescript 7.2.0 → 7.3.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/test-utils/msw-setup.js +4 -3
- package/dist/cjs/types/entities.js +43 -26
- package/dist/cjs/types/sync/resources/calendars.js +7 -3
- package/dist/cjs/types/sync/resources/collaborators.js +4 -2
- package/dist/cjs/types/sync/resources/reminders.js +8 -6
- package/dist/cjs/types/sync/resources/suggestions.js +11 -7
- package/dist/cjs/types/sync/resources/user-settings.js +5 -5
- package/dist/cjs/types/sync/resources/user.js +11 -15
- package/dist/cjs/types/sync/resources/view-options.js +33 -25
- package/dist/esm/test-utils/msw-setup.js +1 -0
- package/dist/esm/types/entities.js +32 -15
- package/dist/esm/types/sync/resources/calendars.js +6 -2
- package/dist/esm/types/sync/resources/collaborators.js +3 -1
- package/dist/esm/types/sync/resources/reminders.js +4 -2
- package/dist/esm/types/sync/resources/suggestions.js +8 -4
- package/dist/esm/types/sync/resources/user-settings.js +2 -2
- package/dist/esm/types/sync/resources/user.js +6 -10
- package/dist/esm/types/sync/resources/view-options.js +22 -14
- package/dist/types/types/entities.d.ts +48 -1
- package/dist/types/types/sync/commands/project-view-options.d.ts +2 -2
- package/dist/types/types/sync/commands/view-options.d.ts +3 -7
- package/dist/types/types/sync/resources/calendars.d.ts +8 -0
- package/dist/types/types/sync/resources/collaborators.d.ts +4 -0
- package/dist/types/types/sync/resources/reminders.d.ts +11 -0
- package/dist/types/types/sync/resources/suggestions.d.ts +42 -0
- package/dist/types/types/sync/resources/user-settings.d.ts +8 -0
- package/dist/types/types/sync/resources/user.d.ts +30 -0
- package/dist/types/types/sync/resources/view-options.d.ts +75 -0
- package/package.json +5 -5
|
@@ -1,4 +1,79 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/** Available view types. */
|
|
3
|
+
export declare const VIEW_TYPES: readonly ["TODAY", "UPCOMING", "PROJECT", "LABEL", "FILTER", "WORKSPACE_FILTER", "SEARCH", "TEMPLATE_PREVIEW", "TASK_DETAIL", "AUTOMATION", "ASSIGNED", "OVERDUE", "WORKSPACE_OVERVIEW"];
|
|
4
|
+
/** Type of view in the Todoist UI. */
|
|
5
|
+
export type ViewType = (typeof VIEW_TYPES)[number];
|
|
6
|
+
export declare const ViewTypeSchema: z.ZodEnum<{
|
|
7
|
+
TODAY: "TODAY";
|
|
8
|
+
UPCOMING: "UPCOMING";
|
|
9
|
+
PROJECT: "PROJECT";
|
|
10
|
+
LABEL: "LABEL";
|
|
11
|
+
FILTER: "FILTER";
|
|
12
|
+
WORKSPACE_FILTER: "WORKSPACE_FILTER";
|
|
13
|
+
SEARCH: "SEARCH";
|
|
14
|
+
TEMPLATE_PREVIEW: "TEMPLATE_PREVIEW";
|
|
15
|
+
TASK_DETAIL: "TASK_DETAIL";
|
|
16
|
+
AUTOMATION: "AUTOMATION";
|
|
17
|
+
ASSIGNED: "ASSIGNED";
|
|
18
|
+
OVERDUE: "OVERDUE";
|
|
19
|
+
WORKSPACE_OVERVIEW: "WORKSPACE_OVERVIEW";
|
|
20
|
+
}>;
|
|
21
|
+
/** Available view modes. */
|
|
22
|
+
export declare const VIEW_MODES: readonly ["LIST", "BOARD", "CALENDAR"];
|
|
23
|
+
/** Display mode for a view. */
|
|
24
|
+
export type ViewMode = (typeof VIEW_MODES)[number];
|
|
25
|
+
export declare const ViewModeSchema: z.ZodEnum<{
|
|
26
|
+
LIST: "LIST";
|
|
27
|
+
BOARD: "BOARD";
|
|
28
|
+
CALENDAR: "CALENDAR";
|
|
29
|
+
}>;
|
|
30
|
+
/** Available grouping options. */
|
|
31
|
+
export declare const GROUPED_BY_OPTIONS: readonly ["ASSIGNEE", "ADDED_DATE", "DUE_DATE", "DEADLINE", "LABEL", "PRIORITY", "PROJECT", "WORKSPACE"];
|
|
32
|
+
/** Field to group tasks by. */
|
|
33
|
+
export type GroupedBy = (typeof GROUPED_BY_OPTIONS)[number];
|
|
34
|
+
export declare const GroupedBySchema: z.ZodNullable<z.ZodEnum<{
|
|
35
|
+
PROJECT: "PROJECT";
|
|
36
|
+
LABEL: "LABEL";
|
|
37
|
+
ASSIGNEE: "ASSIGNEE";
|
|
38
|
+
ADDED_DATE: "ADDED_DATE";
|
|
39
|
+
DUE_DATE: "DUE_DATE";
|
|
40
|
+
DEADLINE: "DEADLINE";
|
|
41
|
+
PRIORITY: "PRIORITY";
|
|
42
|
+
WORKSPACE: "WORKSPACE";
|
|
43
|
+
}>>;
|
|
44
|
+
/** Available sorting options. */
|
|
45
|
+
export declare const SORTED_BY_OPTIONS: readonly ["MANUAL", "ALPHABETICALLY", "ASSIGNEE", "DUE_DATE", "DEADLINE", "ADDED_DATE", "PRIORITY", "PROJECT", "WORKSPACE"];
|
|
46
|
+
/** Field to sort tasks by. */
|
|
47
|
+
export type SortedBy = (typeof SORTED_BY_OPTIONS)[number];
|
|
48
|
+
export declare const SortedBySchema: z.ZodNullable<z.ZodEnum<{
|
|
49
|
+
MANUAL: "MANUAL";
|
|
50
|
+
PROJECT: "PROJECT";
|
|
51
|
+
ASSIGNEE: "ASSIGNEE";
|
|
52
|
+
ADDED_DATE: "ADDED_DATE";
|
|
53
|
+
DUE_DATE: "DUE_DATE";
|
|
54
|
+
DEADLINE: "DEADLINE";
|
|
55
|
+
PRIORITY: "PRIORITY";
|
|
56
|
+
WORKSPACE: "WORKSPACE";
|
|
57
|
+
ALPHABETICALLY: "ALPHABETICALLY";
|
|
58
|
+
}>>;
|
|
59
|
+
/** Available sort directions. */
|
|
60
|
+
export declare const SORT_ORDERS: readonly ["ASC", "DESC"];
|
|
61
|
+
/** Sort direction. */
|
|
62
|
+
export type SortOrder = (typeof SORT_ORDERS)[number];
|
|
63
|
+
export declare const SortOrderSchema: z.ZodNullable<z.ZodEnum<{
|
|
64
|
+
ASC: "ASC";
|
|
65
|
+
DESC: "DESC";
|
|
66
|
+
}>>;
|
|
67
|
+
/** Available calendar layout modes. */
|
|
68
|
+
export declare const CALENDAR_LAYOUTS: readonly ["WEEK", "MONTH"];
|
|
69
|
+
/** Calendar layout mode. */
|
|
70
|
+
export type CalendarLayout = (typeof CALENDAR_LAYOUTS)[number];
|
|
71
|
+
export declare const CalendarSettingsSchema: z.ZodObject<{
|
|
72
|
+
layout: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
WEEK: "WEEK";
|
|
74
|
+
MONTH: "MONTH";
|
|
75
|
+
}>>;
|
|
76
|
+
}, z.core.$loose>;
|
|
2
77
|
export declare const ViewOptionsSchema: z.ZodObject<{
|
|
3
78
|
viewType: z.ZodEnum<{
|
|
4
79
|
TODAY: "TODAY";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-api-typescript",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.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",
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
"lint-check": "eslint ./src --ext ts,tsx",
|
|
30
30
|
"ts-compile-check": "npx tsc -p tsconfig.typecheck.json",
|
|
31
31
|
"audit": "npm audit --audit-level=moderate",
|
|
32
|
-
"test": "
|
|
32
|
+
"test": "vitest run",
|
|
33
|
+
"test:watch": "vitest",
|
|
34
|
+
"test:coverage": "vitest run --coverage",
|
|
33
35
|
"api:request": "node ./scripts/todoist-api-request.cjs",
|
|
34
36
|
"build:cjs": "npx tsc -p tsconfig.cjs.json",
|
|
35
37
|
"build:esm": "npx tsc -p tsconfig.esm.json",
|
|
@@ -54,7 +56,6 @@
|
|
|
54
56
|
"devDependencies": {
|
|
55
57
|
"@doist/eslint-config": "12.0.0",
|
|
56
58
|
"@doist/prettier-config": "4.0.0",
|
|
57
|
-
"@types/jest": "30.0.0",
|
|
58
59
|
"@typescript-eslint/eslint-plugin": "8.46.3",
|
|
59
60
|
"@typescript-eslint/parser": "8.46.3",
|
|
60
61
|
"dotenv": "17.3.1",
|
|
@@ -64,14 +65,13 @@
|
|
|
64
65
|
"eslint-plugin-import": "2.27.5",
|
|
65
66
|
"eslint-plugin-prettier": "5.1.3",
|
|
66
67
|
"husky": "9.1.7",
|
|
67
|
-
"jest": "30.1.3",
|
|
68
68
|
"lint-staged": "16.2.7",
|
|
69
69
|
"msw": "2.12.10",
|
|
70
70
|
"npm-run-all2": "8.0.4",
|
|
71
71
|
"obsidian": "^1.10.2-1",
|
|
72
72
|
"prettier": "3.3.2",
|
|
73
73
|
"rimraf": "6.1.2",
|
|
74
|
-
"
|
|
74
|
+
"vitest": "4.0.14",
|
|
75
75
|
"ts-node": "10.9.2",
|
|
76
76
|
"type-fest": "^5.0.0",
|
|
77
77
|
"typescript": "5.9.3"
|