@shortcut/client 1.1.0 → 2.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/LICENSE +21 -0
- package/README.md +32 -39
- package/lib/ShortcutClient.d.mts +10 -0
- package/lib/ShortcutClient.d.ts +8 -3
- package/lib/ShortcutClient.js +2177 -13
- package/lib/ShortcutClient.mjs +2141 -0
- package/lib/generated/Api.d.mts +1415 -0
- package/lib/generated/Api.d.ts +511 -138
- package/lib/generated/Api.js +2163 -1030
- package/lib/generated/Api.mjs +2128 -0
- package/lib/generated/data-contracts.d.mts +5860 -0
- package/lib/generated/data-contracts.d.ts +1024 -462
- package/lib/generated/data-contracts.js +17 -11
- package/lib/generated/data-contracts.mjs +0 -0
- package/lib/generated/http-client.d.mts +48 -0
- package/lib/generated/http-client.d.ts +11 -8
- package/lib/generated/http-client.js +131 -92
- package/lib/generated/http-client.mjs +101 -0
- package/lib/index.d.mts +5 -0
- package/lib/index.d.ts +5 -3
- package/lib/index.js +2176 -18
- package/lib/index.mjs +2142 -0
- package/package.json +63 -43
package/package.json
CHANGED
|
@@ -1,62 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shortcut/client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A Promise based library to the Shortcut REST API",
|
|
5
|
-
"
|
|
6
|
-
"types": "lib/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"lib"
|
|
9
|
-
],
|
|
5
|
+
"homepage": "https://github.com/useshortcut/shortcut-client-js",
|
|
10
6
|
"bugs": {
|
|
11
7
|
"url": "https://github.com/useshortcut/shortcut-client-js/issues"
|
|
12
8
|
},
|
|
13
|
-
"homepage": "https://github.com/useshortcut/shortcut-client-js",
|
|
14
|
-
"readme": "https://github.com/useshortcut/shortcut-client-js#readme",
|
|
15
9
|
"repository": {
|
|
16
10
|
"type": "git",
|
|
17
11
|
"url": "https://github.com/useshortcut/shortcut-client-js.git"
|
|
18
12
|
},
|
|
19
13
|
"license": "MIT",
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./lib/index.d.mts",
|
|
20
|
+
"default": "./lib/index.mjs"
|
|
21
|
+
},
|
|
22
|
+
"require": {
|
|
23
|
+
"types": "./lib/index.d.ts",
|
|
24
|
+
"default": "./lib/index.js"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"main": "./lib/index.js",
|
|
29
|
+
"module": "./lib/index.mjs",
|
|
30
|
+
"types": "./lib/index.d.ts",
|
|
31
|
+
"files": [
|
|
32
|
+
"lib"
|
|
33
|
+
],
|
|
20
34
|
"scripts": {
|
|
21
|
-
"build": "yarn build:client && yarn build:add-typedoc-comments &&
|
|
22
|
-
"build:client": "swagger-typescript-api -p ./schema/shortcut.swagger.json -o ./src/generated --clean-output --axios --modular --templates ./templates",
|
|
35
|
+
"build": "yarn build:client && yarn build:add-typedoc-comments && tsup",
|
|
23
36
|
"build:add-typedoc-comments": "npx jscodeshift -t scripts/add-typedoc-comments.ts --extensions=ts --parser=ts src/generated/**",
|
|
37
|
+
"build:client": "swagger-typescript-api generate --path ./schema/shortcut.swagger.json --output ./src/generated --clean-output --axios --modular --templates ./templates",
|
|
24
38
|
"build:docs": "typedoc ./src --exclude 'src/__tests__/**'",
|
|
25
|
-
"
|
|
39
|
+
"check-exports": "attw --pack .",
|
|
40
|
+
"format": "prettier --write -l *.{json,md,prettierrc} '{src,scripts}/**/*.ts'",
|
|
41
|
+
"format:check": "prettier --check *.{json,md,prettierrc} '{src,scripts}/**/*.ts'",
|
|
42
|
+
"lint": "eslint 'src/**/*.{js,ts}'",
|
|
26
43
|
"prepublishOnly": "yarn build",
|
|
27
44
|
"sync:schema": "curl --silent https://developer.shortcut.com/api/rest/v3/shortcut.swagger.json --output ./schema/shortcut.swagger.json && yarn validate:schema",
|
|
28
|
-
"validate:schema": "swagger-cli validate ./schema/shortcut.swagger.json",
|
|
29
|
-
"lint": "eslint 'src/**/*.{js,ts}'",
|
|
30
45
|
"test": "jest",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"axios": "^1.5.0"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@types/jest": "^29.5.4",
|
|
39
|
-
"@types/jscodeshift": "0.11.6",
|
|
40
|
-
"@types/node": "^20.5.7",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
|
42
|
-
"@typescript-eslint/parser": "^6.5.0",
|
|
43
|
-
"eslint": "^8.48.0",
|
|
44
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
45
|
-
"eslint-config-prettier": "^9.0.0",
|
|
46
|
-
"eslint-plugin-import": "^2.28.1",
|
|
47
|
-
"eslint-plugin-jest": "^27.2.3",
|
|
48
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
49
|
-
"jest": "^29.6.4",
|
|
50
|
-
"jscodeshift": "^0.15.0",
|
|
51
|
-
"prettier": "^3.0.3",
|
|
52
|
-
"rimraf": "^5.0.1",
|
|
53
|
-
"stream-to-blob": "^2.0.1",
|
|
54
|
-
"swagger-cli": "^4.0.4",
|
|
55
|
-
"swagger-typescript-api": "^13.0.3",
|
|
56
|
-
"ts-jest": "^29.1.1",
|
|
57
|
-
"typedoc": "0.25.0",
|
|
58
|
-
"typedoc-plugin-merge-modules": "5.1.0",
|
|
59
|
-
"typescript": "^5.2.2"
|
|
46
|
+
"validate:examples": "npx tsc examples/*.ts --noEmit",
|
|
47
|
+
"validate:schema": "swagger-cli validate ./schema/shortcut.swagger.json"
|
|
60
48
|
},
|
|
61
49
|
"jest": {
|
|
62
50
|
"preset": "ts-jest",
|
|
@@ -65,5 +53,37 @@
|
|
|
65
53
|
"<rootDir>/lib/",
|
|
66
54
|
"<rootDir>/node_modules/"
|
|
67
55
|
]
|
|
68
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"axios": "^1.9.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@arethetypeswrong/cli": "^0.18.1",
|
|
62
|
+
"@total-typescript/tsconfig": "^1.0.4",
|
|
63
|
+
"@types/glob": "^8.1.0",
|
|
64
|
+
"@types/jest": "^29.5.14",
|
|
65
|
+
"@types/jscodeshift": "17.3.0",
|
|
66
|
+
"@types/node": "^22.15.30",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
68
|
+
"@typescript-eslint/parser": "^8.33.1",
|
|
69
|
+
"eslint": "^8.57.1",
|
|
70
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
71
|
+
"eslint-config-prettier": "^10.1.5",
|
|
72
|
+
"eslint-plugin-import": "^2.31.0",
|
|
73
|
+
"eslint-plugin-jest": "^28.12.0",
|
|
74
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
75
|
+
"glob": "^11.0.2",
|
|
76
|
+
"jest": "^29.7.0",
|
|
77
|
+
"jscodeshift": "^17.3.0",
|
|
78
|
+
"prettier": "^3.5.3",
|
|
79
|
+
"stream-to-blob": "^2.0.1",
|
|
80
|
+
"swagger-cli": "^4.0.4",
|
|
81
|
+
"swagger-typescript-api": "^13.2.0",
|
|
82
|
+
"ts-jest": "^29.3.4",
|
|
83
|
+
"tsup": "^8.5.0",
|
|
84
|
+
"typedoc": "0.28.5",
|
|
85
|
+
"typedoc-plugin-merge-modules": "7.0.0",
|
|
86
|
+
"typescript": "^5.8.3"
|
|
87
|
+
},
|
|
88
|
+
"readme": "https://github.com/useshortcut/shortcut-client-js#readme"
|
|
69
89
|
}
|