@doist/todoist-api-typescript 4.0.0-alpha.1 → 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.
@@ -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 types_1 = require("../types");
4
+ var entities_1 = require("../types/entities");
5
5
  function validateTask(input) {
6
- return types_1.Task.check(input);
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 types_1.Project.check(input);
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 types_1.Section.check(input);
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 types_1.Label.check(input);
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 types_1.Comment.check(input);
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 types_1.User.check(input);
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.1",
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": "8.1.3",
36
- "@doist/prettier-config": "3.0.5",
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": "5.54.1",
40
- "@typescript-eslint/parser": "5.54.1",
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": "4.2.1",
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": "2.8.4",
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": "4.9.5"
55
+ "typescript": "5.3.2"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "type-fest": "^4.12.0"