@doist/todoist-api-typescript 6.10.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/test-utils/test-defaults.js +0 -3
- package/dist/cjs/todoist-api.js +18 -34
- package/dist/cjs/types/entities.js +0 -12
- 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/test-utils/test-defaults.js +0 -3
- package/dist/esm/todoist-api.js +19 -35
- package/dist/esm/types/entities.js +0 -12
- 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 +1 -18
- package/dist/types/types/requests.d.ts +17 -48
- package/dist/types/types/sync/commands/index.d.ts +0 -4
- package/dist/types/utils/colors.d.ts +10 -140
- package/dist/types/utils/validators.d.ts +0 -2
- package/package.json +3 -1
|
@@ -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",
|