@doist/todoist-api-typescript 4.0.0-alpha.2 → 4.0.0-alpha.3
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/TodoistApi.d.ts +246 -9
- package/dist/TodoistApi.js +319 -25
- package/dist/authentication.d.ts +78 -4
- package/dist/authentication.js +58 -0
- package/dist/consts/endpoints.d.ts +2 -1
- package/dist/consts/endpoints.js +2 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/restClient.d.ts +1 -1
- package/dist/restClient.js +2 -2
- package/dist/testUtils/asserts.d.ts +0 -1
- package/dist/testUtils/asserts.js +1 -65
- package/dist/testUtils/testDefaults.d.ts +2 -2
- package/dist/types/entities.d.ts +477 -178
- package/dist/types/entities.js +107 -88
- package/dist/types/requests.d.ts +147 -29
- package/dist/types/sync.d.ts +21 -0
- package/dist/types/sync.js +2 -0
- package/dist/utils/colors.d.ts +14 -0
- package/dist/utils/colors.js +14 -0
- package/dist/utils/sanitization.d.ts +29 -0
- package/dist/utils/sanitization.js +29 -0
- package/dist/utils/taskConverters.js +1 -1
- package/dist/utils/validators.d.ts +1 -1
- package/dist/utils/validators.js +7 -7
- package/package.json +10 -10
package/dist/utils/validators.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateUserArray = exports.validateUser = exports.validateCommentArray = exports.validateComment = exports.validateLabelArray = exports.validateLabel = exports.validateSectionArray = exports.validateSection = exports.validateProjectArray = exports.validateProject = exports.validateTaskArray = exports.validateTask = void 0;
|
|
4
|
-
var
|
|
4
|
+
var entities_1 = require("../types/entities");
|
|
5
5
|
function validateTask(input) {
|
|
6
|
-
return
|
|
6
|
+
return entities_1.TaskSchema.parse(input);
|
|
7
7
|
}
|
|
8
8
|
exports.validateTask = validateTask;
|
|
9
9
|
function validateTaskArray(input) {
|
|
@@ -11,7 +11,7 @@ function validateTaskArray(input) {
|
|
|
11
11
|
}
|
|
12
12
|
exports.validateTaskArray = validateTaskArray;
|
|
13
13
|
function validateProject(input) {
|
|
14
|
-
return
|
|
14
|
+
return entities_1.ProjectSchema.parse(input);
|
|
15
15
|
}
|
|
16
16
|
exports.validateProject = validateProject;
|
|
17
17
|
function validateProjectArray(input) {
|
|
@@ -19,7 +19,7 @@ function validateProjectArray(input) {
|
|
|
19
19
|
}
|
|
20
20
|
exports.validateProjectArray = validateProjectArray;
|
|
21
21
|
function validateSection(input) {
|
|
22
|
-
return
|
|
22
|
+
return entities_1.SectionSchema.parse(input);
|
|
23
23
|
}
|
|
24
24
|
exports.validateSection = validateSection;
|
|
25
25
|
function validateSectionArray(input) {
|
|
@@ -27,7 +27,7 @@ function validateSectionArray(input) {
|
|
|
27
27
|
}
|
|
28
28
|
exports.validateSectionArray = validateSectionArray;
|
|
29
29
|
function validateLabel(input) {
|
|
30
|
-
return
|
|
30
|
+
return entities_1.LabelSchema.parse(input);
|
|
31
31
|
}
|
|
32
32
|
exports.validateLabel = validateLabel;
|
|
33
33
|
function validateLabelArray(input) {
|
|
@@ -35,7 +35,7 @@ function validateLabelArray(input) {
|
|
|
35
35
|
}
|
|
36
36
|
exports.validateLabelArray = validateLabelArray;
|
|
37
37
|
function validateComment(input) {
|
|
38
|
-
return
|
|
38
|
+
return entities_1.CommentSchema.parse(input);
|
|
39
39
|
}
|
|
40
40
|
exports.validateComment = validateComment;
|
|
41
41
|
function validateCommentArray(input) {
|
|
@@ -43,7 +43,7 @@ function validateCommentArray(input) {
|
|
|
43
43
|
}
|
|
44
44
|
exports.validateCommentArray = validateCommentArray;
|
|
45
45
|
function validateUser(input) {
|
|
46
|
-
return
|
|
46
|
+
return entities_1.UserSchema.parse(input);
|
|
47
47
|
}
|
|
48
48
|
exports.validateUser = validateUser;
|
|
49
49
|
function validateUserArray(input) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-api-typescript",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.3",
|
|
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",
|
|
@@ -27,32 +27,32 @@
|
|
|
27
27
|
"axios": "^1.0.0",
|
|
28
28
|
"axios-case-converter": "^1.0.0",
|
|
29
29
|
"axios-retry": "^3.1.9",
|
|
30
|
-
"runtypes": "^6.5.0",
|
|
31
30
|
"ts-custom-error": "^3.2.0",
|
|
32
|
-
"uuid": "^9.0.0"
|
|
31
|
+
"uuid": "^9.0.0",
|
|
32
|
+
"zod": "^3.24.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@doist/eslint-config": "
|
|
36
|
-
"@doist/prettier-config": "
|
|
35
|
+
"@doist/eslint-config": "11.1.0",
|
|
36
|
+
"@doist/prettier-config": "4.0.0",
|
|
37
37
|
"@types/jest": "29.4.0",
|
|
38
38
|
"@types/uuid": "9.0.7",
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "
|
|
40
|
-
"@typescript-eslint/parser": "
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "6.21.0",
|
|
40
|
+
"@typescript-eslint/parser": "6.21.0",
|
|
41
41
|
"eslint": "8.35.0",
|
|
42
42
|
"eslint-config-prettier": "8.7.0",
|
|
43
43
|
"eslint-import-resolver-webpack": "0.13.2",
|
|
44
44
|
"eslint-plugin-import": "2.27.5",
|
|
45
|
-
"eslint-plugin-prettier": "
|
|
45
|
+
"eslint-plugin-prettier": "5.1.3",
|
|
46
46
|
"husky": "8.0.3",
|
|
47
47
|
"jest": "29.5.0",
|
|
48
48
|
"lint-staged": "13.1.4",
|
|
49
49
|
"npm-run-all": "4.1.5",
|
|
50
|
-
"prettier": "
|
|
50
|
+
"prettier": "3.3.2",
|
|
51
51
|
"rimraf": "3.0.2",
|
|
52
52
|
"ts-jest": "29.0.5",
|
|
53
53
|
"ts-node": "10.9.1",
|
|
54
54
|
"type-fest": "^4.12.0",
|
|
55
|
-
"typescript": "
|
|
55
|
+
"typescript": "5.3.2"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"type-fest": "^4.12.0"
|