@doist/todoist-api-typescript 1.5.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.
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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");
5
+ function validateTask(input) {
6
+ return types_1.Task.check(input);
7
+ }
8
+ exports.validateTask = validateTask;
9
+ function validateTaskArray(input) {
10
+ return input.map(validateTask);
11
+ }
12
+ exports.validateTaskArray = validateTaskArray;
13
+ function validateProject(input) {
14
+ return types_1.Project.check(input);
15
+ }
16
+ exports.validateProject = validateProject;
17
+ function validateProjectArray(input) {
18
+ return input.map(validateProject);
19
+ }
20
+ exports.validateProjectArray = validateProjectArray;
21
+ function validateSection(input) {
22
+ return types_1.Section.check(input);
23
+ }
24
+ exports.validateSection = validateSection;
25
+ function validateSectionArray(input) {
26
+ return input.map(validateSection);
27
+ }
28
+ exports.validateSectionArray = validateSectionArray;
29
+ function validateLabel(input) {
30
+ return types_1.Label.check(input);
31
+ }
32
+ exports.validateLabel = validateLabel;
33
+ function validateLabelArray(input) {
34
+ return input.map(validateLabel);
35
+ }
36
+ exports.validateLabelArray = validateLabelArray;
37
+ function validateComment(input) {
38
+ return types_1.Comment.check(input);
39
+ }
40
+ exports.validateComment = validateComment;
41
+ function validateCommentArray(input) {
42
+ return input.map(validateComment);
43
+ }
44
+ exports.validateCommentArray = validateCommentArray;
45
+ function validateUser(input) {
46
+ return types_1.User.check(input);
47
+ }
48
+ exports.validateUser = validateUser;
49
+ function validateUserArray(input) {
50
+ return input.map(validateUser);
51
+ }
52
+ exports.validateUserArray = validateUserArray;
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@doist/todoist-api-typescript",
3
+ "version": "1.5.0",
4
+ "description": "A typescript wrapper for the Todoist REST API.",
5
+ "author": "Doist developers",
6
+ "repository": "git@github.com:doist/todoist-api-typescript.git",
7
+ "license": "MIT",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "sideEffects": false,
11
+ "scripts": {
12
+ "clean": "rimraf dist",
13
+ "format-check": "npx prettier --check \"./**/*.{ts,tsx,json,md,yml,babelrc,html}\"",
14
+ "format-fix": "npx prettier --write \"./**/*.{ts,tsx,json,md,yml,babelrc,html}\"",
15
+ "lint": "eslint ./src --ext ts,tsx --fix",
16
+ "lint-check": "eslint ./src --ext ts,tsx",
17
+ "ts-compile-check": "npx tsc -p tsconfig.json",
18
+ "audit": "npm audit --audit-level=moderate",
19
+ "test": "jest",
20
+ "build": "npx tsc -p tsconfig.json",
21
+ "integrity-checks": "npm-run-all clean format-check lint-check test build",
22
+ "prepublishOnly": "npm run integrity-checks",
23
+ "prepare": "npm run build"
24
+ },
25
+ "dependencies": {
26
+ "axios": "^0.21.2",
27
+ "axios-case-converter": "^0.7.0",
28
+ "axios-retry": "^3.1.9",
29
+ "runtypes": "^5.2.0",
30
+ "ts-custom-error": "^3.2.0",
31
+ "url-join": "^4.0.1",
32
+ "uuid": "^8.3.1"
33
+ },
34
+ "devDependencies": {
35
+ "@doist/eslint-config": "^7.0.0",
36
+ "@doist/prettier-config": "^3.0.5",
37
+ "@types/axios": "^0.14.0",
38
+ "@types/jest": "^27.0.3",
39
+ "@types/url-join": "^4.0.1",
40
+ "@types/uuid": "^8.3.0",
41
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
42
+ "@typescript-eslint/parser": "^4.29.3",
43
+ "eslint": "^7.32.0",
44
+ "eslint-config-prettier": "^8.3.0",
45
+ "eslint-import-resolver-webpack": "^0.13.1",
46
+ "eslint-plugin-import": "^2.24.2",
47
+ "eslint-plugin-prettier": "^3.4.0",
48
+ "husky": "^7.0.4",
49
+ "jest": "^27.3.1",
50
+ "jest-mock-extended": "^1.0.14",
51
+ "lint-staged": "^11.1.1",
52
+ "npm-run-all": "^4.1.5",
53
+ "prettier": "^2.2.1",
54
+ "rimraf": "^3.0.2",
55
+ "ts-jest": "^27.0.7",
56
+ "ts-node": "^9.1.1",
57
+ "typescript": "^4.4.4"
58
+ },
59
+ "prettier": "@doist/prettier-config",
60
+ "husky": {
61
+ "hooks": {
62
+ "pre-commit": "npx lint-staged && npm run build"
63
+ }
64
+ },
65
+ "lint-staged": {
66
+ "*.{ts,tsx}": "eslint --fix",
67
+ "*.{ts,tsx,json,html,yml,yaml,md}": "prettier --check"
68
+ },
69
+ "files": [
70
+ "dist/**/*",
71
+ "!dist/**/*.test.js",
72
+ "!dist/**/*.test.d.ts"
73
+ ]
74
+ }