@doist/todoist-api-typescript 2.0.3 → 2.0.5
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.
|
@@ -56,8 +56,8 @@ exports.DEFAULT_QUICK_ADD_RESPONSE = {
|
|
|
56
56
|
labels: DEFAULT_LABELS,
|
|
57
57
|
responsibleUid: DEFAULT_ASSIGNEE,
|
|
58
58
|
checked: 0,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
addedAt: DEFAULT_DATE,
|
|
60
|
+
addedByUid: DEFAULT_CREATOR,
|
|
61
61
|
due: {
|
|
62
62
|
date: DEFAULT_DATE,
|
|
63
63
|
timezone: null,
|
|
@@ -98,7 +98,7 @@ exports.DEFAULT_PROJECT = {
|
|
|
98
98
|
isInboxProject: false,
|
|
99
99
|
isTeamInbox: false,
|
|
100
100
|
viewStyle: DEFAULT_PROJECT_VIEW_STYLE,
|
|
101
|
-
url:
|
|
101
|
+
url: 'https://todoist.com/showProject?id=123',
|
|
102
102
|
};
|
|
103
103
|
exports.INVALID_PROJECT = __assign(__assign({}, exports.DEFAULT_PROJECT), { name: 123 });
|
|
104
104
|
exports.PROJECT_WITH_OPTIONALS_AS_NULL = __assign(__assign({}, exports.DEFAULT_PROJECT), { parentId: null });
|
package/dist/types/entities.d.ts
CHANGED
|
@@ -140,8 +140,8 @@ export declare type QuickAddTaskResponse = {
|
|
|
140
140
|
labels: string[];
|
|
141
141
|
responsibleUid: string | null;
|
|
142
142
|
checked: number;
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
addedAt: string;
|
|
144
|
+
addedByUid: string | null;
|
|
145
145
|
due: {
|
|
146
146
|
date: string;
|
|
147
147
|
timezone: string | null;
|
package/dist/types/requests.d.ts
CHANGED
|
@@ -32,11 +32,11 @@ export declare type UpdateTaskArgs = {
|
|
|
32
32
|
description?: string;
|
|
33
33
|
labels?: string[];
|
|
34
34
|
priority?: number;
|
|
35
|
-
dueString?: string;
|
|
36
|
-
dueLang?: string;
|
|
37
|
-
dueDate?: string;
|
|
38
|
-
dueDatetime?: string;
|
|
39
|
-
assigneeId?: string;
|
|
35
|
+
dueString?: string | null;
|
|
36
|
+
dueLang?: string | null;
|
|
37
|
+
dueDate?: string | null;
|
|
38
|
+
dueDatetime?: string | null;
|
|
39
|
+
assigneeId?: string | null;
|
|
40
40
|
};
|
|
41
41
|
export declare type ProjectViewStyle = 'list' | 'board';
|
|
42
42
|
export declare type AddProjectArgs = {
|
|
@@ -17,9 +17,10 @@ function getTaskUrlFromQuickAddResponse(responseData) {
|
|
|
17
17
|
return "".concat(showTaskEndpoint, "?id=").concat(responseData.id);
|
|
18
18
|
}
|
|
19
19
|
function getTaskFromQuickAddResponse(responseData) {
|
|
20
|
+
var _a;
|
|
20
21
|
var due = responseData.due
|
|
21
22
|
? __assign(__assign({ isRecurring: responseData.due.isRecurring, string: responseData.due.string, date: responseData.due.date }, (responseData.due.timezone !== null && { datetime: responseData.due.date })), (responseData.due.timezone !== null && { timezone: responseData.due.timezone })) : undefined;
|
|
22
|
-
var task = __assign(__assign(__assign({ id: responseData.id, order: responseData.childOrder, content: responseData.content, description: responseData.description, projectId: responseData.projectId, sectionId: responseData.sectionId ? responseData.sectionId : undefined, isCompleted: responseData.checked === 1, labels: responseData.labels, priority: responseData.priority, commentCount: 0, createdAt: responseData.
|
|
23
|
+
var task = __assign(__assign(__assign({ id: responseData.id, order: responseData.childOrder, content: responseData.content, description: responseData.description, projectId: responseData.projectId, sectionId: responseData.sectionId ? responseData.sectionId : undefined, isCompleted: responseData.checked === 1, labels: responseData.labels, priority: responseData.priority, commentCount: 0, createdAt: responseData.addedAt, url: getTaskUrlFromQuickAddResponse(responseData), creatorId: (_a = responseData.addedByUid) !== null && _a !== void 0 ? _a : '' }, (due !== undefined && { due: due })), (responseData.parentId !== null && { parentId: responseData.parentId })), (responseData.responsibleUid !== null && {
|
|
23
24
|
assigneeId: responseData.responsibleUid,
|
|
24
25
|
}));
|
|
25
26
|
return task;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-api-typescript",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "A typescript wrapper for the Todoist REST API.",
|
|
5
5
|
"author": "Doist developers",
|
|
6
6
|
"repository": "git@github.com:doist/todoist-api-typescript.git",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"axios-retry": "^3.1.9",
|
|
30
30
|
"runtypes": "^6.5.0",
|
|
31
31
|
"ts-custom-error": "^3.2.0",
|
|
32
|
-
"uuid": "^
|
|
32
|
+
"uuid": "^9.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@doist/eslint-config": "7.
|
|
35
|
+
"@doist/eslint-config": "7.5.0",
|
|
36
36
|
"@doist/prettier-config": "3.0.5",
|
|
37
37
|
"@types/axios": "0.14.0",
|
|
38
38
|
"@types/jest": "27.5.2",
|
|
39
39
|
"@types/uuid": "8.3.4",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
41
|
-
"@typescript-eslint/parser": "5.
|
|
42
|
-
"eslint": "8.
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "5.39.0",
|
|
41
|
+
"@typescript-eslint/parser": "5.39.0",
|
|
42
|
+
"eslint": "8.24.0",
|
|
43
43
|
"eslint-config-prettier": "8.5.0",
|
|
44
44
|
"eslint-import-resolver-webpack": "0.13.2",
|
|
45
45
|
"eslint-plugin-import": "2.26.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"rimraf": "3.0.2",
|
|
53
53
|
"ts-jest": "28.0.8",
|
|
54
54
|
"ts-node": "10.9.1",
|
|
55
|
-
"typescript": "4.8.
|
|
55
|
+
"typescript": "4.8.4"
|
|
56
56
|
},
|
|
57
57
|
"prettier": "@doist/prettier-config",
|
|
58
58
|
"husky": {
|