@doist/todoist-api-typescript 6.9.0 → 7.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.
- package/README.md +24 -0
- package/dist/cjs/authentication.js +44 -48
- package/dist/cjs/consts/endpoints.js +1 -2
- package/dist/cjs/rest-client.js +1 -1
- package/dist/cjs/test-utils/test-defaults.js +0 -3
- package/dist/cjs/todoist-api.js +27 -31
- package/dist/cjs/types/entities.js +0 -12
- package/dist/cjs/utils/activity-helpers.js +18 -0
- package/dist/cjs/utils/colors.js +9 -87
- package/dist/esm/authentication.js +45 -48
- package/dist/esm/consts/endpoints.js +0 -1
- package/dist/esm/rest-client.js +1 -1
- package/dist/esm/test-utils/test-defaults.js +0 -3
- package/dist/esm/todoist-api.js +28 -32
- package/dist/esm/types/entities.js +0 -12
- package/dist/esm/utils/activity-helpers.js +17 -0
- package/dist/esm/utils/colors.js +8 -84
- package/dist/types/authentication.d.ts +0 -41
- package/dist/types/consts/endpoints.d.ts +0 -1
- package/dist/types/test-utils/test-defaults.d.ts +0 -1
- package/dist/types/todoist-api.d.ts +9 -6
- package/dist/types/types/entities.d.ts +16 -18
- package/dist/types/types/requests.d.ts +22 -37
- package/dist/types/types/sync/commands/index.d.ts +0 -4
- package/dist/types/utils/activity-helpers.d.ts +8 -0
- package/dist/types/utils/colors.d.ts +10 -140
- package/dist/types/utils/validators.d.ts +0 -2
- package/package.json +3 -1
|
@@ -70,7 +70,6 @@ export declare const TaskSchema: z.ZodPipe<z.ZodObject<{
|
|
|
70
70
|
childOrder: z.ZodNumber;
|
|
71
71
|
content: z.ZodString;
|
|
72
72
|
description: z.ZodString;
|
|
73
|
-
noteCount: z.ZodNumber;
|
|
74
73
|
dayOrder: z.ZodNumber;
|
|
75
74
|
isCollapsed: z.ZodBoolean;
|
|
76
75
|
isUncompletable: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -111,7 +110,6 @@ export declare const TaskSchema: z.ZodPipe<z.ZodObject<{
|
|
|
111
110
|
childOrder: number;
|
|
112
111
|
content: string;
|
|
113
112
|
description: string;
|
|
114
|
-
noteCount: number;
|
|
115
113
|
dayOrder: number;
|
|
116
114
|
isCollapsed: boolean;
|
|
117
115
|
}, {
|
|
@@ -149,7 +147,6 @@ export declare const TaskSchema: z.ZodPipe<z.ZodObject<{
|
|
|
149
147
|
childOrder: number;
|
|
150
148
|
content: string;
|
|
151
149
|
description: string;
|
|
152
|
-
noteCount: number;
|
|
153
150
|
dayOrder: number;
|
|
154
151
|
isCollapsed: boolean;
|
|
155
152
|
isUncompletable: boolean;
|
|
@@ -686,37 +683,38 @@ export declare const ProductivityStatsSchema: z.ZodObject<{
|
|
|
686
683
|
*/
|
|
687
684
|
export type ProductivityStats = z.infer<typeof ProductivityStatsSchema>;
|
|
688
685
|
export declare const ColorSchema: z.ZodObject<{
|
|
689
|
-
id: z.ZodNumber;
|
|
690
686
|
key: z.ZodString;
|
|
691
687
|
displayName: z.ZodString;
|
|
692
|
-
name: z.ZodString;
|
|
693
688
|
hexValue: z.ZodString;
|
|
694
|
-
value: z.ZodString;
|
|
695
689
|
}, z.core.$strip>;
|
|
696
690
|
/**
|
|
697
691
|
* Represents a color in Todoist.
|
|
698
692
|
* @see https://todoist.com/api/v1/docs#tag/Colors
|
|
699
693
|
*/
|
|
700
694
|
export type Color = z.infer<typeof ColorSchema>;
|
|
701
|
-
/**
|
|
702
|
-
* @deprecated Use 'task' instead. This will be removed in the next major version.
|
|
703
|
-
*/
|
|
704
|
-
type DeprecatedItem = 'item';
|
|
705
|
-
/**
|
|
706
|
-
* @deprecated Use 'comment' instead. This will be removed in the next major version.
|
|
707
|
-
*/
|
|
708
|
-
type DeprecatedNote = 'note';
|
|
709
695
|
/**
|
|
710
696
|
* Type hints for known object types. Accepts any string for forward compatibility.
|
|
711
|
-
* Supports both modern naming ('task', 'comment') and legacy naming ('item', 'note').
|
|
712
|
-
*
|
|
713
|
-
* **Note**: The legacy values 'item' and 'note' are deprecated. Use 'task' and 'comment' instead.
|
|
714
697
|
*/
|
|
715
|
-
export type ActivityObjectType = 'task' | 'comment' | 'project' |
|
|
698
|
+
export type ActivityObjectType = 'task' | 'comment' | 'project' | (string & Record<string, never>);
|
|
716
699
|
/**
|
|
717
700
|
* Type hints for known event types. Accepts any string for forward compatibility.
|
|
718
701
|
*/
|
|
719
702
|
export type ActivityEventType = 'added' | 'updated' | 'deleted' | 'completed' | 'uncompleted' | 'archived' | 'unarchived' | 'shared' | 'left' | (string & Record<string, never>);
|
|
703
|
+
type ModernActivityObjectType = 'task' | 'comment' | 'project' | (string & Record<string, never>);
|
|
704
|
+
/**
|
|
705
|
+
* Combined object:event filter string for the `objectEventTypes` parameter of `getActivityLogs`.
|
|
706
|
+
*
|
|
707
|
+
* Uses modern object type names (`task`, `comment`) rather than legacy API names (`item`, `note`).
|
|
708
|
+
* Either part may be omitted:
|
|
709
|
+
* - `'task:added'` — task additions only
|
|
710
|
+
* - `'task:'` — all events for tasks
|
|
711
|
+
* - `':deleted'` — all deleted events across all object types
|
|
712
|
+
*
|
|
713
|
+
* The final `string & Record<string, never>` member allows any arbitrary string
|
|
714
|
+
* to be passed for forward compatibility, while still providing autocomplete for
|
|
715
|
+
* the known combinations above.
|
|
716
|
+
*/
|
|
717
|
+
export type ActivityObjectEventType = `${ModernActivityObjectType}:${ActivityEventType}` | `${ModernActivityObjectType}:` | `:${ActivityEventType}` | (string & Record<string, never>);
|
|
720
718
|
/**
|
|
721
719
|
* Flexible object containing event-specific data.
|
|
722
720
|
* Uses z.record to accept any properties for forward compatibility.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RequireAllOrNone, RequireOneOrNone, RequireExactlyOne } from 'type-fest';
|
|
2
2
|
import type { ColorKey } from '../utils/colors.js';
|
|
3
|
-
import type { ActivityEvent,
|
|
3
|
+
import type { ActivityEvent, ActivityObjectEventType, Comment, Duration, Label, PersonalProject, ProjectViewStyle, ProjectVisibility, Section, Task, User, WorkspaceProject } from './entities.js';
|
|
4
4
|
/**
|
|
5
5
|
* Arguments for creating a new task.
|
|
6
6
|
* @see https://todoist.com/api/v1/docs#tag/Tasks/operation/create_task_api_v1_tasks_post
|
|
@@ -115,9 +115,17 @@ export type UpdateTaskArgs = {
|
|
|
115
115
|
description?: string;
|
|
116
116
|
labels?: string[];
|
|
117
117
|
priority?: number;
|
|
118
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Natural language due date.
|
|
120
|
+
* Use `"no date"` to clear a due date, or `null` as an SDK alias for the same behavior.
|
|
121
|
+
*/
|
|
122
|
+
dueString?: (string & {}) | 'no date' | null;
|
|
119
123
|
dueLang?: string | null;
|
|
120
124
|
assigneeId?: string | null;
|
|
125
|
+
/**
|
|
126
|
+
* Deadline date in `YYYY-MM-DD` format.
|
|
127
|
+
* Use `null` to clear a task deadline.
|
|
128
|
+
*/
|
|
121
129
|
deadlineDate?: string | null;
|
|
122
130
|
deadlineLang?: string | null;
|
|
123
131
|
isUncompletable?: boolean;
|
|
@@ -404,18 +412,9 @@ export type UpdateCommentArgs = {
|
|
|
404
412
|
content: string;
|
|
405
413
|
};
|
|
406
414
|
/**
|
|
407
|
-
*
|
|
415
|
+
* Common arguments for retrieving activity logs (excluding filter-type params).
|
|
408
416
|
*/
|
|
409
|
-
type
|
|
410
|
-
/**
|
|
411
|
-
* Type of object to filter by (e.g., 'task', 'comment', 'project').
|
|
412
|
-
* Accepts both modern naming ('task', 'comment') and legacy naming ('item', 'note').
|
|
413
|
-
*/
|
|
414
|
-
objectType?: ActivityObjectType;
|
|
415
|
-
/**
|
|
416
|
-
* Type of event to filter by (e.g., 'added', 'updated', 'deleted', 'completed', 'uncompleted', 'archived', 'unarchived', 'shared', 'left').
|
|
417
|
-
*/
|
|
418
|
-
eventType?: ActivityEventType;
|
|
417
|
+
type GetActivityLogsArgsCommon = {
|
|
419
418
|
/**
|
|
420
419
|
* Filter by the ID of a specific object.
|
|
421
420
|
*/
|
|
@@ -477,31 +476,17 @@ type GetActivityLogsArgsBase = {
|
|
|
477
476
|
*/
|
|
478
477
|
dateTo?: Date | string;
|
|
479
478
|
};
|
|
480
|
-
type
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* @deprecated String dates (YYYY-MM-DD format) are deprecated. Use Date objects instead.
|
|
492
|
-
* This type will be removed in the next major version.
|
|
493
|
-
*/
|
|
494
|
-
type GetActivityLogsArgsWithString = GetActivityLogsArgsBase & {
|
|
495
|
-
/**
|
|
496
|
-
* @deprecated Use `dateFrom` instead. Will be removed in the next major version.
|
|
497
|
-
*/
|
|
498
|
-
since?: string;
|
|
499
|
-
/**
|
|
500
|
-
* @deprecated Use `dateTo` instead. Will be removed in the next major version.
|
|
501
|
-
*/
|
|
502
|
-
until?: string;
|
|
479
|
+
export type GetActivityLogsArgs = GetActivityLogsArgsCommon & {
|
|
480
|
+
objectEventTypes?: ActivityObjectEventType | ActivityObjectEventType[];
|
|
481
|
+
/** @removed Use `objectEventTypes` instead. */
|
|
482
|
+
objectType?: never;
|
|
483
|
+
/** @removed Use `objectEventTypes` instead. */
|
|
484
|
+
eventType?: never;
|
|
485
|
+
/** @removed Use `dateFrom` instead. */
|
|
486
|
+
since?: never;
|
|
487
|
+
/** @removed Use `dateTo` instead. */
|
|
488
|
+
until?: never;
|
|
503
489
|
};
|
|
504
|
-
export type GetActivityLogsArgs = GetActivityLogsArgsWithDate | GetActivityLogsArgsWithString;
|
|
505
490
|
/**
|
|
506
491
|
* Response from retrieving activity logs.
|
|
507
492
|
*/
|
|
@@ -151,10 +151,6 @@ export type SyncCommand<Type extends SyncCommandType | string = string> = {
|
|
|
151
151
|
args: Type extends SyncCommandType ? SyncCommandsMap[Type] : Record<string, unknown>;
|
|
152
152
|
tempId?: string;
|
|
153
153
|
};
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated Use `SyncCommand` instead.
|
|
156
|
-
*/
|
|
157
|
-
export type Command = SyncCommand<string>;
|
|
158
154
|
export * from './shared.js';
|
|
159
155
|
export * from './tasks.js';
|
|
160
156
|
export * from './projects.js';
|
|
@@ -18,3 +18,11 @@ export declare function normalizeObjectTypeForApi(objectType: string | undefined
|
|
|
18
18
|
* @returns The object type using modern SDK naming.
|
|
19
19
|
*/
|
|
20
20
|
export declare function denormalizeObjectTypeFromApi(objectType: string | undefined): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Normalizes an `ActivityObjectEventType` filter string for the API,
|
|
23
|
+
* converting modern object type names to legacy API names.
|
|
24
|
+
* e.g. 'task:added' -> 'item:added', 'comment:' -> 'note:', ':deleted' -> ':deleted'
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeObjectEventTypeForApi(filter: string): string;
|
|
@@ -1,317 +1,187 @@
|
|
|
1
1
|
import type { Color } from '../types/entities.js';
|
|
2
2
|
export declare const berryRed: {
|
|
3
|
-
readonly id: 30;
|
|
4
3
|
readonly key: "berry_red";
|
|
5
4
|
readonly displayName: "Berry Red";
|
|
6
|
-
readonly name: "Berry Red";
|
|
7
5
|
readonly hexValue: "#b8255f";
|
|
8
|
-
readonly value: "#b8255f";
|
|
9
6
|
};
|
|
10
7
|
export declare const red: {
|
|
11
|
-
readonly id: 31;
|
|
12
8
|
readonly key: "red";
|
|
13
9
|
readonly displayName: "Red";
|
|
14
|
-
readonly name: "Red";
|
|
15
10
|
readonly hexValue: "#db4035";
|
|
16
|
-
readonly value: "#db4035";
|
|
17
11
|
};
|
|
18
12
|
export declare const orange: {
|
|
19
|
-
readonly id: 32;
|
|
20
13
|
readonly key: "orange";
|
|
21
14
|
readonly displayName: "Orange";
|
|
22
|
-
readonly name: "Orange";
|
|
23
15
|
readonly hexValue: "#ff9933";
|
|
24
|
-
readonly value: "#ff9933";
|
|
25
16
|
};
|
|
26
17
|
export declare const yellow: {
|
|
27
|
-
readonly id: 33;
|
|
28
18
|
readonly key: "yellow";
|
|
29
19
|
readonly displayName: "Yellow";
|
|
30
|
-
readonly name: "Yellow";
|
|
31
20
|
readonly hexValue: "#fad000";
|
|
32
|
-
readonly value: "#fad000";
|
|
33
21
|
};
|
|
34
22
|
export declare const oliveGreen: {
|
|
35
|
-
readonly id: 34;
|
|
36
23
|
readonly key: "olive_green";
|
|
37
24
|
readonly displayName: "Olive Green";
|
|
38
|
-
readonly name: "Olive Green";
|
|
39
25
|
readonly hexValue: "#afb83b";
|
|
40
|
-
readonly value: "#afb83b";
|
|
41
26
|
};
|
|
42
27
|
export declare const limeGreen: {
|
|
43
|
-
readonly id: 35;
|
|
44
28
|
readonly key: "lime_green";
|
|
45
29
|
readonly displayName: "Lime Green";
|
|
46
|
-
readonly name: "Lime Green";
|
|
47
30
|
readonly hexValue: "#7ecc49";
|
|
48
|
-
readonly value: "#7ecc49";
|
|
49
31
|
};
|
|
50
32
|
export declare const green: {
|
|
51
|
-
readonly id: 36;
|
|
52
33
|
readonly key: "green";
|
|
53
34
|
readonly displayName: "Green";
|
|
54
|
-
readonly name: "Green";
|
|
55
35
|
readonly hexValue: "#299438";
|
|
56
|
-
readonly value: "#299438";
|
|
57
36
|
};
|
|
58
37
|
export declare const mintGreen: {
|
|
59
|
-
readonly id: 37;
|
|
60
38
|
readonly key: "mint_green";
|
|
61
39
|
readonly displayName: "Mint Green";
|
|
62
|
-
readonly name: "Mint Green";
|
|
63
40
|
readonly hexValue: "#6accbc";
|
|
64
|
-
readonly value: "#6accbc";
|
|
65
41
|
};
|
|
66
|
-
export declare const
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
69
|
-
readonly displayName: "Turquoise";
|
|
70
|
-
readonly name: "Turquoise";
|
|
42
|
+
export declare const teal: {
|
|
43
|
+
readonly key: "teal";
|
|
44
|
+
readonly displayName: "Teal";
|
|
71
45
|
readonly hexValue: "#158fad";
|
|
72
|
-
readonly value: "#158fad";
|
|
73
46
|
};
|
|
74
47
|
export declare const skyBlue: {
|
|
75
|
-
readonly id: 39;
|
|
76
48
|
readonly key: "sky_blue";
|
|
77
49
|
readonly displayName: "Sky Blue";
|
|
78
|
-
readonly name: "Sky Blue";
|
|
79
50
|
readonly hexValue: "#14aaf5";
|
|
80
|
-
readonly value: "#14aaf5";
|
|
81
51
|
};
|
|
82
52
|
export declare const lightBlue: {
|
|
83
|
-
readonly id: 40;
|
|
84
53
|
readonly key: "light_blue";
|
|
85
54
|
readonly displayName: "Light Blue";
|
|
86
|
-
readonly name: "Light Blue";
|
|
87
55
|
readonly hexValue: "#96c3eb";
|
|
88
|
-
readonly value: "#96c3eb";
|
|
89
56
|
};
|
|
90
57
|
export declare const blue: {
|
|
91
|
-
readonly id: 41;
|
|
92
58
|
readonly key: "blue";
|
|
93
59
|
readonly displayName: "Blue";
|
|
94
|
-
readonly name: "Blue";
|
|
95
60
|
readonly hexValue: "#4073ff";
|
|
96
|
-
readonly value: "#4073ff";
|
|
97
61
|
};
|
|
98
62
|
export declare const grape: {
|
|
99
|
-
readonly id: 42;
|
|
100
63
|
readonly key: "grape";
|
|
101
64
|
readonly displayName: "Grape";
|
|
102
|
-
readonly name: "Grape";
|
|
103
65
|
readonly hexValue: "#884dff";
|
|
104
|
-
readonly value: "#884dff";
|
|
105
66
|
};
|
|
106
67
|
export declare const violet: {
|
|
107
|
-
readonly id: 43;
|
|
108
68
|
readonly key: "violet";
|
|
109
69
|
readonly displayName: "Violet";
|
|
110
|
-
readonly name: "Violet";
|
|
111
70
|
readonly hexValue: "#af38eb";
|
|
112
|
-
readonly value: "#af38eb";
|
|
113
71
|
};
|
|
114
72
|
export declare const lavender: {
|
|
115
|
-
readonly id: 44;
|
|
116
73
|
readonly key: "lavender";
|
|
117
74
|
readonly displayName: "Lavender";
|
|
118
|
-
readonly name: "Lavender";
|
|
119
75
|
readonly hexValue: "#eb96eb";
|
|
120
|
-
readonly value: "#eb96eb";
|
|
121
76
|
};
|
|
122
77
|
export declare const magenta: {
|
|
123
|
-
readonly id: 45;
|
|
124
78
|
readonly key: "magenta";
|
|
125
79
|
readonly displayName: "Magenta";
|
|
126
|
-
readonly name: "Magenta";
|
|
127
80
|
readonly hexValue: "#e05194";
|
|
128
|
-
readonly value: "#e05194";
|
|
129
81
|
};
|
|
130
82
|
export declare const salmon: {
|
|
131
|
-
readonly id: 46;
|
|
132
83
|
readonly key: "salmon";
|
|
133
84
|
readonly displayName: "Salmon";
|
|
134
|
-
readonly name: "Salmon";
|
|
135
85
|
readonly hexValue: "#ff8d85";
|
|
136
|
-
readonly value: "#ff8d85";
|
|
137
86
|
};
|
|
138
87
|
export declare const charcoal: {
|
|
139
|
-
readonly id: 47;
|
|
140
88
|
readonly key: "charcoal";
|
|
141
89
|
readonly displayName: "Charcoal";
|
|
142
|
-
readonly name: "Charcoal";
|
|
143
90
|
readonly hexValue: "#808080";
|
|
144
|
-
readonly value: "#808080";
|
|
145
91
|
};
|
|
146
|
-
export declare const
|
|
147
|
-
readonly
|
|
148
|
-
readonly
|
|
149
|
-
readonly displayName: "Gray";
|
|
150
|
-
readonly name: "Gray";
|
|
92
|
+
export declare const grey: {
|
|
93
|
+
readonly key: "grey";
|
|
94
|
+
readonly displayName: "Grey";
|
|
151
95
|
readonly hexValue: "#b8b8b8";
|
|
152
|
-
readonly value: "#b8b8b8";
|
|
153
96
|
};
|
|
154
97
|
export declare const taupe: {
|
|
155
|
-
readonly id: 49;
|
|
156
98
|
readonly key: "taupe";
|
|
157
99
|
readonly displayName: "Taupe";
|
|
158
|
-
readonly name: "Taupe";
|
|
159
100
|
readonly hexValue: "#ccac93";
|
|
160
|
-
readonly value: "#ccac93";
|
|
161
101
|
};
|
|
162
102
|
export declare const colors: readonly [{
|
|
163
|
-
readonly id: 30;
|
|
164
103
|
readonly key: "berry_red";
|
|
165
104
|
readonly displayName: "Berry Red";
|
|
166
|
-
readonly name: "Berry Red";
|
|
167
105
|
readonly hexValue: "#b8255f";
|
|
168
|
-
readonly value: "#b8255f";
|
|
169
106
|
}, {
|
|
170
|
-
readonly id: 31;
|
|
171
107
|
readonly key: "red";
|
|
172
108
|
readonly displayName: "Red";
|
|
173
|
-
readonly name: "Red";
|
|
174
109
|
readonly hexValue: "#db4035";
|
|
175
|
-
readonly value: "#db4035";
|
|
176
110
|
}, {
|
|
177
|
-
readonly id: 32;
|
|
178
111
|
readonly key: "orange";
|
|
179
112
|
readonly displayName: "Orange";
|
|
180
|
-
readonly name: "Orange";
|
|
181
113
|
readonly hexValue: "#ff9933";
|
|
182
|
-
readonly value: "#ff9933";
|
|
183
114
|
}, {
|
|
184
|
-
readonly id: 33;
|
|
185
115
|
readonly key: "yellow";
|
|
186
116
|
readonly displayName: "Yellow";
|
|
187
|
-
readonly name: "Yellow";
|
|
188
117
|
readonly hexValue: "#fad000";
|
|
189
|
-
readonly value: "#fad000";
|
|
190
118
|
}, {
|
|
191
|
-
readonly id: 34;
|
|
192
119
|
readonly key: "olive_green";
|
|
193
120
|
readonly displayName: "Olive Green";
|
|
194
|
-
readonly name: "Olive Green";
|
|
195
121
|
readonly hexValue: "#afb83b";
|
|
196
|
-
readonly value: "#afb83b";
|
|
197
122
|
}, {
|
|
198
|
-
readonly id: 35;
|
|
199
123
|
readonly key: "lime_green";
|
|
200
124
|
readonly displayName: "Lime Green";
|
|
201
|
-
readonly name: "Lime Green";
|
|
202
125
|
readonly hexValue: "#7ecc49";
|
|
203
|
-
readonly value: "#7ecc49";
|
|
204
126
|
}, {
|
|
205
|
-
readonly id: 36;
|
|
206
127
|
readonly key: "green";
|
|
207
128
|
readonly displayName: "Green";
|
|
208
|
-
readonly name: "Green";
|
|
209
129
|
readonly hexValue: "#299438";
|
|
210
|
-
readonly value: "#299438";
|
|
211
130
|
}, {
|
|
212
|
-
readonly id: 37;
|
|
213
131
|
readonly key: "mint_green";
|
|
214
132
|
readonly displayName: "Mint Green";
|
|
215
|
-
readonly name: "Mint Green";
|
|
216
133
|
readonly hexValue: "#6accbc";
|
|
217
|
-
readonly value: "#6accbc";
|
|
218
134
|
}, {
|
|
219
|
-
readonly
|
|
220
|
-
readonly
|
|
221
|
-
readonly displayName: "Turquoise";
|
|
222
|
-
readonly name: "Turquoise";
|
|
135
|
+
readonly key: "teal";
|
|
136
|
+
readonly displayName: "Teal";
|
|
223
137
|
readonly hexValue: "#158fad";
|
|
224
|
-
readonly value: "#158fad";
|
|
225
138
|
}, {
|
|
226
|
-
readonly id: 39;
|
|
227
139
|
readonly key: "sky_blue";
|
|
228
140
|
readonly displayName: "Sky Blue";
|
|
229
|
-
readonly name: "Sky Blue";
|
|
230
141
|
readonly hexValue: "#14aaf5";
|
|
231
|
-
readonly value: "#14aaf5";
|
|
232
142
|
}, {
|
|
233
|
-
readonly id: 40;
|
|
234
143
|
readonly key: "light_blue";
|
|
235
144
|
readonly displayName: "Light Blue";
|
|
236
|
-
readonly name: "Light Blue";
|
|
237
145
|
readonly hexValue: "#96c3eb";
|
|
238
|
-
readonly value: "#96c3eb";
|
|
239
146
|
}, {
|
|
240
|
-
readonly id: 41;
|
|
241
147
|
readonly key: "blue";
|
|
242
148
|
readonly displayName: "Blue";
|
|
243
|
-
readonly name: "Blue";
|
|
244
149
|
readonly hexValue: "#4073ff";
|
|
245
|
-
readonly value: "#4073ff";
|
|
246
150
|
}, {
|
|
247
|
-
readonly id: 42;
|
|
248
151
|
readonly key: "grape";
|
|
249
152
|
readonly displayName: "Grape";
|
|
250
|
-
readonly name: "Grape";
|
|
251
153
|
readonly hexValue: "#884dff";
|
|
252
|
-
readonly value: "#884dff";
|
|
253
154
|
}, {
|
|
254
|
-
readonly id: 43;
|
|
255
155
|
readonly key: "violet";
|
|
256
156
|
readonly displayName: "Violet";
|
|
257
|
-
readonly name: "Violet";
|
|
258
157
|
readonly hexValue: "#af38eb";
|
|
259
|
-
readonly value: "#af38eb";
|
|
260
158
|
}, {
|
|
261
|
-
readonly id: 44;
|
|
262
159
|
readonly key: "lavender";
|
|
263
160
|
readonly displayName: "Lavender";
|
|
264
|
-
readonly name: "Lavender";
|
|
265
161
|
readonly hexValue: "#eb96eb";
|
|
266
|
-
readonly value: "#eb96eb";
|
|
267
162
|
}, {
|
|
268
|
-
readonly id: 45;
|
|
269
163
|
readonly key: "magenta";
|
|
270
164
|
readonly displayName: "Magenta";
|
|
271
|
-
readonly name: "Magenta";
|
|
272
165
|
readonly hexValue: "#e05194";
|
|
273
|
-
readonly value: "#e05194";
|
|
274
166
|
}, {
|
|
275
|
-
readonly id: 46;
|
|
276
167
|
readonly key: "salmon";
|
|
277
168
|
readonly displayName: "Salmon";
|
|
278
|
-
readonly name: "Salmon";
|
|
279
169
|
readonly hexValue: "#ff8d85";
|
|
280
|
-
readonly value: "#ff8d85";
|
|
281
170
|
}, {
|
|
282
|
-
readonly id: 47;
|
|
283
171
|
readonly key: "charcoal";
|
|
284
172
|
readonly displayName: "Charcoal";
|
|
285
|
-
readonly name: "Charcoal";
|
|
286
173
|
readonly hexValue: "#808080";
|
|
287
|
-
readonly value: "#808080";
|
|
288
174
|
}, {
|
|
289
|
-
readonly
|
|
290
|
-
readonly
|
|
291
|
-
readonly displayName: "Gray";
|
|
292
|
-
readonly name: "Gray";
|
|
175
|
+
readonly key: "grey";
|
|
176
|
+
readonly displayName: "Grey";
|
|
293
177
|
readonly hexValue: "#b8b8b8";
|
|
294
|
-
readonly value: "#b8b8b8";
|
|
295
178
|
}, {
|
|
296
|
-
readonly id: 49;
|
|
297
179
|
readonly key: "taupe";
|
|
298
180
|
readonly displayName: "Taupe";
|
|
299
|
-
readonly name: "Taupe";
|
|
300
181
|
readonly hexValue: "#ccac93";
|
|
301
|
-
readonly value: "#ccac93";
|
|
302
182
|
}];
|
|
303
183
|
export type ColorKey = (typeof colors)[number]['key'];
|
|
304
184
|
export declare const defaultColor: Color;
|
|
305
|
-
/**
|
|
306
|
-
* @private
|
|
307
|
-
* @deprecated Use {@link getColorByKey} instead
|
|
308
|
-
*/
|
|
309
|
-
export declare function getColorById(colorId: number): Color;
|
|
310
|
-
/**
|
|
311
|
-
* @private
|
|
312
|
-
* @deprecated Use {@link getColorByKey} instead
|
|
313
|
-
*/
|
|
314
|
-
export declare function getColorByName(colorName: string): Color;
|
|
315
185
|
/**
|
|
316
186
|
* Retrieves a {@link Color} object by its key identifier.
|
|
317
187
|
*
|
|
@@ -36,7 +36,6 @@ export declare const validateTask: (input: unknown) => {
|
|
|
36
36
|
childOrder: number;
|
|
37
37
|
content: string;
|
|
38
38
|
description: string;
|
|
39
|
-
noteCount: number;
|
|
40
39
|
dayOrder: number;
|
|
41
40
|
isCollapsed: boolean;
|
|
42
41
|
};
|
|
@@ -77,7 +76,6 @@ export declare const validateTaskArray: (input: unknown[]) => {
|
|
|
77
76
|
childOrder: number;
|
|
78
77
|
content: string;
|
|
79
78
|
description: string;
|
|
80
|
-
noteCount: number;
|
|
81
79
|
dayOrder: number;
|
|
82
80
|
isCollapsed: boolean;
|
|
83
81
|
}[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-api-typescript",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.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",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"ts-compile-check": "npx tsc -p tsconfig.typecheck.json",
|
|
31
31
|
"audit": "npm audit --audit-level=moderate",
|
|
32
32
|
"test": "jest",
|
|
33
|
+
"api:request": "node ./scripts/todoist-api-request.cjs",
|
|
33
34
|
"build:cjs": "npx tsc -p tsconfig.cjs.json",
|
|
34
35
|
"build:esm": "npx tsc -p tsconfig.esm.json",
|
|
35
36
|
"build:fix-esm": "node scripts/fix-esm-imports.cjs",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"@types/jest": "30.0.0",
|
|
57
58
|
"@typescript-eslint/eslint-plugin": "8.46.3",
|
|
58
59
|
"@typescript-eslint/parser": "8.46.3",
|
|
60
|
+
"dotenv": "17.3.1",
|
|
59
61
|
"eslint": "8.57.1",
|
|
60
62
|
"eslint-config-prettier": "8.7.0",
|
|
61
63
|
"eslint-import-resolver-webpack": "0.13.2",
|