diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6e6eb26a..cd6103329e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Jira.js changelog +### 2.18.0 + +- Agile + - `Fields` model added for `Issue` Model. +- Version 3: + - Support simple string body (comment) was added to `addComment` method of `issueComments` API. +- Version 2, Version 3: + - `putAddonProperty` method fixed. Now you can provide property for set. + ### 2.17.0 - JSDoc improvements diff --git a/package-lock.json b/package-lock.json index a1ed464caa..d8beedffbd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jira.js", - "version": "2.17.0", + "version": "2.18.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "jira.js", - "version": "2.17.0", + "version": "2.18.0", "license": "MIT", "dependencies": { "atlassian-jwt": "^2.0.2", @@ -16,29 +16,28 @@ "tslib": "^2.5.0" }, "devDependencies": { - "@swc-node/register": "^1.6.2", - "@swc/helpers": "^0.4.14", + "@swc-node/register": "^1.6.4", + "@swc/helpers": "^0.5.0", "@types/express": "^4.17.17", - "@types/node": "^18.15.10", + "@types/node": "^18.15.11", "@types/oauth": "^0.9.1", "@types/sinon": "^10.0.13", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", + "@typescript-eslint/eslint-plugin": "^5.58.0", + "@typescript-eslint/parser": "^5.58.0", "ava": "^5.2.0", "dotenv": "^16.0.3", - "eslint": "^8.36.0", + "eslint": "^8.38.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.0.0", - "eslint-import-resolver-typescript": "^3.5.3", + "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.27.5", - "eslint-plugin-sort-exports": "^0.8.0", "prettier": "^2.8.7", "prettier-plugin-jsdoc": "^0.4.2", "sinon": "^15.0.3", "ts-node": "^10.9.1", "typedoc": "^0.23.28", "typedoc-plugin-extras": "^2.3.2", - "typescript": "^5.0.2" + "typescript": "^5.0.4" } }, "node_modules/@babel/runtime": { @@ -82,23 +81,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.1.tgz", - "integrity": "sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", - "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.0", + "espree": "^9.5.1", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -114,9 +113,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", - "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", + "integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -156,18 +155,18 @@ "dev": true }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { @@ -289,9 +288,9 @@ "dev": true }, "node_modules/@swc-node/core": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@swc-node/core/-/core-1.10.1.tgz", - "integrity": "sha512-4aiqLb5Uz+zDt7oIMAtH69+l1BvKV3k7fMYNNLjgdSM7qmFwrpHwu+Ss9nOYPTCFlbKCUMP/70aD5Gt2skmJaw==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@swc-node/core/-/core-1.10.3.tgz", + "integrity": "sha512-8rpv1DXzsQjN/C8ZXuaTSmJ4M/lRr6geUlbOQ861DLC+sKWcEEvxRjK9cXQ28GserHuEcFDA3wlF9rD1YD0x+Q==", "dev": true, "engines": { "node": ">= 10" @@ -305,12 +304,12 @@ } }, "node_modules/@swc-node/register": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@swc-node/register/-/register-1.6.2.tgz", - "integrity": "sha512-7kzUOrw5RhSW23VU9RtEOlH71MQZ4cfUPgu245f3tKjYIu1CkxNJVX48FAiGJ6+3QgJMXLr1anT9FeeCmX12xw==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@swc-node/register/-/register-1.6.4.tgz", + "integrity": "sha512-J6UtQvFR/VdETg74JsT6t/wEONWRRgM4/aLmyfC4GS4uAUZNn73NUxnih+7bnfpmp6qQwfrQ137zTiXLtMa5hQ==", "dev": true, "dependencies": { - "@swc-node/core": "^1.10.1", + "@swc-node/core": "^1.10.3", "@swc-node/sourcemap-support": "^0.3.0", "colorette": "^2.0.19", "debug": "^4.3.4", @@ -337,9 +336,9 @@ } }, "node_modules/@swc/core": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.42.tgz", - "integrity": "sha512-nVFUd5+7tGniM2cT3LXaqnu3735Cu4az8A9gAKK+8sdpASI52SWuqfDBmjFCK9xG90MiVDVp2PTZr0BWqCIzpw==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.49.tgz", + "integrity": "sha512-br44ZHOfE9YyRGcORSLkHFQHTvhwRcaithBJ1Q5y5iMGpLbH0Wai3GN49L60RvmGwxNJfWzT+E7+rNNR7ewKgA==", "dev": true, "hasInstallScript": true, "peer": true, @@ -351,22 +350,30 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.3.42", - "@swc/core-darwin-x64": "1.3.42", - "@swc/core-linux-arm-gnueabihf": "1.3.42", - "@swc/core-linux-arm64-gnu": "1.3.42", - "@swc/core-linux-arm64-musl": "1.3.42", - "@swc/core-linux-x64-gnu": "1.3.42", - "@swc/core-linux-x64-musl": "1.3.42", - "@swc/core-win32-arm64-msvc": "1.3.42", - "@swc/core-win32-ia32-msvc": "1.3.42", - "@swc/core-win32-x64-msvc": "1.3.42" + "@swc/core-darwin-arm64": "1.3.49", + "@swc/core-darwin-x64": "1.3.49", + "@swc/core-linux-arm-gnueabihf": "1.3.49", + "@swc/core-linux-arm64-gnu": "1.3.49", + "@swc/core-linux-arm64-musl": "1.3.49", + "@swc/core-linux-x64-gnu": "1.3.49", + "@swc/core-linux-x64-musl": "1.3.49", + "@swc/core-win32-arm64-msvc": "1.3.49", + "@swc/core-win32-ia32-msvc": "1.3.49", + "@swc/core-win32-x64-msvc": "1.3.49" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.42.tgz", - "integrity": "sha512-hM6RrZFyoCM9mX3cj/zM5oXwhAqjUdOCLXJx7KTQps7NIkv/Qjvobgvyf2gAb89j3ARNo9NdIoLjTjJ6oALtiA==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.49.tgz", + "integrity": "sha512-g7aIfXh6uPHmhLXdjXQq5t3HAyS/EdvujasW1DIS5k8UqOBaSoCcSGtLIjzcLv3KujqNfYcm118E+12H0nY6fQ==", "cpu": [ "arm64" ], @@ -381,9 +388,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.42.tgz", - "integrity": "sha512-bjsWtHMb6wJK1+RGlBs2USvgZ0txlMk11y0qBLKo32gLKTqzUwRw0Fmfzuf6Ue2a/w//7eqMlPFEre4LvJajGw==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.49.tgz", + "integrity": "sha512-eSIxVX0YDw40Bre5sAx2BV3DzdIGzmQvCf2yiBvLqiiL6GC0mmuDeWbUCAzdUX6fJ6FUVEBMUVqNOc9oJ2/d5w==", "cpu": [ "x64" ], @@ -398,9 +405,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.42.tgz", - "integrity": "sha512-Oe0ggMz3MyqXNfeVmY+bBTL0hFSNY3bx8dhcqsh4vXk/ZVGse94QoC4dd92LuPHmKT0x6nsUzB86x2jU9QHW5g==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.49.tgz", + "integrity": "sha512-8mj3IcRVr/OJY0mVITz6Z5osNAMJK5GiKDaZ+3QejPLbl6aiu4sH4GmTHDRN14RnaVXOpecsGcUoQmNoNa3u3w==", "cpu": [ "arm" ], @@ -415,9 +422,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.42.tgz", - "integrity": "sha512-ZJsa8NIW1RLmmHGTJCbM7OPSbBZ9rOMrLqDtUOGrT0uoJXZnnQqolflamB5wviW0X6h3Z3/PSTNGNDCJ3u3Lqg==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.49.tgz", + "integrity": "sha512-Rmg9xw6tmpOpf6GKKjpHQGmjfHzqSths5ebI2ahrHlhekzZF2HYmPkVw4bHda8Bja6mbaw8FVBgBHjPU8mMeDA==", "cpu": [ "arm64" ], @@ -432,9 +439,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.42.tgz", - "integrity": "sha512-YpZwlFAfOp5vkm/uVUJX1O7N3yJDO1fDQRWqsOPPNyIJkI2ydlRQtgN6ZylC159Qv+TimfXnGTlNr7o3iBAqjg==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.49.tgz", + "integrity": "sha512-nlKPYMogAI3Aak6Mlkag8/2AlHAZ/DpH7RjhfMazsaGhD/sQOmYdyY9Al69ejpa419YJuREeeeLoojFlSsd30g==", "cpu": [ "arm64" ], @@ -449,9 +456,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.42.tgz", - "integrity": "sha512-0ccpKnsZbyHBzaQFdP8U9i29nvOfKitm6oJfdJzlqsY/jCqwvD8kv2CAKSK8WhJz//ExI2LqNrDI0yazx5j7+A==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.49.tgz", + "integrity": "sha512-QOyeJQ6NVi73SJcizbwvIZTiGA/N+BxX9liRrvibumaQmRh8fWjJiLNsv3ODSHeuonak7E8Bf7a7NnSTyu48Mw==", "cpu": [ "x64" ], @@ -466,9 +473,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.42.tgz", - "integrity": "sha512-7eckRRuTZ6+3K21uyfXXgc2ZCg0mSWRRNwNT3wap2bYkKPeqTgb8pm8xYSZNEiMuDonHEat6XCCV36lFY6kOdQ==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.49.tgz", + "integrity": "sha512-WlDMz+SOpYC9O/ZBUw1oiyWI7HyUCMlf/HS8Fy/kRI3eGoGCUxVTCJ1mP57GdQr4Wg32Y/ZpO2KSNQFWnT8mAw==", "cpu": [ "x64" ], @@ -483,9 +490,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.42.tgz", - "integrity": "sha512-t27dJkdw0GWANdN4TV0lY/V5vTYSx5SRjyzzZolep358ueCGuN1XFf1R0JcCbd1ojosnkQg2L7A7991UjXingg==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.49.tgz", + "integrity": "sha512-41LZOeI94Za3twib8KOIjnHYAZ+nkBFmboaREsFR1760S7jiMVywqWX8nFZvn/CXj15Fjjgdgyuig+zMREwXwQ==", "cpu": [ "arm64" ], @@ -500,9 +507,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.42.tgz", - "integrity": "sha512-xfpc/Zt/aMILX4IX0e3loZaFyrae37u3MJCv1gJxgqrpeLi7efIQr3AmERkTK3mxTO6R5urSliWw2W3FyZ7D3Q==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.49.tgz", + "integrity": "sha512-IdqLPoMKssyAoOCZdNXmnAd6/uyx+Hb9KSfZUHepZaNfwMy6J5XXrOsbYs3v53FH8MtekUUdV+mMX4me9bcv9w==", "cpu": [ "ia32" ], @@ -517,9 +524,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.42.tgz", - "integrity": "sha512-ra2K4Tu++EJLPhzZ6L8hWUsk94TdK/2UKhL9dzCBhtzKUixsGCEqhtqH1zISXNvW8qaVLFIMUP37ULe80/IJaA==", + "version": "1.3.49", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.49.tgz", + "integrity": "sha512-7Fqjo5pS3uIohhSbYSaR0+e/bJdxmQb4oG97FIh5qvlCCGQaQ9UiaEeYy4uK0Ad+Menum1IXCAEiG7RHcl6Eyw==", "cpu": [ "x64" ], @@ -534,9 +541,9 @@ } }, "node_modules/@swc/helpers": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz", - "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.0.tgz", + "integrity": "sha512-SjY/p4MmECVVEWspzSRpQEM3sjR17sP8PbGxELWrT+YZMBfiUyt1MRUNjMV23zohwlG2HYtCQOsCwsTHguXkyg==", "dev": true, "dependencies": { "tslib": "^2.4.0" @@ -651,9 +658,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.15.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz", - "integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==", + "version": "18.15.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", + "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", "dev": true }, "node_modules/@types/oauth": { @@ -715,15 +722,15 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.56.0.tgz", - "integrity": "sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg==", + "version": "5.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.58.0.tgz", + "integrity": "sha512-vxHvLhH0qgBd3/tW6/VccptSfc8FxPQIkmNTVLWcCOVqSBvqpnKkBTYrhcGlXfSnd78azwe+PsjYFj0X34/njA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/type-utils": "5.56.0", - "@typescript-eslint/utils": "5.56.0", + "@typescript-eslint/scope-manager": "5.58.0", + "@typescript-eslint/type-utils": "5.58.0", + "@typescript-eslint/utils": "5.58.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -749,14 +756,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.56.0.tgz", - "integrity": "sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==", + "version": "5.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.58.0.tgz", + "integrity": "sha512-ixaM3gRtlfrKzP8N6lRhBbjTow1t6ztfBvQNGuRM8qH1bjFFXIJ35XY+FC0RRBKn3C6cT+7VW1y8tNm7DwPHDQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", + "@typescript-eslint/scope-manager": "5.58.0", + "@typescript-eslint/types": "5.58.0", + "@typescript-eslint/typescript-estree": "5.58.0", "debug": "^4.3.4" }, "engines": { @@ -776,13 +783,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz", - "integrity": "sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw==", + "version": "5.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.58.0.tgz", + "integrity": "sha512-b+w8ypN5CFvrXWQb9Ow9T4/6LC2MikNf1viLkYTiTbkQl46CnR69w7lajz1icW0TBsYmlpg+mRzFJ4LEJ8X9NA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0" + "@typescript-eslint/types": "5.58.0", + "@typescript-eslint/visitor-keys": "5.58.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -793,13 +800,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.56.0.tgz", - "integrity": "sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A==", + "version": "5.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.58.0.tgz", + "integrity": "sha512-FF5vP/SKAFJ+LmR9PENql7fQVVgGDOS+dq3j+cKl9iW/9VuZC/8CFmzIP0DLKXfWKpRHawJiG70rVH+xZZbp8w==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.56.0", - "@typescript-eslint/utils": "5.56.0", + "@typescript-eslint/typescript-estree": "5.58.0", + "@typescript-eslint/utils": "5.58.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -820,9 +827,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.56.0.tgz", - "integrity": "sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w==", + "version": "5.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.58.0.tgz", + "integrity": "sha512-JYV4eITHPzVQMnHZcYJXl2ZloC7thuUHrcUmxtzvItyKPvQ50kb9QXBkgNAt90OYMqwaodQh2kHutWZl1fc+1g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -833,13 +840,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz", - "integrity": "sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg==", + "version": "5.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.58.0.tgz", + "integrity": "sha512-cRACvGTodA+UxnYM2uwA2KCwRL7VAzo45syNysqlMyNyjw0Z35Icc9ihPJZjIYuA5bXJYiJ2YGUB59BqlOZT1Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0", + "@typescript-eslint/types": "5.58.0", + "@typescript-eslint/visitor-keys": "5.58.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -860,17 +867,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.56.0.tgz", - "integrity": "sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA==", + "version": "5.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.58.0.tgz", + "integrity": "sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", + "@typescript-eslint/scope-manager": "5.58.0", + "@typescript-eslint/types": "5.58.0", + "@typescript-eslint/typescript-estree": "5.58.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -886,12 +893,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz", - "integrity": "sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q==", + "version": "5.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.58.0.tgz", + "integrity": "sha512-/fBraTlPj0jwdyTwLyrRTxv/3lnU2H96pNTVM6z3esTWLtA5MZ9ghSMJ7Rb+TtUAdtEw9EyJzJ0EydIMKxQ9gA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.56.0", + "@typescript-eslint/types": "5.58.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1242,9 +1249,9 @@ } }, "node_modules/ava/node_modules/globby": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", - "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", + "version": "13.1.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", + "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==", "dev": true, "dependencies": { "dir-glob": "^3.0.1", @@ -1869,9 +1876,9 @@ } }, "node_modules/del/node_modules/globby": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", - "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", + "version": "13.1.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", + "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==", "dev": true, "dependencies": { "dir-glob": "^3.0.1", @@ -2126,15 +2133,15 @@ } }, "node_modules/eslint": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", - "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", + "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.1", - "@eslint/js": "8.36.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.38.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2145,8 +2152,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.5.0", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2267,18 +2274,19 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.3.tgz", - "integrity": "sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ==", + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz", + "integrity": "sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==", "dev": true, "dependencies": { "debug": "^4.3.4", - "enhanced-resolve": "^5.10.0", - "get-tsconfig": "^4.2.0", - "globby": "^13.1.2", - "is-core-module": "^2.10.0", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "get-tsconfig": "^4.5.0", + "globby": "^13.1.3", + "is-core-module": "^2.11.0", "is-glob": "^4.0.3", - "synckit": "^0.8.4" + "synckit": "^0.8.5" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -2292,9 +2300,9 @@ } }, "node_modules/eslint-import-resolver-typescript/node_modules/globby": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", - "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", + "version": "13.1.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", + "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==", "dev": true, "dependencies": { "dir-glob": "^3.0.1", @@ -2532,15 +2540,6 @@ "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-sort-exports": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-sort-exports/-/eslint-plugin-sort-exports-0.8.0.tgz", - "integrity": "sha512-5x7kJNjIS5bSyehFJ6Gk2gh2wUPt/rmhwDHF8JPDicSH7bvrLRFdlkhHu74YqYBjEySHYaOZVoKNP90TjI0v6w==", - "dev": true, - "peerDependencies": { - "eslint": ">=5.0.0" - } - }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -2564,12 +2563,15 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/ansi-regex": { @@ -2659,14 +2661,14 @@ } }, "node_modules/espree": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", - "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3000,9 +3002,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.4.0.tgz", - "integrity": "sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.5.0.tgz", + "integrity": "sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==", "dev": true, "funding": { "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" @@ -3385,9 +3387,9 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", + "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -4014,9 +4016,9 @@ } }, "node_modules/mdast-util-to-string": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.1.1.tgz", - "integrity": "sha512-tGvhT94e+cVnQt8JWE9/b3cUQZWS732TJxXHktvP+BYo62PpYD53Ls/6cC60rW21dW+txxiM4zMdc6abASvZKA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", + "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", "dev": true, "dependencies": { "@types/mdast": "^3.0.0" @@ -5261,12 +5263,12 @@ } }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.11.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -5382,9 +5384,9 @@ } }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.4.0.tgz", + "integrity": "sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -6005,9 +6007,9 @@ } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.3.tgz", - "integrity": "sha512-5UB4yYusDtkRPbRiy1cqZ1IpGNcJCGlEMG17RKzPddpyiPKoCdwohbED8g4QXT0ewCt8LTkQXuljsUfQ3FKM4A==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -6020,9 +6022,9 @@ } }, "node_modules/typescript": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz", - "integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index adb36bb4fd..e8a943ed4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jira.js", - "version": "2.17.0", + "version": "2.18.0", "description": "jira.js is a powerful Node.JS/Browser module that allows you to interact with the Jira API very easily", "main": "out/index.js", "types": "out/index.d.ts", @@ -51,29 +51,28 @@ } }, "devDependencies": { - "@swc-node/register": "^1.6.2", - "@swc/helpers": "^0.4.14", + "@swc-node/register": "^1.6.4", + "@swc/helpers": "^0.5.0", "@types/express": "^4.17.17", - "@types/node": "^18.15.10", + "@types/node": "^18.15.11", "@types/oauth": "^0.9.1", "@types/sinon": "^10.0.13", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", + "@typescript-eslint/eslint-plugin": "^5.58.0", + "@typescript-eslint/parser": "^5.58.0", "ava": "^5.2.0", "dotenv": "^16.0.3", - "eslint": "^8.36.0", + "eslint": "^8.38.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.0.0", - "eslint-import-resolver-typescript": "^3.5.3", + "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.27.5", - "eslint-plugin-sort-exports": "^0.8.0", "prettier": "^2.8.7", "prettier-plugin-jsdoc": "^0.4.2", "sinon": "^15.0.3", "ts-node": "^10.9.1", "typedoc": "^0.23.28", "typedoc-plugin-extras": "^2.3.2", - "typescript": "^5.0.2" + "typescript": "^5.0.4" }, "dependencies": { "atlassian-jwt": "^2.0.2", diff --git a/src/agile/models/fields.ts b/src/agile/models/fields.ts new file mode 100644 index 0000000000..28742d48ad --- /dev/null +++ b/src/agile/models/fields.ts @@ -0,0 +1,85 @@ +import { Attachment } from '../../version3/models'; +import { Epic } from './epic'; +import { FixVersion } from './fixVersion'; +import { Issue } from './issue'; +import { IssueType } from './issueType'; +import { Progress } from './progress'; +import { Project } from './project'; +import { Sprint } from './sprint'; +import { Status } from './status'; +import { User } from './user'; +import { Version } from './version'; +import { + Comment, + IssueLink, + Priority, + ProjectComponent, + Resolution, + RichText, + TimeTrackingDetails, + Votes, + Watchers, + Worklog, +} from '../../version2/models'; + +export interface Fields { + [key: string]: any; + + aggregateprogress: Progress; + aggregatetimeestimate: number | null; + aggregatetimeoriginalestimate: number | null; + aggregatetimespent: number | null; + assignee: User; + attachment: Attachment[]; + comment: { + comments: Comment[]; + self: string; + maxResults: number; + total: number; + startAt: number; + }; + components: ProjectComponent[]; + created: string; + creator: User; + description: string | null; + duedate: string | null; + environment: RichText | null; + epic: Epic | null; + fixVersions: FixVersion[]; + flagged: boolean; + issuelinks: IssueLink[]; + issuerestriction: { + issuerestrictions: any; + shouldDisplay: boolean; + }; + issuetype: IssueType; + labels: string[]; + lastViewed: string | null; + priority: Priority; + progress: Progress; + project: Project; + reporter: User; + resolution: Resolution | null; + resolutiondate: string | null; + security: any | null; + sprint: Sprint; + status: Status; + statuscategorychangedate: string; + subtasks: Issue[]; + summary: string; + timeestimate: number | null; + timeoriginalestimate: any | null; + timespent: number | null; + timetracking: TimeTrackingDetails; + updated: string; + versions: Version[]; + votes: Votes; + watches: Watchers; + worklog: { + startAt: number; + maxResults: number; + total: number; + worklogs: Worklog[]; + }; + workratio: number; +} diff --git a/src/agile/models/fixVersion.ts b/src/agile/models/fixVersion.ts new file mode 100644 index 0000000000..905f6a2c57 --- /dev/null +++ b/src/agile/models/fixVersion.ts @@ -0,0 +1,17 @@ +/** Represents a fix version in a Jira project. */ +export interface FixVersion { + /** The URL of the fix version details. */ + self: string; + /** The unique identifier of the fix version. */ + id: string; + /** The description of the fix version. */ + description: string; + /** The name of the fix version. */ + name: string; + /** Whether the fix version is archived. */ + archived: boolean; + /** Whether the fix version is released. */ + released: boolean; + /** The release date of the fix version, if applicable. */ + releaseDate?: string; +} diff --git a/src/agile/models/index.ts b/src/agile/models/index.ts index c5da48f504..de29c45a66 100644 --- a/src/agile/models/index.ts +++ b/src/agile/models/index.ts @@ -85,6 +85,6 @@ export * from './submittedVulnerabilitiesResult'; export * from './subquery'; export * from './toggleFeatures'; export * from './userAvatarUrls'; -export * from './userJson'; +export * from './user'; export * from './version'; export * from './vulnerability'; diff --git a/src/agile/models/issue.ts b/src/agile/models/issue.ts index fd60c6c3bf..a43880ad3f 100644 --- a/src/agile/models/issue.ts +++ b/src/agile/models/issue.ts @@ -1,3 +1,4 @@ +import { Fields } from './fields'; import { Operations } from './operations'; /** @deprecated Use {@link Issue} instead. */ @@ -243,5 +244,5 @@ export interface Issue { actuallyIncluded?: string[]; excluded?: string[]; }; - fields?: {}; + fields?: Fields; } diff --git a/src/agile/models/issueType.ts b/src/agile/models/issueType.ts new file mode 100644 index 0000000000..bfb6168116 --- /dev/null +++ b/src/agile/models/issueType.ts @@ -0,0 +1,21 @@ +/** Details about an issue type. */ +export interface IssueType { + /** The URL of the issue type. */ + self: string; + /** The unique identifier of the issue type. */ + id: string; + /** The description of the issue type. */ + description: string; + /** The URL of the icon for the issue type. */ + iconUrl: string; + /** The name of the issue type. */ + name: string; + /** Whether the issue type is a subtask type. */ + subtask: boolean; + /** The ID of the avatar for the issue type. */ + avatarId: number; + /** The ID of the entity for the issue type. */ + entityId: string; + /** The hierarchy level of the issue type. */ + hierarchyLevel: number; +} diff --git a/src/agile/models/progress.ts b/src/agile/models/progress.ts new file mode 100644 index 0000000000..3cc8165068 --- /dev/null +++ b/src/agile/models/progress.ts @@ -0,0 +1,7 @@ +/** Represents the progress of a task. */ +export interface Progress { + /** The current progress value. */ + progress: number; + /** The total progress value. */ + total: number; +} diff --git a/src/agile/models/project.ts b/src/agile/models/project.ts new file mode 100644 index 0000000000..e834b7c433 --- /dev/null +++ b/src/agile/models/project.ts @@ -0,0 +1,23 @@ +import { AvatarUrls } from './avatarUrls'; + +/** Details about a project. */ +export interface Project { + /** The URL of the project details. */ + self: string; + /** The ID of the project. */ + id: string; + /** The key of the project. */ + key: string; + /** The name of the project. */ + name: string; + /** + * The [project + * type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes) of the + * project. + */ + projectTypeKey: string; + /** Whether the project is simplified. */ + simplified: boolean; + /** The avatar URLs of the project. */ + avatarUrls: AvatarUrls; +} diff --git a/src/agile/models/status.ts b/src/agile/models/status.ts new file mode 100644 index 0000000000..7ef6e12c11 --- /dev/null +++ b/src/agile/models/status.ts @@ -0,0 +1,10 @@ +import { StatusCategory } from './statusCategory'; + +export interface Status { + self: string; + description: string; + iconUrl: string; + name: string; + id: string; + statusCategory: StatusCategory; +} diff --git a/src/agile/models/statusCategory.ts b/src/agile/models/statusCategory.ts new file mode 100644 index 0000000000..f7942767b3 --- /dev/null +++ b/src/agile/models/statusCategory.ts @@ -0,0 +1,7 @@ +export interface StatusCategory { + self: string; + id: number; + key: string; + colorName: string; + name: string; +} diff --git a/src/agile/models/userJson.ts b/src/agile/models/user.ts similarity index 89% rename from src/agile/models/userJson.ts rename to src/agile/models/user.ts index bab70dc594..7c1ade31f7 100644 --- a/src/agile/models/userJson.ts +++ b/src/agile/models/user.ts @@ -1,5 +1,5 @@ -/** @deprecated Use {@link UserJson} instead. */ -export type UserJsonBean = UserJson; +/** @deprecated Use {@link User} instead. */ +export type UserJsonBean = User; /** * User details permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions:* @@ -12,16 +12,16 @@ export type UserJsonBean = UserJson; * - User record unavailable: This usually occurs due to an internal service outage. In this case, all parameters have * fallback values. */ -export interface UserJson { +export interface User { /** The URL of the user. */ - self?: string; + self: string; /** * @deprecated This property is no longer available and will be removed from the documentation soon. See the * [deprecation * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) * for details. */ - name?: string; + name: string; /** * @deprecated This property is no longer available and will be removed from the documentation soon. See the * [deprecation @@ -33,11 +33,11 @@ export interface UserJson { * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, * _5b10ac8d82e05b22cc7d4ef5_. */ - accountId?: string; + accountId: string; /** The email address of the user. Depending on the user’s privacy settings, this may be returned as null. */ - emailAddress?: string; + emailAddress: string | null; /** Details about the avatars for an item. */ - avatarUrls?: { + avatarUrls: { /** The URL of the item's 16x16 pixel avatar. */ '16x16'?: string; /** The URL of the item's 24x24 pixel avatar. */ @@ -48,17 +48,17 @@ export interface UserJson { '48x48'?: string; }; /** The display name of the user. Depending on the user’s privacy settings, this may return an alternative value. */ - displayName?: string; + displayName: string; /** Whether the user is active. */ - active?: boolean; + active: boolean; /** * The time zone specified in the user's profile. Depending on the user’s privacy settings, this may be returned as * null. */ - timeZone?: string; + timeZone: string | null; /** * The type of account represented by this user. This will be one of 'atlassian' (normal users), 'app' (application * user) or 'customer' (Jira Service Desk customer user) */ - accountType?: string; + accountType: string; } diff --git a/src/version2/announcementBanner.ts b/src/version2/announcementBanner.ts index 6ca105b7fb..ee04cbf709 100644 --- a/src/version2/announcementBanner.ts +++ b/src/version2/announcementBanner.ts @@ -49,9 +49,9 @@ export class AnnouncementBanner { url: '/rest/api/2/announcementBanner', method: 'PUT', data: { - message: parameters.message, isDismissible: parameters.isDismissible, isEnabled: parameters.isEnabled, + message: parameters.message, visibility: parameters.visibility, }, }; diff --git a/src/version2/appMigration.ts b/src/version2/appMigration.ts index e26c0fb8ab..5614cd363e 100644 --- a/src/version2/appMigration.ts +++ b/src/version2/appMigration.ts @@ -31,8 +31,8 @@ export class AppMigration { url: '/rest/atlassian-connect/1/migration/field', method: 'PUT', headers: { - 'Atlassian-Transfer-Id': parameters.transferId, 'Atlassian-Account-Id': parameters.accountId, + 'Atlassian-Transfer-Id': parameters.transferId, }, data: { updateValueList: parameters.updateValueList, @@ -66,9 +66,9 @@ export class AppMigration { url: `/rest/atlassian-connect/1/migration/properties/${parameters.entityType}`, method: 'PUT', headers: { - 'Content-Type': 'application/json', - 'Atlassian-Transfer-Id': parameters.transferId, 'Atlassian-Account-Id': parameters.accountId, + 'Atlassian-Transfer-Id': parameters.transferId, + 'Content-Type': 'application/json', }, data: parameters.body ?? parameters.entities, }; @@ -103,9 +103,9 @@ export class AppMigration { 'Atlassian-Transfer-Id': parameters.transferId, }, data: { - workflowEntityId: parameters.workflowEntityId, - ruleIds: parameters.ruleIds, expand: parameters.expand, + ruleIds: parameters.ruleIds, + workflowEntityId: parameters.workflowEntityId, }, }; diff --git a/src/version2/appProperties.ts b/src/version2/appProperties.ts index 9ad711b9b0..159bab60ae 100644 --- a/src/version2/appProperties.ts +++ b/src/version2/appProperties.ts @@ -114,6 +114,7 @@ export class AppProperties { const config: RequestConfig = { url: `/rest/atlassian-connect/1/addons/${parameters.addonKey}/properties/${parameters.propertyKey}`, method: 'PUT', + data: parameters.property, }; return this.client.sendRequest(config, callback); diff --git a/src/version2/models/fields.ts b/src/version2/models/fields.ts index f4cea13789..55b599797c 100644 --- a/src/version2/models/fields.ts +++ b/src/version2/models/fields.ts @@ -20,80 +20,79 @@ import { Worklog } from './worklog'; export interface Fields { [key: string]: any; - statuscategorychangedate?: string; /** The estimate of how much longer working on the issue will take, in seconds. */ aggregatetimespent: number | null; /** The assignee of the linked issue. */ assignee: UserDetails; + /** The list of issue attachments. */ + attachment: Attachment[]; + /** The list of issue comment. */ + comment: { + /** The list of issue comment. */ + comments: Comment[]; + self: string; + maxResults: number; + total: number; + startAt: number; + }; + /** The list of project components the issue belongs to. */ + components: ProjectComponent[]; + /** The creation time of the issue. */ + created: string; + /** The user who created the issue */ + creator: User; + /** The issue description. */ + description?: string; /** The time the issue is due. */ duedate: string | null; + /** The value of the environment field. */ + environment: RichText | null; /** The list of versions where the issue was fixed. */ fixVersions: FixVersion[]; + /** The list of issue links. */ + issuelinks: IssueLink[]; + issuerestriction?: { + issuerestrictions: any; + shouldDisplay: boolean; + }; + /** The type of the linked issue. */ + issuetype: IssueTypeDetails; + /** The list of labels associated with the issue. */ + labels: string[]; lastViewed: string | null; /** The issue parent. */ parent?: Issue; /** The priority of the linked issue. */ priority: Priority; + /** The reporter of the issue. */ + reporter: User; /** The resolution of the issue. */ resolution: Resolution | null; /** The time the issue was resolved at. */ resolutiondate: string | null; /** The status of the linked issue. */ status: StatusDetails; + statuscategorychangedate?: string; + /** The list of subtasks. */ + subtasks: Issue[]; /** The summary description of the linked issue. */ summary: string; + timeoriginalestimate?: any; /** The time that was spent working on the issue, in seconds. */ timespent: number | null; /** The time tracking of the linked issue. */ timetracking: TimeTrackingDetails; - /** The list of issue links. */ - issuelinks: IssueLink[]; - /** The type of the linked issue. */ - issuetype: IssueTypeDetails; - /** The number of watchers of the issue. Returns an error if watching is disabled. */ - watches: Watchers; - /** The creation time of the issue. */ - created: string; - /** The list of labels associated with the issue. */ - labels: string[]; /** The time when the issue was last updated at. */ updated: string; - /** The list of project components the issue belongs to. */ - components: ProjectComponent[]; - /** The value of the environment field. */ - environment: RichText | null; - /** The issue description. */ - description?: string; - /** The list of issue attachments. */ - attachment: Attachment[]; - /** The user who created the issue */ - creator: User; - /** The list of subtasks. */ - subtasks: Issue[]; - /** The reporter of the issue. */ - reporter: User; - /** The list of issue comment. */ - comment: { - /** The list of issue comment. */ - comments: Comment[]; - self: string; - maxResults: number; - total: number; - startAt: number; - }; /** The number of voters of the issue. Returns an error if voting is disabled. */ votes: Votes & { voters: never }; - - workratio: number; - issuerestriction?: { - issuerestrictions: any; - shouldDisplay: boolean; - }; - timeoriginalestimate?: any; + /** The number of watchers of the issue. Returns an error if watching is disabled. */ + watches: Watchers; worklog: { startAt: number; maxResults: number; total: number; worklogs: Worklog[]; }; + workratio: number; } diff --git a/src/version2/parameters/putAddonProperty.ts b/src/version2/parameters/putAddonProperty.ts index 24956356d8..0199699cdb 100644 --- a/src/version2/parameters/putAddonProperty.ts +++ b/src/version2/parameters/putAddonProperty.ts @@ -3,4 +3,5 @@ export interface PutAddonProperty { addonKey: string; /** The key of the property. */ propertyKey: string; + property: any; } diff --git a/src/version3/announcementBanner.ts b/src/version3/announcementBanner.ts index 38cd4786e7..e0e8ff2b27 100644 --- a/src/version3/announcementBanner.ts +++ b/src/version3/announcementBanner.ts @@ -49,9 +49,9 @@ export class AnnouncementBanner { url: '/rest/api/3/announcementBanner', method: 'PUT', data: { - message: parameters?.message, isDismissible: parameters?.isDismissible, isEnabled: parameters?.isEnabled, + message: parameters?.message, visibility: parameters?.visibility, }, }; diff --git a/src/version3/appMigration.ts b/src/version3/appMigration.ts index 1eef4c1220..323c499a44 100644 --- a/src/version3/appMigration.ts +++ b/src/version3/appMigration.ts @@ -31,8 +31,8 @@ export class AppMigration { url: '/rest/atlassian-connect/1/migration/field', method: 'PUT', headers: { - 'Atlassian-Transfer-Id': parameters.transferId, 'Atlassian-Account-Id': parameters.accountId, + 'Atlassian-Transfer-Id': parameters.transferId, }, data: { updateValueList: parameters.updateValueList, @@ -66,9 +66,9 @@ export class AppMigration { url: `/rest/atlassian-connect/1/migration/properties/${parameters.entityType}`, method: 'PUT', headers: { - 'Content-Type': 'application/json', - 'Atlassian-Transfer-Id': parameters.transferId, 'Atlassian-Account-Id': parameters.accountId, + 'Atlassian-Transfer-Id': parameters.transferId, + 'Content-Type': 'application/json', }, data: parameters.body ?? parameters.entities, }; @@ -103,9 +103,9 @@ export class AppMigration { 'Atlassian-Transfer-Id': parameters.transferId, }, data: { - workflowEntityId: parameters.workflowEntityId, - ruleIds: parameters.ruleIds, expand: parameters.expand, + ruleIds: parameters.ruleIds, + workflowEntityId: parameters.workflowEntityId, }, }; diff --git a/src/version3/appProperties.ts b/src/version3/appProperties.ts index 3012833c64..c07212e0d6 100644 --- a/src/version3/appProperties.ts +++ b/src/version3/appProperties.ts @@ -114,6 +114,7 @@ export class AppProperties { const config: RequestConfig = { url: `/rest/atlassian-connect/1/addons/${parameters.addonKey}/properties/${parameters.propertyKey}`, method: 'PUT', + data: parameters.property, }; return this.client.sendRequest(config, callback); diff --git a/src/version3/parameters/putAddonProperty.ts b/src/version3/parameters/putAddonProperty.ts index 24956356d8..0199699cdb 100644 --- a/src/version3/parameters/putAddonProperty.ts +++ b/src/version3/parameters/putAddonProperty.ts @@ -3,4 +3,5 @@ export interface PutAddonProperty { addonKey: string; /** The key of the property. */ propertyKey: string; + property: any; }