diff --git a/package-lock.json b/package-lock.json index ef84ea2c3b..d7d5394edb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,30 +10,30 @@ "license": "MIT", "dependencies": { "atlassian-jwt": "^2.0.2", - "axios": "^1.5.0", + "axios": "^1.5.1", "form-data": "^4.0.0", "oauth": "^0.10.0", "tslib": "^2.6.2" }, "devDependencies": { - "@swc-node/register": "1.6.6", - "@swc/helpers": "^0.5.1", - "@types/express": "^4.17.17", - "@types/node": "^20.5.9", + "@swc-node/register": "^1.6.8", + "@swc/helpers": "^0.5.2", + "@types/express": "^4.17.18", + "@types/node": "^20.8.0", "@types/oauth": "^0.9.2", - "@types/sinon": "^10.0.16", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", + "@types/sinon": "^10.0.17", + "@typescript-eslint/eslint-plugin": "^6.7.3", + "@typescript-eslint/parser": "^6.7.3", "ava": "^5.3.1", "dotenv": "^16.3.1", - "eslint": "^8.48.0", + "eslint": "^8.50.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", - "eslint-import-resolver-typescript": "^3.6.0", + "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.28.1", "prettier": "^3.0.3", - "prettier-plugin-jsdoc": "^1.0.1", - "sinon": "^15.2.0", + "prettier-plugin-jsdoc": "^1.0.2", + "sinon": "^16.0.0", "ts-node": "^10.9.1", "typedoc": "^0.25.1", "typedoc-plugin-extras": "^3.0.0", @@ -50,9 +50,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", - "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", + "version": "7.23.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.1.tgz", + "integrity": "sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==", "dev": true, "peer": true, "dependencies": { @@ -90,9 +90,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz", - "integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.0.tgz", + "integrity": "sha512-zJmuCWj2VLBt4c25CfBIbMZLGLyhkvs7LznyVX5HfpzeocThgIj5XQK4L+g3U36mMcx8bPMhGyPpwCATamC4jQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -122,9 +122,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", - "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", + "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -268,9 +268,9 @@ "dev": true }, "node_modules/@swc-node/core": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/@swc-node/core/-/core-1.10.5.tgz", - "integrity": "sha512-G+Me0sTApMy6WY9mT0TluFxdO633P1GWMllbT3LWeJlknqQxJo8dAQcV0Uc0+rvBVXt7rRo/BMUZNJp88qarzg==", + "version": "1.10.6", + "resolved": "https://registry.npmjs.org/@swc-node/core/-/core-1.10.6.tgz", + "integrity": "sha512-lDIi/rPosmKIknWzvs2/Fi9zWRtbkx8OJ9pQaevhsoGzJSal8Pd315k1W5AIrnknfdAB4HqRN12fk6AhqnrEEw==", "dev": true, "engines": { "node": ">= 10" @@ -284,12 +284,12 @@ } }, "node_modules/@swc-node/register": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/@swc-node/register/-/register-1.6.6.tgz", - "integrity": "sha512-KgnQrWLgtJzEgPpxvhOPUDonv1xreVumGdzXDQlDVIqU3vH+spW8ZYxxyjJVMh3G/mQG8E3bFvUMHIS+E3FL2w==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@swc-node/register/-/register-1.6.8.tgz", + "integrity": "sha512-74ijy7J9CWr1Z88yO+ykXphV29giCrSpANQPQRooE0bObpkTO1g4RzQovIfbIaniBiGDDVsYwDoQ3FIrCE8HcQ==", "dev": true, "dependencies": { - "@swc-node/core": "^1.10.4", + "@swc-node/core": "^1.10.6", "@swc-node/sourcemap-support": "^0.3.0", "colorette": "^2.0.19", "debug": "^4.3.4", @@ -316,14 +316,15 @@ } }, "node_modules/@swc/core": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.82.tgz", - "integrity": "sha512-jpC1a18HMH67018Ij2jh+hT7JBFu7ZKcQVfrZ8K6JuEY+kjXmbea07P9MbQUZbAe0FB+xi3CqEVCP73MebodJQ==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.90.tgz", + "integrity": "sha512-wptBxP4PldOnhmyDVj8qUcn++GRqyw1qc9wOTGtPNHz8cpuTfdfIgYGlhI4La0UYqecuaaIfLfokyuNePOMHPg==", "dev": true, "hasInstallScript": true, "peer": true, "dependencies": { - "@swc/types": "^0.1.4" + "@swc/counter": "^0.1.1", + "@swc/types": "^0.1.5" }, "engines": { "node": ">=10" @@ -333,16 +334,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.3.82", - "@swc/core-darwin-x64": "1.3.82", - "@swc/core-linux-arm-gnueabihf": "1.3.82", - "@swc/core-linux-arm64-gnu": "1.3.82", - "@swc/core-linux-arm64-musl": "1.3.82", - "@swc/core-linux-x64-gnu": "1.3.82", - "@swc/core-linux-x64-musl": "1.3.82", - "@swc/core-win32-arm64-msvc": "1.3.82", - "@swc/core-win32-ia32-msvc": "1.3.82", - "@swc/core-win32-x64-msvc": "1.3.82" + "@swc/core-darwin-arm64": "1.3.90", + "@swc/core-darwin-x64": "1.3.90", + "@swc/core-linux-arm-gnueabihf": "1.3.90", + "@swc/core-linux-arm64-gnu": "1.3.90", + "@swc/core-linux-arm64-musl": "1.3.90", + "@swc/core-linux-x64-gnu": "1.3.90", + "@swc/core-linux-x64-musl": "1.3.90", + "@swc/core-win32-arm64-msvc": "1.3.90", + "@swc/core-win32-ia32-msvc": "1.3.90", + "@swc/core-win32-x64-msvc": "1.3.90" }, "peerDependencies": { "@swc/helpers": "^0.5.0" @@ -354,9 +355,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.82.tgz", - "integrity": "sha512-JfsyDW34gVKD3uE0OUpUqYvAD3yseEaicnFP6pB292THtLJb0IKBBnK50vV/RzEJtc1bR3g1kNfxo2PeurZTrA==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.90.tgz", + "integrity": "sha512-he0w74HvcoufE6CZrB/U/VGVbc7021IQvYrn1geMACnq/OqMBqjdczNtdNfJAy87LZ4AOUjHDKEIjsZZu7o8nQ==", "cpu": [ "arm64" ], @@ -371,9 +372,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.82.tgz", - "integrity": "sha512-ogQWgNMq7qTpITjcP3dnzkFNj7bh6SwMr859GvtOTrE75H7L7jDWxESfH4f8foB/LGxBKiDNmxKhitCuAsZK4A==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.90.tgz", + "integrity": "sha512-hKNM0Ix0qMlAamPe0HUfaAhQVbZEL5uK6Iw8v9ew0FtVB4v7EifQ9n41wh+yCj0CjcHBPEBbQU0P6mNTxJu/RQ==", "cpu": [ "x64" ], @@ -388,9 +389,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.82.tgz", - "integrity": "sha512-7TMXG1lXlNhD0kUiEqs+YlGV4irAdBa2quuy+XI3oJf2fBK6dQfEq4xBy65B3khrorzQS3O0oDGQ+cmdpHExHA==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.90.tgz", + "integrity": "sha512-HumvtrqTWE8rlFuKt7If0ZL7145H/jVc4AeziVjcd+/ajpqub7IyfrLCYd5PmKMtfeSVDMsxjG0BJ0HLRxrTJA==", "cpu": [ "arm" ], @@ -405,9 +406,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.82.tgz", - "integrity": "sha512-26JkOujbzcItPAmIbD5vHJxQVy5ihcSu3YHTKwope1h28sApZdtE7S3e2G3gsZRTIdsCQkXUtAQeqHxGWWR3pw==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.90.tgz", + "integrity": "sha512-tA7DqCS7YCwngwXZQeqQhhMm8BbydpaABw8Z/EDQ7KPK1iZ1rNjZw+aWvSpmNmEGmH1RmQ9QDS9mGRDp0faAeg==", "cpu": [ "arm64" ], @@ -422,9 +423,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.82.tgz", - "integrity": "sha512-8Izj9tuuMpoc3cqiPBRtwqpO1BZ/+sfZVsEhLxrbOFlcSb8LnKyMle1g3JMMUwI4EU75RGVIzZMn8A6GOKdJbA==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.90.tgz", + "integrity": "sha512-p2Vtid5BZA36fJkNUwk5HP+HJlKgTru+Ghna7pRe45ghKkkRIUk3fhkgudEvfKfhT+3AvP+GTVQ+T9k0gc9S8w==", "cpu": [ "arm64" ], @@ -439,9 +440,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.82.tgz", - "integrity": "sha512-0GSrIBScQwTaPv46T2qB7XnDYxndRCpwH4HMjh6FN+I+lfPUhTSJKW8AonqrqT1TbpFIgvzQs7EnTsD7AnSCow==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.90.tgz", + "integrity": "sha512-J6pDtWaulYGXuANERuvv4CqmUbZOQrRZBCRQGZQJ6a86RWpesZqckBelnYx48wYmkgvMkF95Y3xbI3WTfoSHzw==", "cpu": [ "x64" ], @@ -456,9 +457,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.82.tgz", - "integrity": "sha512-KJUnaaepDKNzrEbwz4jv0iC3/t9x0NSoe06fnkAlhh2+NFKWKKJhVCOBTrpds8n7eylBDIXUlK34XQafjVMUdg==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.90.tgz", + "integrity": "sha512-3Gh6EA3+0K+l3MqnRON7h5bZ32xLmfcVM6QiHHJ9dBttq7YOEeEoMOCdIPMaQxJmK1VfLgZCsPYRd66MhvUSkw==", "cpu": [ "x64" ], @@ -473,9 +474,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.82.tgz", - "integrity": "sha512-TR3MHKhDYIyGyFcyl2d/p1ftceXcubAhX5wRSOdtOyr5+K/v3jbyCCqN7bbqO5o43wQVCwwR/drHleYyDZvg8Q==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.90.tgz", + "integrity": "sha512-BNaw/iJloDyaNOFV23Sr53ULlnbmzSoerTJ10v0TjSZOEIpsS0Rw6xOK1iI0voDJnRXeZeWRSxEC9DhefNtN/g==", "cpu": [ "arm64" ], @@ -490,9 +491,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.82.tgz", - "integrity": "sha512-ZX4HzVVt6hs84YUg70UvyBJnBOIspmQQM0iXSzBvOikk3zRoN7BnDwQH4GScvevCEBuou60+i4I6d5kHLOfh8Q==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.90.tgz", + "integrity": "sha512-SiyTethWAheE/JbxXCukAAciU//PLcmVZ2ME92MRuLMLmOhrwksjbaa7ukj9WEF3LWrherhSqTXnpj3VC1l/qw==", "cpu": [ "ia32" ], @@ -507,9 +508,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.3.82", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.82.tgz", - "integrity": "sha512-4mJMnex21kbQoaHeAmHnVwQN9/XAfPszJ6n9HI7SVH+aAHnbBIR0M59/b50/CJMjTj5niUGk7EwQ3nhVNOG32g==", + "version": "1.3.90", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.90.tgz", + "integrity": "sha512-OpWAW5ljKcPJ3SQ0pUuKqYfwXv7ssIhVgrH9XP9ONtdgXKWZRL9hqJQkcL55FARw/gDjKanoCM47wsTNQL+ZZA==", "cpu": [ "x64" ], @@ -523,19 +524,26 @@ "node": ">=10" } }, + "node_modules/@swc/counter": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz", + "integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==", + "dev": true, + "peer": true + }, "node_modules/@swc/helpers": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", - "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", + "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==", "dev": true, "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@swc/types": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.4.tgz", - "integrity": "sha512-z/G02d+59gyyUb7KYhKi9jOhicek6QD2oMaotUyG+lUkybpXoV49dY9bj7Ah5Q+y7knK2jU67UTX9FyfGzaxQg==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", + "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==", "dev": true, "peer": true }, @@ -564,9 +572,9 @@ "dev": true }, "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.3.tgz", + "integrity": "sha512-oyl4jvAfTGX9Bt6Or4H9ni1Z447/tQuxnZsytsCaExKlmJiU8sFgnIBRzJUpKwB5eWn9HuBYlUlVA74q/yN0eQ==", "dev": true, "dependencies": { "@types/connect": "*", @@ -583,18 +591,18 @@ } }, "node_modules/@types/debug": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", - "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", + "integrity": "sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==", "dev": true, "dependencies": { "@types/ms": "*" } }, "node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "version": "4.17.18", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.18.tgz", + "integrity": "sha512-Sxv8BSLLgsBYmcnGdGjjEjqET2U+AKAdCRODmMiq02FgjwuV75Ut85DRpvFjyw/Mk0vgUOliGRU0UUmuuZHByQ==", "dev": true, "dependencies": { "@types/body-parser": "*", @@ -604,9 +612,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.36", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.36.tgz", - "integrity": "sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==", + "version": "4.17.37", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.37.tgz", + "integrity": "sha512-ZohaCYTgGFcOP7u6aJOhY9uIZQgZ2vxC2yWoArY+FeDXlqeH66ZVBjgvg+RLVAS/DWNq4Ap9ZXu1+SUQiiWYMg==", "dev": true, "dependencies": { "@types/node": "*", @@ -616,15 +624,15 @@ } }, "node_modules/@types/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.2.tgz", + "integrity": "sha512-lPG6KlZs88gef6aD85z3HNkztpj7w2R7HmR3gygjfXCQmsLloWNARFkMuzKiiY8FGdh1XDpgBdrSf4aKDiA7Kg==", "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", + "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", "dev": true }, "node_modules/@types/json5": { @@ -634,30 +642,30 @@ "dev": true }, "node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.13.tgz", + "integrity": "sha512-HjiGiWedR0DVFkeNljpa6Lv4/IZU1+30VY5d747K7lBudFc3R0Ibr6yJ9lN3BE28VnZyDfLF/VB1Ql1ZIbKrmg==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.3.tgz", + "integrity": "sha512-Ys+/St+2VF4+xuY6+kDIXGxbNRO0mesVg0bbxEfB97Od1Vjpjx9KD1qxs64Gcb3CWPirk9Xe+PT4YiiHQ9T+eg==", "dev": true }, "node_modules/@types/ms": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", - "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "version": "0.7.32", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.32.tgz", + "integrity": "sha512-xPSg0jm4mqgEkNhowKgZFBNtwoEwF6gJ4Dhww+GFpm3IgtNseHQZ5IqdNwnquZEoANxyDAKDRAdVo4Z72VvD/g==", "dev": true }, "node_modules/@types/node": { - "version": "20.5.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.9.tgz", - "integrity": "sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==", + "version": "20.8.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.0.tgz", + "integrity": "sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==", "dev": true }, "node_modules/@types/oauth": { @@ -676,21 +684,21 @@ "dev": true }, "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.5.tgz", + "integrity": "sha512-xrO9OoVPqFuYyR/loIHjnbvvyRZREYKLjxV4+dY6v3FQR3stQ9ZxIGkaclF7YhI9hfjpuTbu14hZEy94qKLtOA==", "dev": true }, "node_modules/@types/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", "dev": true }, "node_modules/@types/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", - "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.2.tgz", + "integrity": "sha512-aAG6yRf6r0wQ29bkS+x97BIs64ZLxeE/ARwyS6wrldMm3C1MdKwCcnnEwMC1slI8wuxJOpiUH9MioC0A0i+GJw==", "dev": true, "dependencies": { "@types/mime": "^1", @@ -698,9 +706,9 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", - "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.3.tgz", + "integrity": "sha512-yVRvFsEMrv7s0lGhzrggJjNOSmZCdgCjw9xWrPr/kNNLp6FaDfMC1KaYl3TSJ0c58bECwNBMoQrZJ8hA8E1eFg==", "dev": true, "dependencies": { "@types/http-errors": "*", @@ -709,18 +717,18 @@ } }, "node_modules/@types/sinon": { - "version": "10.0.16", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", - "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", + "version": "10.0.17", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz", + "integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.3.tgz", + "integrity": "sha512-4g+2YyWe0Ve+LBh+WUm1697PD0Kdi6coG1eU0YjQbwx61AZ8XbEpL1zIT6WjuUKrCMCROpEaYQPDjBnDouBVAQ==", "dev": true }, "node_modules/@types/unist": { @@ -730,16 +738,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.6.0.tgz", - "integrity": "sha512-CW9YDGTQnNYMIo5lMeuiIG08p4E0cXrXTbcZ2saT/ETE7dWUrNxlijsQeU04qAAKkILiLzdQz+cGFxCJjaZUmA==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.3.tgz", + "integrity": "sha512-vntq452UHNltxsaaN+L9WyuMch8bMd9CqJ3zhzTPXXidwbf5mqqKCVXEuvRZUqLJSTLeWE65lQwyXsRGnXkCTA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/type-utils": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", + "@typescript-eslint/scope-manager": "6.7.3", + "@typescript-eslint/type-utils": "6.7.3", + "@typescript-eslint/utils": "6.7.3", + "@typescript-eslint/visitor-keys": "6.7.3", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -765,15 +773,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.6.0.tgz", - "integrity": "sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.3.tgz", + "integrity": "sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", + "@typescript-eslint/scope-manager": "6.7.3", + "@typescript-eslint/types": "6.7.3", + "@typescript-eslint/typescript-estree": "6.7.3", + "@typescript-eslint/visitor-keys": "6.7.3", "debug": "^4.3.4" }, "engines": { @@ -793,13 +801,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.6.0.tgz", - "integrity": "sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.3.tgz", + "integrity": "sha512-wOlo0QnEou9cHO2TdkJmzF7DFGvAKEnB82PuPNHpT8ZKKaZu6Bm63ugOTn9fXNJtvuDPanBc78lGUGGytJoVzQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0" + "@typescript-eslint/types": "6.7.3", + "@typescript-eslint/visitor-keys": "6.7.3" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -810,13 +818,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.6.0.tgz", - "integrity": "sha512-8m16fwAcEnQc69IpeDyokNO+D5spo0w1jepWWY2Q6y5ZKNuj5EhVQXjtVAeDDqvW6Yg7dhclbsz6rTtOvcwpHg==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.3.tgz", + "integrity": "sha512-Fc68K0aTDrKIBvLnKTZ5Pf3MXK495YErrbHb1R6aTpfK5OdSFj0rVN7ib6Tx6ePrZ2gsjLqr0s98NG7l96KSQw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/utils": "6.6.0", + "@typescript-eslint/typescript-estree": "6.7.3", + "@typescript-eslint/utils": "6.7.3", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -837,9 +845,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.6.0.tgz", - "integrity": "sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.3.tgz", + "integrity": "sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -850,13 +858,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.6.0.tgz", - "integrity": "sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.3.tgz", + "integrity": "sha512-YLQ3tJoS4VxLFYHTw21oe1/vIZPRqAO91z6Uv0Ss2BKm/Ag7/RVQBcXTGcXhgJMdA4U+HrKuY5gWlJlvoaKZ5g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", + "@typescript-eslint/types": "6.7.3", + "@typescript-eslint/visitor-keys": "6.7.3", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -877,17 +885,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.6.0.tgz", - "integrity": "sha512-mPHFoNa2bPIWWglWYdR0QfY9GN0CfvvXX1Sv6DlSTive3jlMTUy+an67//Gysc+0Me9pjitrq0LJp0nGtLgftw==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.3.tgz", + "integrity": "sha512-vzLkVder21GpWRrmSR9JxGZ5+ibIUSudXlW52qeKpzUEQhRSmyZiVDDj3crAth7+5tmN1ulvgKaCU2f/bPRCzg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/scope-manager": "6.7.3", + "@typescript-eslint/types": "6.7.3", + "@typescript-eslint/typescript-estree": "6.7.3", "semver": "^7.5.4" }, "engines": { @@ -902,12 +910,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.6.0.tgz", - "integrity": "sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.3.tgz", + "integrity": "sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/types": "6.7.3", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -1133,14 +1141,14 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -1151,17 +1159,17 @@ } }, "node_modules/array.prototype.tosorted": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", - "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz", + "integrity": "sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==", "dev": true, "peer": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.1.3" + "get-intrinsic": "^1.2.1" } }, "node_modules/arraybuffer.prototype.slice": { @@ -1349,9 +1357,9 @@ } }, "node_modules/axe-core": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.2.tgz", - "integrity": "sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==", + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.2.tgz", + "integrity": "sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==", "dev": true, "peer": true, "engines": { @@ -1359,9 +1367,9 @@ } }, "node_modules/axios": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", - "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -1857,12 +1865,27 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -1973,18 +1996,18 @@ } }, "node_modules/es-abstract": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", - "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", + "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.2", "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", + "function.prototype.name": "^1.1.6", "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", @@ -2000,23 +2023,23 @@ "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", "object-inspect": "^1.12.3", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.0", - "safe-array-concat": "^1.0.0", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", "typed-array-buffer": "^1.0.0", "typed-array-byte-length": "^1.0.0", "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.10" + "which-typed-array": "^1.1.11" }, "engines": { "node": ">= 0.4" @@ -2026,15 +2049,15 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.14.tgz", - "integrity": "sha512-JgtVnwiuoRuzLvqelrvN3Xu7H9bu2ap/kQ2CrM62iidP8SKuD99rWU3CJy++s7IVL2qb/AjXPGR/E7i9ngd/Cw==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz", + "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==", "dev": true, "peer": true, "dependencies": { "asynciterator.prototype": "^1.0.0", "call-bind": "^1.0.2", - "define-properties": "^1.2.0", + "define-properties": "^1.2.1", "es-abstract": "^1.22.1", "es-set-tostringtag": "^2.0.1", "function-bind": "^1.1.1", @@ -2044,8 +2067,8 @@ "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "internal-slot": "^1.0.5", - "iterator.prototype": "^1.1.0", - "safe-array-concat": "^1.0.0" + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.0.1" } }, "node_modules/es-set-tostringtag": { @@ -2110,16 +2133,16 @@ } }, "node_modules/eslint": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", - "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", + "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint/js": "8.50.0", + "@humanwhocodes/config-array": "^0.11.11", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.12.4", @@ -2248,9 +2271,9 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", - "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", "dev": true, "dependencies": { "debug": "^4.3.4", @@ -2781,15 +2804,15 @@ } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "funding": [ { "type": "individual", @@ -2921,9 +2944,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", - "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -2965,9 +2988,9 @@ } }, "node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3604,16 +3627,17 @@ "dev": true }, "node_modules/iterator.prototype": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.1.tgz", - "integrity": "sha512-9E+nePc8C9cnQldmNl6bgpTY6zI4OPRZd97fhJ/iVZ1GifIUDVV5F6x1nEDqpe8KaMEZGT4xgrwKQDxXnjOIZQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", "dev": true, "peer": true, "dependencies": { - "define-properties": "^1.2.0", + "define-properties": "^1.2.1", "get-intrinsic": "^1.2.1", "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.3" + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" } }, "node_modules/js-string-escape": { @@ -5013,13 +5037,13 @@ } }, "node_modules/prettier-plugin-jsdoc": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-1.0.1.tgz", - "integrity": "sha512-07q74MfX9m+xHK2+Lr4c+igiEzAKVDWhqkvlm65WoYJUlRiaV6STXcEtcZMhrPPYgNeQRgb9FJmgE/n+OI4MpQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-1.0.2.tgz", + "integrity": "sha512-mhLT3qiSmfzjOEDvgLntX3XmSJaiDrgoN7WmOp4IH2mZ6LhbvZAnPDJH3Rs0k1O6WR7HcmM92fU1ArB0ALLG+A==", "dev": true, "dependencies": { "binary-searching": "^2.0.5", - "comment-parser": "^1.3.1", + "comment-parser": "^1.4.0", "mdast-util-from-markdown": "^1.2.0" }, "engines": { @@ -5138,14 +5162,14 @@ "peer": true }, "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "set-function-name": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -5164,9 +5188,9 @@ } }, "node_modules/resolve": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", - "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", + "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", "dev": true, "dependencies": { "is-core-module": "^2.13.0", @@ -5353,6 +5377,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5413,9 +5451,9 @@ } }, "node_modules/sinon": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", - "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.0.0.tgz", + "integrity": "sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0", @@ -5519,9 +5557,9 @@ } }, "node_modules/string.prototype.matchall": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.9.tgz", - "integrity": "sha512-6i5hL3MqG/K2G43mWXWgP+qizFW/QH/7kCNN13JrJS5q48FN5IKksLDscexKP3dnmB6cdm9jlNgAsWNLpSykmA==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", + "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", "dev": true, "peer": true, "dependencies": { @@ -5532,6 +5570,7 @@ "has-symbols": "^1.0.3", "internal-slot": "^1.0.5", "regexp.prototype.flags": "^1.5.0", + "set-function-name": "^2.0.0", "side-channel": "^1.0.4" }, "funding": { @@ -5539,14 +5578,14 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -5556,14 +5595,14 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5726,9 +5765,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz", - "integrity": "sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", "dev": true, "engines": { "node": ">=16.13.0" diff --git a/package.json b/package.json index dcead0d901..06ed3ae1c9 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,22 @@ { "name": "jira.js", "version": "2.19.1", - "description": "jira.js is a powerful Node.JS/Browser module that allows you to interact with the Jira API very easily", + "description": "A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.", "main": "out/index.js", "types": "out/index.d.ts", "repository": "https://github.com/MrRefactoring/jira.js.git", "author": "Vladislav Tupikin ", "license": "MIT", "keywords": [ - "atlassian", "jira", + "javascript", + "typescript", + "nodejs", + "browser", + "atlassian", "api", - "agile", - "cloud", - "serviceDesk", - "wrapper", "client", - "rest" + "library" ], "scripts": { "build": "tsc", @@ -62,24 +62,24 @@ } }, "devDependencies": { - "@swc-node/register": "1.6.6", - "@swc/helpers": "^0.5.1", - "@types/express": "^4.17.17", - "@types/node": "^20.5.9", + "@swc-node/register": "^1.6.8", + "@swc/helpers": "^0.5.2", + "@types/express": "^4.17.18", + "@types/node": "^20.8.0", "@types/oauth": "^0.9.2", - "@types/sinon": "^10.0.16", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", + "@types/sinon": "^10.0.17", + "@typescript-eslint/eslint-plugin": "^6.7.3", + "@typescript-eslint/parser": "^6.7.3", "ava": "^5.3.1", "dotenv": "^16.3.1", - "eslint": "^8.48.0", + "eslint": "^8.50.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", - "eslint-import-resolver-typescript": "^3.6.0", + "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.28.1", "prettier": "^3.0.3", - "prettier-plugin-jsdoc": "^1.0.1", - "sinon": "^15.2.0", + "prettier-plugin-jsdoc": "^1.0.2", + "sinon": "^16.0.0", "ts-node": "^10.9.1", "typedoc": "^0.25.1", "typedoc-plugin-extras": "^3.0.0", @@ -87,7 +87,7 @@ }, "dependencies": { "atlassian-jwt": "^2.0.2", - "axios": "^1.5.0", + "axios": "^1.5.1", "form-data": "^4.0.0", "oauth": "^0.10.0", "tslib": "^2.6.2" diff --git a/src/version2/dashboards.ts b/src/version2/dashboards.ts index d6073fbeb2..ef9e70fbf3 100644 --- a/src/version2/dashboards.ts +++ b/src/version2/dashboards.ts @@ -55,7 +55,7 @@ export class Dashboards { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async createDashboard( - parameters: Parameters.CreateDashboard | undefined, + parameters: Parameters.CreateDashboard, callback: Callback, ): Promise; /** @@ -63,19 +63,60 @@ export class Dashboards { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async createDashboard(parameters?: Parameters.CreateDashboard, callback?: never): Promise; + async createDashboard(parameters: Parameters.CreateDashboard, callback?: never): Promise; async createDashboard( - parameters?: Parameters.CreateDashboard, + parameters: Parameters.CreateDashboard, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/dashboard', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - sharePermissions: parameters?.sharePermissions, - editPermissions: parameters?.editPermissions, + description: parameters.description, + editPermissions: parameters.editPermissions, + name: parameters.name, + sharePermissions: parameters.sharePermissions, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Bulk edit dashboards. Maximum number of dashboards to be edited at the same time is 100. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None + * + * The dashboards to be updated must be owned by the user, or the user must be an administrator. + */ + async bulkEditDashboards( + parameters: Parameters.BulkEditDashboards, + callback: Callback, + ): Promise; + /** + * Bulk edit dashboards. Maximum number of dashboards to be edited at the same time is 100. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None + * + * The dashboards to be updated must be owned by the user, or the user must be an administrator. + */ + async bulkEditDashboards( + parameters: Parameters.BulkEditDashboards, + callback?: never, + ): Promise; + async bulkEditDashboards( + parameters: Parameters.BulkEditDashboards, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/dashboard/bulk/edit', + method: 'PUT', + data: { + action: parameters.action, + changeOwnerDetails: parameters.changeOwnerDetails, + entityIds: parameters.entityIds, + extendAdminPermissions: parameters.extendAdminPermissions, + permissionDetails: parameters.permissionDetails, }, }; @@ -247,12 +288,12 @@ export class Dashboards { url: `/rest/api/2/dashboard/${parameters.dashboardId}/gadget`, method: 'POST', data: { - moduleKey: parameters.moduleKey, - uri: parameters.uri, color: parameters.color, + ignoreUriAndModuleKeyValidation: parameters.ignoreUriAndModuleKeyValidation, + moduleKey: parameters.moduleKey, position: parameters.position, title: parameters.title, - ignoreUriAndModuleKeyValidation: parameters.ignoreUriAndModuleKeyValidation, + uri: parameters.uri, }, }; @@ -276,9 +317,9 @@ export class Dashboards { url: `/rest/api/2/dashboard/${parameters.dashboardId}/gadget/${parameters.gadgetId}`, method: 'PUT', data: { - title: parameters.title, color: parameters.color, position: parameters.position, + title: parameters.title, }, }; @@ -608,10 +649,10 @@ export class Dashboards { url: `/rest/api/2/dashboard/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, - sharePermissions: parameters.sharePermissions, editPermissions: parameters.editPermissions, + name: parameters.name, + sharePermissions: parameters.sharePermissions, }, }; @@ -675,10 +716,10 @@ export class Dashboards { url: `/rest/api/2/dashboard/${parameters.id}/copy`, method: 'POST', data: { - name: parameters.name, description: parameters.description, - sharePermissions: parameters.sharePermissions, editPermissions: parameters.editPermissions, + name: parameters.name, + sharePermissions: parameters.sharePermissions, }, }; diff --git a/src/version2/filters.ts b/src/version2/filters.ts index 27b6498a96..1ecd242c6f 100644 --- a/src/version2/filters.ts +++ b/src/version2/filters.ts @@ -9,10 +9,7 @@ export class Filters { /** * @deprecated Returns all filters. Deprecated, use [Search for filters](#api-rest-api-2-filter-search-get) that - * supports search and pagination. - * - * This operation can be accessed anonymously. - * + * supports search and pagination. This operation can be accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None, * however, only the following filters are returned: * @@ -29,10 +26,7 @@ export class Filters { ): Promise; /** * @deprecated Returns all filters. Deprecated, use [ Search for filters](#api-rest-api-2-filter-search-get) that - * supports search and pagination. - * - * This operation can be accessed anonymously. - * + * supports search and pagination. This operation can be accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None, * however, only the following filters are returned: * @@ -63,10 +57,7 @@ export class Filters { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ - async createFilter( - parameters: Parameters.CreateFilter | undefined, - callback: Callback, - ): Promise; + async createFilter(parameters: Parameters.CreateFilter, callback: Callback): Promise; /** * Creates a filter. The filter is shared according to the [default share scope](#api-rest-api-2-filter-post). The * filter is not selected as a favorite. @@ -74,9 +65,9 @@ export class Filters { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ - async createFilter(parameters?: Parameters.CreateFilter, callback?: never): Promise; + async createFilter(parameters: Parameters.CreateFilter, callback?: never): Promise; async createFilter( - parameters?: Parameters.CreateFilter, + parameters: Parameters.CreateFilter, callback?: Callback, ): Promise { const config: RequestConfig = { @@ -87,20 +78,20 @@ export class Filters { overrideSharePermissions: parameters?.overrideSharePermissions, }, data: { - self: parameters?.self, - id: parameters?.id, - name: parameters?.name, - description: parameters?.description, - owner: parameters?.owner, - jql: parameters?.jql, - viewUrl: parameters?.viewUrl, - searchUrl: parameters?.searchUrl, - favourite: parameters?.favourite, - favouritedCount: parameters?.favouritedCount, - sharePermissions: parameters?.sharePermissions, - editPermissions: parameters?.editPermissions, - sharedUsers: parameters?.sharedUsers, - subscriptions: parameters?.subscriptions, + description: parameters.description, + editPermissions: parameters.editPermissions, + favourite: parameters.favourite, + favouritedCount: parameters.favouritedCount, + id: parameters.id, + jql: parameters.jql, + name: parameters.name, + owner: parameters.owner, + searchUrl: parameters.searchUrl, + self: parameters.self, + sharePermissions: parameters.sharePermissions, + sharedUsers: parameters.sharedUsers, + subscriptions: parameters.subscriptions, + viewUrl: parameters.viewUrl, }, }; diff --git a/src/version2/groups.ts b/src/version2/groups.ts index 51d4684587..17e481c8c1 100644 --- a/src/version2/groups.ts +++ b/src/version2/groups.ts @@ -10,9 +10,7 @@ export class Groups { /** * @deprecated This operation is deprecated, use * [`group/member`](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/#api-rest-api-2-group-member-get). - * * Returns all users in a group. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -20,9 +18,7 @@ export class Groups { /** * @deprecated This operation is deprecated, use * [`group/member`](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/#api-rest-api-2-group-member-get). - * * Returns all users in a group. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ diff --git a/src/version2/instanceInformation.ts b/src/version2/instanceInformation.ts index 056b334c35..f9ab9e0fb4 100644 --- a/src/version2/instanceInformation.ts +++ b/src/version2/instanceInformation.ts @@ -3,19 +3,20 @@ import { Callback } from '../callback'; import { Client } from '../clients'; import { RequestConfig } from '../requestConfig'; +/** @deprecated Use {@link LicenseMetrics} */ export class InstanceInformation { constructor(private client: Client) {} /** - * Returns licensing information about the Jira instance. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * @deprecated Use {@link LicenseMetrics.getLicense}. Returns licensing information about the Jira instance. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * None. */ async getLicense(callback: Callback): Promise; /** - * Returns licensing information about the Jira instance. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * @deprecated Use {@link LicenseMetrics.getLicense}. Returns licensing information about the Jira instance. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * None. */ async getLicense(callback?: never): Promise; async getLicense(callback?: Callback): Promise { diff --git a/src/version2/issueAdjustmentsApps.ts b/src/version2/issueAdjustmentsApps.ts index 3522cccd1b..01b912f0d5 100644 --- a/src/version2/issueAdjustmentsApps.ts +++ b/src/version2/issueAdjustmentsApps.ts @@ -9,8 +9,8 @@ export class IssueAdjustmentsApps { /** * @deprecated Gets issue adjustments. Issue adjustments can only be retrieved by Forge apps. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * None. */ async getIssueAdjustments( parameters: Parameters.GetIssueAdjustments | undefined, @@ -18,8 +18,8 @@ export class IssueAdjustmentsApps { ): Promise; /** * @deprecated Gets issue adjustments. Issue adjustments can only be retrieved by Forge apps. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * None. */ async getIssueAdjustments( parameters?: Parameters.GetIssueAdjustments, @@ -43,10 +43,8 @@ export class IssueAdjustmentsApps { } /** - * @deprecated Creates an issue adjustment. Issue adjustment can only be created by Forge apps. - * - * Each app can define up to 100 issue adjustments. Each issue adjustment can define up to 1000 contexts. - * + * @deprecated Creates an issue adjustment. Issue adjustment can only be created by Forge apps. Each app can define up + * to 100 issue adjustments. Each issue adjustment can define up to 1000 contexts. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the issue adjustment is created without contexts. @@ -58,10 +56,8 @@ export class IssueAdjustmentsApps { callback: Callback, ): Promise; /** - * @deprecated Creates an issue adjustment. Issue adjustment can only be created by Forge apps. - * - * Each app can define up to 100 issue adjustments. Each issue adjustment can define up to 1000 contexts. - * + * @deprecated Creates an issue adjustment. Issue adjustment can only be created by Forge apps. Each app can define up + * to 100 issue adjustments. Each issue adjustment can define up to 1000 contexts. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the issue adjustment is created without contexts. @@ -91,10 +87,8 @@ export class IssueAdjustmentsApps { } /** - * @deprecated Updates an issue adjustment. Issue adjustment can only be updated by Forge apps. - * - * Each issue adjustment can define up to 1000 contexts. - * + * @deprecated Updates an issue adjustment. Issue adjustment can only be updated by Forge apps. Each issue adjustment + * can define up to 1000 contexts. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the issue adjustment is created without contexts. @@ -106,10 +100,8 @@ export class IssueAdjustmentsApps { callback: Callback, ): Promise; /** - * @deprecated Updates an issue adjustment. Issue adjustment can only be updated by Forge apps. - * - * Each issue adjustment can define up to 1000 contexts. - * + * @deprecated Updates an issue adjustment. Issue adjustment can only be updated by Forge apps. Each issue adjustment + * can define up to 1000 contexts. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the issue adjustment is created without contexts. @@ -138,8 +130,8 @@ export class IssueAdjustmentsApps { /** * @deprecated Deletes an issue adjustment. All the contexts that belong to the issue adjustment are deleted too. * Issue adjustment can only be deleted by Forge apps. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * None. */ async deleteIssueAdjustment( parameters: Parameters.DeleteIssueAdjustment, @@ -148,8 +140,8 @@ export class IssueAdjustmentsApps { /** * @deprecated Deletes an issue adjustment. All the contexts that belong to the issue adjustment are deleted too. * Issue adjustment can only be deleted by Forge apps. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * None. */ async deleteIssueAdjustment(parameters: Parameters.DeleteIssueAdjustment, callback?: never): Promise; async deleteIssueAdjustment( diff --git a/src/version2/issueCustomFieldOptions.ts b/src/version2/issueCustomFieldOptions.ts index b295bf36c4..494ac1789f 100644 --- a/src/version2/issueCustomFieldOptions.ts +++ b/src/version2/issueCustomFieldOptions.ts @@ -12,17 +12,13 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-get) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of - * options and, where the custom select field is of the type _Select List (cascading)_, cascading options for custom - * select fields. Cascading options are included in the item count when determining pagination. Only options from - * the global context are returned. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue - * field select list options created by Connect apps. - * + * for details. Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) + * list of options and, where the custom select field is of the type _Select List (cascading)_, cascading options + * for custom select fields. Cascading options are included in the item count when determining pagination. Only + * options from the global context are returned. Note that this operation **only works for issue field select list + * options created in Jira or using operations from the [Issue custom field + * options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue field select list + * options created by Connect apps. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -35,17 +31,13 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-get) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of - * options and, where the custom select field is of the type _Select List (cascading)_, cascading options for custom - * select fields. Cascading options are included in the item count when determining pagination. Only options from - * the global context are returned. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue - * field select list options created by Connect apps. - * + * for details. Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) + * list of options and, where the custom select field is of the type _Select List (cascading)_, cascading options + * for custom select fields. Cascading options are included in the item count when determining pagination. Only + * options from the global context are returned. Note that this operation **only works for issue field select list + * options created in Jira or using operations from the [Issue custom field + * options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue field select list + * options created by Connect apps. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -74,15 +66,11 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Creates options and, where the custom select field is of the type _Select List (cascading)_, cascading options for - * a custom select field. The options are added to the global context of the field. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * for details. Creates options and, where the custom select field is of the type _Select List (cascading)_, + * cascading options for a custom select field. The options are added to the global context of the field. Note that + * this operation **only works for issue field select list options created in Jira or using operations from the + * [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue * field select list options created by Connect apps. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -95,15 +83,11 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Creates options and, where the custom select field is of the type _Select List (cascading)_, cascading options for - * a custom select field. The options are added to the global context of the field. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * for details. Creates options and, where the custom select field is of the type _Select List (cascading)_, + * cascading options for a custom select field. The options are added to the global context of the field. Note that + * this operation **only works for issue field select list options created in Jira or using operations from the + * [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue * field select list options created by Connect apps. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -131,17 +115,12 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-put) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Updates the options on a custom select field. Where an updated option is in use on an issue, the value on the issue - * is also updated. Options that are not found are ignored. A maximum of 1000 options, including sub-options of - * _Select List (cascading)_ fields, can be updated per request. The options are updated on the global context of - * the field. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue - * field select list options created by Connect apps. - * + * for details. Updates the options on a custom select field. Where an updated option is in use on an issue, the + * value on the issue is also updated. Options that are not found are ignored. A maximum of 1000 options, including + * sub-options of _Select List (cascading)_ fields, can be updated per request. The options are updated on the + * global context of the field. Note that this operation **only works for issue field select list options created in + * Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, + * it cannot be used with issue field select list options created by Connect apps. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -154,17 +133,12 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-put) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Updates the options on a custom select field. Where an updated option is in use on an issue, the value on the issue - * is also updated. Options that are not found are ignored. A maximum of 1000 options, including sub-options of - * _Select List (cascading)_ fields, can be updated per request. The options are updated on the global context of - * the field. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue - * field select list options created by Connect apps. - * + * for details. Updates the options on a custom select field. Where an updated option is in use on an issue, the + * value on the issue is also updated. Options that are not found are ignored. A maximum of 1000 options, including + * sub-options of _Select List (cascading)_ fields, can be updated per request. The options are updated on the + * global context of the field. Note that this operation **only works for issue field select list options created in + * Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, + * it cannot be used with issue field select list options created by Connect apps. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ diff --git a/src/version2/issueFields.ts b/src/version2/issueFields.ts index bab13fa8d6..50284bed91 100644 --- a/src/version2/issueFields.ts +++ b/src/version2/issueFields.ts @@ -224,7 +224,6 @@ export class IssueFields { * @deprecated Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) * list of the contexts a field is used in. Deprecated, use [ Get custom field * contexts](#api-rest-api-2-field-fieldId-context-get). - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -236,7 +235,6 @@ export class IssueFields { * @deprecated Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) * list of the contexts a field is used in. Deprecated, use [ Get custom field * contexts](#api-rest-api-2-field-fieldId-context-get). - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ diff --git a/src/version2/issueLinkTypes.ts b/src/version2/issueLinkTypes.ts index 80de9befeb..f9fc02a695 100644 --- a/src/version2/issueLinkTypes.ts +++ b/src/version2/issueLinkTypes.ts @@ -48,7 +48,7 @@ export class IssueLinkTypes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueLinkType( - parameters: Parameters.CreateIssueLinkType | undefined, + parameters: Parameters.CreateIssueLinkType, callback: Callback, ): Promise; /** @@ -61,22 +61,22 @@ export class IssueLinkTypes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueLinkType( - parameters?: Parameters.CreateIssueLinkType, + parameters: Parameters.CreateIssueLinkType, callback?: never, ): Promise; async createIssueLinkType( - parameters?: Parameters.CreateIssueLinkType, + parameters: Parameters.CreateIssueLinkType, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/issueLinkType', method: 'POST', data: { - id: parameters?.id, - name: parameters?.name, - inward: parameters?.inward, - outward: parameters?.outward, - self: parameters?.self, + id: parameters.id, + inward: parameters.inward, + name: parameters.name, + outward: parameters.outward, + self: parameters.self, }, }; @@ -158,8 +158,8 @@ export class IssueLinkTypes { method: 'PUT', data: { id: parameters.id, - name: parameters.name, inward: parameters.inward, + name: parameters.name, outward: parameters.outward, self: parameters.self, }, diff --git a/src/version2/issueNotificationSchemes.ts b/src/version2/issueNotificationSchemes.ts index dd10b3ccb5..0621f57a3c 100644 --- a/src/version2/issueNotificationSchemes.ts +++ b/src/version2/issueNotificationSchemes.ts @@ -218,6 +218,9 @@ export class IssueNotificationSchemes { /** * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. * + * @deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -225,6 +228,9 @@ export class IssueNotificationSchemes { /** * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. * + * @deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ diff --git a/src/version2/issuePriorities.ts b/src/version2/issuePriorities.ts index 303b3c49a6..fc98e5afea 100644 --- a/src/version2/issuePriorities.ts +++ b/src/version2/issuePriorities.ts @@ -2,6 +2,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; import { Callback } from '../callback'; import { Client } from '../clients'; +import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; export class IssuePriorities { @@ -37,7 +38,7 @@ export class IssuePriorities { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createPriority( - parameters: Parameters.CreatePriority | undefined, + parameters: Parameters.CreatePriority, callback: Callback, ): Promise; /** @@ -46,19 +47,19 @@ export class IssuePriorities { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async createPriority(parameters?: Parameters.CreatePriority, callback?: never): Promise; + async createPriority(parameters: Parameters.CreatePriority, callback?: never): Promise; async createPriority( - parameters?: Parameters.CreatePriority, + parameters: Parameters.CreatePriority, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/priority', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - iconUrl: parameters?.iconUrl, - statusColor: parameters?.statusColor, + description: parameters.description, + iconUrl: parameters.iconUrl, + name: parameters.name, + statusColor: parameters.statusColor, }, }; @@ -130,6 +131,8 @@ export class IssuePriorities { * priorities. The list can contain all priorities or a subset determined by any combination of these criteria: * * - A list of priority IDs. Any invalid priority IDs are ignored. + * - A list of project IDs. Only priorities that are available in these projects will be returned. Any invalid project + * IDs are ignored. * - Whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, * as there is no concept of default priorities in team-managed projects. * @@ -145,6 +148,8 @@ export class IssuePriorities { * priorities. The list can contain all priorities or a subset determined by any combination of these criteria: * * - A list of priority IDs. Any invalid priority IDs are ignored. + * - A list of project IDs. Only priorities that are available in these projects will be returned. Any invalid project + * IDs are ignored. * - Whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, * as there is no concept of default priorities in team-managed projects. * @@ -166,6 +171,7 @@ export class IssuePriorities { startAt: parameters?.startAt, maxResults: parameters?.maxResults, id: parameters?.id, + projectId: paramSerializer('projectId', parameters?.projectId), onlyDefault: parameters?.onlyDefault, }, }; @@ -223,9 +229,9 @@ export class IssuePriorities { url: `/rest/api/2/priority/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, iconUrl: parameters.iconUrl, + name: parameters.name, statusColor: parameters.statusColor, }, }; @@ -234,6 +240,9 @@ export class IssuePriorities { } /** + * @deprecated: please refer to the_ [changelog](https://developer.atlassian.com/changelog/#CHANGE-1066) _for more + * details._ + * * Deletes an issue priority. * * This operation is @@ -246,6 +255,9 @@ export class IssuePriorities { */ async deletePriority(parameters: Parameters.DeletePriority, callback: Callback): Promise; /** + * @deprecated: please refer to the_ [changelog](https://developer.atlassian.com/changelog/#CHANGE-1066) _for more + * details._ + * * Deletes an issue priority. * * This operation is diff --git a/src/version2/issueResolutions.ts b/src/version2/issueResolutions.ts index c7422a5ce7..45ca52eb38 100644 --- a/src/version2/issueResolutions.ts +++ b/src/version2/issueResolutions.ts @@ -9,14 +9,12 @@ export class IssueResolutions { /** * @deprecated Returns a list of all issue resolution values. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ async getResolutions(callback: Callback): Promise; /** * @deprecated Returns a list of all issue resolution values. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ @@ -173,7 +171,6 @@ export class IssueResolutions { /** * @deprecated Returns an issue resolution value. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ @@ -183,7 +180,6 @@ export class IssueResolutions { ): Promise; /** * @deprecated Returns an issue resolution value. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ diff --git a/src/version2/issueSecuritySchemes.ts b/src/version2/issueSecuritySchemes.ts index 5382c36d34..60c089ea24 100644 --- a/src/version2/issueSecuritySchemes.ts +++ b/src/version2/issueSecuritySchemes.ts @@ -247,11 +247,59 @@ export class IssueSecuritySchemes { return this.client.sendRequest(config, callback); } + /** + * Associates an issue security scheme with a project and remaps security levels of issues to the new levels, if + * provided. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-2-task-taskId-get) to obtain subsequent updates. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async associateSchemesToProjects( + parameters: Parameters.AssociateSchemesToProjects, + callback: Callback, + ): Promise; + /** + * Associates an issue security scheme with a project and remaps security levels of issues to the new levels, if + * provided. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-2-task-taskId-get) to obtain subsequent updates. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async associateSchemesToProjects( + parameters: Parameters.AssociateSchemesToProjects, + callback?: never, + ): Promise; + async associateSchemesToProjects( + parameters: Parameters.AssociateSchemesToProjects, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/issuesecurityschemes/project', + method: 'PUT', + data: { + oldToNewSecurityLevelMappings: parameters.oldToNewSecurityLevelMappings, + projectId: parameters.projectId, + schemeId: parameters.schemeId, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of issue - * security schemes.\ - * If you specify the project ID parameter, the result will contain issue security schemes and related project IDs you - * filter by. Use {@link Parameters.SearchProjectsUsingSecuritySchemes} to obtain all projects related to scheme. + * security schemes. If you specify the project ID parameter, the result will contain issue security schemes and + * related project IDs you filter by. * * Only issue security schemes in the context of classic projects are returned. * @@ -264,9 +312,8 @@ export class IssueSecuritySchemes { ): Promise; /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of issue - * security schemes.\ - * If you specify the project ID parameter, the result will contain issue security schemes and related project IDs you - * filter by. Use {@link Parameters.SearchProjectsUsingSecuritySchemes} to obtain all projects related to scheme. + * security schemes. If you specify the project ID parameter, the result will contain issue security schemes and + * related project IDs you filter by. * * Only issue security schemes in the context of classic projects are returned. * diff --git a/src/version2/issues.ts b/src/version2/issues.ts index 02a92aa454..2c00ffa2c5 100644 --- a/src/version2/issues.ts +++ b/src/version2/issues.ts @@ -81,11 +81,131 @@ export class Issues { updateHistory: parameters.updateHistory, }, data: { - transition: parameters.transition, fields: parameters.fields, - update: parameters.update, historyMetadata: parameters.historyMetadata, properties: parameters.properties, + transition: parameters.transition, + update: parameters.update, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Enables admins to archive up to 100,000 issues in a single request using JQL, returning the URL to check the status + * of the submitted request. + * + * You can use the [get + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get) + * and [cancel + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-cancel-post) + * APIs to manage the request. + * + * **Note that:** + * + * - You can't archive subtasks directly, only through their parent issues + * - You can only archive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + * + * **Rate limiting:** Only a single request per user can be active at any given time. + */ + async archiveIssuesAsync( + parameters: Parameters.ArchiveIssuesAsync, + callback: Callback, + ): Promise; + /** + * Enables admins to archive up to 100,000 issues in a single request using JQL, returning the URL to check the status + * of the submitted request. + * + * You can use the [get + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get) + * and [cancel + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-cancel-post) + * APIs to manage the request. + * + * **Note that:** + * + * - You can't archive subtasks directly, only through their parent issues + * - You can only archive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + * + * **Rate limiting:** Only a single request per user can be active at any given time. + */ + async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback?: never): Promise; + async archiveIssuesAsync( + parameters: Parameters.ArchiveIssuesAsync, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/issue/archive', + method: 'POST', + data: { + jql: parameters.jql, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Enables admins to archive up to 1000 issues in a single request using issue ID/key, returning details of the + * issue(s) archived in the process and the errors encountered, if any. + * + * **Note that:** + * + * - You can't archive subtasks directly, only through their parent issues + * - You can only archive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + */ + async archiveIssues( + parameters: Parameters.ArchiveIssues, + callback: Callback, + ): Promise; + /** + * Enables admins to archive up to 1000 issues in a single request using issue ID/key, returning details of the + * issue(s) archived in the process and the errors encountered, if any. + * + * **Note that:** + * + * - You can't archive subtasks directly, only through their parent issues + * - You can only archive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + */ + async archiveIssues(parameters: Parameters.ArchiveIssues, callback?: never): Promise; + async archiveIssues( + parameters: Parameters.ArchiveIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/issue/archive', + method: 'PUT', + data: { + issueIdsOrKeys: parameters.issueIdsOrKeys, }, }; @@ -205,6 +325,61 @@ export class Issues { return this.client.sendRequest(config, callback); } + /** + * Enables admins to unarchive up to 1000 issues in a single request using issue ID/key, returning details of the + * issue(s) unarchived in the process and the errors encountered, if any. + * + * **Note that:** + * + * - You can't unarchive subtasks directly, only through their parent issues + * - You can only unarchive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + */ + async unarchiveIssues( + parameters: Parameters.UnarchiveIssues, + callback: Callback, + ): Promise; + /** + * Enables admins to unarchive up to 1000 issues in a single request using issue ID/key, returning details of the + * issue(s) unarchived in the process and the errors encountered, if any. + * + * **Note that:** + * + * - You can't unarchive subtasks directly, only through their parent issues + * - You can only unarchive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + */ + async unarchiveIssues( + parameters: Parameters.UnarchiveIssues, + callback?: never, + ): Promise; + async unarchiveIssues( + parameters: Parameters.UnarchiveIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/issue/unarchive', + method: 'PUT', + data: { + issueIdsOrKeys: parameters.issueIdsOrKeys, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns the details for an issue. * @@ -316,13 +491,15 @@ export class Issues { notifyUsers: parameters.notifyUsers, overrideScreenSecurity: parameters.overrideScreenSecurity, overrideEditableFlag: parameters.overrideEditableFlag, + returnIssue: parameters.returnIssue, + expand: parameters.expand, }, data: { - transition: parameters.transition, fields: parameters.fields, - update: parameters.update, historyMetadata: parameters.historyMetadata, properties: parameters.properties, + transition: parameters.transition, + update: parameters.update, }, }; @@ -418,20 +595,20 @@ export class Issues { url: `/rest/api/2/issue/${parameters.issueIdOrKey}/assignee`, method: 'PUT', data: { - self: parameters.self, - key: parameters.key, accountId: parameters.accountId, accountType: parameters.accountType, - name: parameters.name, - emailAddress: parameters.emailAddress, - avatarUrls: parameters.avatarUrls, - displayName: parameters.displayName, active: parameters.active, - timeZone: parameters.timeZone, - locale: parameters.locale, - groups: parameters.groups, applicationRoles: parameters.applicationRoles, + avatarUrls: parameters.avatarUrls, + displayName: parameters.displayName, + emailAddress: parameters.emailAddress, expand: parameters.expand, + groups: parameters.groups, + key: parameters.key, + locale: parameters.locale, + name: parameters.name, + self: parameters.self, + timeZone: parameters.timeZone, }, }; @@ -694,11 +871,11 @@ export class Issues { url: `/rest/api/2/issue/${parameters.issueIdOrKey}/notify`, method: 'POST', data: { + htmlBody: parameters.htmlBody, + restrict: parameters.restrict, subject: parameters.subject, textBody: parameters.textBody, - htmlBody: parameters.htmlBody, to: parameters.to, - restrict: parameters.restrict, }, }; @@ -813,11 +990,70 @@ export class Issues { url: `/rest/api/2/issue/${parameters.issueIdOrKey}/transitions`, method: 'POST', data: { - transition: parameters.transition, fields: parameters.fields, - update: parameters.update, historyMetadata: parameters.historyMetadata, properties: parameters.properties, + transition: parameters.transition, + update: parameters.update, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Enables admins to retrieve details of all archived issues. Upon a successful request, the admin who submitted it + * will receive an email with a link to download a CSV file with the issue details. + * + * Note that this API only exports the values of system fields and archival-specific fields (`ArchivedBy` and + * `ArchivedDate`). Custom fields aren't supported. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + * + * **Rate limiting:** Only a single request can be active at any given time. + */ + async exportArchivedIssues( + parameters: Parameters.ExportArchivedIssues, + callback: Callback, + ): Promise; + /** + * Enables admins to retrieve details of all archived issues. Upon a successful request, the admin who submitted it + * will receive an email with a link to download a CSV file with the issue details. + * + * Note that this API only exports the values of system fields and archival-specific fields (`ArchivedBy` and + * `ArchivedDate`). Custom fields aren't supported. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + * + * **Rate limiting:** Only a single request can be active at any given time. + */ + async exportArchivedIssues( + parameters: Parameters.ExportArchivedIssues, + callback?: never, + ): Promise; + async exportArchivedIssues( + parameters: Parameters.ExportArchivedIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/issues/archive/export', + method: 'PUT', + data: { + archivedBy: parameters.archivedBy, + archivedDateRange: parameters.archivedDateRange, + issueTypes: parameters.issueTypes, + projects: parameters.projects, + reporters: parameters.reporters, }, }; diff --git a/src/version2/licenseMetrics.ts b/src/version2/licenseMetrics.ts index 08fb67ef7d..bf12582bf8 100644 --- a/src/version2/licenseMetrics.ts +++ b/src/version2/licenseMetrics.ts @@ -7,13 +7,40 @@ export class LicenseMetrics { constructor(private client: Client) {} /** - * Returns the total approximate user account across all jira licenced application keys. Please note this information - * is cached with a 7-day lifecycle and could be stale at the time of call. + * Returns licensing information about the Jira instance. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + */ + async getLicense(callback: Callback): Promise; + /** + * Returns licensing information about the Jira instance. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + */ + async getLicense(callback?: never): Promise; + async getLicense(callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/instance/license', + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns the approximate number of user accounts across all Jira licenses. Note that this information is cached with + * a 7-day lifecycle and could be stale at the time of call. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getApproximateLicenseCount(callback: Callback): Promise; /** - * Returns the total approximate user account across all jira licenced application keys. Please note this information - * is cached with a 7-day lifecycle and could be stale at the time of call. + * Returns the approximate number of user accounts across all Jira licenses. Note that this information is cached with + * a 7-day lifecycle and could be stale at the time of call. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getApproximateLicenseCount(callback?: never): Promise; async getApproximateLicenseCount(callback?: Callback): Promise { @@ -26,16 +53,22 @@ export class LicenseMetrics { } /** - * Returns the total approximate user account for a specific `jira licence application key`. Please note this - * information is cached with a 7-day lifecycle and could be stale at the time of call. + * Returns the total approximate number of user accounts for a single Jira license. Note that this information is + * cached with a 7-day lifecycle and could be stale at the time of call. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getApproximateApplicationLicenseCount( applicationKey: string, callback: Callback, ): Promise; /** - * Returns the total approximate user account for a specific `jira licence application key`. Please note this - * information is cached with a 7-day lifecycle and could be stale at the time of call. + * Returns the total approximate number of user accounts for a single Jira license. Note that this information is + * cached with a 7-day lifecycle and could be stale at the time of call. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getApproximateApplicationLicenseCount( applicationKey: string, diff --git a/src/version2/models/availableWorkflowConnectRule.ts b/src/version2/models/availableWorkflowConnectRule.ts new file mode 100644 index 0000000000..23db909126 --- /dev/null +++ b/src/version2/models/availableWorkflowConnectRule.ts @@ -0,0 +1,21 @@ +/** The Connect provided ecosystem rules available. */ +export interface AvailableWorkflowConnectRule { + /** The add-on providing the rule. */ + addonKey?: string; + /** The URL creation path segment defined in the Connect module. */ + createUrl?: string; + /** The rule description. */ + description?: string; + /** The URL edit path segment defined in the Connect module. */ + editUrl?: string; + /** The module providing the rule. */ + moduleKey?: string; + /** The rule name. */ + name?: string; + /** The rule key. */ + ruleKey?: string; + /** The rule type. */ + ruleType?: string; + /** The URL view path segment defined in the Connect module. */ + viewUrl?: string; +} diff --git a/src/version2/models/availableWorkflowForgeRule.ts b/src/version2/models/availableWorkflowForgeRule.ts new file mode 100644 index 0000000000..aff833ac19 --- /dev/null +++ b/src/version2/models/availableWorkflowForgeRule.ts @@ -0,0 +1,13 @@ +/** The Forge provided ecosystem rules available. */ +export interface AvailableWorkflowForgeRule { + /** The rule description. */ + description?: string; + /** The unique ARI of the forge rule type. */ + id?: string; + /** The rule name. */ + name?: string; + /** The rule key. */ + ruleKey?: string; + /** The rule type. */ + ruleType?: string; +} diff --git a/src/version2/models/availableWorkflowSystemRule.ts b/src/version2/models/availableWorkflowSystemRule.ts new file mode 100644 index 0000000000..30ff1a459b --- /dev/null +++ b/src/version2/models/availableWorkflowSystemRule.ts @@ -0,0 +1,17 @@ +/** The Atlassian provided system rules available. */ +export interface AvailableWorkflowSystemRule { + /** The rule description. */ + description: string; + /** List of rules that conflict with this one. */ + incompatibleRuleKeys: string[]; + /** Whether the rule can be added to an initial transition. */ + isAvailableForInitialTransition: boolean; + /** Whether the rule is visible. */ + isVisible: boolean; + /** The rule name. */ + name: string; + /** The rule key. */ + ruleKey: string; + /** The rule type. */ + ruleType: string; +} diff --git a/src/version2/models/availableWorkflowTriggerTypes.ts b/src/version2/models/availableWorkflowTriggerTypes.ts new file mode 100644 index 0000000000..c6d05575d0 --- /dev/null +++ b/src/version2/models/availableWorkflowTriggerTypes.ts @@ -0,0 +1,9 @@ +/** The list of available trigger types. */ +export interface AvailableWorkflowTriggerTypes { + /** The description of the trigger rule. */ + description?: string; + /** The name of the trigger rule. */ + name?: string; + /** The type identifier of trigger rule. */ + type?: string; +} diff --git a/src/version2/models/availableWorkflowTriggers.ts b/src/version2/models/availableWorkflowTriggers.ts new file mode 100644 index 0000000000..2fa661876b --- /dev/null +++ b/src/version2/models/availableWorkflowTriggers.ts @@ -0,0 +1,9 @@ +import { AvailableWorkflowTriggerTypes } from './availableWorkflowTriggerTypes'; + +/** The trigger rules available. */ +export interface AvailableWorkflowTriggers { + /** The list of available trigger types. */ + availableTypes: AvailableWorkflowTriggerTypes[]; + /** The rule key of the rule. */ + ruleKey: string; +} diff --git a/src/version2/models/bulkChangeOwnerDetails.ts b/src/version2/models/bulkChangeOwnerDetails.ts new file mode 100644 index 0000000000..c64ce952eb --- /dev/null +++ b/src/version2/models/bulkChangeOwnerDetails.ts @@ -0,0 +1,7 @@ +/** Details for changing owners of shareable entities */ +export interface BulkChangeOwnerDetails { + /** Whether the name is fixed automatically if it's duplicated after changing owner. */ + autofixName: boolean; + /** The account id of the new owner. */ + newOwner: string; +} diff --git a/src/version2/models/bulkEditShareableEntity.ts b/src/version2/models/bulkEditShareableEntity.ts new file mode 100644 index 0000000000..b34aebb907 --- /dev/null +++ b/src/version2/models/bulkEditShareableEntity.ts @@ -0,0 +1,7 @@ +/** Details of a request to bulk edit shareable entity. */ +export interface BulkEditShareableEntity { + /** Allowed action for bulk edit shareable entity */ + action: string; + /** The mapping dashboard id to errors if any. */ + entityErrors?: {}; +} diff --git a/src/version2/models/conditionGroupConfiguration.ts b/src/version2/models/conditionGroupConfiguration.ts new file mode 100644 index 0000000000..bdc95aa010 --- /dev/null +++ b/src/version2/models/conditionGroupConfiguration.ts @@ -0,0 +1,15 @@ +import { WorkflowRuleConfiguration } from './workflowRuleConfiguration'; + +/** The conditions group associated with the transition. */ +export interface ConditionGroupConfiguration { + /** The nested conditions of the condition group. */ + conditionGroups?: ConditionGroupConfiguration[]; + /** The rules for this condition. */ + conditions?: WorkflowRuleConfiguration[]; + /** + * Determines how the conditions in the group are evaluated. Accepts either `ANY` or `ALL`. If `ANY` is used, at least + * one condition in the group must be true for the group to evaluate to true. If `ALL` is used, all conditions in the + * group must be true for the group to evaluate to true. + */ + operation?: string; +} diff --git a/src/version2/models/conditionGroupUpdate.ts b/src/version2/models/conditionGroupUpdate.ts new file mode 100644 index 0000000000..6d1b17b6fb --- /dev/null +++ b/src/version2/models/conditionGroupUpdate.ts @@ -0,0 +1,15 @@ +import { WorkflowRuleConfiguration } from './workflowRuleConfiguration'; + +/** The conditions group associated with the transition. */ +export interface ConditionGroupUpdate { + /** The nested conditions of the condition group. */ + conditionGroups?: ConditionGroupUpdate[]; + /** The rules for this condition. */ + conditions?: WorkflowRuleConfiguration[]; + /** + * Determines how the conditions in the group are evaluated. Accepts either `ANY` or `ALL`. If `ANY` is used, at least + * one condition in the group must be true for the group to evaluate to true. If `ALL` is used, all conditions in the + * group must be true for the group to evaluate to true. + */ + operation: string; +} diff --git a/src/version2/models/dateRangeFilter.ts b/src/version2/models/dateRangeFilter.ts new file mode 100644 index 0000000000..230c346b24 --- /dev/null +++ b/src/version2/models/dateRangeFilter.ts @@ -0,0 +1,7 @@ +/** List issues archived within a specified date range. */ +export interface DateRangeFilter { + /** List issues archived after a specified date, passed in the YYYY-MM-DD format. */ + dateAfter: string; + /** List issues archived before a specified date provided in the YYYY-MM-DD format. */ + dateBefore: string; +} diff --git a/src/version2/models/documentVersion.ts b/src/version2/models/documentVersion.ts new file mode 100644 index 0000000000..072f220d94 --- /dev/null +++ b/src/version2/models/documentVersion.ts @@ -0,0 +1,7 @@ +/** The version details of the workflow. */ +export interface DocumentVersion { + /** The version UUID. */ + id?: string; + /** The version number. */ + versionNumber?: number; +} diff --git a/src/version2/models/error.ts b/src/version2/models/error.ts new file mode 100644 index 0000000000..2163724641 --- /dev/null +++ b/src/version2/models/error.ts @@ -0,0 +1,5 @@ +export interface Error { + count?: number; + issueIdsOrKeys?: string[]; + message?: string; +} diff --git a/src/version2/models/errors.ts b/src/version2/models/errors.ts new file mode 100644 index 0000000000..bc20bd9dd8 --- /dev/null +++ b/src/version2/models/errors.ts @@ -0,0 +1,8 @@ +import { Error } from './error'; + +export interface Errors { + issueIsSubtask?: Error; + issuesInArchivedProjects?: Error; + issuesInUnlicensedProjects?: Error; + issuesNotFound?: Error; +} diff --git a/src/version2/models/exportArchivedIssuesTaskProgress.ts b/src/version2/models/exportArchivedIssuesTaskProgress.ts new file mode 100644 index 0000000000..08b9940c42 --- /dev/null +++ b/src/version2/models/exportArchivedIssuesTaskProgress.ts @@ -0,0 +1,9 @@ +/** The response for status request for a running/completed export task. */ +export interface ExportArchivedIssuesTaskProgress { + fileUrl?: string; + payload?: string; + progress?: number; + status?: string; + submittedTime?: string; + taskId?: string; +} diff --git a/src/version2/models/index.ts b/src/version2/models/index.ts index b214a31baa..f919287b7a 100644 --- a/src/version2/models/index.ts +++ b/src/version2/models/index.ts @@ -25,12 +25,19 @@ export * from './autoCompleteSuggestion'; export * from './autoCompleteSuggestions'; export * from './availableDashboardGadget'; export * from './availableDashboardGadgetsResponse'; +export * from './availableWorkflowConnectRule'; +export * from './availableWorkflowForgeRule'; +export * from './availableWorkflowSystemRule'; +export * from './availableWorkflowTriggers'; +export * from './availableWorkflowTriggerTypes'; export * from './avatar'; export * from './avatars'; export * from './avatarUrls'; +export * from './bulkChangeOwnerDetails'; export * from './bulkCreateCustomFieldOptionRequest'; export * from './bulkCustomFieldOptionCreateRequest'; export * from './bulkCustomFieldOptionUpdateRequest'; +export * from './bulkEditShareableEntity'; export * from './bulkIssueIsWatching'; export * from './bulkIssuePropertyUpdateRequest'; export * from './bulkOperationErrorResult'; @@ -49,6 +56,8 @@ export * from './component'; export * from './componentIssuesCount'; export * from './componentWithIssueCount'; export * from './compoundClause'; +export * from './conditionGroupConfiguration'; +export * from './conditionGroupUpdate'; export * from './configuration'; export * from './connectCustomFieldValue'; export * from './connectCustomFieldValues'; @@ -111,16 +120,21 @@ export * from './dashboardGadgetResponse'; export * from './dashboardGadgetSettings'; export * from './dashboardGadgetUpdateRequest'; export * from './dashboardUser'; +export * from './dateRangeFilter'; export * from './defaultLevelValue'; export * from './defaultShareScope'; export * from './defaultWorkflow'; export * from './deleteAndReplaceVersion'; export * from './deprecatedWorkflow'; +export * from './documentVersion'; export * from './entityProperty'; export * from './entityPropertyDetails'; +export * from './error'; export * from './errorCollection'; export * from './errorMessage'; +export * from './errors'; export * from './eventNotification'; +export * from './exportArchivedIssuesTaskProgress'; export * from './failedWebhook'; export * from './failedWebhooks'; export * from './field'; @@ -171,6 +185,7 @@ export * from './issue'; export * from './issueAdjustmentContextDetails'; export * from './issueAdjustmentDetails'; export * from './issueAdjustmentIdentifiers'; +export * from './issueArchivalSync'; export * from './issueChangelogIds'; export * from './issueCommentListRequest'; export * from './issueCreateMetadata'; @@ -241,6 +256,8 @@ export * from './jiraExpressionsComplexity'; export * from './jiraExpressionsComplexityValue'; export * from './jiraExpressionValidationError'; export * from './jiraStatus'; +export * from './jiraWorkflow'; +export * from './jiraWorkflowStatus'; export * from './jqlFunctionPrecomputation'; export * from './jqlFunctionPrecomputationUpdate'; export * from './jqlFunctionPrecomputationUpdateRequest'; @@ -290,6 +307,7 @@ export * from './notificationSchemeEventDetails'; export * from './notificationSchemeEventTypeId'; export * from './notificationSchemeId'; export * from './notificationSchemeNotificationDetails'; +export * from './oldToNewSecurityLevelMappings'; export * from './operationMessage'; export * from './operations'; export * from './orderOfCustomFieldOptions'; @@ -356,6 +374,7 @@ export * from './pageWorkflowTransitionRules'; export * from './paginatedResponseComment'; export * from './parsedJqlQueries'; export * from './parsedJqlQuery'; +export * from './permissionDetails'; export * from './permissionGrant'; export * from './permissionGrants'; export * from './permissionHolder'; @@ -367,6 +386,7 @@ export * from './permittedProjects'; export * from './priority'; export * from './priorityId'; export * from './project'; +export * from './projectAndIssueTypePair'; export * from './projectAvatars'; export * from './projectCategory'; export * from './projectComponent'; @@ -457,7 +477,11 @@ export * from './statusCategory'; export * from './statusCreate'; export * from './statusCreateRequest'; export * from './statusDetails'; +export * from './statusLayoutUpdate'; export * from './statusMapping'; +export * from './statusMappingDTO'; +export * from './statusMigration'; +export * from './statusReferenceAndPort'; export * from './statusScope'; export * from './statusUpdate'; export * from './statusUpdateRequest'; @@ -473,6 +497,7 @@ export * from './timeTrackingProvider'; export * from './transition'; export * from './transitions'; export * from './transitionScreenDetails'; +export * from './transitionUpdateDTO'; export * from './uiModificationContextDetails'; export * from './uiModificationDetails'; export * from './uiModificationIdentifiers'; @@ -503,6 +528,8 @@ export * from './userList'; export * from './userMigration'; export * from './userPermission'; export * from './userPickerUser'; +export * from './validationOptionsForCreate'; +export * from './validationOptionsForUpdate'; export * from './valueOperand'; export * from './version'; export * from './versionIssueCounts'; @@ -519,10 +546,19 @@ export * from './webhookDetails'; export * from './webhookRegistrationDetails'; export * from './webhooksExpirationDate'; export * from './workflow'; +export * from './workflowCapabilities'; export * from './workflowCompoundCondition'; export * from './workflowCondition'; +export * from './workflowCreate'; +export * from './workflowCreateRequest'; +export * from './workflowCreateResponse'; +export * from './workflowElementReference'; export * from './workflowId'; +export * from './workflowLayout'; export * from './workflowOperations'; +export * from './workflowRead'; +export * from './workflowReferenceStatus'; +export * from './workflowRuleConfiguration'; export * from './workflowRules'; export * from './workflowRulesSearch'; export * from './workflowRulesSearchDetails'; @@ -530,9 +566,13 @@ export * from './workflowScheme'; export * from './workflowSchemeAssociations'; export * from './workflowSchemeIdName'; export * from './workflowSchemeProjectAssociation'; +export * from './workflowScope'; export * from './workflowSimpleCondition'; export * from './workflowStatus'; +export * from './workflowStatusAndPort'; +export * from './workflowStatusLayout'; export * from './workflowStatusProperties'; +export * from './workflowStatusUpdate'; export * from './workflowsWithTransitionRulesDetails'; export * from './workflowTransition'; export * from './workflowTransitionProperty'; @@ -542,5 +582,12 @@ export * from './workflowTransitionRulesDetails'; export * from './workflowTransitionRulesUpdate'; export * from './workflowTransitionRulesUpdateErrorDetails'; export * from './workflowTransitionRulesUpdateErrors'; +export * from './workflowTransitions'; +export * from './workflowTrigger'; +export * from './workflowUpdate'; +export * from './workflowUpdateRequest'; +export * from './workflowUpdateResponse'; +export * from './workflowValidationError'; +export * from './workflowValidationErrorList'; export * from './worklog'; export * from './worklogIdsRequest'; diff --git a/src/version2/models/issueArchivalSync.ts b/src/version2/models/issueArchivalSync.ts new file mode 100644 index 0000000000..8145c2a246 --- /dev/null +++ b/src/version2/models/issueArchivalSync.ts @@ -0,0 +1,7 @@ +import { Errors } from './errors'; + +/** Number of archived/unarchived issues and list of errors that occurred during the action, if any. */ +export interface IssueArchivalSync { + errors?: Errors; + numberOfIssuesUpdated?: number; +} diff --git a/src/version2/models/issueTypeCreate.ts b/src/version2/models/issueTypeCreate.ts index 51097f6544..522ea65141 100644 --- a/src/version2/models/issueTypeCreate.ts +++ b/src/version2/models/issueTypeCreate.ts @@ -17,9 +17,7 @@ export interface IssueTypeCreate { /** * @deprecated Use `hierarchyLevel` instead. See the [deprecation * notice](https://community.developer.atlassian.com/t/deprecation-of-the-epic-link-parent-link-and-other-related-fields-in-rest-apis-and-webhooks/54048) - * for details. - * - * Whether the issue type is `subtype` or `standard`. Defaults to `standard`. + * for details. Whether the issue type is `subtype` or `standard`. Defaults to `standard`. */ type?: 'subtype' | 'standard' | string; } diff --git a/src/version2/models/jiraWorkflow.ts b/src/version2/models/jiraWorkflow.ts new file mode 100644 index 0000000000..1a846701e2 --- /dev/null +++ b/src/version2/models/jiraWorkflow.ts @@ -0,0 +1,32 @@ +import { DocumentVersion } from './documentVersion'; +import { ProjectIssueTypes } from './projectIssueTypes'; +import { WorkflowLayout } from './workflowLayout'; +import { WorkflowReferenceStatus } from './workflowReferenceStatus'; +import { WorkflowScope } from './workflowScope'; +import { WorkflowTransitions } from './workflowTransitions'; + +/** Details of a workflow. */ +export interface JiraWorkflow { + /** The description of the workflow. */ + description?: string; + /** The ID of the workflow. */ + id?: string; + /** Indicates if the workflow can be edited. */ + isEditable?: boolean; + /** The name of the workflow. */ + name?: string; + scope?: WorkflowScope; + startPointLayout?: WorkflowLayout; + /** The statuses referenced in this workflow. */ + statuses?: WorkflowReferenceStatus[]; + /** If there is a current [asynchronous task](#async-operations) operation for this workflow. */ + taskId?: string; + /** The transitions of the workflow. */ + transitions?: WorkflowTransitions[]; + /** + * Use the optional `workflows.usages` expand to get additional information about the projects and issue types + * associated with the requested workflows. + */ + usages?: ProjectIssueTypes[]; + version?: DocumentVersion; +} diff --git a/src/version2/models/jiraWorkflowStatus.ts b/src/version2/models/jiraWorkflowStatus.ts new file mode 100644 index 0000000000..10749ea0ab --- /dev/null +++ b/src/version2/models/jiraWorkflowStatus.ts @@ -0,0 +1,22 @@ +import { ProjectIssueTypes } from './projectIssueTypes'; +import { WorkflowScope } from './workflowScope'; + +/** Details of a status. */ +export interface JiraWorkflowStatus { + /** The description of the status. */ + description?: string; + /** The ID of the status. */ + id?: string; + /** The name of the status. */ + name?: string; + scope?: WorkflowScope; + /** The category of the status. */ + statusCategory?: string; + /** The reference of the status. */ + statusReference?: string; + /** + * The `statuses.usages` expand is an optional parameter that can be used when reading and updating statuses in Jira. + * It provides additional information about the projects and issue types associated with the requested statuses. + */ + usages?: ProjectIssueTypes[]; +} diff --git a/src/version2/models/oldToNewSecurityLevelMappings.ts b/src/version2/models/oldToNewSecurityLevelMappings.ts new file mode 100644 index 0000000000..ab3d7a459a --- /dev/null +++ b/src/version2/models/oldToNewSecurityLevelMappings.ts @@ -0,0 +1,6 @@ +export interface OldToNewSecurityLevelMappings { + /** The new issue security level ID. Providing null will clear the assigned old level from issues. */ + newLevelId: string; + /** The old issue security level ID. Providing null will remap all issues without any assigned levels. */ + oldLevelId: string; +} diff --git a/src/version2/models/permissionDetails.ts b/src/version2/models/permissionDetails.ts new file mode 100644 index 0000000000..df73897699 --- /dev/null +++ b/src/version2/models/permissionDetails.ts @@ -0,0 +1,9 @@ +import { SharePermission } from './sharePermission'; + +/** Details for permissions of shareable entities */ +export interface PermissionDetails { + /** The edit permissions for the shareable entities. */ + editPermissions: SharePermission[]; + /** The share permissions for the shareable entities. */ + sharePermissions: SharePermission[]; +} diff --git a/src/version2/models/projectAndIssueTypePair.ts b/src/version2/models/projectAndIssueTypePair.ts new file mode 100644 index 0000000000..96adac43fc --- /dev/null +++ b/src/version2/models/projectAndIssueTypePair.ts @@ -0,0 +1,7 @@ +/** A project and issueType ID pair that identifies a status mapping. */ +export interface ProjectAndIssueTypePair { + /** The ID of the issue type. */ + issueTypeId: string; + /** The ID of the project. */ + projectId: string; +} diff --git a/src/version2/models/statusLayoutUpdate.ts b/src/version2/models/statusLayoutUpdate.ts new file mode 100644 index 0000000000..ea1130ee59 --- /dev/null +++ b/src/version2/models/statusLayoutUpdate.ts @@ -0,0 +1,10 @@ +import { WorkflowLayout } from './workflowLayout'; + +/** The statuses associated with this workflow. */ +export interface StatusLayoutUpdate { + layout?: WorkflowLayout; + /** The properties for this status layout. */ + properties: {}; + /** A unique ID which the status will use to refer to this layout configuration. */ + statusReference: string; +} diff --git a/src/version2/models/statusMappingDTO.ts b/src/version2/models/statusMappingDTO.ts new file mode 100644 index 0000000000..8754433ffe --- /dev/null +++ b/src/version2/models/statusMappingDTO.ts @@ -0,0 +1,11 @@ +import { StatusMigration } from './statusMigration'; + +/** The mapping of old to new status ID for a specific project and issue type. */ +export interface StatusMappingDTO { + /** The issue type for the status mapping. */ + issueTypeId: string; + /** The project for the status mapping. */ + projectId: string; + /** The list of old and new status ID mappings for the specified project and issue type. */ + statusMigrations: StatusMigration[]; +} diff --git a/src/version2/models/statusMigration.ts b/src/version2/models/statusMigration.ts new file mode 100644 index 0000000000..8c4cb05a1a --- /dev/null +++ b/src/version2/models/statusMigration.ts @@ -0,0 +1,7 @@ +/** The mapping of old to new status ID. */ +export interface StatusMigration { + /** The new status ID. */ + newStatusReference: string; + /** The old status ID. */ + oldStatusReference: string; +} diff --git a/src/version2/models/statusReferenceAndPort.ts b/src/version2/models/statusReferenceAndPort.ts new file mode 100644 index 0000000000..3bf7340e89 --- /dev/null +++ b/src/version2/models/statusReferenceAndPort.ts @@ -0,0 +1,7 @@ +/** The status reference and port that a transition is connected to. */ +export interface StatusReferenceAndPort { + /** The port this transition uses to connect to this status. */ + port?: number; + /** The reference of this status. */ + statusReference: string; +} diff --git a/src/version2/models/taskProgressObject.ts b/src/version2/models/taskProgressObject.ts index bed64af8a8..06eeda38e2 100644 --- a/src/version2/models/taskProgressObject.ts +++ b/src/version2/models/taskProgressObject.ts @@ -18,7 +18,7 @@ export interface TaskProgressObject { /** The progress of the task, as a percentage complete. */ progress: number; /** The result of the task execution. */ - result?: {}; + result?: any; /** The URL of the task. */ self: string; /** A timestamp recording when the task was started. */ diff --git a/src/version2/models/transitionUpdateDTO.ts b/src/version2/models/transitionUpdateDTO.ts new file mode 100644 index 0000000000..d98aec9f58 --- /dev/null +++ b/src/version2/models/transitionUpdateDTO.ts @@ -0,0 +1,31 @@ +import { ConditionGroupUpdate } from './conditionGroupUpdate'; +import { StatusReferenceAndPort } from './statusReferenceAndPort'; +import { WorkflowRuleConfiguration } from './workflowRuleConfiguration'; +import { WorkflowTrigger } from './workflowTrigger'; + +/** The transitions of this workflow. */ +export interface TransitionUpdateDTO { + /** The post-functions of the transition. */ + actions?: WorkflowRuleConfiguration[]; + conditions?: ConditionGroupUpdate; + /** The custom event ID of the transition. */ + customIssueEventId?: string; + /** The description of the transition. */ + description?: string; + /** The statuses the transition can start from. */ + from?: StatusReferenceAndPort[]; + /** The ID of the transition. */ + id: string; + /** The name of the transition. */ + name: string; + /** The properties of the transition. */ + properties?: {}; + to?: StatusReferenceAndPort; + transitionScreen?: WorkflowRuleConfiguration; + /** The triggers of the transition. */ + triggers?: WorkflowTrigger[]; + /** The transition type. */ + type: string; + /** The validators of the transition. */ + validators?: WorkflowRuleConfiguration[]; +} diff --git a/src/version2/models/validationOptionsForCreate.ts b/src/version2/models/validationOptionsForCreate.ts new file mode 100644 index 0000000000..3b59fe691c --- /dev/null +++ b/src/version2/models/validationOptionsForCreate.ts @@ -0,0 +1,7 @@ +/** + * The level of validation to return from the API. If no values are provided, the default would return `WARNING` and + * `ERROR` level validation results. + */ +export interface ValidationOptionsForCreate { + levels?: string[]; +} diff --git a/src/version2/models/validationOptionsForUpdate.ts b/src/version2/models/validationOptionsForUpdate.ts new file mode 100644 index 0000000000..8930e73a3f --- /dev/null +++ b/src/version2/models/validationOptionsForUpdate.ts @@ -0,0 +1,7 @@ +/** + * The level of validation to return from the API. If no values are provided, the default would return `WARNING` and + * `ERROR` level validation results. + */ +export interface ValidationOptionsForUpdate { + levels?: string[]; +} diff --git a/src/version2/models/workflowCapabilities.ts b/src/version2/models/workflowCapabilities.ts new file mode 100644 index 0000000000..2fbb6213d6 --- /dev/null +++ b/src/version2/models/workflowCapabilities.ts @@ -0,0 +1,22 @@ +import { AvailableWorkflowConnectRule } from './availableWorkflowConnectRule'; +import { AvailableWorkflowForgeRule } from './availableWorkflowForgeRule'; +import { AvailableWorkflowSystemRule } from './availableWorkflowSystemRule'; +import { AvailableWorkflowTriggers } from './availableWorkflowTriggers'; + +export interface WorkflowCapabilities { + /** The Connect provided ecosystem rules available. */ + connectRules?: AvailableWorkflowConnectRule[]; + /** + * The scope of the workflow capabilities. `GLOBAL` for company-managed projects and `PROJECT` for team-managed + * projects. + */ + editorScope?: string; + /** The Forge provided ecosystem rules available. */ + forgeRules?: AvailableWorkflowForgeRule[]; + /** The types of projects that this capability set is available for. */ + projectTypes?: string[]; + /** The Atlassian provided system rules available. */ + systemRules?: AvailableWorkflowSystemRule[]; + /** The trigger rules available. */ + triggerRules?: AvailableWorkflowTriggers[]; +} diff --git a/src/version2/models/workflowCreate.ts b/src/version2/models/workflowCreate.ts new file mode 100644 index 0000000000..dcd7390cd5 --- /dev/null +++ b/src/version2/models/workflowCreate.ts @@ -0,0 +1,16 @@ +import { StatusLayoutUpdate } from './statusLayoutUpdate'; +import { TransitionUpdateDTO } from './transitionUpdateDTO'; +import { WorkflowLayout } from './workflowLayout'; + +/** The details of the workflows to create. */ +export interface WorkflowCreate { + /** The description of the workflow to create. */ + description?: string; + /** The name of the workflow to create. */ + name: string; + startPointLayout?: WorkflowLayout; + /** The statuses associated with this workflow. */ + statuses: StatusLayoutUpdate[]; + /** The transitions of this workflow. */ + transitions: TransitionUpdateDTO[]; +} diff --git a/src/version2/models/workflowCreateRequest.ts b/src/version2/models/workflowCreateRequest.ts new file mode 100644 index 0000000000..b4eaf9cc0a --- /dev/null +++ b/src/version2/models/workflowCreateRequest.ts @@ -0,0 +1,12 @@ +import { WorkflowCreate } from './workflowCreate'; +import { WorkflowScope } from './workflowScope'; +import { WorkflowStatusUpdate } from './workflowStatusUpdate'; + +/** The create workflows payload. */ +export interface WorkflowCreateRequest { + scope: WorkflowScope; + /** The statuses to associate with the workflows. */ + statuses: WorkflowStatusUpdate[]; + /** The details of the workflows to create. */ + workflows: WorkflowCreate[]; +} diff --git a/src/version2/models/workflowCreateResponse.ts b/src/version2/models/workflowCreateResponse.ts new file mode 100644 index 0000000000..1600d3ce86 --- /dev/null +++ b/src/version2/models/workflowCreateResponse.ts @@ -0,0 +1,10 @@ +import { JiraWorkflow } from './jiraWorkflow'; +import { JiraWorkflowStatus } from './jiraWorkflowStatus'; + +/** Details of the created workflows and statuses. */ +export interface WorkflowCreateResponse { + /** List of created statuses. */ + statuses?: JiraWorkflowStatus[]; + /** List of created workflows. */ + workflows?: JiraWorkflow[]; +} diff --git a/src/version2/models/workflowElementReference.ts b/src/version2/models/workflowElementReference.ts new file mode 100644 index 0000000000..e0b0ed2390 --- /dev/null +++ b/src/version2/models/workflowElementReference.ts @@ -0,0 +1,14 @@ +import { ProjectAndIssueTypePair } from './projectAndIssueTypePair'; + +/** A reference to the location of the error. This will be null if the error does not refer to a specific element. */ +export interface WorkflowElementReference { + /** A property key. */ + propertyKey?: string; + /** A rule ID. */ + ruleId?: string; + statusMappingReference?: ProjectAndIssueTypePair; + /** A status reference. */ + statusReference?: string; + /** A transition ID. */ + transitionId?: string; +} diff --git a/src/version2/models/workflowLayout.ts b/src/version2/models/workflowLayout.ts new file mode 100644 index 0000000000..a11cd570b1 --- /dev/null +++ b/src/version2/models/workflowLayout.ts @@ -0,0 +1,7 @@ +/** The starting point for the statuses in the workflow. */ +export interface WorkflowLayout { + /** The x axis location. */ + x?: number; + /** The y axis location. */ + y?: number; +} diff --git a/src/version2/models/workflowRead.ts b/src/version2/models/workflowRead.ts new file mode 100644 index 0000000000..64ae1fb21f --- /dev/null +++ b/src/version2/models/workflowRead.ts @@ -0,0 +1,10 @@ +import { JiraWorkflow } from './jiraWorkflow'; +import { JiraWorkflowStatus } from './jiraWorkflowStatus'; + +/** Details of workflows and related statuses. */ +export interface WorkflowRead { + /** List of statuses. */ + statuses?: JiraWorkflowStatus[]; + /** List of workflows. */ + workflows?: JiraWorkflow[]; +} diff --git a/src/version2/models/workflowReferenceStatus.ts b/src/version2/models/workflowReferenceStatus.ts new file mode 100644 index 0000000000..b60f99d504 --- /dev/null +++ b/src/version2/models/workflowReferenceStatus.ts @@ -0,0 +1,12 @@ +import { WorkflowStatusLayout } from './workflowStatusLayout'; + +/** The statuses referenced in the workflow. */ +export interface WorkflowReferenceStatus { + /** Indicates if the status is deprecated. */ + deprecated?: boolean; + layout?: WorkflowStatusLayout; + /** The properties associated with the status. */ + properties?: {}; + /** The reference of the status. */ + statusReference?: string; +} diff --git a/src/version2/models/workflowRuleConfiguration.ts b/src/version2/models/workflowRuleConfiguration.ts new file mode 100644 index 0000000000..1df368717b --- /dev/null +++ b/src/version2/models/workflowRuleConfiguration.ts @@ -0,0 +1,9 @@ +/** The configuration of the rule. */ +export interface WorkflowRuleConfiguration { + /** The ID of the rule. */ + id?: string; + /** The parameters related to the rule. */ + parameters?: {}; + /** The rule key of the rule. */ + ruleKey: string; +} diff --git a/src/version2/models/workflowScope.ts b/src/version2/models/workflowScope.ts new file mode 100644 index 0000000000..c1d31a8fd5 --- /dev/null +++ b/src/version2/models/workflowScope.ts @@ -0,0 +1,8 @@ +import { ProjectId } from './projectId'; + +/** The scope of the workflow. */ +export interface WorkflowScope { + project?: ProjectId; + /** The scope of the workflow. `GLOBAL` for company-managed projects and `PROJECT` for team-managed projects. */ + type: string; +} diff --git a/src/version2/models/workflowStatusAndPort.ts b/src/version2/models/workflowStatusAndPort.ts new file mode 100644 index 0000000000..1ef65ed402 --- /dev/null +++ b/src/version2/models/workflowStatusAndPort.ts @@ -0,0 +1,7 @@ +/** The status reference and port that a transition is connected to. */ +export interface WorkflowStatusAndPort { + /** The port the transition is connected to this status. */ + port?: number; + /** The reference of this status. */ + statusReference?: string; +} diff --git a/src/version2/models/workflowStatusLayout.ts b/src/version2/models/workflowStatusLayout.ts new file mode 100644 index 0000000000..2b760493dc --- /dev/null +++ b/src/version2/models/workflowStatusLayout.ts @@ -0,0 +1,7 @@ +/** The x and y location of the status in the workflow. */ +export interface WorkflowStatusLayout { + /** The x axis location. */ + x?: number; + /** The y axis location. */ + y?: number; +} diff --git a/src/version2/models/workflowStatusUpdate.ts b/src/version2/models/workflowStatusUpdate.ts new file mode 100644 index 0000000000..5f077332e2 --- /dev/null +++ b/src/version2/models/workflowStatusUpdate.ts @@ -0,0 +1,13 @@ +/** Details of the status being updated. */ +export interface WorkflowStatusUpdate { + /** The description of the status. */ + description?: string; + /** The ID of the status. */ + id?: string; + /** The name of the status. */ + name: string; + /** The category of the status. */ + statusCategory: string; + /** The reference of the status. */ + statusReference: string; +} diff --git a/src/version2/models/workflowTransitions.ts b/src/version2/models/workflowTransitions.ts new file mode 100644 index 0000000000..dc89268156 --- /dev/null +++ b/src/version2/models/workflowTransitions.ts @@ -0,0 +1,31 @@ +import { ConditionGroupConfiguration } from './conditionGroupConfiguration'; +import { WorkflowRuleConfiguration } from './workflowRuleConfiguration'; +import { WorkflowStatusAndPort } from './workflowStatusAndPort'; +import { WorkflowTrigger } from './workflowTrigger'; + +/** The transitions of the workflow. */ +export interface WorkflowTransitions { + /** The post-functions of the transition. */ + actions?: WorkflowRuleConfiguration[]; + conditions?: ConditionGroupConfiguration; + /** The custom event ID of the transition. */ + customIssueEventId?: string; + /** The description of the transition. */ + description?: string; + /** The statuses the transition can start from. */ + from?: WorkflowStatusAndPort[]; + /** The ID of the transition. */ + id?: string; + /** The name of the transition. */ + name?: string; + /** The properties of the transition. */ + properties?: {}; + to?: WorkflowStatusAndPort; + transitionScreen?: WorkflowRuleConfiguration; + /** The triggers of the transition. */ + triggers?: WorkflowTrigger[]; + /** The transition type. */ + type?: string; + /** The validators of the transition. */ + validators?: WorkflowRuleConfiguration[]; +} diff --git a/src/version2/models/workflowTrigger.ts b/src/version2/models/workflowTrigger.ts new file mode 100644 index 0000000000..410c0ada8b --- /dev/null +++ b/src/version2/models/workflowTrigger.ts @@ -0,0 +1,9 @@ +/** The trigger configuration associated with a workflow. */ +export interface WorkflowTrigger { + /** The ID of the trigger. */ + id?: string; + /** The parameters of the trigger. */ + parameters: {}; + /** The rule key of the trigger. */ + ruleKey: string; +} diff --git a/src/version2/models/workflowUpdate.ts b/src/version2/models/workflowUpdate.ts new file mode 100644 index 0000000000..c85fde3077 --- /dev/null +++ b/src/version2/models/workflowUpdate.ts @@ -0,0 +1,24 @@ +import { DocumentVersion } from './documentVersion'; +import { StatusLayoutUpdate } from './statusLayoutUpdate'; +import { StatusMappingDTO } from './statusMappingDTO'; +import { StatusMigration } from './statusMigration'; +import { TransitionUpdateDTO } from './transitionUpdateDTO'; +import { WorkflowLayout } from './workflowLayout'; + +/** The details of the workflows to update. */ +export interface WorkflowUpdate { + /** The mapping of old to new status ID. */ + defaultStatusMappings?: StatusMigration[]; + /** The new description for this workflow. */ + description?: string; + /** The ID of this workflow. */ + id: string; + startPointLayout?: WorkflowLayout; + /** The mapping of old to new status ID for a specific project and issue type. */ + statusMappings?: StatusMappingDTO[]; + /** The statuses associated with this workflow. */ + statuses: StatusLayoutUpdate[]; + /** The transitions of this workflow. */ + transitions: TransitionUpdateDTO[]; + version: DocumentVersion; +} diff --git a/src/version2/models/workflowUpdateRequest.ts b/src/version2/models/workflowUpdateRequest.ts new file mode 100644 index 0000000000..7f5c7e9b17 --- /dev/null +++ b/src/version2/models/workflowUpdateRequest.ts @@ -0,0 +1,10 @@ +import { WorkflowStatusUpdate } from './workflowStatusUpdate'; +import { WorkflowUpdate } from './workflowUpdate'; + +/** The update workflows payload. */ +export interface WorkflowUpdateRequest { + /** The statuses to associate with the workflows. */ + statuses: WorkflowStatusUpdate[]; + /** The details of the workflows to update. */ + workflows: WorkflowUpdate[]; +} diff --git a/src/version2/models/workflowUpdateResponse.ts b/src/version2/models/workflowUpdateResponse.ts new file mode 100644 index 0000000000..57e60d99dd --- /dev/null +++ b/src/version2/models/workflowUpdateResponse.ts @@ -0,0 +1,11 @@ +import { JiraWorkflow } from './jiraWorkflow'; +import { JiraWorkflowStatus } from './jiraWorkflowStatus'; + +export interface WorkflowUpdateResponse { + /** List of updated statuses. */ + statuses?: JiraWorkflowStatus[]; + /** If there is a [asynchronous task](#async-operations) operation, as a result of this update. */ + taskId?: string; + /** List of updated workflows. */ + workflows?: JiraWorkflow[]; +} diff --git a/src/version2/models/workflowValidationError.ts b/src/version2/models/workflowValidationError.ts new file mode 100644 index 0000000000..18e8a32d6d --- /dev/null +++ b/src/version2/models/workflowValidationError.ts @@ -0,0 +1,14 @@ +import { WorkflowElementReference } from './workflowElementReference'; + +/** The details about a workflow validation error. */ +export interface WorkflowValidationError { + /** An error code. */ + code?: string; + elementReference?: WorkflowElementReference; + /** The validation error level. */ + level?: string; + /** An error message. */ + message?: string; + /** The type of element the error or warning references. */ + type?: string; +} diff --git a/src/version2/models/workflowValidationErrorList.ts b/src/version2/models/workflowValidationErrorList.ts new file mode 100644 index 0000000000..95e3690a4d --- /dev/null +++ b/src/version2/models/workflowValidationErrorList.ts @@ -0,0 +1,6 @@ +import { WorkflowValidationError } from './workflowValidationError'; + +export interface WorkflowValidationErrorList { + /** The list of validation errors. */ + errors?: WorkflowValidationError[]; +} diff --git a/src/version2/myself.ts b/src/version2/myself.ts index 635ae02354..e9a44b7a70 100644 --- a/src/version2/myself.ts +++ b/src/version2/myself.ts @@ -203,23 +203,17 @@ export class Myself { /** * @deprecated Deprecated, use [Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) - * from the user management REST API instead. - * - * Sets the locale of the user. The locale must be one supported by the instance of Jira. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * Permission to access Jira. + * from the user management REST API instead. Sets the locale of the user. The locale must be one supported by the + * instance of Jira. **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) + * required:** Permission to access Jira. */ async setLocale(parameters: Parameters.SetLocale | undefined, callback: Callback): Promise; /** * @deprecated Deprecated, use [Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) - * from the user management REST API instead. - * - * Sets the locale of the user. The locale must be one supported by the instance of Jira. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * Permission to access Jira. + * from the user management REST API instead. Sets the locale of the user. The locale must be one supported by the + * instance of Jira. **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) + * required:** Permission to access Jira. */ async setLocale(parameters?: Parameters.SetLocale, callback?: never): Promise; async setLocale(parameters?: Parameters.SetLocale, callback?: Callback): Promise { @@ -237,10 +231,7 @@ export class Myself { /** * @deprecated Deprecated, use [Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) - * from the user management REST API instead. - * - * Deletes the locale of the user, which restores the default setting. - * + * from the user management REST API instead. Deletes the locale of the user, which restores the default setting. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ @@ -248,10 +239,7 @@ export class Myself { /** * @deprecated Deprecated, use [Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) - * from the user management REST API instead. - * - * Deletes the locale of the user, which restores the default setting. - * + * from the user management REST API instead. Deletes the locale of the user, which restores the default setting. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ diff --git a/src/version2/parameters/archiveIssues.ts b/src/version2/parameters/archiveIssues.ts new file mode 100644 index 0000000000..abaee418c3 --- /dev/null +++ b/src/version2/parameters/archiveIssues.ts @@ -0,0 +1,3 @@ +export interface ArchiveIssues { + issueIdsOrKeys?: string[]; +} diff --git a/src/version2/parameters/archiveIssuesAsync.ts b/src/version2/parameters/archiveIssuesAsync.ts new file mode 100644 index 0000000000..74a43a0704 --- /dev/null +++ b/src/version2/parameters/archiveIssuesAsync.ts @@ -0,0 +1,3 @@ +export interface ArchiveIssuesAsync { + jql?: string; +} diff --git a/src/version2/parameters/associateSchemesToProjects.ts b/src/version2/parameters/associateSchemesToProjects.ts new file mode 100644 index 0000000000..1e9752f741 --- /dev/null +++ b/src/version2/parameters/associateSchemesToProjects.ts @@ -0,0 +1,11 @@ +import { OldToNewSecurityLevelMappings } from '../models'; + +/** Issue security scheme, project, and remapping details. */ +export interface AssociateSchemesToProjects { + /** The list of scheme levels which should be remapped to new levels of the issue security scheme. */ + oldToNewSecurityLevelMappings: OldToNewSecurityLevelMappings[]; + /** The ID of the project. */ + projectId: string; + /** The ID of the issue security scheme. Providing null will clear the association with the issue security scheme. */ + schemeId: string; +} diff --git a/src/version2/parameters/bulkEditDashboards.ts b/src/version2/parameters/bulkEditDashboards.ts new file mode 100644 index 0000000000..43116d773c --- /dev/null +++ b/src/version2/parameters/bulkEditDashboards.ts @@ -0,0 +1,13 @@ +import { BulkChangeOwnerDetails, PermissionDetails } from '../models'; + +/** Details of a request to bulk edit shareable entity. */ +export interface BulkEditDashboards { + /** Allowed action for bulk edit shareable entity */ + action: string; + changeOwnerDetails?: BulkChangeOwnerDetails; + /** The id list of shareable entities to be changed. */ + entityIds: number[]; + /** Whether the actions are executed by users with Administer Jira global permission. */ + extendAdminPermissions?: boolean; + permissionDetails?: PermissionDetails; +} diff --git a/src/version2/parameters/createWorkflows.ts b/src/version2/parameters/createWorkflows.ts new file mode 100644 index 0000000000..945aa45f09 --- /dev/null +++ b/src/version2/parameters/createWorkflows.ts @@ -0,0 +1,3 @@ +import { WorkflowCreateRequest } from '../models'; + +export interface CreateWorkflows extends WorkflowCreateRequest {} diff --git a/src/version2/parameters/editIssue.ts b/src/version2/parameters/editIssue.ts index 8ffcf4593b..1be9cc59a8 100644 --- a/src/version2/parameters/editIssue.ts +++ b/src/version2/parameters/editIssue.ts @@ -21,4 +21,11 @@ export interface EditIssue extends IssueUpdateDetails { * users with _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ overrideEditableFlag?: boolean; + /** + * Whether the response should contain the issue with fields edited in this request. The returned issue will have the + * same format as in the [Get issue API](#api-rest-api-3-issue-issueidorkey-get). + */ + returnIssue?: boolean; + /** The Get issue API expand parameter to use in the response if the `returnIssue` parameter is `true`. */ + expand?: string; } diff --git a/src/version2/parameters/exportArchivedIssues.ts b/src/version2/parameters/exportArchivedIssues.ts new file mode 100644 index 0000000000..62a6f84f44 --- /dev/null +++ b/src/version2/parameters/exportArchivedIssues.ts @@ -0,0 +1,14 @@ +import { DateRangeFilter } from '../models'; + +/** Details of a filter for exporting archived issues. */ +export interface ExportArchivedIssues { + /** List archived issues archived by a specified account ID. */ + archivedBy?: string[]; + archivedDateRange?: DateRangeFilter; + /** List archived issues with a specified issue type ID. */ + issueTypes?: string[]; + /** List archived issues with a specified project key. */ + projects?: string[]; + /** List archived issues where the reporter is a specified account ID. */ + reporters?: string[]; +} diff --git a/src/version2/parameters/index.ts b/src/version2/parameters/index.ts index c25ff2dd10..8e4ef6ec6f 100644 --- a/src/version2/parameters/index.ts +++ b/src/version2/parameters/index.ts @@ -18,6 +18,8 @@ export * from './addWatcher'; export * from './addWorklog'; export * from './analyseExpression'; export * from './appendMappingsForIssueTypeScreenScheme'; +export * from './archiveIssues'; +export * from './archiveIssuesAsync'; export * from './archiveProject'; export * from './assignFieldConfigurationSchemeToProject'; export * from './assignIssue'; @@ -26,8 +28,10 @@ export * from './assignIssueTypeScreenSchemeToProject'; export * from './assignPermissionScheme'; export * from './assignProjectsToCustomFieldContext'; export * from './assignSchemeToProject'; +export * from './associateSchemesToProjects'; export * from './associateSchemeWithProject'; export * from './bulkDeleteIssueProperty'; +export * from './bulkEditDashboards'; export * from './bulkGetGroups'; export * from './bulkGetUsers'; export * from './bulkGetUsersMigration'; @@ -74,6 +78,7 @@ export * from './createUiModification'; export * from './createUser'; export * from './createVersion'; export * from './createWorkflow'; +export * from './createWorkflows'; export * from './createWorkflowScheme'; export * from './createWorkflowSchemeDraftFromParent'; export * from './createWorkflowTransitionProperty'; @@ -145,6 +150,7 @@ export * from './editIssue'; export * from './evaluateJiraExpression'; export * from './expandAttachmentForHumans'; export * from './expandAttachmentForMachines'; +export * from './exportArchivedIssues'; export * from './findAssignableUsers'; export * from './findBulkAssignableUsers'; export * from './findGroups'; @@ -355,6 +361,7 @@ export * from './partialUpdateProjectRole'; export * from './publishDraftWorkflowScheme'; export * from './putAddonProperty'; export * from './putAppProperty'; +export * from './readWorkflows'; export * from './refreshWebhooks'; export * from './registerDynamicWebhooks'; export * from './registerModules'; @@ -422,6 +429,7 @@ export * from './setWorklogProperty'; export * from './storeAvatar'; export * from './toggleFeatureForProject'; export * from './trashCustomField'; +export * from './unarchiveIssues'; export * from './updateComment'; export * from './updateComponent'; export * from './updateComponent'; @@ -469,10 +477,14 @@ export * from './updateStatuses'; export * from './updateUiModification'; export * from './updateVersion'; export * from './updateWorkflowMapping'; +export * from './updateWorkflows'; export * from './updateWorkflowScheme'; export * from './updateWorkflowSchemeDraft'; export * from './updateWorkflowTransitionProperty'; export * from './updateWorkflowTransitionRuleConfigurations'; export * from './updateWorklog'; +export * from './validateCreateWorkflows'; export * from './validateProjectKey'; +export * from './validateUpdateWorkflows'; +export * from './workflowCapabilities'; export * from './workflowRuleSearch'; diff --git a/src/version2/parameters/readWorkflows.ts b/src/version2/parameters/readWorkflows.ts new file mode 100644 index 0000000000..c1248108f5 --- /dev/null +++ b/src/version2/parameters/readWorkflows.ts @@ -0,0 +1,18 @@ +import { ProjectAndIssueTypePair } from '../models'; + +export interface ReadWorkflows { + /** The list of projects and issue types to query. */ + projectAndIssueTypes?: ProjectAndIssueTypePair[]; + /** The list of workflow IDs to query. */ + workflowIds?: string[]; + /** The list of workflow names to query. */ + workflowNames?: string[]; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * `workflows.usages` Returns the project and issue types that each workflow is associated with. `statuses.usages` + * Returns the project and issue types that each status is associated with. + */ + expand?: string; +} diff --git a/src/version2/parameters/searchPriorities.ts b/src/version2/parameters/searchPriorities.ts index 2380e6f1be..58ab0a017c 100644 --- a/src/version2/parameters/searchPriorities.ts +++ b/src/version2/parameters/searchPriorities.ts @@ -5,6 +5,11 @@ export interface SearchPriorities { maxResults?: number; /** The list of priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=2&id=3`. */ id?: string[]; + /** + * The list of projects IDs. To include multiple IDs, provide an ampersand-separated list. For example, + * `projectid=10010&projectid=10111`. + */ + projectId?: string[]; /** Whether only the default priority is returned. */ onlyDefault?: boolean; } diff --git a/src/version2/parameters/unarchiveIssues.ts b/src/version2/parameters/unarchiveIssues.ts new file mode 100644 index 0000000000..bb04ae1fcf --- /dev/null +++ b/src/version2/parameters/unarchiveIssues.ts @@ -0,0 +1,3 @@ +export interface UnarchiveIssues { + issueIdsOrKeys?: string[]; +} diff --git a/src/version2/parameters/updateWorkflows.ts b/src/version2/parameters/updateWorkflows.ts new file mode 100644 index 0000000000..e569bc2e6b --- /dev/null +++ b/src/version2/parameters/updateWorkflows.ts @@ -0,0 +1,12 @@ +import { WorkflowUpdateRequest } from '../models'; + +export interface UpdateWorkflows extends WorkflowUpdateRequest { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * `workflows.usages` Returns the project and issue types that each workflow is associated with. `statuses.usages` + * Returns the project and issue types that each status is associated with. + */ + expand?: string; +} diff --git a/src/version2/parameters/validateCreateWorkflows.ts b/src/version2/parameters/validateCreateWorkflows.ts new file mode 100644 index 0000000000..c8eddb187e --- /dev/null +++ b/src/version2/parameters/validateCreateWorkflows.ts @@ -0,0 +1,6 @@ +import { ValidationOptionsForCreate, WorkflowCreateRequest } from '../models'; + +export interface ValidateCreateWorkflows { + payload: WorkflowCreateRequest; + validationOptions?: ValidationOptionsForCreate; +} diff --git a/src/version2/parameters/validateUpdateWorkflows.ts b/src/version2/parameters/validateUpdateWorkflows.ts new file mode 100644 index 0000000000..53e67051f5 --- /dev/null +++ b/src/version2/parameters/validateUpdateWorkflows.ts @@ -0,0 +1,6 @@ +import { ValidationOptionsForUpdate, WorkflowUpdateRequest } from '../models'; + +export interface ValidateUpdateWorkflows { + payload: WorkflowUpdateRequest; + validationOptions?: ValidationOptionsForUpdate; +} diff --git a/src/version2/parameters/workflowCapabilities.ts b/src/version2/parameters/workflowCapabilities.ts new file mode 100644 index 0000000000..57c9c17d0a --- /dev/null +++ b/src/version2/parameters/workflowCapabilities.ts @@ -0,0 +1,5 @@ +export interface WorkflowCapabilities { + workflowId?: string; + projectId?: string; + issueTypeId?: string; +} diff --git a/src/version2/projectVersions.ts b/src/version2/projectVersions.ts index 7e870203c0..f8a2421536 100644 --- a/src/version2/projectVersions.ts +++ b/src/version2/projectVersions.ts @@ -240,14 +240,9 @@ export class ProjectVersions { * * @deprecated Use [Delete and replace version](#api-rest-api-2-version-id-removeAndSwap-post) that supports swapping * version values in custom fields, in addition to the swapping for `fixVersion` and `affectedVersion` provided in - * this resource. - * - * Alternative versions can be provided to update issues that use the deleted version in `fixVersion` or - * `affectedVersion`. If alternatives are not provided, occurrences of `fixVersion` and `affectedVersion` that - * contain the deleted version are cleared. - * - * This operation can be accessed anonymously. - * + * this resource. Alternative versions can be provided to update issues that use the deleted version in `fixVersion` + * or `affectedVersion`. If alternatives are not provided, occurrences of `fixVersion` and `affectedVersion` that + * contain the deleted version are cleared. This operation can be accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ * [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the version. @@ -258,14 +253,9 @@ export class ProjectVersions { * * @deprecated Use [Delete and replace version](#api-rest-api-2-version-id-removeAndSwap-post) that supports swapping * version values in custom fields, in addition to the swapping for `fixVersion` and `affectedVersion` provided in - * this resource. - * - * Alternative versions can be provided to update issues that use the deleted version in `fixVersion` or - * `affectedVersion`. If alternatives are not provided, occurrences of `fixVersion` and `affectedVersion` that - * contain the deleted version are cleared. - * - * This operation can be accessed anonymously. - * + * this resource. Alternative versions can be provided to update issues that use the deleted version in `fixVersion` + * or `affectedVersion`. If alternatives are not provided, occurrences of `fixVersion` and `affectedVersion` that + * contain the deleted version are cleared. This operation can be accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ * [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the version. diff --git a/src/version2/projects.ts b/src/version2/projects.ts index be0585a803..2ad2d092b7 100644 --- a/src/version2/projects.ts +++ b/src/version2/projects.ts @@ -9,10 +9,8 @@ export class Projects { /** * @deprecated Returns all projects visible to the user. Deprecated, use [ Get projects - * paginated](#api-rest-api-2-project-search-get) that supports search and pagination. - * - * This operation can be accessed anonymously. - * + * paginated](#api-rest-api-2-project-search-get) that supports search and pagination. This operation can be + * accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Projects are returned only where the user has _Browse Projects_ or _Administer projects_ [project * permission](https://confluence.atlassian.com/x/yodKLg) for the project. @@ -23,10 +21,8 @@ export class Projects { ): Promise; /** * @deprecated Returns all projects visible to the user. Deprecated, use [ Get projects - * paginated](#api-rest-api-2-project-search-get) that supports search and pagination. - * - * This operation can be accessed anonymously. - * + * paginated](#api-rest-api-2-project-search-get) that supports search and pagination. This operation can be + * accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Projects are returned only where the user has _Browse Projects_ or _Administer projects_ [project * permission](https://confluence.atlassian.com/x/yodKLg) for the project. @@ -52,11 +48,11 @@ export class Projects { /** * Creates a project based on a project type template, as shown in the following table: * - * | Project Type Key | Project Template Key | - * | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | - * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-internal-service-desk`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk` | - * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-cross-team-template`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | + * | Project Type Key | Project Template Key | + * | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | + * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | + * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | * * The project types are available according to the installed Jira features as follows: * @@ -79,11 +75,11 @@ export class Projects { /** * Creates a project based on a project type template, as shown in the following table: * - * | Project Type Key | Project Template Key | - * | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | - * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-internal-service-desk`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk` | - * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-cross-team-template`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | + * | Project Type Key | Project Template Key | + * | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | + * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | + * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | * * The project types are available according to the installed Jira features as follows: * @@ -277,19 +273,25 @@ export class Projects { /** * Updates the [project details](https://confluence.atlassian.com/x/ahLpNw) of a project. * - * All parameters are optional in the body of the request. + * All parameters are optional in the body of the request. Schemes will only be updated if they are included in the + * request, any omitted schemes will be left unchanged. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). is only needed when changing the + * schemes or project key. Otherwise you will only need _Administer Projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async updateProject(parameters: Parameters.UpdateProject, callback: Callback): Promise; /** * Updates the [project details](https://confluence.atlassian.com/x/ahLpNw) of a project. * - * All parameters are optional in the body of the request. + * All parameters are optional in the body of the request. Schemes will only be updated if they are included in the + * request, any omitted schemes will be left unchanged. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). is only needed when changing the + * schemes or project key. Otherwise you will only need _Administer Projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async updateProject(parameters: Parameters.UpdateProject, callback?: never): Promise; async updateProject( @@ -442,14 +444,20 @@ export class Projects { * Restores a project that has been archived or placed in the Jira recycle bin. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg)for Company managed projects. + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) for the project for Team managed projects. */ async restore(parameters: Parameters.Restore | string, callback: Callback): Promise; /** * Restores a project that has been archived or placed in the Jira recycle bin. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg)for Company managed projects. + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) for the project for Team managed projects. */ async restore(parameters: Parameters.Restore | string, callback?: never): Promise; async restore( @@ -511,7 +519,6 @@ export class Projects { * different template or type](https://confluence.atlassian.com/x/yEKeOQ). Updates a [project * type](https://confluence.atlassian.com/x/GwiiLQ). The project type can be updated for classic projects only, * project type cannot be updated for next-gen projects. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -524,7 +531,6 @@ export class Projects { * different template or type](https://confluence.atlassian.com/x/yEKeOQ). Updates a [project * type](https://confluence.atlassian.com/x/GwiiLQ). The project type can be updated for classic projects only, * project type cannot be updated for next-gen projects. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -592,8 +598,7 @@ export class Projects { } /** - * Gets a [notification scheme](https://confluence.atlassian.com/x/8YdKLg) associated with the project. Deprecated, - * use [Get notification schemes paginated](#api-rest-api-2-notificationscheme-get) supporting search and pagination. + * Gets a [notification scheme](https://confluence.atlassian.com/x/8YdKLg) associated with the project. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project @@ -604,8 +609,7 @@ export class Projects { callback: Callback, ): Promise; /** - * Gets a [notification scheme](https://confluence.atlassian.com/x/8YdKLg) associated with the project. Deprecated, - * use [Get notification schemes paginated](#api-rest-api-2-notificationscheme-get) supporting search and pagination. + * Gets a [notification scheme](https://confluence.atlassian.com/x/8YdKLg) associated with the project. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project diff --git a/src/version2/workflowSchemeProjectAssociations.ts b/src/version2/workflowSchemeProjectAssociations.ts index 2cbc57a398..e59a472fad 100644 --- a/src/version2/workflowSchemeProjectAssociations.ts +++ b/src/version2/workflowSchemeProjectAssociations.ts @@ -54,10 +54,7 @@ export class WorkflowSchemeProjectAssociations { /** * @deprecated Assigns a workflow scheme to a project. This operation is performed only when there are no issues in - * the project. - * - * Workflow schemes can only be assigned to classic projects. - * + * the project. Workflow schemes can only be assigned to classic projects. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -67,10 +64,7 @@ export class WorkflowSchemeProjectAssociations { ): Promise; /** * @deprecated Assigns a workflow scheme to a project. This operation is performed only when there are no issues in - * the project. - * - * Workflow schemes can only be assigned to classic projects. - * + * the project. Workflow schemes can only be assigned to classic projects. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ diff --git a/src/version2/workflowSchemes.ts b/src/version2/workflowSchemes.ts index 8eac33781b..864986a5cd 100644 --- a/src/version2/workflowSchemes.ts +++ b/src/version2/workflowSchemes.ts @@ -73,19 +73,19 @@ export class WorkflowSchemes { url: '/rest/api/2/workflowscheme', method: 'POST', data: { - id: parameters.id, - name: parameters.name, - description: parameters.description, defaultWorkflow: parameters.defaultWorkflow, + description: parameters.description, + draft: parameters.draft, + id: parameters.id, issueTypeMappings: parameters.issueTypeMappings, + issueTypes: parameters.issueTypes, + lastModified: parameters.lastModified, + lastModifiedUser: parameters.lastModifiedUser, + name: parameters.name, originalDefaultWorkflow: parameters.originalDefaultWorkflow, originalIssueTypeMappings: parameters.originalIssueTypeMappings, - draft: parameters.draft, - lastModifiedUser: parameters.lastModifiedUser, - lastModified: parameters.lastModified, self: parameters.self, updateDraftIfNeeded: parameters.updateDraftIfNeeded, - issueTypes: parameters.issueTypes, }, }; @@ -130,9 +130,9 @@ export class WorkflowSchemes { } /** - * Updates a workflow scheme, including the name, default workflow, issue type to project mappings, and more. If the - * workflow scheme is active (that is, being used by at least one project), then a draft workflow scheme is created or - * updated instead, provided that `updateDraftIfNeeded` is set to `true`. + * Updates a company-manged project workflow scheme, including the name, default workflow, issue type to project + * mappings, and more. If the workflow scheme is active (that is, being used by at least one project), then a draft + * workflow scheme is created or updated instead, provided that `updateDraftIfNeeded` is set to `true`. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -142,9 +142,9 @@ export class WorkflowSchemes { callback: Callback, ): Promise; /** - * Updates a workflow scheme, including the name, default workflow, issue type to project mappings, and more. If the - * workflow scheme is active (that is, being used by at least one project), then a draft workflow scheme is created or - * updated instead, provided that `updateDraftIfNeeded` is set to `true`. + * Updates a company-manged project workflow scheme, including the name, default workflow, issue type to project + * mappings, and more. If the workflow scheme is active (that is, being used by at least one project), then a draft + * workflow scheme is created or updated instead, provided that `updateDraftIfNeeded` is set to `true`. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -285,8 +285,8 @@ export class WorkflowSchemes { url: `/rest/api/2/workflowscheme/${parameters.id}/default`, method: 'PUT', data: { - workflow: parameters.workflow, updateDraftIfNeeded: parameters.updateDraftIfNeeded, + workflow: parameters.workflow, }, }; @@ -538,10 +538,10 @@ export class WorkflowSchemes { workflowName: parameters.workflowName, }, data: { - workflow: parameters.workflow, - issueTypes: parameters.issueTypes, defaultMapping: parameters.defaultMapping, + issueTypes: parameters.issueTypes, updateDraftIfNeeded: parameters.updateDraftIfNeeded, + workflow: parameters.workflow, }, }; diff --git a/src/version2/workflowTransitionRules.ts b/src/version2/workflowTransitionRules.ts index c8ea3b000c..ed920a1c35 100644 --- a/src/version2/workflowTransitionRules.ts +++ b/src/version2/workflowTransitionRules.ts @@ -84,7 +84,9 @@ export class WorkflowTransitionRules { * - [conditions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-condition/) * - [validators](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-validator/) * - * Only rules created by the calling Connect app can be updated. + * Only rules created by the calling + * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) or + * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps) app can be updated. * * To assist with app migration, this operation can be used to: * @@ -95,7 +97,8 @@ export class WorkflowTransitionRules { * Rules are enabled if the `disabled` parameter is not provided. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * Connect apps can use this operation. + * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) or + * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps) apps can use this operation. */ async updateWorkflowTransitionRuleConfigurations( parameters: Parameters.UpdateWorkflowTransitionRuleConfigurations, @@ -108,7 +111,9 @@ export class WorkflowTransitionRules { * - [conditions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-condition/) * - [validators](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-validator/) * - * Only rules created by the calling Connect app can be updated. + * Only rules created by the calling + * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) or + * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps) app can be updated. * * To assist with app migration, this operation can be used to: * @@ -119,7 +124,8 @@ export class WorkflowTransitionRules { * Rules are enabled if the `disabled` parameter is not provided. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * Connect apps can use this operation. + * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) or + * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps) apps can use this operation. */ async updateWorkflowTransitionRuleConfigurations( parameters: Parameters.UpdateWorkflowTransitionRuleConfigurations, diff --git a/src/version2/workflows.ts b/src/version2/workflows.ts index 452b96d8b8..10b5be68b8 100644 --- a/src/version2/workflows.ts +++ b/src/version2/workflows.ts @@ -11,10 +11,8 @@ export class Workflows { /** * @deprecated Returns all workflows in Jira or a workflow. Deprecated, use [Get workflows * paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflows/#api-rest-api-2-workflow-search-get). - * * If the `workflowName` parameter is specified, the workflow is returned as an object (not in an array). Otherwise, * an array of workflow objects is returned. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) * required:** _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -25,10 +23,8 @@ export class Workflows { /** * @deprecated Returns all workflows in Jira or a workflow. Deprecated, use [Get workflows * paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflows/#api-rest-api-2-workflow-search-get). - * * If the `workflowName` parameter is specified, the workflow is returned as an object (not in an array). Otherwise, * an array of workflow objects is returned. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -76,10 +72,10 @@ export class Workflows { url: '/rest/api/2/workflow', method: 'POST', data: { - name: parameters.name, description: parameters.description, - transitions: parameters.transitions, + name: parameters.name, statuses: parameters.statuses, + transitions: parameters.transitions, }, }; @@ -182,4 +178,262 @@ export class Workflows { return this.client.sendRequest(config, callback); } + + /** + * Returns a list of workflows and related statuses by providing workflow names, workflow IDs, or project and issue + * types. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async readWorkflows( + parameters: Parameters.ReadWorkflows, + callback: Callback, + ): Promise; + /** + * Returns a list of workflows and related statuses by providing workflow names, workflow IDs, or project and issue + * types. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async readWorkflows(parameters: Parameters.ReadWorkflows, callback?: never): Promise; + async readWorkflows( + parameters: Parameters.ReadWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflows', + method: 'POST', + params: { + expand: parameters.expand, + }, + data: { + projectAndIssueTypes: parameters.projectAndIssueTypes, + workflowIds: parameters.workflowIds, + workflowNames: parameters.workflowNames, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and + * issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of + * project types that the workflow is scoped to. It also includes all rules organized into their broad categories + * (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, + * Forge). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to access all, including global-scoped, workflows + * - _Administer projects_ project permissions to access project-scoped workflows + */ + async workflowCapabilities( + parameters: Parameters.WorkflowCapabilities, + callback: Callback, + ): Promise; + /** + * Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and + * issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of + * project types that the workflow is scoped to. It also includes all rules organized into their broad categories + * (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, + * Forge). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to access all, including global-scoped, workflows + * - _Administer projects_ project permissions to access project-scoped workflows + */ + async workflowCapabilities( + parameters: Parameters.WorkflowCapabilities, + callback?: never, + ): Promise; + async workflowCapabilities( + parameters: Parameters.WorkflowCapabilities, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflows/capabilities', + method: 'GET', + params: { + workflowId: parameters.workflowId, + projectId: parameters.projectId, + issueTypeId: parameters.issueTypeId, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Create workflows and related statuses. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async createWorkflows( + parameters: Parameters.CreateWorkflows, + callback: Callback, + ): Promise; + /** + * Create workflows and related statuses. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async createWorkflows( + parameters: Parameters.CreateWorkflows, + callback?: never, + ): Promise; + async createWorkflows( + parameters: Parameters.CreateWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflows/create', + method: 'POST', + data: { + scope: parameters.scope, + statuses: parameters.statuses, + workflows: parameters.workflows, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Validate the payload for bulk create workflows. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async validateCreateWorkflows( + parameters: Parameters.ValidateCreateWorkflows, + callback: Callback, + ): Promise; + /** + * Validate the payload for bulk create workflows. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async validateCreateWorkflows( + parameters: Parameters.ValidateCreateWorkflows, + callback?: never, + ): Promise; + async validateCreateWorkflows( + parameters: Parameters.ValidateCreateWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflows/create/validation', + method: 'POST', + data: { + payload: parameters.payload, + validationOptions: parameters.validationOptions, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Update workflows and related statuses. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async updateWorkflows( + parameters: Parameters.UpdateWorkflows, + callback: Callback, + ): Promise; + /** + * Update workflows and related statuses. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async updateWorkflows( + parameters: Parameters.UpdateWorkflows, + callback?: never, + ): Promise; + async updateWorkflows( + parameters: Parameters.UpdateWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflows/update', + method: 'POST', + params: { + expand: parameters.expand, + }, + data: { + statuses: parameters.statuses, + workflows: parameters.workflows, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Validate the payload for bulk update workflows. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async validateUpdateWorkflows( + parameters: Parameters.ValidateUpdateWorkflows, + callback: Callback, + ): Promise; + /** + * Validate the payload for bulk update workflows. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async validateUpdateWorkflows( + parameters: Parameters.ValidateUpdateWorkflows, + callback?: never, + ): Promise; + async validateUpdateWorkflows( + parameters: Parameters.ValidateUpdateWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflows/update/validation', + method: 'POST', + data: { + payload: parameters.payload, + validationOptions: parameters.validationOptions, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version3/dashboards.ts b/src/version3/dashboards.ts index c875e49da6..4ae1955b4b 100644 --- a/src/version3/dashboards.ts +++ b/src/version3/dashboards.ts @@ -54,7 +54,7 @@ export class Dashboards { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ async createDashboard( - parameters: Parameters.CreateDashboard | undefined, + parameters: Parameters.CreateDashboard, callback: Callback, ): Promise; /** @@ -62,19 +62,60 @@ export class Dashboards { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async createDashboard(parameters?: Parameters.CreateDashboard, callback?: never): Promise; + async createDashboard(parameters: Parameters.CreateDashboard, callback?: never): Promise; async createDashboard( - parameters?: Parameters.CreateDashboard, + parameters: Parameters.CreateDashboard, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/dashboard', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - sharePermissions: parameters?.sharePermissions, - editPermissions: parameters?.editPermissions, + description: parameters.description, + editPermissions: parameters.editPermissions, + name: parameters.name, + sharePermissions: parameters.sharePermissions, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Bulk edit dashboards. Maximum number of dashboards to be edited at the same time is 100. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None + * + * The dashboards to be updated must be owned by the user, or the user must be an administrator. + */ + async bulkEditDashboards( + parameters: Parameters.BulkEditDashboards, + callback: Callback, + ): Promise; + /** + * Bulk edit dashboards. Maximum number of dashboards to be edited at the same time is 100. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None + * + * The dashboards to be updated must be owned by the user, or the user must be an administrator. + */ + async bulkEditDashboards( + parameters: Parameters.BulkEditDashboards, + callback?: never, + ): Promise; + async bulkEditDashboards( + parameters: Parameters.BulkEditDashboards, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/dashboard/bulk/edit', + method: 'PUT', + data: { + action: parameters.action, + changeOwnerDetails: parameters.changeOwnerDetails, + entityIds: parameters.entityIds, + extendAdminPermissions: parameters.extendAdminPermissions, + permissionDetails: parameters.permissionDetails, }, }; @@ -248,12 +289,12 @@ export class Dashboards { url: `/rest/api/3/dashboard/${parameters.dashboardId}/gadget`, method: 'POST', data: { - moduleKey: parameters.moduleKey, - uri: parameters.uri, color: parameters.color, + ignoreUriAndModuleKeyValidation: parameters.ignoreUriAndModuleKeyValidation, + moduleKey: parameters.moduleKey, position: parameters.position, title: parameters.title, - ignoreUriAndModuleKeyValidation: parameters.ignoreUriAndModuleKeyValidation, + uri: parameters.uri, }, }; @@ -277,9 +318,9 @@ export class Dashboards { url: `/rest/api/3/dashboard/${parameters.dashboardId}/gadget/${parameters.gadgetId}`, method: 'PUT', data: { - title: parameters.title, color: parameters.color, position: parameters.position, + title: parameters.title, }, }; @@ -609,10 +650,10 @@ export class Dashboards { url: `/rest/api/3/dashboard/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, - sharePermissions: parameters.sharePermissions, editPermissions: parameters.editPermissions, + name: parameters.name, + sharePermissions: parameters.sharePermissions, }, }; @@ -676,10 +717,10 @@ export class Dashboards { url: `/rest/api/3/dashboard/${parameters.id}/copy`, method: 'POST', data: { - name: parameters.name, description: parameters.description, - sharePermissions: parameters.sharePermissions, editPermissions: parameters.editPermissions, + name: parameters.name, + sharePermissions: parameters.sharePermissions, }, }; diff --git a/src/version3/filters.ts b/src/version3/filters.ts index 13ca7a0fa2..2e2fb2cdb7 100644 --- a/src/version3/filters.ts +++ b/src/version3/filters.ts @@ -9,10 +9,7 @@ export class Filters { /** * @deprecated Returns all filters. Deprecated, use [ Search for filters](#api-rest-api-3-filter-search-get) that - * supports search and pagination. - * - * This operation can be accessed anonymously. - * + * supports search and pagination. This operation can be accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None, * however, only the following filters are returned: * @@ -29,10 +26,7 @@ export class Filters { ): Promise; /** * @deprecated Returns all filters. Deprecated, use [ Search for filters](#api-rest-api-3-filter-search-get) that - * supports search and pagination. - * - * This operation can be accessed anonymously. - * + * supports search and pagination. This operation can be accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None, * however, only the following filters are returned: * @@ -63,10 +57,7 @@ export class Filters { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Permission to access Jira. */ - async createFilter( - parameters: Parameters.CreateFilter | undefined, - callback: Callback, - ): Promise; + async createFilter(parameters: Parameters.CreateFilter, callback: Callback): Promise; /** * Creates a filter. The filter is shared according to the [default share scope](#api-rest-api-3-filter-post). The * filter is not selected as a favorite. @@ -74,9 +65,9 @@ export class Filters { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Permission to access Jira. */ - async createFilter(parameters?: Parameters.CreateFilter, callback?: never): Promise; + async createFilter(parameters: Parameters.CreateFilter, callback?: never): Promise; async createFilter( - parameters?: Parameters.CreateFilter, + parameters: Parameters.CreateFilter, callback?: Callback, ): Promise { const config: RequestConfig = { @@ -87,20 +78,20 @@ export class Filters { overrideSharePermissions: parameters?.overrideSharePermissions, }, data: { - self: parameters?.self, - id: parameters?.id, - name: parameters?.name, - description: parameters?.description, - owner: parameters?.owner, - jql: parameters?.jql, - viewUrl: parameters?.viewUrl, - searchUrl: parameters?.searchUrl, - favourite: parameters?.favourite, - favouritedCount: parameters?.favouritedCount, - sharePermissions: parameters?.sharePermissions, - editPermissions: parameters?.editPermissions, - sharedUsers: parameters?.sharedUsers, - subscriptions: parameters?.subscriptions, + description: parameters.description, + editPermissions: parameters.editPermissions, + favourite: parameters.favourite, + favouritedCount: parameters.favouritedCount, + id: parameters.id, + jql: parameters.jql, + name: parameters.name, + owner: parameters.owner, + searchUrl: parameters.searchUrl, + self: parameters.self, + sharePermissions: parameters.sharePermissions, + sharedUsers: parameters.sharedUsers, + subscriptions: parameters.subscriptions, + viewUrl: parameters.viewUrl, }, }; diff --git a/src/version3/groups.ts b/src/version3/groups.ts index ab1fe1f1f7..bd1f5475a1 100644 --- a/src/version3/groups.ts +++ b/src/version3/groups.ts @@ -8,21 +8,15 @@ export class Groups { constructor(private client: Client) {} /** - * @deprecated This operation is deprecated, use [`group/member`](#api-rest-api-3-group-member-get). - * - * Returns all users in a group. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * @deprecated This operation is deprecated, use [`group/member`](#api-rest-api-3-group-member-get). Returns all users + * in a group. **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) + * required:** _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getGroup(parameters: Parameters.GetGroup, callback: Callback): Promise; /** - * @deprecated This operation is deprecated, use [`group/member`](#api-rest-api-3-group-member-get). - * - * Returns all users in a group. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * @deprecated This operation is deprecated, use [`group/member`](#api-rest-api-3-group-member-get). Returns all users + * in a group. **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) + * required:** _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getGroup(parameters: Parameters.GetGroup, callback?: never): Promise; async getGroup(parameters: Parameters.GetGroup, callback?: Callback): Promise { @@ -204,8 +198,8 @@ export class Groups { groupId: parameters.groupId, }, data: { - name: parameters.name, accountId: parameters.accountId, + name: parameters.name, }, }; @@ -301,11 +295,11 @@ export class Groups { method: 'GET', params: { accountId: parameters?.accountId, - caseInsensitive: parameters?.caseInsensitive, + query: parameters?.query, exclude: parameters?.exclude, excludeId: parameters?.excludeId, maxResults: parameters?.maxResults, - query: parameters?.query, + caseInsensitive: parameters?.caseInsensitive, userName: parameters?.userName, }, }; diff --git a/src/version3/issueAdjustmentsApps.ts b/src/version3/issueAdjustmentsApps.ts index eecc80e393..458ff9aa4a 100644 --- a/src/version3/issueAdjustmentsApps.ts +++ b/src/version3/issueAdjustmentsApps.ts @@ -9,8 +9,8 @@ export class IssueAdjustmentsApps { /** * @deprecated Gets issue adjustments. Issue adjustments can only be retrieved by Forge apps. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * None. */ async getIssueAdjustments( parameters: Parameters.GetIssueAdjustments | undefined, @@ -18,8 +18,8 @@ export class IssueAdjustmentsApps { ): Promise; /** * @deprecated Gets issue adjustments. Issue adjustments can only be retrieved by Forge apps. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * None. */ async getIssueAdjustments( parameters?: Parameters.GetIssueAdjustments, @@ -43,10 +43,8 @@ export class IssueAdjustmentsApps { } /** - * @deprecated Creates an issue adjustment. Issue adjustment can only be created by Forge apps. - * - * Each app can define up to 100 issue adjustments. Each issue adjustment can define up to 1000 contexts. - * + * @deprecated Creates an issue adjustment. Issue adjustment can only be created by Forge apps. Each app can define up + * to 100 issue adjustments. Each issue adjustment can define up to 1000 contexts. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * * - _None_ if the issue adjustment is created without contexts. @@ -58,10 +56,8 @@ export class IssueAdjustmentsApps { callback: Callback, ): Promise; /** - * @deprecated Creates an issue adjustment. Issue adjustment can only be created by Forge apps. - * - * Each app can define up to 100 issue adjustments. Each issue adjustment can define up to 1000 contexts. - * + * @deprecated Creates an issue adjustment. Issue adjustment can only be created by Forge apps. Each app can define up + * to 100 issue adjustments. Each issue adjustment can define up to 1000 contexts. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * * - _None_ if the issue adjustment is created without contexts. @@ -91,10 +87,8 @@ export class IssueAdjustmentsApps { } /** - * @deprecated Updates an issue adjustment. Issue adjustment can only be updated by Forge apps. - * - * Each issue adjustment can define up to 1000 contexts. - * + * @deprecated Updates an issue adjustment. Issue adjustment can only be updated by Forge apps. Each issue adjustment + * can define up to 1000 contexts. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * * - _None_ if the issue adjustment is created without contexts. @@ -106,10 +100,8 @@ export class IssueAdjustmentsApps { callback: Callback, ): Promise; /** - * @deprecated Updates an issue adjustment. Issue adjustment can only be updated by Forge apps. - * - * Each issue adjustment can define up to 1000 contexts. - * + * @deprecated Updates an issue adjustment. Issue adjustment can only be updated by Forge apps. Each issue adjustment + * can define up to 1000 contexts. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * * - _None_ if the issue adjustment is created without contexts. @@ -138,8 +130,8 @@ export class IssueAdjustmentsApps { /** * @deprecated Deletes an issue adjustment. All the contexts that belong to the issue adjustment are deleted too. * Issue adjustment can only be deleted by Forge apps. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * None. */ async deleteIssueAdjustment( parameters: Parameters.DeleteIssueAdjustment, @@ -148,8 +140,8 @@ export class IssueAdjustmentsApps { /** * @deprecated Deletes an issue adjustment. All the contexts that belong to the issue adjustment are deleted too. * Issue adjustment can only be deleted by Forge apps. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * None. */ async deleteIssueAdjustment(parameters: Parameters.DeleteIssueAdjustment, callback?: never): Promise; async deleteIssueAdjustment( diff --git a/src/version3/issueCustomFieldOptions.ts b/src/version3/issueCustomFieldOptions.ts index 015db36823..44e17f9984 100644 --- a/src/version3/issueCustomFieldOptions.ts +++ b/src/version3/issueCustomFieldOptions.ts @@ -12,17 +12,13 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-get) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of - * options and, where the custom select field is of the type _Select List (cascading)_, cascading options for custom - * select fields. Cascading options are included in the item count when determining pagination. Only options from - * the global context are returned. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue - * field select list options created by Connect apps. - * + * for details. Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) + * list of options and, where the custom select field is of the type _Select List (cascading)_, cascading options + * for custom select fields. Cascading options are included in the item count when determining pagination. Only + * options from the global context are returned. Note that this operation **only works for issue field select list + * options created in Jira or using operations from the [Issue custom field + * options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue field select list + * options created by Connect apps. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -35,17 +31,13 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-get) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of - * options and, where the custom select field is of the type _Select List (cascading)_, cascading options for custom - * select fields. Cascading options are included in the item count when determining pagination. Only options from - * the global context are returned. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue - * field select list options created by Connect apps. - * + * for details. Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) + * list of options and, where the custom select field is of the type _Select List (cascading)_, cascading options + * for custom select fields. Cascading options are included in the item count when determining pagination. Only + * options from the global context are returned. Note that this operation **only works for issue field select list + * options created in Jira or using operations from the [Issue custom field + * options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue field select list + * options created by Connect apps. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -76,15 +68,11 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Creates options and, where the custom select field is of the type _Select List (cascading)_, cascading options for - * a custom select field. The options are added to the global context of the field. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * for details. Creates options and, where the custom select field is of the type _Select List (cascading)_, + * cascading options for a custom select field. The options are added to the global context of the field. Note that + * this operation **only works for issue field select list options created in Jira or using operations from the + * [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue * field select list options created by Connect apps. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -97,15 +85,11 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Creates options and, where the custom select field is of the type _Select List (cascading)_, cascading options for - * a custom select field. The options are added to the global context of the field. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * for details. Creates options and, where the custom select field is of the type _Select List (cascading)_, + * cascading options for a custom select field. The options are added to the global context of the field. Note that + * this operation **only works for issue field select list options created in Jira or using operations from the + * [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue * field select list options created by Connect apps. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -133,17 +117,12 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-put) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Updates the options on a custom select field. Where an updated option is in use on an issue, the value on the issue - * is also updated. Options that are not found are ignored. A maximum of 1000 options, including sub-options of - * _Select List (cascading)_ fields, can be updated per request. The options are updated on the global context of - * the field. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue - * field select list options created by Connect apps. - * + * for details. Updates the options on a custom select field. Where an updated option is in use on an issue, the + * value on the issue is also updated. Options that are not found are ignored. A maximum of 1000 options, including + * sub-options of _Select List (cascading)_ fields, can be updated per request. The options are updated on the + * global context of the field. Note that this operation **only works for issue field select list options created in + * Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, + * it cannot be used with issue field select list options created by Connect apps. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -156,17 +135,12 @@ export class IssueCustomFieldOptions { * (context)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-put) * instead. See [Deprecation of custom field * options](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-removal-of-custom-field-options-operations/) - * for details. - * - * Updates the options on a custom select field. Where an updated option is in use on an issue, the value on the issue - * is also updated. Options that are not found are ignored. A maximum of 1000 options, including sub-options of - * _Select List (cascading)_ fields, can be updated per request. The options are updated on the global context of - * the field. - * - * Note that this operation **only works for issue field select list options created in Jira or using operations from - * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue - * field select list options created by Connect apps. - * + * for details. Updates the options on a custom select field. Where an updated option is in use on an issue, the + * value on the issue is also updated. Options that are not found are ignored. A maximum of 1000 options, including + * sub-options of _Select List (cascading)_ fields, can be updated per request. The options are updated on the + * global context of the field. Note that this operation **only works for issue field select list options created in + * Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, + * it cannot be used with issue field select list options created by Connect apps. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -431,8 +405,8 @@ export class IssueCustomFieldOptions { url: `/rest/api/3/field/${parameters.fieldId}/context/${parameters.contextId}/option/move`, method: 'PUT', data: { - customFieldOptionIds: parameters.customFieldOptionIds, after: parameters.after, + customFieldOptionIds: parameters.customFieldOptionIds, position: parameters.position, }, }; diff --git a/src/version3/issueFields.ts b/src/version3/issueFields.ts index c6b64925e9..0592b6130c 100644 --- a/src/version3/issueFields.ts +++ b/src/version3/issueFields.ts @@ -55,7 +55,7 @@ export class IssueFields { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createCustomField( - parameters: Parameters.CreateCustomField | undefined, + parameters: Parameters.CreateCustomField, callback: Callback, ): Promise; /** @@ -65,21 +65,21 @@ export class IssueFields { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createCustomField( - parameters?: Parameters.CreateCustomField, + parameters: Parameters.CreateCustomField, callback?: never, ): Promise; async createCustomField( - parameters?: Parameters.CreateCustomField, + parameters: Parameters.CreateCustomField, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/field', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - type: parameters?.type, - searcherKey: parameters?.searcherKey, + description: parameters.description, + name: parameters.name, + searcherKey: parameters.searcherKey, + type: parameters.type, }, }; @@ -211,8 +211,8 @@ export class IssueFields { url: `/rest/api/3/field/${parameters.fieldId}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, searcherKey: parameters.searcherKey, }, }; @@ -224,7 +224,6 @@ export class IssueFields { * @deprecated Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) * list of the contexts a field is used in. Deprecated, use [ Get custom field * contexts](#api-rest-api-3-field-fieldId-context-get). - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -236,7 +235,6 @@ export class IssueFields { * @deprecated Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) * list of the contexts a field is used in. Deprecated, use [ Get custom field * contexts](#api-rest-api-3-field-fieldId-context-get). - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -265,7 +263,7 @@ export class IssueFields { * field](https://confluence.atlassian.com/x/Z44fOw) for more information on trashing and deleting custom fields. * * This operation is - * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). Follow the * `location` link in the response to determine the status of the task and use [Get * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. * @@ -278,7 +276,7 @@ export class IssueFields { * field](https://confluence.atlassian.com/x/Z44fOw) for more information on trashing and deleting custom fields. * * This operation is - * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). Follow the * `location` link in the response to determine the status of the task and use [Get * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. * diff --git a/src/version3/issueLinkTypes.ts b/src/version3/issueLinkTypes.ts index 61ba556ad9..06b4fc987b 100644 --- a/src/version3/issueLinkTypes.ts +++ b/src/version3/issueLinkTypes.ts @@ -48,7 +48,7 @@ export class IssueLinkTypes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueLinkType( - parameters: Parameters.CreateIssueLinkType | undefined, + parameters: Parameters.CreateIssueLinkType, callback: Callback, ): Promise; /** @@ -61,22 +61,22 @@ export class IssueLinkTypes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueLinkType( - parameters?: Parameters.CreateIssueLinkType, + parameters: Parameters.CreateIssueLinkType, callback?: never, ): Promise; async createIssueLinkType( - parameters?: Parameters.CreateIssueLinkType, + parameters: Parameters.CreateIssueLinkType, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/issueLinkType', method: 'POST', data: { - id: parameters?.id, - name: parameters?.name, - inward: parameters?.inward, - outward: parameters?.outward, - self: parameters?.self, + id: parameters.id, + inward: parameters.inward, + name: parameters.name, + outward: parameters.outward, + self: parameters.self, }, }; @@ -156,8 +156,8 @@ export class IssueLinkTypes { method: 'PUT', data: { id: parameters.id, - name: parameters.name, inward: parameters.inward, + name: parameters.name, outward: parameters.outward, self: parameters.self, }, diff --git a/src/version3/issueNotificationSchemes.ts b/src/version3/issueNotificationSchemes.ts index be3d9c2589..60683be695 100644 --- a/src/version3/issueNotificationSchemes.ts +++ b/src/version3/issueNotificationSchemes.ts @@ -216,17 +216,19 @@ export class IssueNotificationSchemes { } /** - * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * @deprecated Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async addNotifications(parameters: Parameters.AddNotifications, callback: Callback): Promise; /** - * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * @deprecated Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async addNotifications(parameters: Parameters.AddNotifications, callback?: never): Promise; async addNotifications(parameters: Parameters.AddNotifications, callback?: Callback): Promise { diff --git a/src/version3/issuePriorities.ts b/src/version3/issuePriorities.ts index fefd62a1f7..3d3cfc7af2 100644 --- a/src/version3/issuePriorities.ts +++ b/src/version3/issuePriorities.ts @@ -2,6 +2,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; import { Callback } from '../callback'; import { Client } from '../clients'; +import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; export class IssuePriorities { @@ -37,7 +38,7 @@ export class IssuePriorities { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createPriority( - parameters: Parameters.CreatePriority | undefined, + parameters: Parameters.CreatePriority, callback: Callback, ): Promise; /** @@ -46,19 +47,19 @@ export class IssuePriorities { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async createPriority(parameters?: Parameters.CreatePriority, callback?: never): Promise; + async createPriority(parameters: Parameters.CreatePriority, callback?: never): Promise; async createPriority( - parameters?: Parameters.CreatePriority, + parameters: Parameters.CreatePriority, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/priority', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - iconUrl: parameters?.iconUrl, - statusColor: parameters?.statusColor, + description: parameters.description, + iconUrl: parameters.iconUrl, + name: parameters.name, + statusColor: parameters.statusColor, }, }; @@ -103,25 +104,22 @@ export class IssuePriorities { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async movePriorities( - parameters: Parameters.MovePriorities | undefined, - callback: Callback, - ): Promise; + async movePriorities(parameters: Parameters.MovePriorities, callback: Callback): Promise; /** * Changes the order of issue priorities. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async movePriorities(parameters?: Parameters.MovePriorities, callback?: never): Promise; - async movePriorities(parameters?: Parameters.MovePriorities, callback?: Callback): Promise { + async movePriorities(parameters: Parameters.MovePriorities, callback?: never): Promise; + async movePriorities(parameters: Parameters.MovePriorities, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/3/priority/move', method: 'PUT', data: { - ids: parameters?.ids, - after: parameters?.after, - position: parameters?.position, + after: parameters.after, + ids: parameters.ids, + position: parameters.position, }, }; @@ -133,6 +131,8 @@ export class IssuePriorities { * priorities. The list can contain all priorities or a subset determined by any combination of these criteria: * * - A list of priority IDs. Any invalid priority IDs are ignored. + * - A list of project IDs. Only priorities that are available in these projects will be returned. Any invalid project + * IDs are ignored. * - Whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, * as there is no concept of default priorities in team-managed projects. * @@ -148,6 +148,8 @@ export class IssuePriorities { * priorities. The list can contain all priorities or a subset determined by any combination of these criteria: * * - A list of priority IDs. Any invalid priority IDs are ignored. + * - A list of project IDs. Only priorities that are available in these projects will be returned. Any invalid project + * IDs are ignored. * - Whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, * as there is no concept of default priorities in team-managed projects. * @@ -169,6 +171,7 @@ export class IssuePriorities { startAt: parameters?.startAt, maxResults: parameters?.maxResults, id: parameters?.id, + projectId: paramSerializer('projectId', parameters?.projectId), onlyDefault: parameters?.onlyDefault, }, }; @@ -221,9 +224,9 @@ export class IssuePriorities { url: `/rest/api/3/priority/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, iconUrl: parameters.iconUrl, + name: parameters.name, statusColor: parameters.statusColor, }, }; @@ -232,27 +235,23 @@ export class IssuePriorities { } /** - * Deletes an issue priority. - * - * This operation is - * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the - * `location` link in the response to determine the status of the task and use [Get - * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * @deprecated _Deprecated: please refer to the_ [changelog](https://developer.atlassian.com/changelog/#CHANGE-1066) + * _for more details._ Deletes an issue priority. This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async deletePriority(parameters: Parameters.DeletePriority, callback: Callback): Promise; /** - * Deletes an issue priority. - * - * This operation is - * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the - * `location` link in the response to determine the status of the task and use [Get - * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * @deprecated _Deprecated: please refer to the_ [changelog](https://developer.atlassian.com/changelog/#CHANGE-1066) + * _for more details._ Deletes an issue priority. This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async deletePriority(parameters: Parameters.DeletePriority, callback?: never): Promise; async deletePriority(parameters: Parameters.DeletePriority, callback?: Callback): Promise { diff --git a/src/version3/issueResolutions.ts b/src/version3/issueResolutions.ts index b21bbb105e..93327ccc11 100644 --- a/src/version3/issueResolutions.ts +++ b/src/version3/issueResolutions.ts @@ -9,14 +9,12 @@ export class IssueResolutions { /** * @deprecated Returns a list of all issue resolution values. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Permission to access Jira. */ async getResolutions(callback: Callback): Promise; /** * @deprecated Returns a list of all issue resolution values. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Permission to access Jira. */ @@ -173,7 +171,6 @@ export class IssueResolutions { /** * @deprecated Returns an issue resolution value. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Permission to access Jira. */ @@ -183,7 +180,6 @@ export class IssueResolutions { ): Promise; /** * @deprecated Returns an issue resolution value. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Permission to access Jira. */ diff --git a/src/version3/issueSecuritySchemes.ts b/src/version3/issueSecuritySchemes.ts index 33a141d761..4618823f56 100644 --- a/src/version3/issueSecuritySchemes.ts +++ b/src/version3/issueSecuritySchemes.ts @@ -60,9 +60,9 @@ export class IssueSecuritySchemes { url: '/rest/api/3/issuesecurityschemes', method: 'POST', data: { - description: parameters?.description, - levels: parameters?.levels, - name: parameters?.name, + description: parameters.description, + levels: parameters.levels, + name: parameters.name, }, }; @@ -246,11 +246,60 @@ export class IssueSecuritySchemes { return this.client.sendRequest(config, callback); } + /** + * Associates an issue security scheme with a project and remaps security levels of issues to the new levels, if + * provided. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async associateSchemesToProjects( + parameters: Parameters.AssociateSchemesToProjects, + callback: Callback, + ): Promise; + /** + * Associates an issue security scheme with a project and remaps security levels of issues to the new levels, if + * provided. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async associateSchemesToProjects( + parameters: Parameters.AssociateSchemesToProjects, + callback?: never, + ): Promise; + async associateSchemesToProjects( + parameters: Parameters.AssociateSchemesToProjects, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issuesecurityschemes/project', + method: 'PUT', + data: { + oldToNewSecurityLevelMappings: parameters.oldToNewSecurityLevelMappings, + projectId: parameters.projectId, + schemeId: parameters.schemeId, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of issue - * security schemes. If you specify the project ID parameter, the result will contain issue security schemes and - * related project IDs you filter by. Use {@link Parameters.SearchProjectsUsingSecuritySchemes} to obtain all projects - * related to scheme. + * security schemes.\ + * If you specify the project ID parameter, the result will contain issue security schemes and related project IDs you + * filter by. * * Only issue security schemes in the context of classic projects are returned. * @@ -263,9 +312,9 @@ export class IssueSecuritySchemes { ): Promise; /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of issue - * security schemes. If you specify the project ID parameter, the result will contain issue security schemes and - * related project IDs you filter by. Use {@link Parameters.SearchProjectsUsingSecuritySchemes} to obtain all projects - * related to scheme. + * security schemes.\ + * If you specify the project ID parameter, the result will contain issue security schemes and related project IDs you + * filter by. * * Only issue security schemes in the context of classic projects are returned. * diff --git a/src/version3/issues.ts b/src/version3/issues.ts index 5bfe11b0d2..d7a916b21d 100644 --- a/src/version3/issues.ts +++ b/src/version3/issues.ts @@ -109,11 +109,131 @@ export class Issues { updateHistory: parameters.updateHistory, }, data: { - transition: parameters.transition, fields: parameters.fields, - update: parameters.update, historyMetadata: parameters.historyMetadata, properties: parameters.properties, + transition: parameters.transition, + update: parameters.update, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Enables admins to archive up to 100,000 issues in a single request using JQL, returning the URL to check the status + * of the submitted request. + * + * You can use the [get + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get) + * and [cancel + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-cancel-post) + * APIs to manage the request. + * + * **Note that:** + * + * - You can't archive subtasks directly, only through their parent issues + * - You can only archive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + * + * **Rate limiting:** Only a single request per user can be active at any given time. + */ + async archiveIssuesAsync( + parameters: Parameters.ArchiveIssuesAsync, + callback: Callback, + ): Promise; + /** + * Enables admins to archive up to 100,000 issues in a single request using JQL, returning the URL to check the status + * of the submitted request. + * + * You can use the [get + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get) + * and [cancel + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-cancel-post) + * APIs to manage the request. + * + * **Note that:** + * + * - You can't archive subtasks directly, only through their parent issues + * - You can only archive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + * + * **Rate limiting:** Only a single request per user can be active at any given time. + */ + async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback?: never): Promise; + async archiveIssuesAsync( + parameters: Parameters.ArchiveIssuesAsync, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issue/archive', + method: 'POST', + data: { + jql: parameters.jql, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Enables admins to archive up to 1000 issues in a single request using issue ID/key, returning details of the + * issue(s) archived in the process and the errors encountered, if any. + * + * **Note that:** + * + * - You can't archive subtasks directly, only through their parent issues + * - You can only archive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + */ + async archiveIssues( + parameters: Parameters.ArchiveIssues, + callback: Callback, + ): Promise; + /** + * Enables admins to archive up to 1000 issues in a single request using issue ID/key, returning details of the + * issue(s) archived in the process and the errors encountered, if any. + * + * **Note that:** + * + * - You can't archive subtasks directly, only through their parent issues + * - You can only archive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + */ + async archiveIssues(parameters: Parameters.ArchiveIssues, callback?: never): Promise; + async archiveIssues( + parameters: Parameters.ArchiveIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issue/archive', + method: 'PUT', + data: { + issueIdsOrKeys: parameters.issueIdsOrKeys, }, }; @@ -237,6 +357,61 @@ export class Issues { return this.client.sendRequest(config, callback); } + /** + * Enables admins to unarchive up to 1000 issues in a single request using issue ID/key, returning details of the + * issue(s) unarchived in the process and the errors encountered, if any. + * + * **Note that:** + * + * - You can't unarchive subtasks directly, only through their parent issues + * - You can only unarchive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + */ + async unarchiveIssues( + parameters: Parameters.UnarchiveIssues, + callback: Callback, + ): Promise; + /** + * Enables admins to unarchive up to 1000 issues in a single request using issue ID/key, returning details of the + * issue(s) unarchived in the process and the errors encountered, if any. + * + * **Note that:** + * + * - You can't unarchive subtasks directly, only through their parent issues + * - You can only unarchive issues from software, service management, and business projects + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + */ + async unarchiveIssues( + parameters: Parameters.UnarchiveIssues, + callback?: never, + ): Promise; + async unarchiveIssues( + parameters: Parameters.UnarchiveIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issue/unarchive', + method: 'PUT', + data: { + issueIdsOrKeys: parameters.issueIdsOrKeys, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns the details for an issue. * @@ -369,13 +544,15 @@ export class Issues { notifyUsers: parameters.notifyUsers, overrideScreenSecurity: parameters.overrideScreenSecurity, overrideEditableFlag: parameters.overrideEditableFlag, + returnIssue: parameters.returnIssue, + expand: parameters.expand, }, data: { - transition: parameters.transition, fields: parameters.fields, - update: parameters.update, historyMetadata: parameters.historyMetadata, properties: parameters.properties, + transition: parameters.transition, + update: parameters.update, }, }; @@ -469,20 +646,20 @@ export class Issues { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/assignee`, method: 'PUT', data: { - self: parameters.self, - key: parameters.key, accountId: parameters.accountId, accountType: parameters.accountType, - name: parameters.name, - emailAddress: parameters.emailAddress, - avatarUrls: parameters.avatarUrls, - displayName: parameters.displayName, active: parameters.active, - timeZone: parameters.timeZone, - locale: parameters.locale, - groups: parameters.groups, applicationRoles: parameters.applicationRoles, + avatarUrls: parameters.avatarUrls, + displayName: parameters.displayName, + emailAddress: parameters.emailAddress, expand: parameters.expand, + groups: parameters.groups, + key: parameters.key, + locale: parameters.locale, + name: parameters.name, + self: parameters.self, + timeZone: parameters.timeZone, }, }; @@ -738,11 +915,11 @@ export class Issues { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/notify`, method: 'POST', data: { + htmlBody: parameters.htmlBody, + restrict: parameters.restrict, subject: parameters.subject, textBody: parameters.textBody, - htmlBody: parameters.htmlBody, to: parameters.to, - restrict: parameters.restrict, }, }; @@ -870,11 +1047,70 @@ export class Issues { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/transitions`, method: 'POST', data: { - transition: parameters.transition, fields: parameters.fields, - update: parameters.update, historyMetadata: parameters.historyMetadata, properties: parameters.properties, + transition: parameters.transition, + update: parameters.update, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Enables admins to retrieve details of all archived issues. Upon a successful request, the admin who submitted it + * will receive an email with a link to download a CSV file with the issue details. + * + * Note that this API only exports the values of system fields and archival-specific fields (`ArchivedBy` and + * `ArchivedDate`). Custom fields aren't supported. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + * + * **Rate limiting:** Only a single request can be active at any given time. + */ + async exportArchivedIssues( + parameters: Parameters.ExportArchivedIssues | undefined, + callback: Callback, + ): Promise; + /** + * Enables admins to retrieve details of all archived issues. Upon a successful request, the admin who submitted it + * will receive an email with a link to download a CSV file with the issue details. + * + * Note that this API only exports the values of system fields and archival-specific fields (`ArchivedBy` and + * `ArchivedDate`). Custom fields aren't supported. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Jira + * admin or site admin: [global permission](https://confluence.atlassian.com/x/x4dKLg) + * + * **License required:** Premium or Enterprise + * + * **Signed-in users only:** This API can't be accessed anonymously. + * + * **Rate limiting:** Only a single request can be active at any given time. + */ + async exportArchivedIssues( + parameters?: Parameters.ExportArchivedIssues, + callback?: never, + ): Promise; + async exportArchivedIssues( + parameters?: Parameters.ExportArchivedIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issues/archive/export', + method: 'PUT', + data: { + archivedBy: parameters?.archivedBy, + archivedDateRange: parameters?.archivedDateRange, + issueTypes: parameters?.issueTypes, + projects: parameters?.projects, + reporters: parameters?.reporters, }, }; diff --git a/src/version3/licenseMetrics.ts b/src/version3/licenseMetrics.ts index 9220349771..4cd2204fac 100644 --- a/src/version3/licenseMetrics.ts +++ b/src/version3/licenseMetrics.ts @@ -7,13 +7,40 @@ export class LicenseMetrics { constructor(private client: Client) {} /** - * Returns the total approximate user account across all jira licenced application keys. Please note this information - * is cached with a 7-day lifecycle and could be stale at the time of call. + * Returns licensing information about the Jira instance. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + */ + async getLicense(callback: Callback): Promise; + /** + * Returns licensing information about the Jira instance. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + */ + async getLicense(callback?: never): Promise; + async getLicense(callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/3/instance/license', + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns the approximate number of user accounts across all Jira licenses. Note that this information is cached with + * a 7-day lifecycle and could be stale at the time of call. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getApproximateLicenseCount(callback: Callback): Promise; /** - * Returns the total approximate user account across all jira licenced application keys. Please note this information - * is cached with a 7-day lifecycle and could be stale at the time of call. + * Returns the approximate number of user accounts across all Jira licenses. Note that this information is cached with + * a 7-day lifecycle and could be stale at the time of call. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getApproximateLicenseCount(callback?: never): Promise; async getApproximateLicenseCount(callback?: Callback): Promise { @@ -26,16 +53,22 @@ export class LicenseMetrics { } /** - * Returns the total approximate user account for a specific `jira licence application key`. Please note this - * information is cached with a 7-day lifecycle and could be stale at the time of call. + * Returns the total approximate number of user accounts for a single Jira license. Note that this information is + * cached with a 7-day lifecycle and could be stale at the time of call. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getApproximateApplicationLicenseCount( applicationKey: string, callback: Callback, ): Promise; /** - * Returns the total approximate user account for a specific `jira licence application key`. Please note this - * information is cached with a 7-day lifecycle and could be stale at the time of call. + * Returns the total approximate number of user accounts for a single Jira license. Note that this information is + * cached with a 7-day lifecycle and could be stale at the time of call. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getApproximateApplicationLicenseCount( applicationKey: string, diff --git a/src/version3/models/archiveIssueAsyncRequest.ts b/src/version3/models/archiveIssueAsyncRequest.ts new file mode 100644 index 0000000000..bab48d3c5e --- /dev/null +++ b/src/version3/models/archiveIssueAsyncRequest.ts @@ -0,0 +1,3 @@ +export interface ArchiveIssueAsyncRequest { + jql: string; +} diff --git a/src/version3/models/bulkChangeOwnerDetails.ts b/src/version3/models/bulkChangeOwnerDetails.ts new file mode 100644 index 0000000000..c64ce952eb --- /dev/null +++ b/src/version3/models/bulkChangeOwnerDetails.ts @@ -0,0 +1,7 @@ +/** Details for changing owners of shareable entities */ +export interface BulkChangeOwnerDetails { + /** Whether the name is fixed automatically if it's duplicated after changing owner. */ + autofixName: boolean; + /** The account id of the new owner. */ + newOwner: string; +} diff --git a/src/version3/models/bulkEditShareableEntity.ts b/src/version3/models/bulkEditShareableEntity.ts new file mode 100644 index 0000000000..27d95ecdd0 --- /dev/null +++ b/src/version3/models/bulkEditShareableEntity.ts @@ -0,0 +1,7 @@ +/** Details of a request to bulk edit shareable entity. */ +export interface BulkEditShareableEntity { + /** Allowed action for bulk edit shareable entity */ + action: string; + /** The mapping dashboard id to errors if any. */ + entityErrors?: any; +} diff --git a/src/version3/models/dateRangeFilter.ts b/src/version3/models/dateRangeFilter.ts new file mode 100644 index 0000000000..230c346b24 --- /dev/null +++ b/src/version3/models/dateRangeFilter.ts @@ -0,0 +1,7 @@ +/** List issues archived within a specified date range. */ +export interface DateRangeFilter { + /** List issues archived after a specified date, passed in the YYYY-MM-DD format. */ + dateAfter: string; + /** List issues archived before a specified date provided in the YYYY-MM-DD format. */ + dateBefore: string; +} diff --git a/src/version3/models/error.ts b/src/version3/models/error.ts new file mode 100644 index 0000000000..2163724641 --- /dev/null +++ b/src/version3/models/error.ts @@ -0,0 +1,5 @@ +export interface Error { + count?: number; + issueIdsOrKeys?: string[]; + message?: string; +} diff --git a/src/version3/models/errors.ts b/src/version3/models/errors.ts new file mode 100644 index 0000000000..bc20bd9dd8 --- /dev/null +++ b/src/version3/models/errors.ts @@ -0,0 +1,8 @@ +import { Error } from './error'; + +export interface Errors { + issueIsSubtask?: Error; + issuesInArchivedProjects?: Error; + issuesInUnlicensedProjects?: Error; + issuesNotFound?: Error; +} diff --git a/src/version3/models/exportArchivedIssuesTaskProgress.ts b/src/version3/models/exportArchivedIssuesTaskProgress.ts new file mode 100644 index 0000000000..08b9940c42 --- /dev/null +++ b/src/version3/models/exportArchivedIssuesTaskProgress.ts @@ -0,0 +1,9 @@ +/** The response for status request for a running/completed export task. */ +export interface ExportArchivedIssuesTaskProgress { + fileUrl?: string; + payload?: string; + progress?: number; + status?: string; + submittedTime?: string; + taskId?: string; +} diff --git a/src/version3/models/index.ts b/src/version3/models/index.ts index ef044bd429..075dbd0258 100644 --- a/src/version3/models/index.ts +++ b/src/version3/models/index.ts @@ -9,6 +9,7 @@ export * from './announcementBannerConfigurationUpdate'; export * from './application'; export * from './applicationProperty'; export * from './applicationRole'; +export * from './archiveIssueAsyncRequest'; export * from './associatedItem'; export * from './associateFieldConfigurationsWithIssueTypesRequest'; export * from './attachment'; @@ -28,9 +29,11 @@ export * from './availableDashboardGadgetsResponse'; export * from './avatar'; export * from './avatars'; export * from './avatarUrls'; +export * from './bulkChangeOwnerDetails'; export * from './bulkCreateCustomFieldOptionRequest'; export * from './bulkCustomFieldOptionCreateRequest'; export * from './bulkCustomFieldOptionUpdateRequest'; +export * from './bulkEditShareableEntity'; export * from './bulkIssueIsWatching'; export * from './bulkIssuePropertyUpdateRequest'; export * from './bulkOperationErrorResult'; @@ -112,6 +115,7 @@ export * from './dashboardGadgetResponse'; export * from './dashboardGadgetSettings'; export * from './dashboardGadgetUpdateRequest'; export * from './dashboardUser'; +export * from './dateRangeFilter'; export * from './defaultLevelValue'; export * from './defaultShareScope'; export * from './defaultWorkflow'; @@ -120,9 +124,12 @@ export * from './deprecatedWorkflow'; export * from './document'; export * from './entityProperty'; export * from './entityPropertyDetails'; +export * from './error'; export * from './errorCollection'; export * from './errorMessage'; +export * from './errors'; export * from './eventNotification'; +export * from './exportArchivedIssuesTaskProgress'; export * from './failedWebhook'; export * from './failedWebhooks'; export * from './field'; @@ -174,6 +181,8 @@ export * from './issue'; export * from './issueAdjustmentContextDetails'; export * from './issueAdjustmentDetails'; export * from './issueAdjustmentIdentifiers'; +export * from './issueArchivalSync'; +export * from './issueArchivalSyncRequest'; export * from './issueChangelogIds'; export * from './issueCommentListRequest'; export * from './issueCreateMetadata'; @@ -295,6 +304,7 @@ export * from './notificationSchemeEventDetails'; export * from './notificationSchemeEventTypeId'; export * from './notificationSchemeId'; export * from './notificationSchemeNotificationDetails'; +export * from './oldToNewSecurityLevelMappings'; export * from './operationMessage'; export * from './operations'; export * from './orderOfCustomFieldOptions'; @@ -362,6 +372,7 @@ export * from './pageWorkflowTransitionRules'; export * from './paginatedResponseComment'; export * from './parsedJqlQueries'; export * from './parsedJqlQuery'; +export * from './permissionDetails'; export * from './permissionGrant'; export * from './permissionGrants'; export * from './permissionHolder'; diff --git a/src/version3/models/issueArchivalSync.ts b/src/version3/models/issueArchivalSync.ts new file mode 100644 index 0000000000..8145c2a246 --- /dev/null +++ b/src/version3/models/issueArchivalSync.ts @@ -0,0 +1,7 @@ +import { Errors } from './errors'; + +/** Number of archived/unarchived issues and list of errors that occurred during the action, if any. */ +export interface IssueArchivalSync { + errors?: Errors; + numberOfIssuesUpdated?: number; +} diff --git a/src/version3/models/issueArchivalSyncRequest.ts b/src/version3/models/issueArchivalSyncRequest.ts new file mode 100644 index 0000000000..57ba4ab743 --- /dev/null +++ b/src/version3/models/issueArchivalSyncRequest.ts @@ -0,0 +1,4 @@ +/** List of Issue Ids Or Keys that are to be archived or unarchived */ +export interface IssueArchivalSyncRequest { + issueIdsOrKeys: string[]; +} diff --git a/src/version3/models/issueTypeCreate.ts b/src/version3/models/issueTypeCreate.ts index ab049a0a3c..23c08be3e3 100644 --- a/src/version3/models/issueTypeCreate.ts +++ b/src/version3/models/issueTypeCreate.ts @@ -6,9 +6,7 @@ export interface IssueTypeCreate { /** * @deprecated Deprecated. Use `hierarchyLevel` instead. See the [deprecation * notice](https://community.developer.atlassian.com/t/deprecation-of-the-epic-link-parent-link-and-other-related-fields-in-rest-apis-and-webhooks/54048) - * for details. - * - * Whether the issue type is `subtype` or `standard`. Defaults to `standard`. + * for details. Whether the issue type is `subtype` or `standard`. Defaults to `standard`. */ type?: string; /** diff --git a/src/version3/models/oldToNewSecurityLevelMappings.ts b/src/version3/models/oldToNewSecurityLevelMappings.ts new file mode 100644 index 0000000000..ab3d7a459a --- /dev/null +++ b/src/version3/models/oldToNewSecurityLevelMappings.ts @@ -0,0 +1,6 @@ +export interface OldToNewSecurityLevelMappings { + /** The new issue security level ID. Providing null will clear the assigned old level from issues. */ + newLevelId: string; + /** The old issue security level ID. Providing null will remap all issues without any assigned levels. */ + oldLevelId: string; +} diff --git a/src/version3/models/permissionDetails.ts b/src/version3/models/permissionDetails.ts new file mode 100644 index 0000000000..df73897699 --- /dev/null +++ b/src/version3/models/permissionDetails.ts @@ -0,0 +1,9 @@ +import { SharePermission } from './sharePermission'; + +/** Details for permissions of shareable entities */ +export interface PermissionDetails { + /** The edit permissions for the shareable entities. */ + editPermissions: SharePermission[]; + /** The share permissions for the shareable entities. */ + sharePermissions: SharePermission[]; +} diff --git a/src/version3/myself.ts b/src/version3/myself.ts index 5d89c78595..a372b9072e 100644 --- a/src/version3/myself.ts +++ b/src/version3/myself.ts @@ -199,23 +199,17 @@ export class Myself { /** * @deprecated Deprecated, use [ Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) - * from the user management REST API instead. - * - * Sets the locale of the user. The locale must be one supported by the instance of Jira. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * Permission to access Jira. + * from the user management REST API instead. Sets the locale of the user. The locale must be one supported by the + * instance of Jira. **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) + * required:** Permission to access Jira. */ async setLocale(parameters: Parameters.SetLocale | undefined, callback: Callback): Promise; /** * @deprecated Deprecated, use [ Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) - * from the user management REST API instead. - * - * Sets the locale of the user. The locale must be one supported by the instance of Jira. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * Permission to access Jira. + * from the user management REST API instead. Sets the locale of the user. The locale must be one supported by the + * instance of Jira. **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) + * required:** Permission to access Jira. */ async setLocale(parameters?: Parameters.SetLocale, callback?: never): Promise; async setLocale(parameters?: Parameters.SetLocale, callback?: Callback): Promise { @@ -233,10 +227,7 @@ export class Myself { /** * @deprecated Deprecated, use [ Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) - * from the user management REST API instead. - * - * Deletes the locale of the user, which restores the default setting. - * + * from the user management REST API instead. Deletes the locale of the user, which restores the default setting. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Permission to access Jira. */ @@ -244,10 +235,7 @@ export class Myself { /** * @deprecated Deprecated, use [ Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) - * from the user management REST API instead. - * - * Deletes the locale of the user, which restores the default setting. - * + * from the user management REST API instead. Deletes the locale of the user, which restores the default setting. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Permission to access Jira. */ diff --git a/src/version3/parameters/archiveIssues.ts b/src/version3/parameters/archiveIssues.ts new file mode 100644 index 0000000000..ffad9a1080 --- /dev/null +++ b/src/version3/parameters/archiveIssues.ts @@ -0,0 +1,3 @@ +import { IssueArchivalSyncRequest } from '../models'; + +export interface ArchiveIssues extends IssueArchivalSyncRequest {} diff --git a/src/version3/parameters/archiveIssuesAsync.ts b/src/version3/parameters/archiveIssuesAsync.ts new file mode 100644 index 0000000000..f0e873569e --- /dev/null +++ b/src/version3/parameters/archiveIssuesAsync.ts @@ -0,0 +1,3 @@ +import { ArchiveIssueAsyncRequest } from '../models'; + +export interface ArchiveIssuesAsync extends ArchiveIssueAsyncRequest {} diff --git a/src/version3/parameters/associateSchemesToProjects.ts b/src/version3/parameters/associateSchemesToProjects.ts new file mode 100644 index 0000000000..9f959b5dae --- /dev/null +++ b/src/version3/parameters/associateSchemesToProjects.ts @@ -0,0 +1,11 @@ +import { OldToNewSecurityLevelMappings } from '../models'; + +/** Issue security scheme, project, and remapping details. */ +export interface AssociateSchemesToProjects { + /** The list of scheme levels which should be remapped to new levels of the issue security scheme. */ + oldToNewSecurityLevelMappings?: OldToNewSecurityLevelMappings[]; + /** The ID of the project. */ + projectId: string; + /** The ID of the issue security scheme. Providing null will clear the association with the issue security scheme. */ + schemeId: string; +} diff --git a/src/version3/parameters/bulkEditDashboards.ts b/src/version3/parameters/bulkEditDashboards.ts new file mode 100644 index 0000000000..43116d773c --- /dev/null +++ b/src/version3/parameters/bulkEditDashboards.ts @@ -0,0 +1,13 @@ +import { BulkChangeOwnerDetails, PermissionDetails } from '../models'; + +/** Details of a request to bulk edit shareable entity. */ +export interface BulkEditDashboards { + /** Allowed action for bulk edit shareable entity */ + action: string; + changeOwnerDetails?: BulkChangeOwnerDetails; + /** The id list of shareable entities to be changed. */ + entityIds: number[]; + /** Whether the actions are executed by users with Administer Jira global permission. */ + extendAdminPermissions?: boolean; + permissionDetails?: PermissionDetails; +} diff --git a/src/version3/parameters/editIssue.ts b/src/version3/parameters/editIssue.ts index 8ffcf4593b..1be9cc59a8 100644 --- a/src/version3/parameters/editIssue.ts +++ b/src/version3/parameters/editIssue.ts @@ -21,4 +21,11 @@ export interface EditIssue extends IssueUpdateDetails { * users with _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ overrideEditableFlag?: boolean; + /** + * Whether the response should contain the issue with fields edited in this request. The returned issue will have the + * same format as in the [Get issue API](#api-rest-api-3-issue-issueidorkey-get). + */ + returnIssue?: boolean; + /** The Get issue API expand parameter to use in the response if the `returnIssue` parameter is `true`. */ + expand?: string; } diff --git a/src/version3/parameters/exportArchivedIssues.ts b/src/version3/parameters/exportArchivedIssues.ts new file mode 100644 index 0000000000..62a6f84f44 --- /dev/null +++ b/src/version3/parameters/exportArchivedIssues.ts @@ -0,0 +1,14 @@ +import { DateRangeFilter } from '../models'; + +/** Details of a filter for exporting archived issues. */ +export interface ExportArchivedIssues { + /** List archived issues archived by a specified account ID. */ + archivedBy?: string[]; + archivedDateRange?: DateRangeFilter; + /** List archived issues with a specified issue type ID. */ + issueTypes?: string[]; + /** List archived issues with a specified project key. */ + projects?: string[]; + /** List archived issues where the reporter is a specified account ID. */ + reporters?: string[]; +} diff --git a/src/version3/parameters/index.ts b/src/version3/parameters/index.ts index 65adc52cd5..122627e328 100644 --- a/src/version3/parameters/index.ts +++ b/src/version3/parameters/index.ts @@ -18,6 +18,8 @@ export * from './addWatcher'; export * from './addWorklog'; export * from './analyseExpression'; export * from './appendMappingsForIssueTypeScreenScheme'; +export * from './archiveIssues'; +export * from './archiveIssuesAsync'; export * from './archiveProject'; export * from './assignFieldConfigurationSchemeToProject'; export * from './assignIssue'; @@ -26,9 +28,11 @@ export * from './assignIssueTypeScreenSchemeToProject'; export * from './assignPermissionScheme'; export * from './assignProjectsToCustomFieldContext'; export * from './assignSchemeToProject'; +export * from './associateSchemesToProjects'; export * from './associateSchemeWithProject'; export * from './associateSchemeWithProject'; export * from './bulkDeleteIssueProperty'; +export * from './bulkEditDashboards'; export * from './bulkGetGroups'; export * from './bulkGetUsers'; export * from './bulkGetUsersMigration'; @@ -149,6 +153,7 @@ export * from './editIssue'; export * from './evaluateJiraExpression'; export * from './expandAttachmentForHumans'; export * from './expandAttachmentForMachines'; +export * from './exportArchivedIssues'; export * from './findAssignableUsers'; export * from './findBulkAssignableUsers'; export * from './findGroups'; @@ -428,6 +433,7 @@ export * from './setWorklogProperty'; export * from './storeAvatar'; export * from './toggleFeatureForProject'; export * from './trashCustomField'; +export * from './unarchiveIssues'; export * from './updateComment'; export * from './updateComponent'; export * from './updateCustomField'; diff --git a/src/version3/parameters/searchPriorities.ts b/src/version3/parameters/searchPriorities.ts index 2380e6f1be..bf52a7800a 100644 --- a/src/version3/parameters/searchPriorities.ts +++ b/src/version3/parameters/searchPriorities.ts @@ -1,10 +1,15 @@ export interface SearchPriorities { /** The index of the first item to return in a page of results (page offset). */ - startAt?: number; + startAt?: string; /** The maximum number of items to return per page. */ - maxResults?: number; + maxResults?: string; /** The list of priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=2&id=3`. */ id?: string[]; + /** + * The list of projects IDs. To include multiple IDs, provide an ampersand-separated list. For example, + * `projectid=10010&projectid=10111`. + */ + projectId?: string[]; /** Whether only the default priority is returned. */ onlyDefault?: boolean; } diff --git a/src/version3/parameters/unarchiveIssues.ts b/src/version3/parameters/unarchiveIssues.ts new file mode 100644 index 0000000000..4ed49161de --- /dev/null +++ b/src/version3/parameters/unarchiveIssues.ts @@ -0,0 +1,3 @@ +import { IssueArchivalSyncRequest } from '../models'; + +export interface UnarchiveIssues extends IssueArchivalSyncRequest {} diff --git a/src/version3/projectVersions.ts b/src/version3/projectVersions.ts index 766f1568a5..1f6b11b967 100644 --- a/src/version3/projectVersions.ts +++ b/src/version3/projectVersions.ts @@ -240,17 +240,13 @@ export class ProjectVersions { * * @deprecated Deprecated, use [ Delete and replace version](#api-rest-api-3-version-id-removeAndSwap-post) that * supports swapping version values in custom fields, in addition to the swapping for `fixVersion` and - * `affectedVersion` provided in this resource. - * - * Alternative versions can be provided to update issues that use the deleted version in `fixVersion` or - * `affectedVersion`. If alternatives are not provided, occurrences of `fixVersion` and `affectedVersion` that - * contain the deleted version are cleared. - * - * This operation can be accessed anonymously. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ - * [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the version. + * `affectedVersion` provided in this resource. Alternative versions can be provided to update issues that use the + * deleted version in `fixVersion` or `affectedVersion`. If alternatives are not provided, occurrences of + * `fixVersion` and `affectedVersion` that contain the deleted version are cleared. This operation can be accessed + * anonymously. **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) + * required:** _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer + * Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the + * version. */ async deleteVersion(parameters: Parameters.DeleteVersion, callback: Callback): Promise; /** @@ -258,17 +254,13 @@ export class ProjectVersions { * * @deprecated Deprecated, use [ Delete and replace version](#api-rest-api-3-version-id-removeAndSwap-post) that * supports swapping version values in custom fields, in addition to the swapping for `fixVersion` and - * `affectedVersion` provided in this resource. - * - * Alternative versions can be provided to update issues that use the deleted version in `fixVersion` or - * `affectedVersion`. If alternatives are not provided, occurrences of `fixVersion` and `affectedVersion` that - * contain the deleted version are cleared. - * - * This operation can be accessed anonymously. - * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ - * [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the version. + * `affectedVersion` provided in this resource. Alternative versions can be provided to update issues that use the + * deleted version in `fixVersion` or `affectedVersion`. If alternatives are not provided, occurrences of + * `fixVersion` and `affectedVersion` that contain the deleted version are cleared. This operation can be accessed + * anonymously. **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) + * required:** _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer + * Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the + * version. */ async deleteVersion(parameters: Parameters.DeleteVersion, callback?: never): Promise; async deleteVersion(parameters: Parameters.DeleteVersion, callback?: Callback): Promise { diff --git a/src/version3/projects.ts b/src/version3/projects.ts index 0cd130f8e9..b690689f46 100644 --- a/src/version3/projects.ts +++ b/src/version3/projects.ts @@ -9,10 +9,8 @@ export class Projects { /** * @deprecated Returns all projects visible to the user. Deprecated, use [ Get projects - * paginated](#api-rest-api-3-project-search-get) that supports search and pagination. - * - * This operation can be accessed anonymously. - * + * paginated](#api-rest-api-3-project-search-get) that supports search and pagination. This operation can be + * accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Projects are returned only where the user has _Browse Projects_ or _Administer projects_ [project * permission](https://confluence.atlassian.com/x/yodKLg) for the project. @@ -23,10 +21,8 @@ export class Projects { ): Promise; /** * @deprecated Returns all projects visible to the user. Deprecated, use [ Get projects - * paginated](#api-rest-api-3-project-search-get) that supports search and pagination. - * - * This operation can be accessed anonymously. - * + * paginated](#api-rest-api-3-project-search-get) that supports search and pagination. This operation can be + * accessed anonymously. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * Projects are returned only where the user has _Browse Projects_ or _Administer projects_ [project * permission](https://confluence.atlassian.com/x/yodKLg) for the project. @@ -511,7 +507,6 @@ export class Projects { * to a different template or type](https://confluence.atlassian.com/x/yEKeOQ). Updates a [project * type](https://confluence.atlassian.com/x/GwiiLQ). The project type can be updated for classic projects only, * project type cannot be updated for next-gen projects. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -524,7 +519,6 @@ export class Projects { * to a different template or type](https://confluence.atlassian.com/x/yEKeOQ). Updates a [project * type](https://confluence.atlassian.com/x/GwiiLQ). The project type can be updated for classic projects only, * project type cannot be updated for next-gen projects. - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ diff --git a/src/version3/workflowSchemeProjectAssociations.ts b/src/version3/workflowSchemeProjectAssociations.ts index 4efb5d4c3f..d365b67591 100644 --- a/src/version3/workflowSchemeProjectAssociations.ts +++ b/src/version3/workflowSchemeProjectAssociations.ts @@ -54,10 +54,7 @@ export class WorkflowSchemeProjectAssociations { /** * @deprecated Use 'assignSchemeToProject' Assigns a workflow scheme to a project. This operation is performed only - * when there are no issues in the project. - * - * Workflow schemes can only be assigned to classic projects. - * + * when there are no issues in the project. Workflow schemes can only be assigned to classic projects. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -67,10 +64,7 @@ export class WorkflowSchemeProjectAssociations { ): Promise; /** * @deprecated Use 'assignSchemeToProject' Assigns a workflow scheme to a project. This operation is performed only - * when there are no issues in the project. - * - * Workflow schemes can only be assigned to classic projects. - * + * when there are no issues in the project. Workflow schemes can only be assigned to classic projects. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ diff --git a/src/version3/workflows.ts b/src/version3/workflows.ts index 4f9ee943b1..c84b16218f 100644 --- a/src/version3/workflows.ts +++ b/src/version3/workflows.ts @@ -10,11 +10,8 @@ export class Workflows { /** * @deprecated Returns all workflows in Jira or a workflow. Deprecated, use [Get workflows - * paginated](#api-rest-api-3-workflow-search-get). - * - * If the `workflowName` parameter is specified, the workflow is returned as an object (not in an array). Otherwise, - * an array of workflow objects is returned. - * + * paginated](#api-rest-api-3-workflow-search-get). If the `workflowName` parameter is specified, the workflow is + * returned as an object (not in an array). Otherwise, an array of workflow objects is returned. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -24,11 +21,8 @@ export class Workflows { ): Promise; /** * @deprecated Returns all workflows in Jira or a workflow. Deprecated, use [Get workflows - * paginated](#api-rest-api-3-workflow-search-get). - * - * If the `workflowName` parameter is specified, the workflow is returned as an object (not in an array). Otherwise, - * an array of workflow objects is returned. - * + * paginated](#api-rest-api-3-workflow-search-get). If the `workflowName` parameter is specified, the workflow is + * returned as an object (not in an array). Otherwise, an array of workflow objects is returned. * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ diff --git a/tests/unit/version2/issues.test.ts b/tests/unit/version2/issues.test.ts index 847bdeb5d6..cdd4d4eb4c 100644 --- a/tests/unit/version2/issues.test.ts +++ b/tests/unit/version2/issues.test.ts @@ -61,9 +61,11 @@ test('editIssue should accept follow parameters', t => { t.is(callArgument.url, '/rest/api/2/issue/issueId'); t.deepEqual(callArgument.params, { + expand: undefined, notifyUsers: false, overrideEditableFlag: undefined, overrideScreenSecurity: undefined, + returnIssue: undefined, }); t.deepEqual(callArgument.data, { fields: { description: 'desc' }, diff --git a/tests/unit/version3/issues.test.ts b/tests/unit/version3/issues.test.ts index c11aec8e48..ffb9341faa 100644 --- a/tests/unit/version3/issues.test.ts +++ b/tests/unit/version3/issues.test.ts @@ -91,9 +91,11 @@ test('editIssue should accept follow parameters', t => { t.is(callArgument.url, '/rest/api/3/issue/issueId'); t.deepEqual(callArgument.params, { + expand: undefined, notifyUsers: false, overrideEditableFlag: undefined, overrideScreenSecurity: undefined, + returnIssue: undefined, }); t.deepEqual(callArgument.data, { fields: {