diff --git a/CHANGELOG.md b/CHANGELOG.md index be4c358cc0..337733412e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Jira.js changelog +### 2.1.1 + +- Typings improved +- Fixed [bug](https://github.com/MrRefactoring/jira.js/issues/117) with typings in createIssue + ### 2.1.0 - Typings improved diff --git a/package-lock.json b/package-lock.json index 427884e7d8..38c6b21549 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "jira.js", - "version": "2.1.0", + "version": "2.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -863,9 +863,9 @@ } }, "@types/jest": { - "version": "26.0.22", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.22.tgz", - "integrity": "sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw==", + "version": "26.0.23", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.23.tgz", + "integrity": "sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA==", "dev": true, "requires": { "jest-diff": "^26.0.0", @@ -891,9 +891,9 @@ "dev": true }, "@types/node": { - "version": "14.14.41", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz", - "integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.1.tgz", + "integrity": "sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA==", "dev": true }, "@types/normalize-package-data": { @@ -1727,7 +1727,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1919,7 +1918,6 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, "requires": { "once": "^1.4.0" } @@ -2034,9 +2032,9 @@ } }, "eslint": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", - "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.25.0.tgz", + "integrity": "sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -2360,7 +2358,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, "requires": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -2665,9 +2662,9 @@ "dev": true }, "follow-redirects": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", - "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.0.tgz", + "integrity": "sha512-0vRwd7RKQBTt+mgu87mtYeofLFZpTas2S9zY+jIeuLJMNvudIgF52nr19q40HOwH5RrhWIPuj9puybzSJiRrVg==" }, "for-in": { "version": "1.0.2", @@ -2770,7 +2767,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, "requires": { "pump": "^3.0.0" } @@ -2994,8 +2990,7 @@ "human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" }, "iconv-lite": { "version": "0.4.24", @@ -3092,15 +3087,6 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } - }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -3212,12 +3198,6 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", - "dev": true - }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -3245,8 +3225,7 @@ "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" }, "is-string": { "version": "1.0.5", @@ -3294,8 +3273,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", @@ -4092,6 +4070,11 @@ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true }, + "macos-release": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz", + "integrity": "sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg==" + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -4140,16 +4123,15 @@ } }, "marked": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.1.tgz", - "integrity": "sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.3.tgz", + "integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==", "dev": true }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "merge2": { "version": "1.4.1", @@ -4183,8 +4165,7 @@ "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "minimatch": { "version": "3.0.4", @@ -4305,6 +4286,14 @@ "which": "^2.0.2" } }, + "nodejs-user-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/nodejs-user-agent/-/nodejs-user-agent-1.0.0.tgz", + "integrity": "sha512-iGPmWl3Ijce2sHEHacdX/qxg/C2v90GzhiH9ZE/IBkQAXYAWrrUdfbX/RepHfvxMAxHd/ydWg455pRMzWtVd7w==", + "requires": { + "os-name": "^4.0.0" + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -4335,7 +4324,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, "requires": { "path-key": "^3.0.0" } @@ -4495,7 +4483,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } @@ -4504,7 +4491,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "requires": { "mimic-fn": "^2.1.0" } @@ -4549,6 +4535,15 @@ "word-wrap": "^1.2.3" } }, + "os-name": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/os-name/-/os-name-4.0.0.tgz", + "integrity": "sha512-caABzDdJMbtykt7GmSogEat3faTKQhmZf0BS5l/pZGmP0vPWQjXWqOhbLyK+b6j2/DQPmEvYdzLXJXXLJNVDNg==", + "requires": { + "macos-release": "^2.2.0", + "windows-release": "^4.0.0" + } + }, "p-each-series": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", @@ -4630,8 +4625,7 @@ "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" }, "path-parse": { "version": "1.0.6", @@ -4791,7 +4785,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -5442,7 +5435,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "requires": { "shebang-regex": "^3.0.0" } @@ -5450,8 +5442,7 @@ "shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" }, "shelljs": { "version": "0.8.4", @@ -5484,8 +5475,7 @@ "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, "sinon": { "version": "10.0.0", @@ -5951,8 +5941,7 @@ "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" }, "strip-json-comments": { "version": "3.1.1", @@ -5986,26 +5975,24 @@ "dev": true }, "table": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz", - "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.6.0.tgz", + "integrity": "sha512-iZMtp5tUvcnAdtHpZTWLPF0M7AgiQsURR2DwmxnJwSy8I3+cY+ozzVvYha3BOLG2TB+L0CqjIz+91htuj6yCXg==", "dev": true, "requires": { "ajv": "^8.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", "lodash.clonedeep": "^4.5.0", "lodash.flatten": "^4.4.0", "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" }, "dependencies": { "ajv": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.1.0.tgz", - "integrity": "sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.2.0.tgz", + "integrity": "sha512-WSNGFuyWd//XO8n/m/EaOlNLtO0yL8EXT/74LqT4khdhpZjP7lkj/kT5uwRmGitKEVp/Oj7ZUHeGfPtgHhQ5CA==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -6023,11 +6010,12 @@ } }, "telemetry.jira.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/telemetry.jira.js/-/telemetry.jira.js-1.0.0.tgz", - "integrity": "sha512-bpT5Al83gfSymYoXI20gKba6jedxeiCO7IcTobEdQZJALWhHSE0ofbl7edj+6i7UEp1hZcHFANcadrKTRS/TKg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/telemetry.jira.js/-/telemetry.jira.js-1.0.1.tgz", + "integrity": "sha512-5Xq6k5CUOelOb5RwHkkjQYVO0a6JbgLtr78MQ0CmxUlQEJNLdH4pCGrMX9XE+VX2jHThfCtLiqDdIa5/ETphww==", "requires": { - "node-fetch": "^2.6.1" + "node-fetch": "^2.6.1", + "nodejs-user-agent": "^1.0.0" } }, "terminal-link": { @@ -6244,9 +6232,9 @@ } }, "typedoc": { - "version": "0.20.35", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.35.tgz", - "integrity": "sha512-7sNca19LXg2hgyGHq3b33tQ1YFApmd8aBDEzWQ2ry4VDkw/NdFWkysGiGRY1QckDCB0gVH8+MlXA4K71IB3azg==", + "version": "0.20.36", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.36.tgz", + "integrity": "sha512-qFU+DWMV/hifQ9ZAlTjdFO9wbUIHuUBpNXzv68ZyURAP9pInjZiO4+jCPeAzHVcaBCHER9WL/+YzzTt6ZlN/Nw==", "dev": true, "requires": { "colors": "^1.4.0", @@ -6254,12 +6242,12 @@ "handlebars": "^4.7.7", "lodash": "^4.17.21", "lunr": "^2.3.9", - "marked": "^2.0.1", + "marked": "^2.0.3", "minimatch": "^3.0.0", "progress": "^2.0.3", "shelljs": "^0.8.4", "shiki": "^0.9.3", - "typedoc-default-themes": "^0.12.9" + "typedoc-default-themes": "^0.12.10" }, "dependencies": { "lodash": { @@ -6283,9 +6271,9 @@ "dev": true }, "uglify-js": { - "version": "3.13.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.3.tgz", - "integrity": "sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==", + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", + "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", "dev": true, "optional": true }, @@ -6504,7 +6492,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -6515,6 +6502,14 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "windows-release": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-4.0.0.tgz", + "integrity": "sha512-OxmV4wzDKB1x7AZaZgXMVsdJ1qER1ed83ZrTYd5Bwq2HfJVg3DJS8nqlAG4sMoJ7mu8cuRmLEYyU13BKwctRAg==", + "requires": { + "execa": "^4.0.2" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -6541,8 +6536,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { "version": "3.0.3", diff --git a/package.json b/package.json index b06b07938e..ce3eb8c757 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jira.js", - "version": "2.1.0", + "version": "2.1.1", "description": "jira.js is a powerful Node.JS/Browser module that allows you to interact with the Jira API very easily", "main": "out/index.js", "types": "out/index.d.ts", @@ -42,21 +42,21 @@ }, "devDependencies": { "@types/express": "4.17.11", - "@types/jest": "^26.0.22", - "@types/node": "^14.14.41", + "@types/jest": "^26.0.23", + "@types/node": "^15.0.1", "@types/oauth": "^0.9.1", "@types/sinon": "^10.0.0", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", "dotenv": "^8.2.0", - "eslint": "^7.24.0", + "eslint": "^7.25.0", "eslint-config-airbnb-typescript": "^12.3.1", "eslint-import-resolver-typescript": "^2.4.0", "eslint-plugin-import": "^2.22.1", "jest": "^26.6.3", "sinon": "^10.0.0", "ts-jest": "^26.5.5", - "typedoc": "^0.20.35", + "typedoc": "^0.20.36", "typescript": "^4.2.4" }, "dependencies": { diff --git a/src/agile/board.ts b/src/agile/board.ts index 3740dc9d12..93019abe6b 100644 --- a/src/agile/board.ts +++ b/src/agile/board.ts @@ -664,12 +664,12 @@ export class Board { /** * Returns all sprints from a board, for a given board ID. This only includes sprints that the user has permission to view. */ - async getAllSprints(parameters: Parameters.GetAllSprints, callback: Callback): Promise; + async getAllSprints>(parameters: Parameters.GetAllSprints, callback: Callback): Promise; /** * Returns all sprints from a board, for a given board ID. This only includes sprints that the user has permission to view. */ - async getAllSprints(parameters: Parameters.GetAllSprints, callback?: never): Promise; - async getAllSprints(parameters: Parameters.GetAllSprints, callback?: Callback): Promise { + async getAllSprints>(parameters: Parameters.GetAllSprints, callback?: never): Promise; + async getAllSprints>(parameters: Parameters.GetAllSprints, callback?: Callback): Promise { const config = { url: `/agile/1.0/board/${parameters.boardId}/sprint`, method: 'GET', @@ -717,14 +717,14 @@ export class Board { * Note, if the user does not have permission to view the board, no versions will be returned at all. * Returned versions are ordered by the name of the project from which they belong and then by sequence defined by user. */ - async getAllVersions(parameters: Parameters.GetAllVersions, callback: Callback): Promise; + async getAllVersions>(parameters: Parameters.GetAllVersions, callback: Callback): Promise; /** * Returns all versions from a board, for a given board ID. This only includes versions that the user has permission to view. * Note, if the user does not have permission to view the board, no versions will be returned at all. * Returned versions are ordered by the name of the project from which they belong and then by sequence defined by user. */ - async getAllVersions(parameters: Parameters.GetAllVersions, callback?: never): Promise; - async getAllVersions(parameters: Parameters.GetAllVersions, callback?: Callback): Promise { + async getAllVersions>(parameters: Parameters.GetAllVersions, callback?: never): Promise; + async getAllVersions>(parameters: Parameters.GetAllVersions, callback?: Callback): Promise { const config = { url: `/agile/1.0/board/${parameters.boardId}/version`, method: 'GET', diff --git a/src/agile/deployments.ts b/src/agile/deployments.ts index 4a5971bd4b..ba24f20394 100644 --- a/src/agile/deployments.ts +++ b/src/agile/deployments.ts @@ -5,7 +5,8 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Deployments { - constructor(private client: Client) { } + constructor(private client: Client) { + } /** * Update / insert deployment data. diff --git a/src/agile/developmentInformation.ts b/src/agile/developmentInformation.ts index 78d48d0d6d..cba3426c91 100644 --- a/src/agile/developmentInformation.ts +++ b/src/agile/developmentInformation.ts @@ -5,12 +5,14 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class DevelopmentInformation { - constructor(private client: Client) { } + constructor(private client: Client) { + } + /** - * Stores development information provided in the request to make it available when viewing issues in Jira. Existing repository and entity data for the same ID will be replaced if the updateSequenceId of existing data is less than the incoming data. Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are available within a short period of time, but may take some time during peak load and/or maintenance times. */ + * Stores development information provided in the request to make it available when viewing issues in Jira. Existing repository and entity data for the same ID will be replaced if the updateSequenceId of existing data is less than the incoming data. Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are available within a short period of time, but may take some time during peak load and/or maintenance times. */ async storeDevelopmentInformation(parameters: Parameters.StoreDevelopmentInformation, callback: Callback): Promise; /** - * Stores development information provided in the request to make it available when viewing issues in Jira. Existing repository and entity data for the same ID will be replaced if the updateSequenceId of existing data is less than the incoming data. Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are available within a short period of time, but may take some time during peak load and/or maintenance times. */ + * Stores development information provided in the request to make it available when viewing issues in Jira. Existing repository and entity data for the same ID will be replaced if the updateSequenceId of existing data is less than the incoming data. Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are available within a short period of time, but may take some time during peak load and/or maintenance times. */ async storeDevelopmentInformation(parameters: Parameters.StoreDevelopmentInformation, callback?: never): Promise; async storeDevelopmentInformation(parameters: Parameters.StoreDevelopmentInformation, callback?: Callback): Promise { const config = { @@ -26,11 +28,12 @@ export class DevelopmentInformation { return this.client.sendRequest(config, callback, { methodName: 'storeDevelopmentInformation' }); } + /** - * For the specified repository ID, retrieves the repository and the most recent 400 development information entities. The result will be what is currently stored, ignoring any pending updates or deletes. */ + * For the specified repository ID, retrieves the repository and the most recent 400 development information entities. The result will be what is currently stored, ignoring any pending updates or deletes. */ async getRepository(parameters: Parameters.GetRepository, callback: Callback): Promise; /** - * For the specified repository ID, retrieves the repository and the most recent 400 development information entities. The result will be what is currently stored, ignoring any pending updates or deletes. */ + * For the specified repository ID, retrieves the repository and the most recent 400 development information entities. The result will be what is currently stored, ignoring any pending updates or deletes. */ async getRepository(parameters: Parameters.GetRepository, callback?: never): Promise; async getRepository(parameters: Parameters.GetRepository, callback?: Callback): Promise { const config = { @@ -40,11 +43,12 @@ export class DevelopmentInformation { return this.client.sendRequest(config, callback, { methodName: 'getRepository' }); } + /** - * Deletes the repository data stored by the given ID and all related development information entities. Deletion is performed asynchronously. */ + * Deletes the repository data stored by the given ID and all related development information entities. Deletion is performed asynchronously. */ async deleteRepository(parameters: Parameters.DeleteRepository, callback: Callback): Promise; /** - * Deletes the repository data stored by the given ID and all related development information entities. Deletion is performed asynchronously. */ + * Deletes the repository data stored by the given ID and all related development information entities. Deletion is performed asynchronously. */ async deleteRepository(parameters: Parameters.DeleteRepository, callback?: never): Promise; async deleteRepository(parameters: Parameters.DeleteRepository, callback?: Callback): Promise { const config = { @@ -57,11 +61,12 @@ export class DevelopmentInformation { return this.client.sendRequest(config, callback, { methodName: 'deleteRepository' }); } + /** - * Deletes development information entities which have all the provided properties. Entities will be deleted that match ALL of the properties (i.e. treated as an AND). For example if request is `DELETE bulk?accountId=123&projectId=ABC` entities which have properties `accountId=123` and `projectId=ABC` will be deleted. Special property `_updateSequenceId` can be used to delete all entities with updateSequenceId less or equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be supplied to specify properties to delete by. Deletion is performed asynchronously: specified entities will eventually be removed from Jira. */ + * Deletes development information entities which have all the provided properties. Entities will be deleted that match ALL of the properties (i.e. treated as an AND). For example if request is `DELETE bulk?accountId=123&projectId=ABC` entities which have properties `accountId=123` and `projectId=ABC` will be deleted. Special property `_updateSequenceId` can be used to delete all entities with updateSequenceId less or equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be supplied to specify properties to delete by. Deletion is performed asynchronously: specified entities will eventually be removed from Jira. */ async deleteByProperties(parameters: Parameters.DeleteByProperties, callback: Callback): Promise; /** - * Deletes development information entities which have all the provided properties. Entities will be deleted that match ALL of the properties (i.e. treated as an AND). For example if request is `DELETE bulk?accountId=123&projectId=ABC` entities which have properties `accountId=123` and `projectId=ABC` will be deleted. Special property `_updateSequenceId` can be used to delete all entities with updateSequenceId less or equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be supplied to specify properties to delete by. Deletion is performed asynchronously: specified entities will eventually be removed from Jira. */ + * Deletes development information entities which have all the provided properties. Entities will be deleted that match ALL of the properties (i.e. treated as an AND). For example if request is `DELETE bulk?accountId=123&projectId=ABC` entities which have properties `accountId=123` and `projectId=ABC` will be deleted. Special property `_updateSequenceId` can be used to delete all entities with updateSequenceId less or equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be supplied to specify properties to delete by. Deletion is performed asynchronously: specified entities will eventually be removed from Jira. */ async deleteByProperties(parameters: Parameters.DeleteByProperties, callback?: never): Promise; async deleteByProperties(parameters: Parameters.DeleteByProperties, callback?: Callback): Promise { const config = { @@ -74,11 +79,12 @@ export class DevelopmentInformation { return this.client.sendRequest(config, callback, { methodName: 'deleteByProperties' }); } + /** - * Checks if development information which have all the provided properties exists. For example, if request is `GET existsByProperties?accountId=123&projectId=ABC` then result will be positive only if there is at least one entity or repository with both properties `accountId=123` and `projectId=ABC`. Special property `_updateSequenceId` can be used to filter all entities with updateSequenceId less or equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be supplied to specify properties to search by. */ + * Checks if development information which have all the provided properties exists. For example, if request is `GET existsByProperties?accountId=123&projectId=ABC` then result will be positive only if there is at least one entity or repository with both properties `accountId=123` and `projectId=ABC`. Special property `_updateSequenceId` can be used to filter all entities with updateSequenceId less or equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be supplied to specify properties to search by. */ async existsByProperties(parameters: Parameters.ExistsByProperties, callback: Callback): Promise; /** - * Checks if development information which have all the provided properties exists. For example, if request is `GET existsByProperties?accountId=123&projectId=ABC` then result will be positive only if there is at least one entity or repository with both properties `accountId=123` and `projectId=ABC`. Special property `_updateSequenceId` can be used to filter all entities with updateSequenceId less or equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be supplied to specify properties to search by. */ + * Checks if development information which have all the provided properties exists. For example, if request is `GET existsByProperties?accountId=123&projectId=ABC` then result will be positive only if there is at least one entity or repository with both properties `accountId=123` and `projectId=ABC`. Special property `_updateSequenceId` can be used to filter all entities with updateSequenceId less or equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be supplied to specify properties to search by. */ async existsByProperties(parameters: Parameters.ExistsByProperties, callback?: never): Promise; async existsByProperties(parameters: Parameters.ExistsByProperties, callback?: Callback): Promise { const config = { @@ -91,11 +97,12 @@ export class DevelopmentInformation { return this.client.sendRequest(config, callback, { methodName: 'existsByProperties' }); } + /** - * Deletes particular development information entity. Deletion is performed asynchronously. */ + * Deletes particular development information entity. Deletion is performed asynchronously. */ async deleteEntity(parameters: Parameters.DeleteEntity, callback: Callback): Promise; /** - * Deletes particular development information entity. Deletion is performed asynchronously. */ + * Deletes particular development information entity. Deletion is performed asynchronously. */ async deleteEntity(parameters: Parameters.DeleteEntity, callback?: never): Promise; async deleteEntity(parameters: Parameters.DeleteEntity, callback?: Callback): Promise { const config = { diff --git a/src/agile/epic.ts b/src/agile/epic.ts index e1f2ce8b41..b4fbe1228e 100644 --- a/src/agile/epic.ts +++ b/src/agile/epic.ts @@ -5,7 +5,8 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Epic { - constructor(private client: Client) { } + constructor(private client: Client) { + } /** * Returns all issues that do not belong to any epic. diff --git a/src/agile/featureFlags.ts b/src/agile/featureFlags.ts index c6a0fada1b..09460f9deb 100644 --- a/src/agile/featureFlags.ts +++ b/src/agile/featureFlags.ts @@ -5,7 +5,8 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class FeatureFlags { - constructor(private client: Client) { } + constructor(private client: Client) { + } /** * Update / insert Feature Flag data. diff --git a/src/agile/issue.ts b/src/agile/issue.ts index 873fab2df2..7e3ef500ab 100644 --- a/src/agile/issue.ts +++ b/src/agile/issue.ts @@ -5,7 +5,8 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Issue { - constructor(private client: Client) { } + constructor(private client: Client) { + } /** * Moves (ranks) issues before or after a given issue. At most 50 issues may be ranked at once. diff --git a/src/agile/models/getBuildByKey.ts b/src/agile/models/getBuildByKey.ts index fd6025df29..27c006a5c5 100644 --- a/src/agile/models/getBuildByKey.ts +++ b/src/agile/models/getBuildByKey.ts @@ -1,118 +1,118 @@ /** * Data related to a single build - * */ + */ export interface GetBuildByKey { /** The schema version used for this data. - Placeholder to support potential schema changes in the future. - */ + Placeholder to support potential schema changes in the future. + */ schemaVersion?: string; /** An ID that relates a sequence of builds. Depending on your use case this might be a project ID, pipeline ID, - plan key etc. - whatever logical unit you use to group a sequence of builds. + plan key etc. - whatever logical unit you use to group a sequence of builds. - The combination of `pipelineId` and `buildNumber` must uniquely identify a build you have provided. - */ + The combination of `pipelineId` and `buildNumber` must uniquely identify a build you have provided. + */ pipelineId: string; /** Identifies a build within the sequence of builds identified by the build `pipelineId`. - Used to identify the 'most recent' build in that sequence of builds. + Used to identify the 'most recent' build in that sequence of builds. - The combination of `pipelineId` and `buildNumber` must uniquely identify a build you have provided. - */ + The combination of `pipelineId` and `buildNumber` must uniquely identify a build you have provided. + */ buildNumber: number; /** A number used to apply an order to the updates to the build, as identified by `pipelineId` and `buildNumber`, - in the case of out-of-order receipt of update requests. + in the case of out-of-order receipt of update requests. - It must be a monotonically increasing number. For example, epoch time could be one way to generate the - `updateSequenceNumber`. + It must be a monotonically increasing number. For example, epoch time could be one way to generate the + `updateSequenceNumber`. - Updates for a build that is received with an `updateSqeuenceNumber` less than or equal to what is currently - stored will be ignored. - */ + Updates for a build that is received with an `updateSqeuenceNumber` less than or equal to what is currently + stored will be ignored. + */ updateSequenceNumber: number; /** The human-readable name for the build. - Will be shown in the UI. - */ + Will be shown in the UI. + */ displayName: string; /** An optional description to attach to this build. - This may be anything that makes sense in your system. - */ + This may be anything that makes sense in your system. + */ description?: string; /** A human-readable string that to provide information about the build. - */ + */ label?: string; /** The URL to this build in your system. - */ + */ url: string; /** The state of a build. - * `pending` - The build is queued, or some manual action is required. - * `in_progress` - The build is currently running. - * `successful` - The build completed successfully. - * `failed` - The build failed. - * `cancelled` - The build has been cancelled or stopped. - * `unknown` - The build is in an unknown state. - */ + * `pending` - The build is queued, or some manual action is required. + * `in_progress` - The build is currently running. + * `successful` - The build completed successfully. + * `failed` - The build failed. + * `cancelled` - The build has been cancelled or stopped. + * `unknown` - The build is in an unknown state. + */ state: string; /** The last-updated timestamp to present to the user as a summary of the state of the build. - */ + */ lastUpdated: string; /** The Jira issue keys to associate the build information with. - You are free to associate issue keys in any way you like. However, we recommend that you use the name - of the branch the build was executed on, and extract issue keys from that name using a simple regex. This has - the advantage that it provides an intuitive association of builds to issue keys. - */ + You are free to associate issue keys in any way you like. However, we recommend that you use the name + of the branch the build was executed on, and extract issue keys from that name using a simple regex. This has + the advantage that it provides an intuitive association of builds to issue keys. + */ issueKeys: string[]; /** Information about tests that were executed during a build. - */ + */ testInfo?: { /** The total number of tests considered during a build. - */ + */ totalNumber: number; /** The number of tests that passed during a build. - */ + */ numberPassed: number; /** The number of tests that failed during a build. - */ + */ numberFailed: number; /** The number of tests that were skipped during a build. - */ + */ numberSkipped?: number; }; /** Optional information that links a build to a commit, branch etc. - */ + */ references?: { /** Details about the commit the build was run against. - */ + */ commit?: { /** The ID of the commit. E.g. for a Git repository this would be the SHA1 hash. - */ + */ id: string; /** An identifier for the repository containing the commit. - In most cases this should be the URL of the repository in the SCM provider. + In most cases this should be the URL of the repository in the SCM provider. - For cases where the build was executed against a local repository etc. this should be some identifier that is - unique to that repository. - */ + For cases where the build was executed against a local repository etc. this should be some identifier that is + unique to that repository. + */ repositoryUri: string; }; /** Details about the ref the build was run on. - */ + */ ref?: { /** The name of the ref the build ran on - */ + */ name: string; /** An identifer for the ref. - In most cases this should be the URL of the tag/branch etc. in the SCM provider. + In most cases this should be the URL of the tag/branch etc. in the SCM provider. - For cases where the build was executed against a local repository etc. this should be something that uniquely - identifies the ref. - */ + For cases where the build was executed against a local repository etc. this should be something that uniquely + identifies the ref. + */ uri: string; }; }[]; diff --git a/src/agile/models/getDeploymentByKey.ts b/src/agile/models/getDeploymentByKey.ts index 71933eb584..4546184653 100644 --- a/src/agile/models/getDeploymentByKey.ts +++ b/src/agile/models/getDeploymentByKey.ts @@ -4,50 +4,50 @@ * */ export interface GetDeploymentByKey { /** This is the identifier for the deployment. It must be unique for the specified pipeline and environment. It must be a monotonically increasing number, as this is used to sequence the deployments. - */ + */ deploymentSequenceNumber: number; /** A number used to apply an order to the updates to the deployment, as identified by the deploymentSequenceNumber, in the case of out-of-order receipt of update requests. It must be a monotonically increasing number. For example, epoch time could be one way to generate the updateSequenceNumber. - */ + */ updateSequenceNumber: number; /** Deprecated. The Jira issue keys to associate the Deployment information with. - Should replace this field with the "associations" field to associate Deployment information with issueKeys or other types of associations. - */ + Should replace this field with the "associations" field to associate Deployment information with issueKeys or other types of associations. + */ issueKeys?: string[]; /** The entities to associate the Deployment information with. - */ + */ associations?: any[]; /** The human-readable name for the deployment. Will be shown in the UI. - */ + */ displayName: string; /** A URL users can use to link to this deployment, in this environment. - */ + */ url: string; /** A short description of the deployment - */ + */ description: string; /** The last-updated timestamp to present to the user as a summary of the state of the deployment. - */ + */ lastUpdated: string; /** An (optional) additional label that may be displayed with deployment information. Can be used to display version information etc. for the deployment. - */ + */ label?: string; /** The state of the deployment - */ + */ state: string; /** This object models the Continuous Delivery (CD) Pipeline concept, an automated process (usually comprised of multiple stages) - for getting software from version control right through to the production environment. - */ + for getting software from version control right through to the production environment. + */ pipeline: any; /** The environment that the deployment is present in. - */ + */ environment: any; /** A list of commands to be actioned for this Deployment - */ + */ commands?: any[]; /** The DeploymentData schema version used for this deployment data. - Placeholder to support potential schema changes in the future. - */ + Placeholder to support potential schema changes in the future. + */ schemaVersion?: string; } diff --git a/src/agile/models/getDeploymentGatingStatusByKey.ts b/src/agile/models/getDeploymentGatingStatusByKey.ts index 557749f984..d2ce1ad4e2 100644 --- a/src/agile/models/getDeploymentGatingStatusByKey.ts +++ b/src/agile/models/getDeploymentGatingStatusByKey.ts @@ -3,19 +3,19 @@ * */ export interface GetDeploymentGatingStatusByKey { /** This is the identifier for the Deployment. - */ + */ deploymentSequenceNumber?: number; /** The ID of the Deployment's pipeline. - */ + */ pipelineId?: string; /** The ID of the Deployment's environment. - */ + */ environmentId?: string; /** Time the deployment gating status was updated. - */ + */ updatedTimestamp?: string; /** The gating status - */ + */ gatingStatus?: string; details?: any[]; } diff --git a/src/agile/models/getFeatureFlagById.ts b/src/agile/models/getFeatureFlagById.ts index bc6206a8aa..6541ee5f0c 100644 --- a/src/agile/models/getFeatureFlagById.ts +++ b/src/agile/models/getFeatureFlagById.ts @@ -4,42 +4,42 @@ export interface GetFeatureFlagById { /** The FeatureFlagData schema version used for this flag data. - Placeholder to support potential schema changes in the future. - */ + Placeholder to support potential schema changes in the future. + */ schemaVersion?: string; /** The identifier for the Feature Flag. Must be unique for a given Provider. - */ + */ id: string; /** The identifier that users would use to reference the Feature Flag in their source code etc. - Will be made available via the UI for users to copy into their source code etc. - */ + Will be made available via the UI for users to copy into their source code etc. + */ key: string; /** An ID used to apply an ordering to updates for this Feature Flag in the case of out-of-order receipt of update requests. - This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Feature Flag and increment that on each update to Jira). + This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Feature Flag and increment that on each update to Jira). - Updates for a Feature Flag that are received with an updateSqeuenceId lower than what is currently stored will be ignored. - */ + Updates for a Feature Flag that are received with an updateSqeuenceId lower than what is currently stored will be ignored. + */ updateSequenceId: number; /** The human-readable name for the Feature Flag. Will be shown in the UI. - If not provided, will use the ID for display. - */ + If not provided, will use the ID for display. + */ displayName?: string; /** The Jira issue keys to associate the Feature Flag information with. - */ + */ issueKeys: string[]; /** Summary information for a single Feature Flag. - Providers may elect to provide information from a specific environment, or they may choose to 'roll up' information from across multiple environments - whatever makes most sense in the Provider system. + Providers may elect to provide information from a specific environment, or they may choose to 'roll up' information from across multiple environments - whatever makes most sense in the Provider system. - This is the summary information that will be presented to the user on e.g. the Jira issue screen. - */ + This is the summary information that will be presented to the user on e.g. the Jira issue screen. + */ summary: string; /** Detail information for this Feature Flag. - This may be information for each environment the Feature Flag is defined in or a selection of environments made by the user, as appropriate. - */ + This may be information for each environment the Feature Flag is defined in or a selection of environments made by the user, as appropriate. + */ details: string[]; } diff --git a/src/agile/models/getRemoteLinkById.ts b/src/agile/models/getRemoteLinkById.ts index 2543a5d044..4e837d6bad 100644 --- a/src/agile/models/getRemoteLinkById.ts +++ b/src/agile/models/getRemoteLinkById.ts @@ -4,67 +4,67 @@ export interface GetRemoteLinkById { /** The schema version used for this data. - Placeholder to support potential schema changes in the future. - */ + Placeholder to support potential schema changes in the future. + */ schemaVersion?: string; /** The identifier for the Remote Link. Must be unique for a given Provider. - */ + */ id: string; /** An ID used to apply an ordering to updates for this Remote Link in the case of out-of-order receipt of - update requests. + update requests. - It must be a monotonically increasing number. For example, epoch time could be one way to generate the - `updateSequenceNumber`. + It must be a monotonically increasing number. For example, epoch time could be one way to generate the + `updateSequenceNumber`. - Updates for a Remote Link that is received with an `updateSqeuenceNumber` less than or equal to what is currently - stored will be ignored. - */ + Updates for a Remote Link that is received with an `updateSqeuenceNumber` less than or equal to what is currently + stored will be ignored. + */ updateSequenceNumber: number; /** The human-readable name for the Remote Link. - Will be shown in the UI. - */ + Will be shown in the UI. + */ displayName: string; /** The URL to this Remote Link in your system. - */ + */ url: string; /** The type of the Remote Link. The current supported types are 'document', 'alert', 'test', - 'security', 'logFile', 'prototype', 'coverage', 'bugReport' and 'other' - */ + 'security', 'logFile', 'prototype', 'coverage', 'bugReport' and 'other' + */ type: string; /** An optional description to attach to this Remote Link. - This may be anything that makes sense in your system. - */ + This may be anything that makes sense in your system. + */ description?: string; /** The last-updated timestamp to present to the user as a summary of when Remote Link was last updated. - */ + */ lastUpdated: string; /** The entities to associate the Remote Link information with. - */ + */ associations?: any[]; /** The status of a Remote Link. - */ + */ status?: { /** Appearance is a fixed set of appearance types affecting the colour - of the status lozenge in the UI. The colours they correspond to are - equivalent to atlaskit's [Lozenge](https://atlaskit.atlassian.com/packages/core/lozenge) component. - */ + of the status lozenge in the UI. The colours they correspond to are + equivalent to atlaskit's [Lozenge](https://atlaskit.atlassian.com/packages/core/lozenge) component. + */ appearance: string; /** The human-readable description for the Remote Link status. - Will be shown in the UI. - */ + Will be shown in the UI. + */ label: string; }; /** Optional list of actionIds. They are associated with the actions the provider is able to provide when they - registered. Indicates which actions this Remote Link has. + registered. Indicates which actions this Remote Link has. - If any actions have a templateUrl that requires string substitution, then `attributeMap` must be passed in. - */ + If any actions have a templateUrl that requires string substitution, then `attributeMap` must be passed in. + */ actionIds?: string[]; /** Map of key/values (string to string mapping). This is used to build the urls for actions from the - templateUrl the provider registered their available actions with. - */ + templateUrl the provider registered their available actions with. + */ attributeMap?: {}; } diff --git a/src/agile/models/index.ts b/src/agile/models/index.ts index 793bfb44ff..596f6d8c18 100644 --- a/src/agile/models/index.ts +++ b/src/agile/models/index.ts @@ -80,3 +80,4 @@ export * from './subqueryBean'; export * from './toggleFeatures'; export * from './userAvatarUrls'; export * from './userJsonBean'; +export * from './version'; diff --git a/src/agile/models/submitBuilds.ts b/src/agile/models/submitBuilds.ts index c172ad8ec0..76496c05b7 100644 --- a/src/agile/models/submitBuilds.ts +++ b/src/agile/models/submitBuilds.ts @@ -3,50 +3,50 @@ * */ export interface SubmitBuilds { /** The keys of builds that have been accepted for submission. A build key is a composite key that consists of - `pipelineId` and `buildNumber`. + `pipelineId` and `buildNumber`. - A build may be rejected if it was only associated with unknown issue keys, or if the submitted data for that - build does not match the required schema. + A build may be rejected if it was only associated with unknown issue keys, or if the submitted data for that + build does not match the required schema. - Note that a build that isn't updated due to it's `updateSequenceNumber` being out of order is not - considered a failed submission. - */ + Note that a build that isn't updated due to it's `updateSequenceNumber` being out of order is not + considered a failed submission. + */ acceptedBuilds?: { /** An ID that relates a sequence of builds. Depending on your system this might be a project ID, pipeline ID, - plan key etc. - whatever logical unit you use to group a sequence of builds. + plan key etc. - whatever logical unit you use to group a sequence of builds. - The combination of `pipelineId` and `buildNumber` must uniquely identify the build. - */ + The combination of `pipelineId` and `buildNumber` must uniquely identify the build. + */ pipelineId: string; /** Identifies a build within the sequence of builds identified by the build `pipelineId`. - Used to identify the 'most recent' build in that sequence of builds. + Used to identify the 'most recent' build in that sequence of builds. - The combination of `pipelineId` and `buildNumber` must uniquely identify the build. - */ + The combination of `pipelineId` and `buildNumber` must uniquely identify the build. + */ buildNumber: number; }[]; /** Details of builds that have not been accepted for submission. - A build may be rejected if it was only associated with unknown issue keys, or if the submitted data for the - build does not match the required schema. - */ + A build may be rejected if it was only associated with unknown issue keys, or if the submitted data for the + build does not match the required schema. + */ rejectedBuilds?: { /** Fields that uniquely reference a build. - */ + */ key: { /** An ID that relates a sequence of builds. Depending on your system this might be a project ID, pipeline ID, - plan key etc. - whatever logical unit you use to group a sequence of builds. + plan key etc. - whatever logical unit you use to group a sequence of builds. - The combination of `pipelineId` and `buildNumber` must uniquely identify the build. - */ + The combination of `pipelineId` and `buildNumber` must uniquely identify the build. + */ pipelineId: string; /** Identifies a build within the sequence of builds identified by the build `pipelineId`. - Used to identify the 'most recent' build in that sequence of builds. + Used to identify the 'most recent' build in that sequence of builds. - The combination of `pipelineId` and `buildNumber` must uniquely identify the build. - */ + The combination of `pipelineId` and `buildNumber` must uniquely identify the build. + */ buildNumber: number; }; /** The error messages for the rejected build */ @@ -59,11 +59,11 @@ export interface SubmitBuilds { }[]; /** Issue keys that are not known on this Jira instance (if any). - These may be invalid keys (e.g. `UTF-8` is sometimes incorrectly identified as a Jira issue key), or they - may be for projects that no longer exist. + These may be invalid keys (e.g. `UTF-8` is sometimes incorrectly identified as a Jira issue key), or they + may be for projects that no longer exist. - If a build has been associated with issue keys other than those in this array it will still be stored against - those valid keys. If a build was only associated with issue keys deemed to be invalid it won't be persisted. - */ + If a build has been associated with issue keys other than those in this array it will still be stored against + those valid keys. If a build was only associated with issue keys deemed to be invalid it won't be persisted. + */ unknownIssueKeys?: string[]; } diff --git a/src/agile/models/submitDeployments.ts b/src/agile/models/submitDeployments.ts index ace1bf2cb5..763673dc3d 100644 --- a/src/agile/models/submitDeployments.ts +++ b/src/agile/models/submitDeployments.ts @@ -4,22 +4,22 @@ export interface SubmitDeployments { /** The keys of deployments that have been accepted for submission. A deployment key is a composite key that consists of `pipelineId`, `environmentId` and `deploymentSequenceNumber`. - A deployment may be rejected if it was only associated with unknown issue keys. + A deployment may be rejected if it was only associated with unknown issue keys. - Note that a deployment that isn't updated due to it's updateSequenceNumber being out of order is not considered a failed submission. - */ + Note that a deployment that isn't updated due to it's updateSequenceNumber being out of order is not considered a failed submission. + */ acceptedDeployments?: any[]; /** Details of deployments that have not been accepted for submission, usually due to a problem with the request data. - The object will contain the deployment key and any errors associated with that deployment that have prevented it being submitted. - */ + The object will contain the deployment key and any errors associated with that deployment that have prevented it being submitted. + */ rejectedDeployments?: any[]; /** Issue keys that are not known on this Jira instance (if any). - These may be invalid keys (e.g. `UTF-8` is sometimes incorrectly identified as a Jira issue key), or they may be for projects that no longer exist. + These may be invalid keys (e.g. `UTF-8` is sometimes incorrectly identified as a Jira issue key), or they may be for projects that no longer exist. - If a deployment has been associated with issue keys other than those in this array it will still be stored against those valid keys. - If a deployment was only associated with issue keys deemed to be invalid it won't be persisted. - */ + If a deployment has been associated with issue keys other than those in this array it will still be stored against those valid keys. + If a deployment was only associated with issue keys deemed to be invalid it won't be persisted. + */ unknownIssueKeys?: string[]; } diff --git a/src/agile/models/submitFeatureFlags.ts b/src/agile/models/submitFeatureFlags.ts index a1a84a1afb..3772afbf17 100644 --- a/src/agile/models/submitFeatureFlags.ts +++ b/src/agile/models/submitFeatureFlags.ts @@ -4,22 +4,22 @@ export interface SubmitFeatureFlags { /** The IDs of Feature Flags that have been accepted for submission. - A Feature Flag may be rejected if it was only associated with unknown issue keys. + A Feature Flag may be rejected if it was only associated with unknown issue keys. - Note that a Feature Flag that isn't updated due to it's updateSequenceId being out of order is not considered a failed submission. - */ + Note that a Feature Flag that isn't updated due to it's updateSequenceId being out of order is not considered a failed submission. + */ acceptedFeatureFlags?: string[]; /** Details of Feature Flags that have not been accepted for submission, usually due to a problem with the request data. - The object (if present) will be keyed by Feature Flag ID and include any errors associated with that Feature Flag that have prevented it being submitted. - */ + The object (if present) will be keyed by Feature Flag ID and include any errors associated with that Feature Flag that have prevented it being submitted. + */ failedFeatureFlags?: {}; /** Issue keys that are not known on this Jira instance (if any). - These may be invalid keys (e.g. `UTF-8` is sometimes incorrectly identified as a Jira issue key), or they may be for projects that no longer exist. + These may be invalid keys (e.g. `UTF-8` is sometimes incorrectly identified as a Jira issue key), or they may be for projects that no longer exist. - If a Feature Flag has been associated with issue keys other than those in this array it will still be stored against those valid keys. - If a Feature Flag was only associated with issue keys deemed to be invalid it won't be persisted. - */ + If a Feature Flag has been associated with issue keys other than those in this array it will still be stored against those valid keys. + If a Feature Flag was only associated with issue keys deemed to be invalid it won't be persisted. + */ unknownIssueKeys?: string[]; } diff --git a/src/agile/models/submitRemoteLinks.ts b/src/agile/models/submitRemoteLinks.ts index edfdcdc914..f2f86edcbf 100644 --- a/src/agile/models/submitRemoteLinks.ts +++ b/src/agile/models/submitRemoteLinks.ts @@ -4,23 +4,23 @@ export interface SubmitRemoteLinks { /** The IDs of Remote Links that have been accepted for submission. - A Remote Link may be rejected if it was only associated with unknown issue keys, unknown service IDs, or if - the submitted data for that Remote Link does not match the required schema. + A Remote Link may be rejected if it was only associated with unknown issue keys, unknown service IDs, or if + the submitted data for that Remote Link does not match the required schema. - Note that a Remote Link that isn't updated due to it's `updateSequenceNumber` being out of order is not - considered a failed submission. - */ + Note that a Remote Link that isn't updated due to it's `updateSequenceNumber` being out of order is not + considered a failed submission. + */ acceptedRemoteLinks?: string[]; /** Details of Remote Links that have not been accepted for submission, usually due to a problem with the request data. - A Remote Link may be rejected if it was only associated with unknown issue keys, unknown service IDs, or - if the submitted data for the Remote Link does not match the required schema. + A Remote Link may be rejected if it was only associated with unknown issue keys, unknown service IDs, or + if the submitted data for the Remote Link does not match the required schema. - The object (if present) will be keyed by Remote Link ID and include any errors associated with that - Remote Link that have prevented it being submitted. - */ + The object (if present) will be keyed by Remote Link ID and include any errors associated with that + Remote Link that have prevented it being submitted. + */ rejectedRemoteLinks?: {}; /** Issue keys or services IDs or keys that are not known on this Jira instance (if any). - */ + */ unknownAssociations?: string[]; } diff --git a/src/agile/models/version.ts b/src/agile/models/version.ts new file mode 100644 index 0000000000..b2795b7c02 --- /dev/null +++ b/src/agile/models/version.ts @@ -0,0 +1,23 @@ +/** + * Details about a project version. + */ +export interface Version { + /** The URL of the version. */ + self?: string; + /** The ID of the version. */ + id?: string; + /** The description of the version. Optional when creating or updating a version. */ + description?: string; + /** The unique name of the version. Required when creating a version. Optional when updating a version. The maximum length is 255 characters. */ + name?: string; + /** Indicates that the version is archived. Optional when creating or updating a version. */ + archived?: boolean; + /** Indicates that the version is released. If the version is released a request to release again is ignored. Not applicable when creating a version. Optional when updating a version. */ + released?: boolean; + /** The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a version. */ + startDate?: string; + /** The release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a version. */ + releaseDate?: string; + /** The ID of the project to which this version is attached. Required when creating a version. Not applicable when updating a version. */ + projectId?: number; +} diff --git a/src/agile/parameters/getBoardIssuesForSprint.ts b/src/agile/parameters/getBoardIssuesForSprint.ts index 263461f45e..1964c9ca7f 100644 --- a/src/agile/parameters/getBoardIssuesForSprint.ts +++ b/src/agile/parameters/getBoardIssuesForSprint.ts @@ -7,10 +7,13 @@ export interface GetBoardIssuesForSprint { startAt?: number; /** The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; - /** Filters results using a JQL query. If you define an order in your JQL query, - it will override the default order of the returned issues.
- Note that username and userkey can't be used as search terms for - this parameter due to privacy reasons. Use accountId instead. */ + /** + * Filters results using a JQL query. If you define an order in your JQL query, + * it will override the default order of the returned issues. + * + * Note that username and userkey can't be used as search terms for + * this parameter due to privacy reasons. Use accountId instead. + */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; diff --git a/src/agile/parameters/getBuildByKey.ts b/src/agile/parameters/getBuildByKey.ts index 3320d716d8..942958ed03 100644 --- a/src/agile/parameters/getBuildByKey.ts +++ b/src/agile/parameters/getBuildByKey.ts @@ -1,8 +1,8 @@ export interface GetBuildByKey { /** The `pipelineId` of the build. - */ + */ pipelineId: string; /** The `buildNumber` of the build. - */ + */ buildNumber: number; } diff --git a/src/agile/parameters/getDeploymentByKey.ts b/src/agile/parameters/getDeploymentByKey.ts index 2b60eda2b8..a971396e7f 100644 --- a/src/agile/parameters/getDeploymentByKey.ts +++ b/src/agile/parameters/getDeploymentByKey.ts @@ -1,11 +1,11 @@ export interface GetDeploymentByKey { /** The ID of the deployment's pipeline. - */ + */ pipelineId: string; /** The ID of the deployment's environment. - */ + */ environmentId: string; /** The deployment's deploymentSequenceNumber. - */ + */ deploymentSequenceNumber: number; } diff --git a/src/agile/parameters/getDeploymentGatingStatusByKey.ts b/src/agile/parameters/getDeploymentGatingStatusByKey.ts index 99560f623c..3bd2dac5dc 100644 --- a/src/agile/parameters/getDeploymentGatingStatusByKey.ts +++ b/src/agile/parameters/getDeploymentGatingStatusByKey.ts @@ -1,11 +1,11 @@ export interface GetDeploymentGatingStatusByKey { /** The ID of the Deployment's pipeline. - */ + */ pipelineId: string; /** The ID of the Deployment's environment. - */ + */ environmentId: string; /** The Deployment's deploymentSequenceNumber. - */ + */ deploymentSequenceNumber: number; } diff --git a/src/agile/parameters/getFeatureFlagById.ts b/src/agile/parameters/getFeatureFlagById.ts index d18d27c27a..17c2063991 100644 --- a/src/agile/parameters/getFeatureFlagById.ts +++ b/src/agile/parameters/getFeatureFlagById.ts @@ -1,5 +1,5 @@ export interface GetFeatureFlagById { /** The ID of the Feature Flag to fetch. - */ + */ featureFlagId: string; } diff --git a/src/agile/parameters/getIssuesForBacklog.ts b/src/agile/parameters/getIssuesForBacklog.ts index c5f88f878d..ad9a11be44 100644 --- a/src/agile/parameters/getIssuesForBacklog.ts +++ b/src/agile/parameters/getIssuesForBacklog.ts @@ -6,9 +6,9 @@ export interface GetIssuesForBacklog { /** The maximum number of issues to return per page. Default: 50. See the 'Pagination' section at the top of this page for more details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** Filters results using a JQL query. If you define an order in your JQL query, - it will override the default order of the returned issues.
- Note that username and userkey can't be used as search terms for - this parameter due to privacy reasons. Use accountId instead. */ + it will override the default order of the returned issues.
+ Note that username and userkey can't be used as search terms for + this parameter due to privacy reasons. Use accountId instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; diff --git a/src/agile/parameters/getIssuesForBoard.ts b/src/agile/parameters/getIssuesForBoard.ts index 2203f31672..b6fc9e4cf8 100644 --- a/src/agile/parameters/getIssuesForBoard.ts +++ b/src/agile/parameters/getIssuesForBoard.ts @@ -6,9 +6,9 @@ export interface GetIssuesForBoard { /** The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** Filters results using a JQL query. If you define an order in your JQL query, - it will override the default order of the returned issues.
- Note that username and userkey can't be used as search terms for - this parameter due to privacy reasons. Use accountId instead. */ + it will override the default order of the returned issues.
+ Note that username and userkey can't be used as search terms for + this parameter due to privacy reasons. Use accountId instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; diff --git a/src/agile/parameters/getIssuesForEpic.ts b/src/agile/parameters/getIssuesForEpic.ts index 25ce925bad..9bd5e0826d 100644 --- a/src/agile/parameters/getIssuesForEpic.ts +++ b/src/agile/parameters/getIssuesForEpic.ts @@ -6,9 +6,9 @@ export interface GetIssuesForEpic { /** The maximum number of issues to return per page. Default: 50. See the 'Pagination' section at the top of this page for more details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** Filters results using a JQL query. If you define an order in your JQL query, - it will override the default order of the returned issues.
- Note that username and userkey can't be used as search terms for - this parameter due to privacy reasons. Use accountId instead. */ + it will override the default order of the returned issues.
+ Note that username and userkey can't be used as search terms for + this parameter due to privacy reasons. Use accountId instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; diff --git a/src/agile/parameters/getIssuesForSprint.ts b/src/agile/parameters/getIssuesForSprint.ts index f6735a93e5..e7db6337e3 100644 --- a/src/agile/parameters/getIssuesForSprint.ts +++ b/src/agile/parameters/getIssuesForSprint.ts @@ -6,9 +6,9 @@ export interface GetIssuesForSprint { /** The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** Filters results using a JQL query. If you define an order in your JQL query, - it will override the default order of the returned issues.
- Note that username and userkey can't be used as search terms for - this parameter due to privacy reasons. Use accountId instead. */ + it will override the default order of the returned issues.
+ Note that username and userkey can't be used as search terms for + this parameter due to privacy reasons. Use accountId instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; diff --git a/src/agile/parameters/getIssuesWithoutEpicForBoard.ts b/src/agile/parameters/getIssuesWithoutEpicForBoard.ts index b33e0783ba..4b0affd0fb 100644 --- a/src/agile/parameters/getIssuesWithoutEpicForBoard.ts +++ b/src/agile/parameters/getIssuesWithoutEpicForBoard.ts @@ -6,9 +6,9 @@ export interface GetIssuesWithoutEpicForBoard { /** The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** Filters results using a JQL query. If you define an order in your JQL query, - it will override the default order of the returned issues.
- Note that username and userkey can't be used as search terms for - this parameter due to privacy reasons. Use accountId instead. */ + it will override the default order of the returned issues.
+ Note that username and userkey can't be used as search terms for + this parameter due to privacy reasons. Use accountId instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; diff --git a/src/agile/parameters/getRemoteLinkById.ts b/src/agile/parameters/getRemoteLinkById.ts index a0e6b3d1d2..7dad0c38dc 100644 --- a/src/agile/parameters/getRemoteLinkById.ts +++ b/src/agile/parameters/getRemoteLinkById.ts @@ -1,5 +1,5 @@ export interface GetRemoteLinkById { /** The ID of the Remote Link to fetch. - */ + */ remoteLinkId: string; } diff --git a/src/agile/parameters/submitBuilds.ts b/src/agile/parameters/submitBuilds.ts index 860a7b73f7..6791bf6b19 100644 --- a/src/agile/parameters/submitBuilds.ts +++ b/src/agile/parameters/submitBuilds.ts @@ -1,27 +1,27 @@ export interface SubmitBuilds { /** Properties assigned to build data that can then be used for delete / query operations. - Examples might be an account or user ID that can then be used to clean up data if an account is removed from - the Provider system. + Examples might be an account or user ID that can then be used to clean up data if an account is removed from + the Provider system. - Note that these properties will never be returned with build data. They are not intended for use as - metadata to associate with a build. Internally they are stored as a hash so that personal information etc. - is never stored within Jira. + Note that these properties will never be returned with build data. They are not intended for use as + metadata to associate with a build. Internally they are stored as a hash so that personal information etc. + is never stored within Jira. - Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not - contain ':' or start with '_'. - */ + Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not + contain ':' or start with '_'. + */ properties?: {}; /** A list of builds to submit to Jira. - Each build may be associated with one or more Jira issue keys, and will be associated with any properties - included in this request. - */ + Each build may be associated with one or more Jira issue keys, and will be associated with any properties + included in this request. + */ builds?: any[]; /** Information about the provider. This is useful for auditing, logging, debugging, - and other internal uses. It is not considered private information. Hence, it may not contain personally - identifiable information. - */ + and other internal uses. It is not considered private information. Hence, it may not contain personally + identifiable information. + */ providerMetadata?: { /** An optional name of the source of the builds data. */ product?: string; diff --git a/src/agile/parameters/submitDeployments.ts b/src/agile/parameters/submitDeployments.ts index c8aed53f96..8ba01d334c 100644 --- a/src/agile/parameters/submitDeployments.ts +++ b/src/agile/parameters/submitDeployments.ts @@ -1,20 +1,20 @@ export interface SubmitDeployments { /** Properties assigned to deployment data that can then be used for delete / query operations. - Examples might be an account or user ID that can then be used to clean up data if an account is removed from the Provider system. + Examples might be an account or user ID that can then be used to clean up data if an account is removed from the Provider system. - Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' or start with '_'. - */ + Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' or start with '_'. + */ properties?: {}; /** A list of deployments to submit to Jira. - Each deployment may be associated with one or more Jira issue keys, and will be associated with any properties included in this request. - */ + Each deployment may be associated with one or more Jira issue keys, and will be associated with any properties included in this request. + */ deployments?: any[]; /** Information about the provider. This is useful for auditing, logging, debugging, - and other internal uses. It is not considered private information. Hence, it may not contain personally - identifiable information. - */ + and other internal uses. It is not considered private information. Hence, it may not contain personally + identifiable information. + */ providerMetadata?: { /** An optional name of the source of the deployments data. */ product?: string; diff --git a/src/agile/parameters/submitFeatureFlags.ts b/src/agile/parameters/submitFeatureFlags.ts index e15319596d..eea6f90629 100644 --- a/src/agile/parameters/submitFeatureFlags.ts +++ b/src/agile/parameters/submitFeatureFlags.ts @@ -1,22 +1,22 @@ export interface SubmitFeatureFlags { /** Properties assigned to Feature Flag data that can then be used for delete / query operations. - Examples might be an account or user ID that can then be used to clean up data if an account is removed from the Provider system. + Examples might be an account or user ID that can then be used to clean up data if an account is removed from the Provider system. - Note that these properties will never be returned with Feature Flag data. They are not intended for use as metadata to associate with a Feature Flag. Internally they are stored as a hash so that personal information etc. is never stored within Jira. + Note that these properties will never be returned with Feature Flag data. They are not intended for use as metadata to associate with a Feature Flag. Internally they are stored as a hash so that personal information etc. is never stored within Jira. - Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not contain ':' or start with '_'. - */ + Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not contain ':' or start with '_'. + */ properties?: {}; /** A list of Feature Flags to submit to Jira. - Each Feature Flag may be associated with 1 or more Jira issue keys, and will be associated with any properties included in this request. - */ + Each Feature Flag may be associated with 1 or more Jira issue keys, and will be associated with any properties included in this request. + */ flags?: any[]; /** Information about the provider. This is useful for auditing, logging, debugging, - and other internal uses. It is not considered private information. Hence, it may not contain personally - identifiable information. - */ + and other internal uses. It is not considered private information. Hence, it may not contain personally + identifiable information. + */ providerMetadata?: { /** An optional name of the source of the feature flags. */ product?: string; diff --git a/src/agile/parameters/submitRemoteLinks.ts b/src/agile/parameters/submitRemoteLinks.ts index ba8cf5c244..a440bdd06a 100644 --- a/src/agile/parameters/submitRemoteLinks.ts +++ b/src/agile/parameters/submitRemoteLinks.ts @@ -1,22 +1,22 @@ export interface SubmitRemoteLinks { /** Properties assigned to Remote Link data that can then be used for delete / query operations. - Examples might be an account or user ID that can then be used to clean up data if an account is removed from - the Provider system. + Examples might be an account or user ID that can then be used to clean up data if an account is removed from + the Provider system. - Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not - contain ':' or start with '_'. - */ + Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not + contain ':' or start with '_'. + */ properties?: {}; /** A list of Remote Links to submit to Jira. - Each Remote Link may be associated with one or more Jira issue keys, and will be associated with any properties - included in this request. - */ + Each Remote Link may be associated with one or more Jira issue keys, and will be associated with any properties + included in this request. + */ remoteLinks?: string[]; /** Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is - not considered private information. Hence, it may not contain personally identifiable information. - */ + not considered private information. Hence, it may not contain personally identifiable information. + */ providerMetadata?: { /** An optional name of the source of the Remote Links data. */ product?: string; diff --git a/src/agile/remoteLinks.ts b/src/agile/remoteLinks.ts index 712ad34067..22a781fa37 100644 --- a/src/agile/remoteLinks.ts +++ b/src/agile/remoteLinks.ts @@ -5,7 +5,8 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class RemoteLinks { - constructor(private client: Client) { } + constructor(private client: Client) { + } /** * Update / insert Remote Link data. diff --git a/src/agile/sprint.ts b/src/agile/sprint.ts index e5d4b1f338..802c6e10eb 100644 --- a/src/agile/sprint.ts +++ b/src/agile/sprint.ts @@ -5,7 +5,8 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Sprint { - constructor(private client: Client) { } + constructor(private client: Client) { + } /** * Creates a future sprint. Sprint name and origin board id are required. Start date, end date, and goal are optional. diff --git a/src/clients/baseClient.ts b/src/clients/baseClient.ts index 67d66918e8..61ab04d9c9 100644 --- a/src/clients/baseClient.ts +++ b/src/clients/baseClient.ts @@ -84,8 +84,8 @@ export class BaseClient implements Client { bodyExists: !!requestConfig.data, callbackUsed: !!callback, headersExists: !!requestConfig.headers, - libVersion: '2.0.6', - libVersionHash: '001a249da602f82e2d14784bf74be8fa', + libVersion: '2.1.1', + libVersionHash: '7f5651ef9b1fb1869c90bff552f60ecf', methodName: telemetryData?.methodName || 'sendRequest', onErrorMiddlewareUsed: !!this.config.middlewares?.onError, onResponseMiddlewareUsed: !!this.config.middlewares?.onResponse, @@ -94,7 +94,6 @@ export class BaseClient implements Client { requestStartTime: startDateTime, requestStatusCode: 0, strict_GDPR_enabled: !!this.config.strictGDPR, - // @ts-ignore noCheckAtlassianToken: !!this.config.noCheckAtlassianToken, ...telemetryData, }; diff --git a/src/version2/applicationRoles.ts b/src/version2/applicationRoles.ts index dc531bfb6d..c14202ac19 100644 --- a/src/version2/applicationRoles.ts +++ b/src/version2/applicationRoles.ts @@ -12,13 +12,13 @@ export class ApplicationRoles { * Returns all application roles. In Jira, application roles are managed using the [Application access configuration](https://confluence.atlassian.com/x/3YxjL) page. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllApplicationRoles(callback: Callback): Promise; + async getAllApplicationRoles(callback: Callback): Promise; /** * Returns all application roles. In Jira, application roles are managed using the [Application access configuration](https://confluence.atlassian.com/x/3YxjL) page. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllApplicationRoles(callback?: never): Promise; - async getAllApplicationRoles(callback?: Callback): Promise { + async getAllApplicationRoles(callback?: never): Promise; + async getAllApplicationRoles(callback?: Callback): Promise { const config = { url: '/rest/api/2/applicationrole', method: 'GET', diff --git a/src/version2/dashboards.ts b/src/version2/dashboards.ts index fb7887e105..682d35d160 100644 --- a/src/version2/dashboards.ts +++ b/src/version2/dashboards.ts @@ -198,6 +198,7 @@ export class Dashboards { const config = { url: `/rest/api/2/dashboard/${parameters.dashboardId}/items/${parameters.itemId}/properties/${parameters.propertyKey}`, method: 'PUT', + data: parameters.body, } as RequestConfig; return this.client.sendRequest(config, callback, { methodName: 'setDashboardItemProperty' }); diff --git a/src/version2/filterSharing.ts b/src/version2/filterSharing.ts index 37564f0381..a9d0f41c22 100644 --- a/src/version2/filterSharing.ts +++ b/src/version2/filterSharing.ts @@ -61,7 +61,7 @@ export class FilterSharing { * * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * * filters shared with a public project. * * filters shared with the public. */ - async getSharePermissions(parameters: Parameters.GetSharePermissions, callback: Callback): Promise; + async getSharePermissions(parameters: Parameters.GetSharePermissions, callback: Callback): Promise; /** * Returns the share permissions for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. * @@ -74,8 +74,8 @@ export class FilterSharing { * * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * * filters shared with a public project. * * filters shared with the public. */ - async getSharePermissions(parameters: Parameters.GetSharePermissions, callback?: never): Promise; - async getSharePermissions(parameters: Parameters.GetSharePermissions, callback?: Callback): Promise { + async getSharePermissions(parameters: Parameters.GetSharePermissions, callback?: never): Promise; + async getSharePermissions(parameters: Parameters.GetSharePermissions, callback?: Callback): Promise { const config = { url: `/rest/api/2/filter/${parameters.id}/permission`, method: 'GET', @@ -90,15 +90,15 @@ export class FilterSharing { * Be aware that this operation uses different objects for updating share permissions compared to [Update filter](#api-rest-api-2-filter-id-put). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Share dashboards and filters* [global permission](https://confluence.atlassian.com/x/x4dKLg) and the user must own the filter. */ - async addSharePermission(parameters: Parameters.AddSharePermission, callback: Callback): Promise; + async addSharePermission(parameters: Parameters.AddSharePermission, callback: Callback): Promise; /** * Add a share permissions to a filter. If you add a global share permission (one for all logged-in users or the public) it will overwrite all share permissions for the filter. * * Be aware that this operation uses different objects for updating share permissions compared to [Update filter](#api-rest-api-2-filter-id-put). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Share dashboards and filters* [global permission](https://confluence.atlassian.com/x/x4dKLg) and the user must own the filter. */ - async addSharePermission(parameters: Parameters.AddSharePermission, callback?: never): Promise; - async addSharePermission(parameters: Parameters.AddSharePermission, callback?: Callback): Promise { + async addSharePermission(parameters: Parameters.AddSharePermission, callback?: never): Promise; + async addSharePermission(parameters: Parameters.AddSharePermission, callback?: Callback): Promise { const config = { url: `/rest/api/2/filter/${parameters.id}/permission`, method: 'POST', diff --git a/src/version2/filters.ts b/src/version2/filters.ts index ee8a212cd6..fe50b70931 100644 --- a/src/version2/filters.ts +++ b/src/version2/filters.ts @@ -9,6 +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. @@ -20,8 +21,9 @@ export class Filters { * * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * * filters shared with a public project. * * filters shared with the public. */ - async getFilters(parameters: Parameters.GetFilters | undefined, callback: Callback): Promise; + async getFilters(parameters: Parameters.GetFilters | undefined, callback: Callback): 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. @@ -33,8 +35,8 @@ export class Filters { * * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * * filters shared with a public project. * * filters shared with the public. */ - async getFilters(parameters?: Parameters.GetFilters, callback?: never): Promise; - async getFilters(parameters?: Parameters.GetFilters, callback?: Callback): Promise { + async getFilters(parameters?: Parameters.GetFilters, callback?: never): Promise; + async getFilters(parameters?: Parameters.GetFilters, callback?: Callback): Promise { const config = { url: '/rest/api/2/filter', method: 'GET', @@ -97,7 +99,7 @@ export class Filters { * * shared with the public. * * For example, if the user favorites a public filter that is subsequently made private that filter is not returned by this operation. */ - async getFavouriteFilters(parameters: Parameters.GetFavouriteFilters | undefined, callback: Callback): Promise; + async getFavouriteFilters(parameters: Parameters.GetFavouriteFilters | undefined, callback: Callback): Promise; /** * Returns the visible favorite filters of the user. * @@ -112,8 +114,8 @@ export class Filters { * * shared with the public. * * For example, if the user favorites a public filter that is subsequently made private that filter is not returned by this operation. */ - async getFavouriteFilters(parameters?: Parameters.GetFavouriteFilters, callback?: never): Promise; - async getFavouriteFilters(parameters?: Parameters.GetFavouriteFilters, callback?: Callback): Promise { + async getFavouriteFilters(parameters?: Parameters.GetFavouriteFilters, callback?: never): Promise; + async getFavouriteFilters(parameters?: Parameters.GetFavouriteFilters, callback?: Callback): Promise { const config = { url: '/rest/api/2/filter/favourite', method: 'GET', @@ -137,7 +139,7 @@ export class Filters { * * shared with the public. * * For example, if the user favorites a public filter that is subsequently made private that filter is not returned by this operation. */ - async getMyFilters(parameters: Parameters.GetMyFilters | undefined, callback: Callback): Promise; + async getMyFilters(parameters: Parameters.GetMyFilters | undefined, callback: Callback): Promise; /** * Returns the filters owned by the user. If `includeFavourites` is `true`, the user's visible favorite filters are also returned. * @@ -150,8 +152,8 @@ export class Filters { * * shared with the public. * * For example, if the user favorites a public filter that is subsequently made private that filter is not returned by this operation. */ - async getMyFilters(parameters?: Parameters.GetMyFilters, callback?: never): Promise; - async getMyFilters(parameters?: Parameters.GetMyFilters, callback?: Callback): Promise { + async getMyFilters(parameters?: Parameters.GetMyFilters, callback?: never): Promise; + async getMyFilters(parameters?: Parameters.GetMyFilters, callback?: Callback): Promise { const config = { url: '/rest/api/2/filter/my', method: 'GET', @@ -315,7 +317,7 @@ export class Filters { * * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * * filters shared with a public project. * * filters shared with the public. */ - async getColumns(parameters: Parameters.GetColumns, callback: Callback): Promise; + async getColumns(parameters: Parameters.GetColumns, callback: Callback): Promise; /** * Returns the columns configured for a filter. The column configuration is used when the filter's results are viewed in *List View* with the *Columns* set to *Filter*. * @@ -328,8 +330,8 @@ export class Filters { * * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * * filters shared with a public project. * * filters shared with the public. */ - async getColumns(parameters: Parameters.GetColumns, callback?: never): Promise; - async getColumns(parameters: Parameters.GetColumns, callback?: Callback): Promise { + async getColumns(parameters: Parameters.GetColumns, callback?: never): Promise; + async getColumns(parameters: Parameters.GetColumns, callback?: Callback): Promise { const config = { url: `/rest/api/2/filter/${parameters.id}/columns`, method: 'GET', diff --git a/src/version2/groups.ts b/src/version2/groups.ts index 519c8bfe00..e0c9eb11cb 100644 --- a/src/version2/groups.ts +++ b/src/version2/groups.ts @@ -9,14 +9,14 @@ export class Groups { } /** - * This operation is deprecated, use [`group/member`](#api-rest-api-2-group-member-get). + * @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). */ async getGroup(parameters: Parameters.GetGroup, callback: Callback): Promise; /** - * This operation is deprecated, use [`group/member`](#api-rest-api-2-group-member-get). + * @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. * @@ -49,9 +49,7 @@ export class Groups { const config = { url: '/rest/api/2/group', method: 'POST', - data: { - name: parameters?.name, - }, + data: parameters, } as RequestConfig; return this.client.sendRequest(config, callback, { methodName: 'createGroup' }); @@ -61,13 +59,13 @@ export class Groups { * Deletes a group. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)). */ - async removeGroup(parameters: Parameters.RemoveGroup, callback: Callback): Promise; + async removeGroup(parameters: Parameters.RemoveGroup, callback: Callback): Promise; /** * Deletes a group. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)). */ - async removeGroup(parameters: Parameters.RemoveGroup, callback?: never): Promise; - async removeGroup(parameters: Parameters.RemoveGroup, callback?: Callback): Promise { + async removeGroup(parameters: Parameters.RemoveGroup, callback?: never): Promise; + async removeGroup(parameters: Parameters.RemoveGroup, callback?: Callback): Promise { const config = { url: '/rest/api/2/group', method: 'DELETE', diff --git a/src/version2/issueFields.ts b/src/version2/issueFields.ts index 075a177844..3883ab5e42 100644 --- a/src/version2/issueFields.ts +++ b/src/version2/issueFields.ts @@ -19,7 +19,7 @@ export class IssueFields { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getFields(callback: Callback): Promise; + async getFields(callback: Callback): Promise; /** * Returns system and custom issue fields according to the following rules: * @@ -31,8 +31,8 @@ export class IssueFields { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getFields(callback?: never): Promise; - async getFields(callback?: Callback): Promise { + async getFields(callback?: never): Promise; + async getFields(callback?: Callback): Promise { const config = { url: '/rest/api/2/field', method: 'GET', diff --git a/src/version2/issueLinks.ts b/src/version2/issueLinks.ts index 3bf7a62ab2..f7e02bb419 100644 --- a/src/version2/issueLinks.ts +++ b/src/version2/issueLinks.ts @@ -23,7 +23,7 @@ export class IssueLinks { * * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) on the project containing the from (outward) issue, * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. */ - async linkIssues(parameters: Parameters.LinkIssues | undefined, callback: Callback): Promise; + async linkIssues(parameters: Parameters.LinkIssues | undefined, callback: Callback): Promise; /** * Creates a link between two issues. Use this operation to indicate a relationship between two issues and optionally add a comment to the from (outward) issue. To use this resource the site must have [Issue Linking](https://confluence.atlassian.com/x/yoXKM) enabled. * @@ -39,8 +39,8 @@ export class IssueLinks { * * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) on the project containing the from (outward) issue, * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. */ - async linkIssues(parameters?: Parameters.LinkIssues, callback?: never): Promise; - async linkIssues(parameters?: Parameters.LinkIssues, callback?: Callback): Promise { + async linkIssues(parameters?: Parameters.LinkIssues, callback?: never): Promise; + async linkIssues(parameters?: Parameters.LinkIssues, callback?: Callback): Promise { const config = { url: '/rest/api/2/issueLink', method: 'POST', diff --git a/src/version2/issueNavigatorSettings.ts b/src/version2/issueNavigatorSettings.ts index cc301cd34b..cdced51e4e 100644 --- a/src/version2/issueNavigatorSettings.ts +++ b/src/version2/issueNavigatorSettings.ts @@ -1,3 +1,4 @@ +import * as Models from './models'; import { Client } from '../clients'; import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; @@ -10,13 +11,13 @@ export class IssueNavigatorSettings { * Returns the default issue navigator columns. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getIssueNavigatorDefaultColumns(callback: Callback): Promise; + async getIssueNavigatorDefaultColumns(callback: Callback): Promise; /** * Returns the default issue navigator columns. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getIssueNavigatorDefaultColumns(callback?: never): Promise; - async getIssueNavigatorDefaultColumns(callback?: Callback): Promise { + async getIssueNavigatorDefaultColumns(callback?: never): Promise; + async getIssueNavigatorDefaultColumns(callback?: Callback): Promise { const config = { url: '/rest/api/2/settings/columns', method: 'GET', diff --git a/src/version2/issuePriorities.ts b/src/version2/issuePriorities.ts index e1794ae6d4..1cef11acaf 100644 --- a/src/version2/issuePriorities.ts +++ b/src/version2/issuePriorities.ts @@ -12,13 +12,13 @@ export class IssuePriorities { * Returns the list of all issue priorities. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async getPriorities(callback: Callback): Promise; + async getPriorities(callback: Callback): Promise; /** * Returns the list of all issue priorities. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async getPriorities(callback?: never): Promise; - async getPriorities(callback?: Callback): Promise { + async getPriorities(callback?: never): Promise; + async getPriorities(callback?: Callback): Promise { const config = { url: '/rest/api/2/priority', method: 'GET', diff --git a/src/version2/issueResolutions.ts b/src/version2/issueResolutions.ts index f86541f5e1..1a2a648b5d 100644 --- a/src/version2/issueResolutions.ts +++ b/src/version2/issueResolutions.ts @@ -12,13 +12,13 @@ export class IssueResolutions { * 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; + async getResolutions(callback: Callback): Promise; /** * 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?: never): Promise; - async getResolutions(callback?: Callback): Promise { + async getResolutions(callback?: never): Promise; + async getResolutions(callback?: Callback): Promise { const config = { url: '/rest/api/2/resolution', method: 'GET', diff --git a/src/version2/issueTypes.ts b/src/version2/issueTypes.ts index ea098f05c7..33c8c0ecf3 100644 --- a/src/version2/issueTypes.ts +++ b/src/version2/issueTypes.ts @@ -136,15 +136,15 @@ export class IssueTypes { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback: Callback): Promise; + async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback: Callback): Promise; /** * Returns a list of issue types that can be used to replace the issue type. The alternative issue types are those assigned to the same workflow scheme, field configuration scheme, and screen scheme. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback?: never): Promise; - async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback?: Callback): Promise { + async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback?: never): Promise; + async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback?: Callback): Promise { const config = { url: `/rest/api/2/issuetype/${parameters.id}/alternatives`, method: 'GET', diff --git a/src/version2/issueWorklogs.ts b/src/version2/issueWorklogs.ts index 58285ef657..277f6cc816 100644 --- a/src/version2/issueWorklogs.ts +++ b/src/version2/issueWorklogs.ts @@ -278,7 +278,7 @@ export class IssueWorklogs { * * * the worklog is set as *Viewable by All Users*. * * the user is a member of a project role or group with permission to view the worklog. */ - async getWorklogsForIds(parameters: Parameters.GetWorklogsForIds | undefined, callback: Callback): Promise; + async getWorklogsForIds(parameters: Parameters.GetWorklogsForIds | undefined, callback: Callback): Promise; /** * Returns worklog details for a list of worklog IDs. * @@ -288,8 +288,8 @@ export class IssueWorklogs { * * * the worklog is set as *Viewable by All Users*. * * the user is a member of a project role or group with permission to view the worklog. */ - async getWorklogsForIds(parameters?: Parameters.GetWorklogsForIds, callback?: never): Promise; - async getWorklogsForIds(parameters?: Parameters.GetWorklogsForIds, callback?: Callback): Promise { + async getWorklogsForIds(parameters?: Parameters.GetWorklogsForIds, callback?: never): Promise; + async getWorklogsForIds(parameters?: Parameters.GetWorklogsForIds, callback?: Callback): Promise { const config = { url: '/rest/api/2/worklog/list', method: 'POST', diff --git a/src/version2/issues.ts b/src/version2/issues.ts index daeb007fde..4e4073f638 100644 --- a/src/version2/issues.ts +++ b/src/version2/issues.ts @@ -48,7 +48,7 @@ export class Issues { }, } as RequestConfig; - return this.client.sendRequest(config, callback, { methodName: 'createIssue' }); + return this.client.sendRequest(config, callback, { methodName: 'version2.issues.createIssue' }); } /** diff --git a/src/version2/jQL.ts b/src/version2/jQL.ts index 17fc684186..92dfb8a807 100644 --- a/src/version2/jQL.ts +++ b/src/version2/jQL.ts @@ -11,6 +11,8 @@ export class JQL { /** * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. * + * To filter visible field details by project or collapse non-unique fields by field type then [Get field reference data (POST)](#api-rest-api-2-jql-autocompletedata-post) can be used. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ @@ -18,6 +20,8 @@ export class JQL { /** * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. * + * To filter visible field details by project or collapse non-unique fields by field type then [Get field reference data (POST)](#api-rest-api-2-jql-autocompletedata-post) can be used. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ @@ -31,6 +35,37 @@ export class JQL { return this.client.sendRequest(config, callback, { methodName: 'getAutoComplete' }); } + /** + * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. + * + * This operation can filter visible field details by project or collapse non-unique fields by field type. If these features are not required then [Get field reference data (GET)](#api-rest-api-2-jql-autocompletedata-get) can be used. + * + * Including collapsed fields in the response enables you to create JQL queries for fields that share the same name and field type. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ + async getAutoCompletePost(parameters: Parameters.GetAutoCompletePost | undefined, callback: Callback): Promise; + /** + * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. + * + * This operation can filter visible field details by project or collapse non-unique fields by field type. If these features are not required then [Get field reference data (GET)](#api-rest-api-2-jql-autocompletedata-get) can be used. + * + * Including collapsed fields in the response enables you to create JQL queries for fields that share the same name and field type. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ + async getAutoCompletePost(parameters?: Parameters.GetAutoCompletePost, callback?: never): Promise; + async getAutoCompletePost(parameters?: Parameters.GetAutoCompletePost, callback?: Callback): Promise { + const config = { + url: '/rest/api/2/jql/autocompletedata', + method: 'POST', + data: { + projectIds: parameters?.projectIds, + includeCollapsedFields: parameters?.includeCollapsedFields, + }, + } as RequestConfig; + + return this.client.sendRequest(config, callback, { methodName: 'getAutoCompletePost' }); + } + /** * Returns the JQL search auto complete suggestions for a field. * diff --git a/src/version2/jiraSettings.ts b/src/version2/jiraSettings.ts index 95c2021c70..f6418ede7f 100644 --- a/src/version2/jiraSettings.ts +++ b/src/version2/jiraSettings.ts @@ -14,15 +14,15 @@ export class JiraSettings { * If you specify a value for the `key` parameter, then an application property is returned as an object (not in an array). Otherwise, an array of all editable application properties is returned. See [Set application property](#api-rest-api-2-application-properties-id-put) for descriptions of editable properties. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getApplicationProperty(parameters: Parameters.GetApplicationProperty | undefined, callback: Callback): Promise; + async getApplicationProperty(parameters: Parameters.GetApplicationProperty | undefined, callback: Callback): Promise; /** * Returns all application properties or an application property. * * If you specify a value for the `key` parameter, then an application property is returned as an object (not in an array). Otherwise, an array of all editable application properties is returned. See [Set application property](#api-rest-api-2-application-properties-id-put) for descriptions of editable properties. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getApplicationProperty(parameters?: Parameters.GetApplicationProperty, callback?: never): Promise; - async getApplicationProperty(parameters?: Parameters.GetApplicationProperty, callback?: Callback): Promise { + async getApplicationProperty(parameters?: Parameters.GetApplicationProperty, callback?: never): Promise; + async getApplicationProperty(parameters?: Parameters.GetApplicationProperty, callback?: Callback): Promise { const config = { url: '/rest/api/2/application-properties', method: 'GET', @@ -40,13 +40,13 @@ export class JiraSettings { * Returns the application properties that are accessible on the *Advanced Settings* page. To navigate to the *Advanced Settings* page in Jira, choose the Jira icon > **Jira settings** > **System**, **General Configuration** and then click **Advanced Settings** (in the upper right). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAdvancedSettings(callback: Callback): Promise; + async getAdvancedSettings(callback: Callback): Promise; /** * Returns the application properties that are accessible on the *Advanced Settings* page. To navigate to the *Advanced Settings* page in Jira, choose the Jira icon > **Jira settings** > **System**, **General Configuration** and then click **Advanced Settings** (in the upper right). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAdvancedSettings(callback?: never): Promise; - async getAdvancedSettings(callback?: Callback): Promise { + async getAdvancedSettings(callback?: never): Promise; + async getAdvancedSettings(callback?: Callback): Promise { const config = { url: '/rest/api/2/application-properties/advanced-settings', method: 'GET', diff --git a/src/version2/models/createdIssue.ts b/src/version2/models/createdIssue.ts index d1fbedba7f..a046530f36 100644 --- a/src/version2/models/createdIssue.ts +++ b/src/version2/models/createdIssue.ts @@ -8,7 +8,7 @@ export interface CreatedIssue { /** The key of the created issue or subtask. */ key: string; /** The URL of the created issue or subtask. */ - self?: string; + self: string; /** The response code and messages related to any requested transition. */ transition?: NestedResponse[]; } diff --git a/src/version2/models/dashboard.ts b/src/version2/models/dashboard.ts index c18f68afb1..86fb688c40 100644 --- a/src/version2/models/dashboard.ts +++ b/src/version2/models/dashboard.ts @@ -6,7 +6,7 @@ import { SharePermission } from './sharePermission'; export interface Dashboard { description?: string; /** The ID of the dashboard. */ - id?: string; + id: string; /** Whether the dashboard is selected as a favorite by the user. */ isFavourite?: boolean; /** The name of the dashboard. */ diff --git a/src/version2/models/fieldReferenceData.ts b/src/version2/models/fieldReferenceData.ts index 00bf880c87..d533a01e9c 100644 --- a/src/version2/models/fieldReferenceData.ts +++ b/src/version2/models/fieldReferenceData.ts @@ -3,7 +3,13 @@ export interface FieldReferenceData { /** The field identifier. */ value?: string; - /** The display name of the field. */ + /** The display name contains the following: + * + * for system fields, the field name. For example, `Summary`. + * + * for collapsed custom fields, the field name followed by a hyphen and then the field name and field type. For example, `Component - Component[Dropdown]`. + * + * for other custom fields, the field name followed by a hyphen and then the custom field ID. For example, `Component - cf[10061]`. */ displayName?: string; /** Whether the field can be used in a query's `ORDER BY` clause. */ orderable?: string; diff --git a/src/version2/models/index.ts b/src/version2/models/index.ts index defb318da8..214b27995b 100644 --- a/src/version2/models/index.ts +++ b/src/version2/models/index.ts @@ -339,6 +339,7 @@ export * from './screenSchemeDetails'; export * from './screenSchemeId'; export * from './screenTypes'; export * from './screenWithTab'; +export * from './searchAutoComplete'; export * from './screenableField'; export * from './screenableTab'; export * from './searchRequestBean'; diff --git a/src/version2/models/issueFieldOptionScopeBean.ts b/src/version2/models/issueFieldOptionScopeBean.ts index 30a87a98b5..c9967446a4 100644 --- a/src/version2/models/issueFieldOptionScopeBean.ts +++ b/src/version2/models/issueFieldOptionScopeBean.ts @@ -2,7 +2,7 @@ import { ProjectScopeBean } from './projectScopeBean'; import { GlobalScopeBean } from './globalScopeBean'; export interface IssueFieldOptionScopeBean { - /** DEPRECATED */ + /** @deprecated DEPRECATED */ projects?: number[]; /** Defines the projects in which the option is available and the behavior of the option within each project. Specify one object per project. The behavior of the option in a project context overrides the behavior in the global context. */ projects2?: ProjectScopeBean[]; diff --git a/src/version2/models/searchAutoComplete.ts b/src/version2/models/searchAutoComplete.ts new file mode 100644 index 0000000000..b15f733465 --- /dev/null +++ b/src/version2/models/searchAutoComplete.ts @@ -0,0 +1,6 @@ +export interface SearchAutoComplete { + /** List of project IDs used to filter the visible field details returned. */ + projectIds?: number[]; + /** Include collapsed fields for fields that have non-unique names. */ + includeCollapsedFields?: boolean; +} diff --git a/src/version2/myself.ts b/src/version2/myself.ts index ffdcd14246..9226e6e4d9 100644 --- a/src/version2/myself.ts +++ b/src/version2/myself.ts @@ -19,7 +19,7 @@ export class Myself { * 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 to manage timezone and locale instead. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async getPreference(parameters: Parameters.GetPreference, callback: Callback): Promise; + async getPreference(parameters: Parameters.GetPreference, callback: Callback): Promise; /** * Returns the value of a preference of the current user. * @@ -31,8 +31,8 @@ export class Myself { * 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 to manage timezone and locale instead. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async getPreference(parameters: Parameters.GetPreference, callback?: never): Promise; - async getPreference(parameters: Parameters.GetPreference, callback?: Callback): Promise { + async getPreference(parameters: Parameters.GetPreference, callback?: never): Promise; + async getPreference(parameters: Parameters.GetPreference, callback?: Callback): Promise { const config = { url: '/rest/api/2/mypreferences', method: 'GET', @@ -156,14 +156,14 @@ export class Myself { } /** - * 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. + * @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. */ async setLocale(parameters: Parameters.SetLocale | undefined, callback: Callback): Promise; /** - * 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. + * @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. * @@ -182,14 +182,14 @@ export class Myself { } /** - * 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. + * @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. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ async deleteLocale(callback: Callback): Promise; /** - * 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. + * @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. * diff --git a/src/version2/parameters/createGroup.ts b/src/version2/parameters/createGroup.ts index cb17c79fd5..00425f8971 100644 --- a/src/version2/parameters/createGroup.ts +++ b/src/version2/parameters/createGroup.ts @@ -1,4 +1,5 @@ import { AddGroupBean } from '../models'; export interface CreateGroup extends AddGroupBean { + [key: string]: any; } diff --git a/src/version2/parameters/createIssue.ts b/src/version2/parameters/createIssue.ts index 7da70939b8..b8822bf232 100644 --- a/src/version2/parameters/createIssue.ts +++ b/src/version2/parameters/createIssue.ts @@ -25,15 +25,7 @@ export interface CreateIssue extends Omit { [key: string]: any; id?: string | number; }>; - description?: string | { - type?: string; - version?: string | number; - content: Array<{ - type: string; - text: string; - content?: any; - }>; - }; + description?: string; reporter?: { [key: string]: any; id?: string | number; diff --git a/src/version2/parameters/getAutoCompletePost.ts b/src/version2/parameters/getAutoCompletePost.ts new file mode 100644 index 0000000000..5f278b71a0 --- /dev/null +++ b/src/version2/parameters/getAutoCompletePost.ts @@ -0,0 +1,4 @@ +import { SearchAutoComplete } from '../models'; + +export interface GetAutoCompletePost extends SearchAutoComplete { +} diff --git a/src/version2/parameters/index.ts b/src/version2/parameters/index.ts index b9b020553b..b714b6a54d 100644 --- a/src/version2/parameters/index.ts +++ b/src/version2/parameters/index.ts @@ -204,6 +204,7 @@ export * from './deleteIssueTypeScreenScheme'; export * from './appendMappingsForIssueTypeScreenScheme'; export * from './updateDefaultScreenScheme'; export * from './removeMappingsFromIssueTypeScreenScheme'; +export * from './getAutoCompletePost'; export * from './getFieldAutoCompleteForQueryString'; export * from './parseJqlQueries'; export * from './migrateQueries'; diff --git a/src/version2/parameters/setDashboardItemProperty.ts b/src/version2/parameters/setDashboardItemProperty.ts index 29466edf8a..7bf80be519 100644 --- a/src/version2/parameters/setDashboardItemProperty.ts +++ b/src/version2/parameters/setDashboardItemProperty.ts @@ -5,4 +5,5 @@ export interface SetDashboardItemProperty { itemId: string; /** The key of the dashboard item property. The maximum length is 255 characters. */ propertyKey: string; + body?: any; } diff --git a/src/version2/projectCategories.ts b/src/version2/projectCategories.ts index 43eb1053a2..7e5e8cb171 100644 --- a/src/version2/projectCategories.ts +++ b/src/version2/projectCategories.ts @@ -12,13 +12,13 @@ export class ProjectCategories { * Returns all project categories. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async getAllProjectCategories(callback: Callback): Promise; + async getAllProjectCategories(callback: Callback): Promise; /** * Returns all project categories. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async getAllProjectCategories(callback?: never): Promise; - async getAllProjectCategories(callback?: Callback): Promise { + async getAllProjectCategories(callback?: never): Promise; + async getAllProjectCategories(callback?: Callback): Promise { const config = { url: '/rest/api/2/projectCategory', method: 'GET', diff --git a/src/version2/projectComponents.ts b/src/version2/projectComponents.ts index 25b47ee4d9..f6dbe00b5e 100644 --- a/src/version2/projectComponents.ts +++ b/src/version2/projectComponents.ts @@ -185,15 +185,15 @@ export class ProjectComponents { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getProjectComponents(parameters: Parameters.GetProjectComponents, callback: Callback): Promise; + async getProjectComponents(parameters: Parameters.GetProjectComponents, callback: Callback): Promise; /** * Returns all components in a project. See the [Get project components paginated](#api-rest-api-2-project-projectIdOrKey-component-get) resource if you want to get a full list of components with pagination. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getProjectComponents(parameters: Parameters.GetProjectComponents, callback?: never): Promise; - async getProjectComponents(parameters: Parameters.GetProjectComponents, callback?: Callback): Promise { + async getProjectComponents(parameters: Parameters.GetProjectComponents, callback?: never): Promise; + async getProjectComponents(parameters: Parameters.GetProjectComponents, callback?: Callback): Promise { const config = { url: `/rest/api/2/project/${parameters.projectIdOrKey}/components`, method: 'GET', diff --git a/src/version2/projectRoles.ts b/src/version2/projectRoles.ts index 930a92274f..652d284120 100644 --- a/src/version2/projectRoles.ts +++ b/src/version2/projectRoles.ts @@ -16,7 +16,7 @@ export class ProjectRoles { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for any project on the site or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getProjectRoles(parameters: Parameters.GetProjectRoles, callback: Callback): Promise; + async getProjectRoles>(parameters: Parameters.GetProjectRoles, callback: Callback): Promise; /** * Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and self URL for each role. * @@ -25,8 +25,8 @@ export class ProjectRoles { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for any project on the site or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getProjectRoles(parameters: Parameters.GetProjectRoles, callback?: never): Promise; - async getProjectRoles(parameters: Parameters.GetProjectRoles, callback?: Callback): Promise { + async getProjectRoles>(parameters: Parameters.GetProjectRoles, callback?: never): Promise; + async getProjectRoles>(parameters: Parameters.GetProjectRoles, callback?: Callback): Promise { const config = { url: `/rest/api/2/project/${parameters.projectIdOrKey}/role`, method: 'GET', @@ -68,15 +68,15 @@ export class ProjectRoles { * 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. */ - async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback: Callback): Promise; + async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback: Callback): Promise; /** * Returns all [project roles](https://confluence.atlassian.com/x/3odKLg) and the details for each role. Note that the list of project roles is common to all projects. * * 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. */ - async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback?: never): Promise; - async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback?: Callback): Promise { + async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback?: never): Promise; + async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback?: Callback): Promise { const config = { url: `/rest/api/2/project/${parameters.projectIdOrKey}/roledetails`, method: 'GET', @@ -108,7 +108,7 @@ export class ProjectRoles { * * Actors: Users and groups that are associated with a project role for a project, which may differ from the default actors. This enables you to assign a user to different roles in different projects. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllProjectRoles(callback: Callback): Promise; + async getAllProjectRoles(callback: Callback): Promise; /** * Gets a list of all project roles, complete with project role details and default actors. * @@ -128,8 +128,8 @@ export class ProjectRoles { * * Actors: Users and groups that are associated with a project role for a project, which may differ from the default actors. This enables you to assign a user to different roles in different projects. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllProjectRoles(callback?: never): Promise; - async getAllProjectRoles(callback?: Callback): Promise { + async getAllProjectRoles(callback?: never): Promise; + async getAllProjectRoles(callback?: Callback): Promise { const config = { url: '/rest/api/2/role', method: 'GET', diff --git a/src/version2/projectTypes.ts b/src/version2/projectTypes.ts index 63e8ff3e21..13911df4f5 100644 --- a/src/version2/projectTypes.ts +++ b/src/version2/projectTypes.ts @@ -33,11 +33,11 @@ export class ProjectTypes { /** * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw) with a valid license. */ - async getAllAccessibleProjectTypes(callback: Callback): Promise; + async getAllAccessibleProjectTypes(callback: Callback): Promise; /** * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw) with a valid license. */ - async getAllAccessibleProjectTypes(callback?: never): Promise; - async getAllAccessibleProjectTypes(callback?: Callback): Promise { + async getAllAccessibleProjectTypes(callback?: never): Promise; + async getAllAccessibleProjectTypes(callback?: Callback): Promise { const config = { url: '/rest/api/2/project/type/accessible', method: 'GET', diff --git a/src/version2/projectVersions.ts b/src/version2/projectVersions.ts index 35d20e57ef..c3d1f362f9 100644 --- a/src/version2/projectVersions.ts +++ b/src/version2/projectVersions.ts @@ -45,15 +45,15 @@ export class ProjectVersions { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getProjectVersions(parameters: Parameters.GetProjectVersions, callback: Callback): Promise; + async getProjectVersions(parameters: Parameters.GetProjectVersions, callback: Callback): Promise; /** * Returns all versions in a project. The response is not paginated. Use [Get project versions paginated](#api-rest-api-2-project-projectIdOrKey-version-get) if you want to get the versions in a project with pagination. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getProjectVersions(parameters: Parameters.GetProjectVersions, callback?: never): Promise; - async getProjectVersions(parameters: Parameters.GetProjectVersions, callback?: Callback): Promise { + async getProjectVersions(parameters: Parameters.GetProjectVersions, callback?: never): Promise; + async getProjectVersions(parameters: Parameters.GetProjectVersions, callback?: Callback): Promise { const config = { url: `/rest/api/2/project/${parameters.projectIdOrKey}/versions`, method: 'GET', @@ -171,7 +171,7 @@ export class ProjectVersions { /** * Deletes a project version. * - * 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. + * @deprecated 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. * @@ -182,7 +182,7 @@ export class ProjectVersions { /** * Deletes a project version. * - * 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. + * @deprecated 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. * diff --git a/src/version2/projects.ts b/src/version2/projects.ts index 9fd5f6324b..9b721ca281 100644 --- a/src/version2/projects.ts +++ b/src/version2/projects.ts @@ -98,11 +98,11 @@ export class Projects { } /** - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of projects visible to the user. + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of projects visible to the user. * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Projects are returned only where the user has one of: + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Projects are returned only where the user has one of: * * * *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * * *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. @@ -110,11 +110,11 @@ export class Projects { */ async searchProjects(parameters: Parameters.SearchProjects | undefined, callback: Callback): Promise; /** - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of projects visible to the user. + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of projects visible to the user. * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Projects are returned only where the user has one of: + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Projects are returned only where the user has one of: * * * *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * * *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. @@ -305,15 +305,15 @@ export class Projects { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getAllStatuses(parameters: Parameters.GetAllStatuses, callback: Callback): Promise; + async getAllStatuses(parameters: Parameters.GetAllStatuses, callback: Callback): Promise; /** * Returns the valid statuses for a project. The statuses are grouped by issue type, as each project has a set of valid issue types and each issue type has a set of valid statuses. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getAllStatuses(parameters: Parameters.GetAllStatuses, callback?: never): Promise; - async getAllStatuses(parameters: Parameters.GetAllStatuses, callback?: Callback): Promise { + async getAllStatuses(parameters: Parameters.GetAllStatuses, callback?: never): Promise; + async getAllStatuses(parameters: Parameters.GetAllStatuses, callback?: Callback): Promise { const config = { url: `/rest/api/2/project/${parameters.projectIdOrKey}/statuses`, method: 'GET', diff --git a/src/version2/screenTabFields.ts b/src/version2/screenTabFields.ts index 0b16bb1560..253a1a7864 100644 --- a/src/version2/screenTabFields.ts +++ b/src/version2/screenTabFields.ts @@ -15,7 +15,7 @@ export class ScreenTabFields { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme. */ - async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback: Callback): Promise; + async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback: Callback): Promise; /** * Returns all fields for a screen tab. * @@ -23,8 +23,8 @@ export class ScreenTabFields { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme. */ - async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback?: never): Promise; - async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback?: Callback): Promise { + async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback?: never): Promise; + async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback?: Callback): Promise { const config = { url: `/rest/api/2/screens/${parameters.screenId}/tabs/${parameters.tabId}/fields`, method: 'GET', diff --git a/src/version2/screenTabs.ts b/src/version2/screenTabs.ts index d94852c1dc..b18160e07c 100644 --- a/src/version2/screenTabs.ts +++ b/src/version2/screenTabs.ts @@ -15,7 +15,7 @@ export class ScreenTabs { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme. */ - async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback: Callback): Promise; + async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback: Callback): Promise; /** * Returns the list of tabs for a screen. * @@ -23,8 +23,8 @@ export class ScreenTabs { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme. */ - async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback?: never): Promise; - async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback?: Callback): Promise { + async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback?: never): Promise; + async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback?: Callback): Promise { const config = { url: `/rest/api/2/screens/${parameters.screenId}/tabs`, method: 'GET', diff --git a/src/version2/screens.ts b/src/version2/screens.ts index c40fa937f0..881c89f66e 100644 --- a/src/version2/screens.ts +++ b/src/version2/screens.ts @@ -144,13 +144,13 @@ export class Screens { * Returns the fields that can be added to a tab on a screen. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback: Callback): Promise; + async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback: Callback): Promise; /** * Returns the fields that can be added to a tab on a screen. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback?: never): Promise; - async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback?: Callback): Promise { + async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback?: never): Promise; + async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback?: Callback): Promise { const config = { url: `/rest/api/2/screens/${parameters.screenId}/availableFields`, method: 'GET', diff --git a/src/version2/timeTracking.ts b/src/version2/timeTracking.ts index 026813231b..4a58f00157 100644 --- a/src/version2/timeTracking.ts +++ b/src/version2/timeTracking.ts @@ -55,13 +55,13 @@ export class TimeTracking { * Returns all time tracking providers. By default, Jira only has one time tracking provider: *JIRA provided time tracking*. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the [ Time Tracking Provider](https://developer.atlassian.com/cloud/jira/platform/modules/time-tracking-provider/) module. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAvailableTimeTrackingImplementations(callback: Callback): Promise; + async getAvailableTimeTrackingImplementations(callback: Callback): Promise; /** * Returns all time tracking providers. By default, Jira only has one time tracking provider: *JIRA provided time tracking*. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the [ Time Tracking Provider](https://developer.atlassian.com/cloud/jira/platform/modules/time-tracking-provider/) module. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAvailableTimeTrackingImplementations(callback?: never): Promise; - async getAvailableTimeTrackingImplementations(callback?: Callback): Promise { + async getAvailableTimeTrackingImplementations(callback?: never): Promise; + async getAvailableTimeTrackingImplementations(callback?: Callback): Promise { const config = { url: '/rest/api/2/configuration/timetracking/list', method: 'GET', diff --git a/src/version2/userSearch.ts b/src/version2/userSearch.ts index cf2254d8b3..33b4672053 100644 --- a/src/version2/userSearch.ts +++ b/src/version2/userSearch.ts @@ -16,7 +16,7 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback: Callback): Promise; + async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback: Callback): Promise; /** * Returns a list of users who can be assigned issues in one or more projects. The list may be restricted to users whose attributes match a string. * @@ -25,8 +25,8 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback?: never): Promise; - async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback?: Callback): Promise { + async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback?: never): Promise; + async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/assignable/multiProjectSearch', method: 'GET', @@ -55,7 +55,7 @@ export class UserSearch { * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that can be assigned the issue. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who can be assigned the issue, use [Get all users](#api-rest-api-2-users-search-get) and filter the records in your code. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async findAssignableUsers(parameters: Parameters.FindAssignableUsers | undefined, callback: Callback): Promise; + async findAssignableUsers(parameters: Parameters.FindAssignableUsers | undefined, callback: Callback): Promise; /** * Returns a list of users that can be assigned to an issue. Use this operation to find the list of users who can be assigned to: * @@ -68,8 +68,8 @@ export class UserSearch { * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that can be assigned the issue. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who can be assigned the issue, use [Get all users](#api-rest-api-2-users-search-get) and filter the records in your code. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async findAssignableUsers(parameters?: Parameters.FindAssignableUsers, callback?: never): Promise; - async findAssignableUsers(parameters?: Parameters.FindAssignableUsers, callback?: Callback): Promise { + async findAssignableUsers(parameters?: Parameters.FindAssignableUsers, callback?: never): Promise; + async findAssignableUsers(parameters?: Parameters.FindAssignableUsers, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/assignable/search', method: 'GET', @@ -106,7 +106,7 @@ export class UserSearch { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to get users for any project. * * *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project, to get users for that project. */ - async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback: Callback): Promise; + async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback: Callback): Promise; /** * Returns a list of users who fulfill these criteria: * @@ -123,8 +123,8 @@ export class UserSearch { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to get users for any project. * * *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project, to get users for that project. */ - async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback?: never): Promise; - async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback?: Callback): Promise { + async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback?: never): Promise; + async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/permission/search', method: 'GET', @@ -187,7 +187,7 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls or calls by users without the required permission return empty search results. */ - async findUsers(parameters: Parameters.FindUsers | undefined, callback: Callback): Promise; + async findUsers(parameters: Parameters.FindUsers | undefined, callback: Callback): Promise; /** * Returns a list of users that match the search string and property. * @@ -196,8 +196,8 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls or calls by users without the required permission return empty search results. */ - async findUsers(parameters?: Parameters.FindUsers, callback?: never): Promise; - async findUsers(parameters?: Parameters.FindUsers, callback?: Callback): Promise { + async findUsers(parameters?: Parameters.FindUsers, callback?: never): Promise; + async findUsers(parameters?: Parameters.FindUsers, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/search', method: 'GET', @@ -346,7 +346,7 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls and calls by users without the required permission return empty search results. */ - async findUsersWithBrowsePermission(parameters: Parameters.FindUsersWithBrowsePermission | undefined, callback: Callback): Promise; + async findUsersWithBrowsePermission(parameters: Parameters.FindUsersWithBrowsePermission | undefined, callback: Callback): Promise; /** * Returns a list of users who fulfill these criteria: * @@ -363,8 +363,8 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls and calls by users without the required permission return empty search results. */ - async findUsersWithBrowsePermission(parameters?: Parameters.FindUsersWithBrowsePermission, callback?: never): Promise; - async findUsersWithBrowsePermission(parameters?: Parameters.FindUsersWithBrowsePermission, callback?: Callback): Promise { + async findUsersWithBrowsePermission(parameters?: Parameters.FindUsersWithBrowsePermission, callback?: never): Promise; + async findUsersWithBrowsePermission(parameters?: Parameters.FindUsersWithBrowsePermission, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/viewissue/search', method: 'GET', diff --git a/src/version2/users.ts b/src/version2/users.ts index e2bb8e0b0a..a6610b95cd 100644 --- a/src/version2/users.ts +++ b/src/version2/users.ts @@ -36,8 +36,6 @@ export class Users { /** * Creates a user. This resource is retained for legacy compatibility. As soon as a more suitable alternative is available this resource will be deprecated. * - * The option is provided to set or generate a password for the user. When using the option to generate a password, by omitting `password` from the request, include `"notification": "true"` to ensure the user is sent an email advising them that their account is created. This email includes a link for the user to set their password. If the notification isn't sent for a generated password, the user will need to be sent a reset password request from Jira. - * * If the user exists and has access to Jira, the operation returns a 201 status. If the user exists but does not have access to Jira, the operation returns a 400 status. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -45,8 +43,6 @@ export class Users { /** * Creates a user. This resource is retained for legacy compatibility. As soon as a more suitable alternative is available this resource will be deprecated. * - * The option is provided to set or generate a password for the user. When using the option to generate a password, by omitting `password` from the request, include `"notification": "true"` to ensure the user is sent an email advising them that their account is created. This email includes a link for the user to set their password. If the notification isn't sent for a generated password, the user will need to be sent a reset password request from Jira. - * * If the user exists and has access to Jira, the operation returns a 201 status. If the user exists but does not have access to Jira, the operation returns a 400 status. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -124,13 +120,13 @@ export class Users { * Returns the account IDs for the users specified in the `key` or `username` parameters. Note that multiple `key` or `username` parameters can be specified. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async bulkGetUsersMigration(parameters: Parameters.BulkGetUsersMigration | undefined, callback: Callback): Promise; + async bulkGetUsersMigration(parameters: Parameters.BulkGetUsersMigration | undefined, callback: Callback): Promise; /** * Returns the account IDs for the users specified in the `key` or `username` parameters. Note that multiple `key` or `username` parameters can be specified. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async bulkGetUsersMigration(parameters?: Parameters.BulkGetUsersMigration, callback?: never): Promise; - async bulkGetUsersMigration(parameters?: Parameters.BulkGetUsersMigration, callback?: Callback): Promise { + async bulkGetUsersMigration(parameters?: Parameters.BulkGetUsersMigration, callback?: never): Promise; + async bulkGetUsersMigration(parameters?: Parameters.BulkGetUsersMigration, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/bulk/migration', method: 'GET', @@ -152,7 +148,7 @@ export class Users { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLgl), to get the column details for any user. * * Permission to access Jira, to get the calling user's column details. */ - async getUserDefaultColumns(parameters: Parameters.GetUserDefaultColumns | undefined, callback: Callback): Promise; + async getUserDefaultColumns(parameters: Parameters.GetUserDefaultColumns | undefined, callback: Callback): Promise; /** * Returns the default [issue table columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If `accountId` is not passed in the request, the calling user's details are returned. * @@ -160,8 +156,8 @@ export class Users { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLgl), to get the column details for any user. * * Permission to access Jira, to get the calling user's column details. */ - async getUserDefaultColumns(parameters?: Parameters.GetUserDefaultColumns, callback?: never): Promise; - async getUserDefaultColumns(parameters?: Parameters.GetUserDefaultColumns, callback?: Callback): Promise { + async getUserDefaultColumns(parameters?: Parameters.GetUserDefaultColumns, callback?: never): Promise; + async getUserDefaultColumns(parameters?: Parameters.GetUserDefaultColumns, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/columns', method: 'GET', @@ -185,7 +181,7 @@ export class Users { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * * Permission to access Jira, to set the calling user's columns. */ - async setUserColumns(parameters: Parameters.SetUserColumns | undefined, callback: Callback): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns | undefined, callback: Callback): Promise; /** * Sets the default [ issue table columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If an account ID is not passed, the calling user's default columns are set. If no column details are sent, then all default columns are removed. * @@ -197,8 +193,8 @@ export class Users { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * * Permission to access Jira, to set the calling user's columns. */ - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: never): Promise; - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: Callback): Promise { + async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: never): Promise; + async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/columns', method: 'PUT', @@ -279,13 +275,13 @@ export class Users { * Returns the groups to which a user belongs. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUserGroups(parameters: Parameters.GetUserGroups, callback: Callback): Promise; + async getUserGroups(parameters: Parameters.GetUserGroups, callback: Callback): Promise; /** * Returns the groups to which a user belongs. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUserGroups(parameters: Parameters.GetUserGroups, callback?: never): Promise; - async getUserGroups(parameters: Parameters.GetUserGroups, callback?: Callback): Promise { + async getUserGroups(parameters: Parameters.GetUserGroups, callback?: never): Promise; + async getUserGroups(parameters: Parameters.GetUserGroups, callback?: Callback): Promise { const config = { url: '/rest/api/2/user/groups', method: 'GET', @@ -303,13 +299,13 @@ export class Users { * Returns a list of all (active and inactive) users. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllUsersDefault(parameters: Parameters.GetAllUsersDefault | undefined, callback: Callback): Promise; + async getAllUsersDefault(parameters: Parameters.GetAllUsersDefault | undefined, callback: Callback): Promise; /** * Returns a list of all (active and inactive) users. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllUsersDefault(parameters?: Parameters.GetAllUsersDefault, callback?: never): Promise; - async getAllUsersDefault(parameters?: Parameters.GetAllUsersDefault, callback?: Callback): Promise { + async getAllUsersDefault(parameters?: Parameters.GetAllUsersDefault, callback?: never): Promise; + async getAllUsersDefault(parameters?: Parameters.GetAllUsersDefault, callback?: Callback): Promise { const config = { url: '/rest/api/2/users', method: 'GET', @@ -326,13 +322,13 @@ export class Users { * Returns a list of all (active and inactive) users. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllUsers(parameters: Parameters.GetAllUsers | undefined, callback: Callback): Promise; + async getAllUsers(parameters: Parameters.GetAllUsers | undefined, callback: Callback): Promise; /** * Returns a list of all (active and inactive) users. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllUsers(parameters?: Parameters.GetAllUsers, callback?: never): Promise; - async getAllUsers(parameters?: Parameters.GetAllUsers, callback?: Callback): Promise { + async getAllUsers(parameters?: Parameters.GetAllUsers, callback?: never): Promise; + async getAllUsers(parameters?: Parameters.GetAllUsers, callback?: Callback): Promise { const config = { url: '/rest/api/2/users/search', method: 'GET', diff --git a/src/version2/workflowStatusCategories.ts b/src/version2/workflowStatusCategories.ts index 8a8f13a9c8..6b7dc91ef5 100644 --- a/src/version2/workflowStatusCategories.ts +++ b/src/version2/workflowStatusCategories.ts @@ -12,13 +12,13 @@ export class WorkflowStatusCategories { * Returns a list of all status categories. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async getStatusCategories(callback: Callback): Promise; + async getStatusCategories(callback: Callback): Promise; /** * Returns a list of all status categories. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Permission to access Jira. */ - async getStatusCategories(callback?: never): Promise; - async getStatusCategories(callback?: Callback): Promise { + async getStatusCategories(callback?: never): Promise; + async getStatusCategories(callback?: Callback): Promise { const config = { url: '/rest/api/2/statuscategory', method: 'GET', diff --git a/src/version2/workflowStatuses.ts b/src/version2/workflowStatuses.ts index d40a5c3bbf..a55f7b60ba 100644 --- a/src/version2/workflowStatuses.ts +++ b/src/version2/workflowStatuses.ts @@ -14,15 +14,15 @@ export class WorkflowStatuses { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getStatuses(callback: Callback): Promise; + async getStatuses(callback: Callback): Promise; /** * Returns a list of all statuses associated with workflows. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getStatuses(callback?: never): Promise; - async getStatuses(callback?: Callback): Promise { + async getStatuses(callback?: never): Promise; + async getStatuses(callback?: Callback): Promise { const config = { url: '/rest/api/2/status', method: 'GET', diff --git a/src/version3/dashboards.ts b/src/version3/dashboards.ts index 2fc5e35cc0..8ed078ccd3 100644 --- a/src/version3/dashboards.ts +++ b/src/version3/dashboards.ts @@ -13,14 +13,14 @@ export class Dashboards { * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/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 getAllDashboards(parameters: Parameters.GetAllDashboards | undefined, callback: Callback): Promise; /** * Returns a list of dashboards owned by or shared with the user. The list may be filtered to include only favorite or owned dashboards. * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/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 getAllDashboards(parameters?: Parameters.GetAllDashboards, callback?: never): Promise; async getAllDashboards(parameters?: Parameters.GetAllDashboards, callback?: Callback): Promise { const config = { @@ -198,6 +198,7 @@ export class Dashboards { const config = { url: `/rest/api/3/dashboard/${parameters.dashboardId}/items/${parameters.itemId}/properties/${parameters.propertyKey}`, method: 'PUT', + data: parameters.body, } as RequestConfig; return this.client.sendRequest(config, callback, { methodName: 'setDashboardItemProperty' }); diff --git a/src/version3/groups.ts b/src/version3/groups.ts index 9cd9cc575b..9b738b8e02 100644 --- a/src/version3/groups.ts +++ b/src/version3/groups.ts @@ -51,9 +51,7 @@ export class Groups { const config = { url: '/rest/api/3/group', method: 'POST', - data: { - name: parameters?.name, - }, + data: parameters, } as RequestConfig; return this.client.sendRequest(config, callback, { methodName: 'createGroup' }); @@ -63,13 +61,13 @@ export class Groups { * Deletes a group. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)). */ - async removeGroup(parameters: Parameters.RemoveGroup, callback: Callback): Promise; + async removeGroup(parameters: Parameters.RemoveGroup, callback: Callback): Promise; /** * Deletes a group. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)). */ - async removeGroup(parameters: Parameters.RemoveGroup, callback?: never): Promise; - async removeGroup(parameters: Parameters.RemoveGroup, callback?: Callback): Promise { + async removeGroup(parameters: Parameters.RemoveGroup, callback?: never): Promise; + async removeGroup(parameters: Parameters.RemoveGroup, callback?: Callback): Promise { const config = { url: '/rest/api/3/group', method: 'DELETE', diff --git a/src/version3/issueLinks.ts b/src/version3/issueLinks.ts index 25261c27d6..b1f937aac4 100644 --- a/src/version3/issueLinks.ts +++ b/src/version3/issueLinks.ts @@ -23,7 +23,7 @@ export class IssueLinks { * * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) on the project containing the from (outward) issue, * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. */ - async linkIssues(parameters: Parameters.LinkIssues | undefined, callback: Callback): Promise; + async linkIssues(parameters: Parameters.LinkIssues | undefined, callback: Callback): Promise; /** * Creates a link between two issues. Use this operation to indicate a relationship between two issues and optionally add a comment to the from (outward) issue. To use this resource the site must have [Issue Linking](https://confluence.atlassian.com/x/yoXKM) enabled. * @@ -39,8 +39,8 @@ export class IssueLinks { * * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) on the project containing the from (outward) issue, * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. */ - async linkIssues(parameters?: Parameters.LinkIssues, callback?: never): Promise; - async linkIssues(parameters?: Parameters.LinkIssues, callback?: Callback): Promise { + async linkIssues(parameters?: Parameters.LinkIssues, callback?: never): Promise; + async linkIssues(parameters?: Parameters.LinkIssues, callback?: Callback): Promise { const config = { url: '/rest/api/3/issueLink', method: 'POST', diff --git a/src/version3/issueNavigatorSettings.ts b/src/version3/issueNavigatorSettings.ts index 8df604227e..49e02debaa 100644 --- a/src/version3/issueNavigatorSettings.ts +++ b/src/version3/issueNavigatorSettings.ts @@ -1,3 +1,4 @@ +import * as Models from './models'; import { Client } from '../clients'; import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; @@ -10,13 +11,13 @@ export class IssueNavigatorSettings { * Returns the default issue navigator columns. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getIssueNavigatorDefaultColumns(callback: Callback): Promise; + async getIssueNavigatorDefaultColumns(callback: Callback): Promise; /** * Returns the default issue navigator columns. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getIssueNavigatorDefaultColumns(callback?: never): Promise; - async getIssueNavigatorDefaultColumns(callback?: Callback): Promise { + async getIssueNavigatorDefaultColumns(callback?: never): Promise; + async getIssueNavigatorDefaultColumns(callback?: Callback): Promise { const config = { url: '/rest/api/3/settings/columns', method: 'GET', diff --git a/src/version3/issuePriorities.ts b/src/version3/issuePriorities.ts index e6791cfaca..b90ad48a51 100644 --- a/src/version3/issuePriorities.ts +++ b/src/version3/issuePriorities.ts @@ -12,13 +12,13 @@ export class IssuePriorities { * Returns the list of all issue priorities. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async getPriorities(callback: Callback): Promise; + async getPriorities(callback: Callback): Promise; /** * Returns the list of all issue priorities. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async getPriorities(callback?: never): Promise; - async getPriorities(callback?: Callback): Promise { + async getPriorities(callback?: never): Promise; + async getPriorities(callback?: Callback): Promise { const config = { url: '/rest/api/3/priority', method: 'GET', diff --git a/src/version3/issueResolutions.ts b/src/version3/issueResolutions.ts index 41d9aef88f..580d6a083b 100644 --- a/src/version3/issueResolutions.ts +++ b/src/version3/issueResolutions.ts @@ -12,13 +12,13 @@ export class IssueResolutions { * 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; + async getResolutions(callback: Callback): Promise; /** * 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?: never): Promise; - async getResolutions(callback?: Callback): Promise { + async getResolutions(callback?: never): Promise; + async getResolutions(callback?: Callback): Promise { const config = { url: '/rest/api/3/resolution', method: 'GET', diff --git a/src/version3/issueTypes.ts b/src/version3/issueTypes.ts index f78e829fb3..ae1ae5b5a4 100644 --- a/src/version3/issueTypes.ts +++ b/src/version3/issueTypes.ts @@ -136,15 +136,15 @@ export class IssueTypes { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback: Callback): Promise; + async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback: Callback): Promise; /** * Returns a list of issue types that can be used to replace the issue type. The alternative issue types are those assigned to the same workflow scheme, field configuration scheme, and screen scheme. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback?: never): Promise; - async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback?: Callback): Promise { + async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback?: never): Promise; + async getAlternativeIssueTypes(parameters: Parameters.GetAlternativeIssueTypes, callback?: Callback): Promise { const config = { url: `/rest/api/3/issuetype/${parameters.id}/alternatives`, method: 'GET', diff --git a/src/version3/issueWorklogs.ts b/src/version3/issueWorklogs.ts index e8f73affa9..92e6ee8875 100644 --- a/src/version3/issueWorklogs.ts +++ b/src/version3/issueWorklogs.ts @@ -278,7 +278,7 @@ export class IssueWorklogs { * * * the worklog is set as *Viewable by All Users*. * * the user is a member of a project role or group with permission to view the worklog. */ - async getWorklogsForIds(parameters: Parameters.GetWorklogsForIds | undefined, callback: Callback): Promise; + async getWorklogsForIds(parameters: Parameters.GetWorklogsForIds | undefined, callback: Callback): Promise; /** * Returns worklog details for a list of worklog IDs. * @@ -288,8 +288,8 @@ export class IssueWorklogs { * * * the worklog is set as *Viewable by All Users*. * * the user is a member of a project role or group with permission to view the worklog. */ - async getWorklogsForIds(parameters?: Parameters.GetWorklogsForIds, callback?: never): Promise; - async getWorklogsForIds(parameters?: Parameters.GetWorklogsForIds, callback?: Callback): Promise { + async getWorklogsForIds(parameters?: Parameters.GetWorklogsForIds, callback?: never): Promise; + async getWorklogsForIds(parameters?: Parameters.GetWorklogsForIds, callback?: Callback): Promise { const config = { url: '/rest/api/3/worklog/list', method: 'POST', diff --git a/src/version3/issues.ts b/src/version3/issues.ts index 9dc31d7c06..b54c0a5601 100644 --- a/src/version3/issues.ts +++ b/src/version3/issues.ts @@ -52,7 +52,7 @@ export class Issues { }, } as RequestConfig; - return this.client.sendRequest(config, callback, { methodName: 'createIssue' }); + return this.client.sendRequest(config, callback, { methodName: 'version3.issues.createIssue' }); } /** diff --git a/src/version3/jQL.ts b/src/version3/jQL.ts index f90f89d322..60cda40526 100644 --- a/src/version3/jQL.ts +++ b/src/version3/jQL.ts @@ -11,6 +11,8 @@ export class JQL { /** * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. * + * To filter visible field details by project or collapse non-unique fields by field type then [Get field reference data (POST)](#api-rest-api-3-jql-autocompletedata-post) can be used. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ @@ -18,6 +20,8 @@ export class JQL { /** * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. * + * To filter visible field details by project or collapse non-unique fields by field type then [Get field reference data (POST)](#api-rest-api-3-jql-autocompletedata-post) can be used. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ @@ -31,6 +35,37 @@ export class JQL { return this.client.sendRequest(config, callback, { methodName: 'getAutoComplete' }); } + /** + * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. + * + * This operation can filter visible field details by project or collapse non-unique fields by field type. If these features are not required then [Get field reference data (GET)](#api-rest-api-3-jql-autocompletedata-get) can be used. + * + * Including collapsed fields in the response enables you to create JQL queries for fields that share the same name and field type. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ + async getAutoCompletePost(parameters: Parameters.GetAutoCompletePost | undefined, callback: Callback): Promise; + /** + * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. + * + * This operation can filter visible field details by project or collapse non-unique fields by field type. If these features are not required then [Get field reference data (GET)](#api-rest-api-3-jql-autocompletedata-get) can be used. + * + * Including collapsed fields in the response enables you to create JQL queries for fields that share the same name and field type. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ + async getAutoCompletePost(parameters?: Parameters.GetAutoCompletePost, callback?: never): Promise; + async getAutoCompletePost(parameters?: Parameters.GetAutoCompletePost, callback?: Callback): Promise { + const config = { + url: '/rest/api/3/jql/autocompletedata', + method: 'POST', + data: { + projectIds: parameters?.projectIds, + includeCollapsedFields: parameters?.includeCollapsedFields, + }, + } as RequestConfig; + + return this.client.sendRequest(config, callback, { methodName: 'getAutoCompletePost' }); + } + /** * Returns the JQL search auto complete suggestions for a field. * diff --git a/src/version3/jiraSettings.ts b/src/version3/jiraSettings.ts index b9f89426c9..87e7acb828 100644 --- a/src/version3/jiraSettings.ts +++ b/src/version3/jiraSettings.ts @@ -14,15 +14,15 @@ export class JiraSettings { * If you specify a value for the `key` parameter, then an application property is returned as an object (not in an array). Otherwise, an array of all editable application properties is returned. See [Set application property](#api-rest-api-3-application-properties-id-put) for descriptions of editable properties. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getApplicationProperty(parameters: Parameters.GetApplicationProperty | undefined, callback: Callback): Promise; + async getApplicationProperty(parameters: Parameters.GetApplicationProperty | undefined, callback: Callback): Promise; /** * Returns all application properties or an application property. * * If you specify a value for the `key` parameter, then an application property is returned as an object (not in an array). Otherwise, an array of all editable application properties is returned. See [Set application property](#api-rest-api-3-application-properties-id-put) for descriptions of editable properties. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getApplicationProperty(parameters?: Parameters.GetApplicationProperty, callback?: never): Promise; - async getApplicationProperty(parameters?: Parameters.GetApplicationProperty, callback?: Callback): Promise { + async getApplicationProperty(parameters?: Parameters.GetApplicationProperty, callback?: never): Promise; + async getApplicationProperty(parameters?: Parameters.GetApplicationProperty, callback?: Callback): Promise { const config = { url: '/rest/api/3/application-properties', method: 'GET', @@ -40,13 +40,13 @@ export class JiraSettings { * Returns the application properties that are accessible on the *Advanced Settings* page. To navigate to the *Advanced Settings* page in Jira, choose the Jira icon > **Jira settings** > **System**, **General Configuration** and then click **Advanced Settings** (in the upper right). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAdvancedSettings(callback: Callback): Promise; + async getAdvancedSettings(callback: Callback): Promise; /** * Returns the application properties that are accessible on the *Advanced Settings* page. To navigate to the *Advanced Settings* page in Jira, choose the Jira icon > **Jira settings** > **System**, **General Configuration** and then click **Advanced Settings** (in the upper right). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAdvancedSettings(callback?: never): Promise; - async getAdvancedSettings(callback?: Callback): Promise { + async getAdvancedSettings(callback?: never): Promise; + async getAdvancedSettings(callback?: Callback): Promise { const config = { url: '/rest/api/3/application-properties/advanced-settings', method: 'GET', diff --git a/src/version3/models/createdIssue.ts b/src/version3/models/createdIssue.ts index d1fbedba7f..a046530f36 100644 --- a/src/version3/models/createdIssue.ts +++ b/src/version3/models/createdIssue.ts @@ -8,7 +8,7 @@ export interface CreatedIssue { /** The key of the created issue or subtask. */ key: string; /** The URL of the created issue or subtask. */ - self?: string; + self: string; /** The response code and messages related to any requested transition. */ transition?: NestedResponse[]; } diff --git a/src/version3/models/dashboard.ts b/src/version3/models/dashboard.ts index c18f68afb1..86fb688c40 100644 --- a/src/version3/models/dashboard.ts +++ b/src/version3/models/dashboard.ts @@ -6,7 +6,7 @@ import { SharePermission } from './sharePermission'; export interface Dashboard { description?: string; /** The ID of the dashboard. */ - id?: string; + id: string; /** Whether the dashboard is selected as a favorite by the user. */ isFavourite?: boolean; /** The name of the dashboard. */ diff --git a/src/version3/models/fieldReferenceData.ts b/src/version3/models/fieldReferenceData.ts index 00bf880c87..281749b2b7 100644 --- a/src/version3/models/fieldReferenceData.ts +++ b/src/version3/models/fieldReferenceData.ts @@ -3,7 +3,13 @@ export interface FieldReferenceData { /** The field identifier. */ value?: string; - /** The display name of the field. */ + /** The display name contains the following: + + * for system fields, the field name. For example, `Summary`. + * + * for collapsed custom fields, the field name followed by a hyphen and then the field name and field type. For example, `Component - Component[Dropdown]`. + * + * for other custom fields, the field name followed by a hyphen and then the custom field ID. For example, `Component - cf[10061]`. */ displayName?: string; /** Whether the field can be used in a query's `ORDER BY` clause. */ orderable?: string; diff --git a/src/version3/models/index.ts b/src/version3/models/index.ts index defb318da8..d63c47c85b 100644 --- a/src/version3/models/index.ts +++ b/src/version3/models/index.ts @@ -341,6 +341,7 @@ export * from './screenTypes'; export * from './screenWithTab'; export * from './screenableField'; export * from './screenableTab'; +export * from './searchAutoComplete'; export * from './searchRequestBean'; export * from './searchResults'; export * from './securityLevel'; diff --git a/src/version3/models/issueFieldOptionScopeBean.ts b/src/version3/models/issueFieldOptionScopeBean.ts index 30a87a98b5..c9967446a4 100644 --- a/src/version3/models/issueFieldOptionScopeBean.ts +++ b/src/version3/models/issueFieldOptionScopeBean.ts @@ -2,7 +2,7 @@ import { ProjectScopeBean } from './projectScopeBean'; import { GlobalScopeBean } from './globalScopeBean'; export interface IssueFieldOptionScopeBean { - /** DEPRECATED */ + /** @deprecated DEPRECATED */ projects?: number[]; /** Defines the projects in which the option is available and the behavior of the option within each project. Specify one object per project. The behavior of the option in a project context overrides the behavior in the global context. */ projects2?: ProjectScopeBean[]; diff --git a/src/version3/models/searchAutoComplete.ts b/src/version3/models/searchAutoComplete.ts new file mode 100644 index 0000000000..b15f733465 --- /dev/null +++ b/src/version3/models/searchAutoComplete.ts @@ -0,0 +1,6 @@ +export interface SearchAutoComplete { + /** List of project IDs used to filter the visible field details returned. */ + projectIds?: number[]; + /** Include collapsed fields for fields that have non-unique names. */ + includeCollapsedFields?: boolean; +} diff --git a/src/version3/myself.ts b/src/version3/myself.ts index cd359357a7..b6b3ccba94 100644 --- a/src/version3/myself.ts +++ b/src/version3/myself.ts @@ -19,7 +19,7 @@ export class Myself { * 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 to manage timezone and locale instead. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async getPreference(parameters: Parameters.GetPreference, callback: Callback): Promise; + async getPreference(parameters: Parameters.GetPreference, callback: Callback): Promise; /** * Returns the value of a preference of the current user. * @@ -31,8 +31,8 @@ export class Myself { * 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 to manage timezone and locale instead. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async getPreference(parameters: Parameters.GetPreference, callback?: never): Promise; - async getPreference(parameters: Parameters.GetPreference, callback?: Callback): Promise { + async getPreference(parameters: Parameters.GetPreference, callback?: never): Promise; + async getPreference(parameters: Parameters.GetPreference, callback?: Callback): Promise { const config = { url: '/rest/api/3/mypreferences', method: 'GET', @@ -156,14 +156,14 @@ export class Myself { } /** - * 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. + * @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. */ async setLocale(parameters: Parameters.SetLocale | undefined, callback: Callback): Promise; /** - * 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. + * @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. * @@ -182,14 +182,14 @@ export class Myself { } /** - * 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. + * @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. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ async deleteLocale(callback: Callback): Promise; /** - * 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. + * @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. * diff --git a/src/version3/parameters/createGroup.ts b/src/version3/parameters/createGroup.ts index cb17c79fd5..00425f8971 100644 --- a/src/version3/parameters/createGroup.ts +++ b/src/version3/parameters/createGroup.ts @@ -1,4 +1,5 @@ import { AddGroupBean } from '../models'; export interface CreateGroup extends AddGroupBean { + [key: string]: any; } diff --git a/src/version3/parameters/createIssue.ts b/src/version3/parameters/createIssue.ts index a9e8aa1ceb..99a220f447 100644 --- a/src/version3/parameters/createIssue.ts +++ b/src/version3/parameters/createIssue.ts @@ -4,6 +4,12 @@ import { TimeTrackingDetails, } from '../models'; +export interface CreateIssueDescriptionContent { + type: string; + text?: string; + content?: Array; +} + export interface CreateIssue extends Omit { /** Whether the project in which the issue is created is added to the user's **Recently viewed** project list, as shown under **Projects** in Jira. */ updateHistory?: boolean; @@ -25,14 +31,10 @@ export interface CreateIssue extends Omit { [key: string]: any; id?: string | number; }>; - description?: string | { + description?: { type?: string; version?: string | number; - content: Array<{ - type: string; - text: string; - content?: any; - }>; + content: Array; }; reporter?: { [key: string]: any; diff --git a/src/version3/parameters/getAutoCompletePost.ts b/src/version3/parameters/getAutoCompletePost.ts new file mode 100644 index 0000000000..5f278b71a0 --- /dev/null +++ b/src/version3/parameters/getAutoCompletePost.ts @@ -0,0 +1,4 @@ +import { SearchAutoComplete } from '../models'; + +export interface GetAutoCompletePost extends SearchAutoComplete { +} diff --git a/src/version3/parameters/index.ts b/src/version3/parameters/index.ts index b9b020553b..b714b6a54d 100644 --- a/src/version3/parameters/index.ts +++ b/src/version3/parameters/index.ts @@ -204,6 +204,7 @@ export * from './deleteIssueTypeScreenScheme'; export * from './appendMappingsForIssueTypeScreenScheme'; export * from './updateDefaultScreenScheme'; export * from './removeMappingsFromIssueTypeScreenScheme'; +export * from './getAutoCompletePost'; export * from './getFieldAutoCompleteForQueryString'; export * from './parseJqlQueries'; export * from './migrateQueries'; diff --git a/src/version3/parameters/setDashboardItemProperty.ts b/src/version3/parameters/setDashboardItemProperty.ts index 29466edf8a..7bf80be519 100644 --- a/src/version3/parameters/setDashboardItemProperty.ts +++ b/src/version3/parameters/setDashboardItemProperty.ts @@ -5,4 +5,5 @@ export interface SetDashboardItemProperty { itemId: string; /** The key of the dashboard item property. The maximum length is 255 characters. */ propertyKey: string; + body?: any; } diff --git a/src/version3/projectCategories.ts b/src/version3/projectCategories.ts index c61fbd617d..94ca754492 100644 --- a/src/version3/projectCategories.ts +++ b/src/version3/projectCategories.ts @@ -12,13 +12,13 @@ export class ProjectCategories { * Returns all project categories. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async getAllProjectCategories(callback: Callback): Promise; + async getAllProjectCategories(callback: Callback): Promise; /** * Returns all project categories. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async getAllProjectCategories(callback?: never): Promise; - async getAllProjectCategories(callback?: Callback): Promise { + async getAllProjectCategories(callback?: never): Promise; + async getAllProjectCategories(callback?: Callback): Promise { const config = { url: '/rest/api/3/projectCategory', method: 'GET', diff --git a/src/version3/projectComponents.ts b/src/version3/projectComponents.ts index 22fe491025..40721d5764 100644 --- a/src/version3/projectComponents.ts +++ b/src/version3/projectComponents.ts @@ -185,15 +185,15 @@ export class ProjectComponents { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getProjectComponents(parameters: Parameters.GetProjectComponents, callback: Callback): Promise; + async getProjectComponents(parameters: Parameters.GetProjectComponents, callback: Callback): Promise; /** * Returns all components in a project. See the [Get project components paginated](#api-rest-api-3-project-projectIdOrKey-component-get) resource if you want to get a full list of components with pagination. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getProjectComponents(parameters: Parameters.GetProjectComponents, callback?: never): Promise; - async getProjectComponents(parameters: Parameters.GetProjectComponents, callback?: Callback): Promise { + async getProjectComponents(parameters: Parameters.GetProjectComponents, callback?: never): Promise; + async getProjectComponents(parameters: Parameters.GetProjectComponents, callback?: Callback): Promise { const config = { url: `/rest/api/3/project/${parameters.projectIdOrKey}/components`, method: 'GET', diff --git a/src/version3/projectRoles.ts b/src/version3/projectRoles.ts index 4e1a15df95..dc9a987d7c 100644 --- a/src/version3/projectRoles.ts +++ b/src/version3/projectRoles.ts @@ -16,7 +16,7 @@ export class ProjectRoles { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for any project on the site or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getProjectRoles(parameters: Parameters.GetProjectRoles, callback: Callback): Promise; + async getProjectRoles>(parameters: Parameters.GetProjectRoles, callback: Callback): Promise; /** * Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and self URL for each role. * @@ -25,8 +25,8 @@ export class ProjectRoles { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for any project on the site or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getProjectRoles(parameters: Parameters.GetProjectRoles, callback?: never): Promise; - async getProjectRoles(parameters: Parameters.GetProjectRoles, callback?: Callback): Promise { + async getProjectRoles>(parameters: Parameters.GetProjectRoles, callback?: never): Promise; + async getProjectRoles>(parameters: Parameters.GetProjectRoles, callback?: Callback): Promise { const config = { url: `/rest/api/3/project/${parameters.projectIdOrKey}/role`, method: 'GET', @@ -68,15 +68,15 @@ export class ProjectRoles { * 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. */ - async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback: Callback): Promise; + async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback: Callback): Promise; /** * Returns all [project roles](https://confluence.atlassian.com/x/3odKLg) and the details for each role. Note that the list of project roles is common to all projects. * * 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. */ - async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback?: never): Promise; - async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback?: Callback): Promise { + async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback?: never): Promise; + async getProjectRoleDetails(parameters: Parameters.GetProjectRoleDetails, callback?: Callback): Promise { const config = { url: `/rest/api/3/project/${parameters.projectIdOrKey}/roledetails`, method: 'GET', @@ -108,7 +108,7 @@ export class ProjectRoles { * * Actors: Users and groups that are associated with a project role for a project, which may differ from the default actors. This enables you to assign a user to different roles in different projects. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllProjectRoles(callback: Callback): Promise; + async getAllProjectRoles(callback: Callback): Promise; /** * Gets a list of all project roles, complete with project role details and default actors. * @@ -128,8 +128,8 @@ export class ProjectRoles { * * Actors: Users and groups that are associated with a project role for a project, which may differ from the default actors. This enables you to assign a user to different roles in different projects. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllProjectRoles(callback?: never): Promise; - async getAllProjectRoles(callback?: Callback): Promise { + async getAllProjectRoles(callback?: never): Promise; + async getAllProjectRoles(callback?: Callback): Promise { const config = { url: '/rest/api/3/role', method: 'GET', diff --git a/src/version3/projectTypes.ts b/src/version3/projectTypes.ts index 8b559a3a54..7528896f31 100644 --- a/src/version3/projectTypes.ts +++ b/src/version3/projectTypes.ts @@ -33,11 +33,11 @@ export class ProjectTypes { /** * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw) with a valid license. */ - async getAllAccessibleProjectTypes(callback: Callback): Promise; + async getAllAccessibleProjectTypes(callback: Callback): Promise; /** * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw) with a valid license. */ - async getAllAccessibleProjectTypes(callback?: never): Promise; - async getAllAccessibleProjectTypes(callback?: Callback): Promise { + async getAllAccessibleProjectTypes(callback?: never): Promise; + async getAllAccessibleProjectTypes(callback?: Callback): Promise { const config = { url: '/rest/api/3/project/type/accessible', method: 'GET', diff --git a/src/version3/projectVersions.ts b/src/version3/projectVersions.ts index 7785679b62..8ecdc3e925 100644 --- a/src/version3/projectVersions.ts +++ b/src/version3/projectVersions.ts @@ -45,15 +45,15 @@ export class ProjectVersions { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getProjectVersions(parameters: Parameters.GetProjectVersions, callback: Callback): Promise; + async getProjectVersions(parameters: Parameters.GetProjectVersions, callback: Callback): Promise; /** * Returns all versions in a project. The response is not paginated. Use [Get project versions paginated](#api-rest-api-3-project-projectIdOrKey-version-get) if you want to get the versions in a project with pagination. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getProjectVersions(parameters: Parameters.GetProjectVersions, callback?: never): Promise; - async getProjectVersions(parameters: Parameters.GetProjectVersions, callback?: Callback): Promise { + async getProjectVersions(parameters: Parameters.GetProjectVersions, callback?: never): Promise; + async getProjectVersions(parameters: Parameters.GetProjectVersions, callback?: Callback): Promise { const config = { url: `/rest/api/3/project/${parameters.projectIdOrKey}/versions`, method: 'GET', @@ -171,7 +171,7 @@ export class ProjectVersions { /** * Deletes a project version. * - * 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. + * @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. * @@ -182,7 +182,7 @@ export class ProjectVersions { /** * Deletes a project version. * - * 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. + * @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. * diff --git a/src/version3/projects.ts b/src/version3/projects.ts index aaa768c219..8cd81a969e 100644 --- a/src/version3/projects.ts +++ b/src/version3/projects.ts @@ -98,11 +98,11 @@ export class Projects { } /** - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of projects visible to the user. + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of projects visible to the user. * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Projects are returned only where the user has one of: + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Projects are returned only where the user has one of: * * * *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * * *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. @@ -110,11 +110,11 @@ export class Projects { */ async searchProjects(parameters: Parameters.SearchProjects | undefined, callback: Callback): Promise; /** - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of projects visible to the user. + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of projects visible to the user. * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Projects are returned only where the user has one of: + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Projects are returned only where the user has one of: * * * *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * * *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. @@ -305,15 +305,15 @@ export class Projects { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getAllStatuses(parameters: Parameters.GetAllStatuses, callback: Callback): Promise; + async getAllStatuses(parameters: Parameters.GetAllStatuses, callback: Callback): Promise; /** * Returns the valid statuses for a project. The statuses are grouped by issue type, as each project has a set of valid issue types and each issue type has a set of valid statuses. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. */ - async getAllStatuses(parameters: Parameters.GetAllStatuses, callback?: never): Promise; - async getAllStatuses(parameters: Parameters.GetAllStatuses, callback?: Callback): Promise { + async getAllStatuses(parameters: Parameters.GetAllStatuses, callback?: never): Promise; + async getAllStatuses(parameters: Parameters.GetAllStatuses, callback?: Callback): Promise { const config = { url: `/rest/api/3/project/${parameters.projectIdOrKey}/statuses`, method: 'GET', diff --git a/src/version3/screenTabFields.ts b/src/version3/screenTabFields.ts index 38f3aa5b91..f69db871e5 100644 --- a/src/version3/screenTabFields.ts +++ b/src/version3/screenTabFields.ts @@ -15,7 +15,7 @@ export class ScreenTabFields { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme. */ - async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback: Callback): Promise; + async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback: Callback): Promise; /** * Returns all fields for a screen tab. * @@ -23,8 +23,8 @@ export class ScreenTabFields { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme. */ - async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback?: never): Promise; - async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback?: Callback): Promise { + async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback?: never): Promise; + async getAllScreenTabFields(parameters: Parameters.GetAllScreenTabFields, callback?: Callback): Promise { const config = { url: `/rest/api/3/screens/${parameters.screenId}/tabs/${parameters.tabId}/fields`, method: 'GET', diff --git a/src/version3/screenTabs.ts b/src/version3/screenTabs.ts index 83c9e625ec..edf19a54b3 100644 --- a/src/version3/screenTabs.ts +++ b/src/version3/screenTabs.ts @@ -15,7 +15,7 @@ export class ScreenTabs { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme. */ - async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback: Callback): Promise; + async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback: Callback): Promise; /** * Returns the list of tabs for a screen. * @@ -23,8 +23,8 @@ export class ScreenTabs { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme. */ - async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback?: never): Promise; - async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback?: Callback): Promise { + async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback?: never): Promise; + async getAllScreenTabs(parameters: Parameters.GetAllScreenTabs, callback?: Callback): Promise { const config = { url: `/rest/api/3/screens/${parameters.screenId}/tabs`, method: 'GET', diff --git a/src/version3/screens.ts b/src/version3/screens.ts index 78aa2adcd7..3f832b7265 100644 --- a/src/version3/screens.ts +++ b/src/version3/screens.ts @@ -144,13 +144,13 @@ export class Screens { * Returns the fields that can be added to a tab on a screen. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback: Callback): Promise; + async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback: Callback): Promise; /** * Returns the fields that can be added to a tab on a screen. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback?: never): Promise; - async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback?: Callback): Promise { + async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback?: never): Promise; + async getAvailableScreenFields(parameters: Parameters.GetAvailableScreenFields, callback?: Callback): Promise { const config = { url: `/rest/api/3/screens/${parameters.screenId}/availableFields`, method: 'GET', diff --git a/src/version3/timeTracking.ts b/src/version3/timeTracking.ts index 485e0e08bd..25d1c054c6 100644 --- a/src/version3/timeTracking.ts +++ b/src/version3/timeTracking.ts @@ -55,13 +55,13 @@ export class TimeTracking { * Returns all time tracking providers. By default, Jira only has one time tracking provider: *JIRA provided time tracking*. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the [ Time Tracking Provider](https://developer.atlassian.com/cloud/jira/platform/modules/time-tracking-provider/) module. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAvailableTimeTrackingImplementations(callback: Callback): Promise; + async getAvailableTimeTrackingImplementations(callback: Callback): Promise; /** * Returns all time tracking providers. By default, Jira only has one time tracking provider: *JIRA provided time tracking*. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the [ Time Tracking Provider](https://developer.atlassian.com/cloud/jira/platform/modules/time-tracking-provider/) module. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAvailableTimeTrackingImplementations(callback?: never): Promise; - async getAvailableTimeTrackingImplementations(callback?: Callback): Promise { + async getAvailableTimeTrackingImplementations(callback?: never): Promise; + async getAvailableTimeTrackingImplementations(callback?: Callback): Promise { const config = { url: '/rest/api/3/configuration/timetracking/list', method: 'GET', diff --git a/src/version3/userSearch.ts b/src/version3/userSearch.ts index 9003437ed3..58b2505876 100644 --- a/src/version3/userSearch.ts +++ b/src/version3/userSearch.ts @@ -16,7 +16,7 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback: Callback): Promise; + async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback: Callback): Promise; /** * Returns a list of users who can be assigned issues in one or more projects. The list may be restricted to users whose attributes match a string. * @@ -25,8 +25,8 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback?: never): Promise; - async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback?: Callback): Promise { + async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback?: never): Promise; + async findBulkAssignableUsers(parameters: Parameters.FindBulkAssignableUsers, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/assignable/multiProjectSearch', method: 'GET', @@ -55,7 +55,7 @@ export class UserSearch { * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that can be assigned the issue. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who can be assigned the issue, use [Get all users](#api-rest-api-3-users-search-get) and filter the records in your code. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async findAssignableUsers(parameters: Parameters.FindAssignableUsers | undefined, callback: Callback): Promise; + async findAssignableUsers(parameters: Parameters.FindAssignableUsers | undefined, callback: Callback): Promise; /** * Returns a list of users that can be assigned to an issue. Use this operation to find the list of users who can be assigned to: * @@ -68,8 +68,8 @@ export class UserSearch { * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that can be assigned the issue. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who can be assigned the issue, use [Get all users](#api-rest-api-3-users-search-get) and filter the records in your code. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async findAssignableUsers(parameters?: Parameters.FindAssignableUsers, callback?: never): Promise; - async findAssignableUsers(parameters?: Parameters.FindAssignableUsers, callback?: Callback): Promise { + async findAssignableUsers(parameters?: Parameters.FindAssignableUsers, callback?: never): Promise; + async findAssignableUsers(parameters?: Parameters.FindAssignableUsers, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/assignable/search', method: 'GET', @@ -106,7 +106,7 @@ export class UserSearch { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to get users for any project. * * *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project, to get users for that project. */ - async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback: Callback): Promise; + async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback: Callback): Promise; /** * Returns a list of users who fulfill these criteria: * @@ -123,8 +123,8 @@ export class UserSearch { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to get users for any project. * * *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project, to get users for that project. */ - async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback?: never): Promise; - async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback?: Callback): Promise { + async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback?: never): Promise; + async findUsersWithAllPermissions(parameters: Parameters.FindUsersWithAllPermissions, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/permission/search', method: 'GET', @@ -187,7 +187,7 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls or calls by users without the required permission return empty search results. */ - async findUsers(parameters: Parameters.FindUsers | undefined, callback: Callback): Promise; + async findUsers(parameters: Parameters.FindUsers | undefined, callback: Callback): Promise; /** * Returns a list of users that match the search string and property. * @@ -196,8 +196,8 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls or calls by users without the required permission return empty search results. */ - async findUsers(parameters?: Parameters.FindUsers, callback?: never): Promise; - async findUsers(parameters?: Parameters.FindUsers, callback?: Callback): Promise { + async findUsers(parameters?: Parameters.FindUsers, callback?: never): Promise; + async findUsers(parameters?: Parameters.FindUsers, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/search', method: 'GET', @@ -346,7 +346,7 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls and calls by users without the required permission return empty search results. */ - async findUsersWithBrowsePermission(parameters: Parameters.FindUsersWithBrowsePermission | undefined, callback: Callback): Promise; + async findUsersWithBrowsePermission(parameters: Parameters.FindUsersWithBrowsePermission | undefined, callback: Callback): Promise; /** * Returns a list of users who fulfill these criteria: * @@ -363,8 +363,8 @@ export class UserSearch { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls and calls by users without the required permission return empty search results. */ - async findUsersWithBrowsePermission(parameters?: Parameters.FindUsersWithBrowsePermission, callback?: never): Promise; - async findUsersWithBrowsePermission(parameters?: Parameters.FindUsersWithBrowsePermission, callback?: Callback): Promise { + async findUsersWithBrowsePermission(parameters?: Parameters.FindUsersWithBrowsePermission, callback?: never): Promise; + async findUsersWithBrowsePermission(parameters?: Parameters.FindUsersWithBrowsePermission, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/viewissue/search', method: 'GET', diff --git a/src/version3/users.ts b/src/version3/users.ts index 426905f072..7c3237ab91 100644 --- a/src/version3/users.ts +++ b/src/version3/users.ts @@ -36,8 +36,6 @@ export class Users { /** * Creates a user. This resource is retained for legacy compatibility. As soon as a more suitable alternative is available this resource will be deprecated. * - * The option is provided to set or generate a password for the user. When using the option to generate a password, by omitting `password` from the request, include `"notification": "true"` to ensure the user is sent an email advising them that their account is created. This email includes a link for the user to set their password. If the notification isn't sent for a generated password, the user will need to be sent a reset password request from Jira. - * * If the user exists and has access to Jira, the operation returns a 201 status. If the user exists but does not have access to Jira, the operation returns a 400 status. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -45,8 +43,6 @@ export class Users { /** * Creates a user. This resource is retained for legacy compatibility. As soon as a more suitable alternative is available this resource will be deprecated. * - * The option is provided to set or generate a password for the user. When using the option to generate a password, by omitting `password` from the request, include `"notification": "true"` to ensure the user is sent an email advising them that their account is created. This email includes a link for the user to set their password. If the notification isn't sent for a generated password, the user will need to be sent a reset password request from Jira. - * * If the user exists and has access to Jira, the operation returns a 201 status. If the user exists but does not have access to Jira, the operation returns a 400 status. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -124,13 +120,13 @@ export class Users { * Returns the account IDs for the users specified in the `key` or `username` parameters. Note that multiple `key` or `username` parameters can be specified. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async bulkGetUsersMigration(parameters: Parameters.BulkGetUsersMigration | undefined, callback: Callback): Promise; + async bulkGetUsersMigration(parameters: Parameters.BulkGetUsersMigration | undefined, callback: Callback): Promise; /** * Returns the account IDs for the users specified in the `key` or `username` parameters. Note that multiple `key` or `username` parameters can be specified. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async bulkGetUsersMigration(parameters?: Parameters.BulkGetUsersMigration, callback?: never): Promise; - async bulkGetUsersMigration(parameters?: Parameters.BulkGetUsersMigration, callback?: Callback): Promise { + async bulkGetUsersMigration(parameters?: Parameters.BulkGetUsersMigration, callback?: never): Promise; + async bulkGetUsersMigration(parameters?: Parameters.BulkGetUsersMigration, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/bulk/migration', method: 'GET', @@ -152,7 +148,7 @@ export class Users { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLgl), to get the column details for any user. * * Permission to access Jira, to get the calling user's column details. */ - async getUserDefaultColumns(parameters: Parameters.GetUserDefaultColumns | undefined, callback: Callback): Promise; + async getUserDefaultColumns(parameters: Parameters.GetUserDefaultColumns | undefined, callback: Callback): Promise; /** * Returns the default [issue table columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If `accountId` is not passed in the request, the calling user's details are returned. * @@ -160,8 +156,8 @@ export class Users { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLgl), to get the column details for any user. * * Permission to access Jira, to get the calling user's column details. */ - async getUserDefaultColumns(parameters?: Parameters.GetUserDefaultColumns, callback?: never): Promise; - async getUserDefaultColumns(parameters?: Parameters.GetUserDefaultColumns, callback?: Callback): Promise { + async getUserDefaultColumns(parameters?: Parameters.GetUserDefaultColumns, callback?: never): Promise; + async getUserDefaultColumns(parameters?: Parameters.GetUserDefaultColumns, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/columns', method: 'GET', @@ -185,7 +181,7 @@ export class Users { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * * Permission to access Jira, to set the calling user's columns. */ - async setUserColumns(parameters: Parameters.SetUserColumns | undefined, callback: Callback): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns | undefined, callback: Callback): Promise; /** * Sets the default [ issue table columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If an account ID is not passed, the calling user's default columns are set. If no column details are sent, then all default columns are removed. * @@ -197,8 +193,8 @@ export class Users { * * * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * * Permission to access Jira, to set the calling user's columns. */ - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: never): Promise; - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: Callback): Promise { + async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: never): Promise; + async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/columns', method: 'PUT', @@ -279,13 +275,13 @@ export class Users { * Returns the groups to which a user belongs. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUserGroups(parameters: Parameters.GetUserGroups, callback: Callback): Promise; + async getUserGroups(parameters: Parameters.GetUserGroups, callback: Callback): Promise; /** * Returns the groups to which a user belongs. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUserGroups(parameters: Parameters.GetUserGroups, callback?: never): Promise; - async getUserGroups(parameters: Parameters.GetUserGroups, callback?: Callback): Promise { + async getUserGroups(parameters: Parameters.GetUserGroups, callback?: never): Promise; + async getUserGroups(parameters: Parameters.GetUserGroups, callback?: Callback): Promise { const config = { url: '/rest/api/3/user/groups', method: 'GET', @@ -303,13 +299,13 @@ export class Users { * Returns a list of all (active and inactive) users. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllUsersDefault(parameters: Parameters.GetAllUsersDefault | undefined, callback: Callback): Promise; + async getAllUsersDefault(parameters: Parameters.GetAllUsersDefault | undefined, callback: Callback): Promise; /** * Returns a list of all (active and inactive) users. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllUsersDefault(parameters?: Parameters.GetAllUsersDefault, callback?: never): Promise; - async getAllUsersDefault(parameters?: Parameters.GetAllUsersDefault, callback?: Callback): Promise { + async getAllUsersDefault(parameters?: Parameters.GetAllUsersDefault, callback?: never): Promise; + async getAllUsersDefault(parameters?: Parameters.GetAllUsersDefault, callback?: Callback): Promise { const config = { url: '/rest/api/3/users', method: 'GET', @@ -326,13 +322,13 @@ export class Users { * Returns a list of all (active and inactive) users. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllUsers(parameters: Parameters.GetAllUsers | undefined, callback: Callback): Promise; + async getAllUsers(parameters: Parameters.GetAllUsers | undefined, callback: Callback): Promise; /** * Returns a list of all (active and inactive) users. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllUsers(parameters?: Parameters.GetAllUsers, callback?: never): Promise; - async getAllUsers(parameters?: Parameters.GetAllUsers, callback?: Callback): Promise { + async getAllUsers(parameters?: Parameters.GetAllUsers, callback?: never): Promise; + async getAllUsers(parameters?: Parameters.GetAllUsers, callback?: Callback): Promise { const config = { url: '/rest/api/3/users/search', method: 'GET', diff --git a/src/version3/workflowStatusCategories.ts b/src/version3/workflowStatusCategories.ts index f9c7b9fc8f..2cf036eea3 100644 --- a/src/version3/workflowStatusCategories.ts +++ b/src/version3/workflowStatusCategories.ts @@ -12,13 +12,13 @@ export class WorkflowStatusCategories { * Returns a list of all status categories. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async getStatusCategories(callback: Callback): Promise; + async getStatusCategories(callback: Callback): Promise; /** * Returns a list of all status categories. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Permission to access Jira. */ - async getStatusCategories(callback?: never): Promise; - async getStatusCategories(callback?: Callback): Promise { + async getStatusCategories(callback?: never): Promise; + async getStatusCategories(callback?: Callback): Promise { const config = { url: '/rest/api/3/statuscategory', method: 'GET', diff --git a/src/version3/workflowStatuses.ts b/src/version3/workflowStatuses.ts index 1cb2e883e3..9cd5815c84 100644 --- a/src/version3/workflowStatuses.ts +++ b/src/version3/workflowStatuses.ts @@ -14,15 +14,15 @@ export class WorkflowStatuses { * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async getStatuses(callback: Callback): Promise; + async getStatuses(callback: Callback): Promise; /** * Returns a list of all statuses associated with workflows. * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async getStatuses(callback?: never): Promise; - async getStatuses(callback?: Callback): Promise { + async getStatuses(callback?: never): Promise; + async getStatuses(callback?: Callback): Promise { const config = { url: '/rest/api/3/status', method: 'GET', diff --git a/src/version3/workflows.ts b/src/version3/workflows.ts index 67e019dc6b..255ce9deaa 100644 --- a/src/version3/workflows.ts +++ b/src/version3/workflows.ts @@ -9,6 +9,7 @@ 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/v3/api-group-workflows/#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. @@ -17,6 +18,7 @@ export class Workflows { */ async getAllWorkflows(parameters: Parameters.GetAllWorkflows | undefined, callback: Callback): Promise; /** + * @deprecated * Returns all workflows in Jira or a workflow. Deprecated, use [Get workflows paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows/#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. diff --git a/tests/system/constants.ts b/tests/system/constants.ts new file mode 100644 index 0000000000..96ea6d3bca --- /dev/null +++ b/tests/system/constants.ts @@ -0,0 +1,8 @@ +export namespace Constants { + export const testTimeouts = 20_000; + export const testProjectKey = 'AUTOTEST'; + export const testProjectName = 'Jira.js project for automatic tests'; + export const testGroupName = 'Automated tests group name'; + export const testDashboardName = 'Automated dashboard name'; + export const testIssueSummary = 'Test issue summary'; +} diff --git a/tests/system/index.ts b/tests/system/index.ts new file mode 100644 index 0000000000..dcfc194d9f --- /dev/null +++ b/tests/system/index.ts @@ -0,0 +1,2 @@ +export * from './constants'; +export * as Utils from './utils'; diff --git a/tests/system/utils/constants.ts b/tests/system/utils/constants.ts deleted file mode 100644 index faa54f0e60..0000000000 --- a/tests/system/utils/constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -export namespace Constants { - export const testProjectKey = 'AUTOTEST'; - export const testProjectName = 'Jira.js project for automatic tests'; -} diff --git a/tests/system/utils/createIssue.ts b/tests/system/utils/createIssue.ts index 1ca06113b9..07e6994276 100644 --- a/tests/system/utils/createIssue.ts +++ b/tests/system/utils/createIssue.ts @@ -1,5 +1,5 @@ import { getVersion2Client } from './getClient'; -import { Constants } from './constants'; +import { Constants } from '../constants'; export const createIssue = async () => { const client = getVersion2Client(); diff --git a/tests/system/utils/createTestProject.ts b/tests/system/utils/createTestProject.ts index 8f2c05102f..9a658eb2f3 100644 --- a/tests/system/utils/createTestProject.ts +++ b/tests/system/utils/createTestProject.ts @@ -1,5 +1,5 @@ import { getVersion2Client } from './getClient'; -import { Constants } from './constants'; +import { Constants } from '../constants'; export const createTestProject = async () => { const client = getVersion2Client(); diff --git a/tests/system/utils/deleteTestProject.ts b/tests/system/utils/deleteTestProject.ts index 7b009e4483..470367cb38 100644 --- a/tests/system/utils/deleteTestProject.ts +++ b/tests/system/utils/deleteTestProject.ts @@ -1,5 +1,5 @@ import { getVersion2Client } from './getClient'; -import { Constants } from './constants'; +import { Constants } from '../constants'; export const deleteTestProject = async () => { const client = getVersion2Client(); diff --git a/tests/system/utils/index.ts b/tests/system/utils/index.ts index 863469d19d..ae0d8313f3 100644 --- a/tests/system/utils/index.ts +++ b/tests/system/utils/index.ts @@ -1,5 +1,4 @@ export * from './cleanupEnvironment'; -export * from './constants'; export * from './createIssue'; export * from './createTestProject'; export * from './deleteTestProject'; diff --git a/tests/system/version2/dashboards.test.ts b/tests/system/version2/dashboards.test.ts new file mode 100644 index 0000000000..5f0af75c59 --- /dev/null +++ b/tests/system/version2/dashboards.test.ts @@ -0,0 +1,37 @@ +import { Version2Models } from '../../../src'; +import { Constants } from '../constants'; +import { cleanupEnvironment, getVersion2Client, prepareEnvironment } from '../utils'; + +describe('Dashboards', () => { + let dashboard: Version2Models.Dashboard; + const client = getVersion2Client(); + + beforeAll(async () => { + jest.setTimeout(Constants.testTimeouts); + await prepareEnvironment(); + }); + + afterAll(async () => { + await cleanupEnvironment(); + }); + + it('should create dashboard', async () => { + dashboard = await client.dashboards.createDashboard({ + name: Constants.testDashboardName, + sharePermissions: [], + }); + + expect(dashboard).toBeDefined(); + expect(dashboard.name).toBe(Constants.testDashboardName); + expect(dashboard.sharePermissions).toEqual([]); + }); + + it('should remove dashboard', async () => { + const response = await client.dashboards.deleteDashboard({ + id: dashboard.id, + }); + + expect(typeof response).toBe('string'); + expect(response).toBe(''); + }); +}); diff --git a/tests/system/version2/groups.test.ts b/tests/system/version2/groups.test.ts new file mode 100644 index 0000000000..b44ac0a293 --- /dev/null +++ b/tests/system/version2/groups.test.ts @@ -0,0 +1,24 @@ +import { getVersion2Client } from '../utils'; +import { Constants } from '..'; + +describe('Groups', () => { + const client = getVersion2Client(); + + it('should create a group', async () => { + const group = await client.groups.createGroup({ + name: Constants.testGroupName, + }); + + expect(group).toBeDefined(); + expect(group.name).toBe(Constants.testGroupName); + }); + + it('should remove a group', async () => { + const response = await client.groups.removeGroup({ + groupname: Constants.testGroupName, + }); + + expect(typeof response).toBe('string'); + expect(response.trim()).toBe(''); + }); +}); diff --git a/tests/system/version2/issueAttachments.test.ts b/tests/system/version2/issueAttachments.test.ts index 8763ee923e..e4d08abed3 100644 --- a/tests/system/version2/issueAttachments.test.ts +++ b/tests/system/version2/issueAttachments.test.ts @@ -1,14 +1,14 @@ import * as fs from 'fs'; import { cleanupEnvironment, - Constants, getVersion2Client, prepareEnvironment, } from '../utils'; +import { Constants } from '../constants'; -describe('System tests. IssueAttachments', () => { +describe('IssueAttachments', () => { beforeAll(async () => { - jest.setTimeout(10_000); + jest.setTimeout(Constants.testTimeouts); await prepareEnvironment(); }); diff --git a/tests/system/version2/issueSearch.test.ts b/tests/system/version2/issueSearch.test.ts index 66d539a733..c2f7f18d48 100644 --- a/tests/system/version2/issueSearch.test.ts +++ b/tests/system/version2/issueSearch.test.ts @@ -3,10 +3,11 @@ import { getVersion2Client, prepareEnvironment, } from '../utils'; +import { Constants } from '../constants'; -describe('System tests. IssueSearch', () => { +describe('IssueSearch', () => { beforeAll(async () => { - jest.setTimeout(10_000); + jest.setTimeout(Constants.testTimeouts); await prepareEnvironment(); }); diff --git a/tests/system/version2/issues.test.ts b/tests/system/version2/issues.test.ts new file mode 100644 index 0000000000..621c573c9f --- /dev/null +++ b/tests/system/version2/issues.test.ts @@ -0,0 +1,47 @@ +import { Version2Models } from '../../../src'; +import { Constants } from '../constants'; +import { + cleanupEnvironment, + getVersion2Client, + prepareEnvironment, +} from '../utils'; + +describe('Issues', () => { + let createdIssue: Version2Models.CreatedIssue; + const client = getVersion2Client(); + + beforeAll(async () => { + jest.setTimeout(Constants.testTimeouts); + await prepareEnvironment(); + }); + + afterAll(async () => { + await cleanupEnvironment(); + }); + + it('should create issue', async () => { + createdIssue = await client.issues.createIssue({ + fields: { + summary: Constants.testIssueSummary, + issuetype: { + name: 'Task', + }, + project: { + key: Constants.testProjectKey, + }, + description: 'Test description', + }, + }); + + expect(createdIssue).toBeDefined(); + expect(createdIssue.id).toBeDefined(); + expect(createdIssue.key).toBe(`${Constants.testProjectKey}-1`); + expect(createdIssue.self).toBeDefined(); + }); + + it('should remove issue', async () => { + const removedIssue = await client.issues.deleteIssue({ issueIdOrKey: createdIssue.id }); + + expect(removedIssue).toBe(''); + }); +}); diff --git a/tests/system/version2/projectRoles.test.ts b/tests/system/version2/projectRoles.test.ts new file mode 100644 index 0000000000..46822f6328 --- /dev/null +++ b/tests/system/version2/projectRoles.test.ts @@ -0,0 +1,24 @@ +import { Constants } from '../constants'; +import { cleanupEnvironment, getVersion2Client, prepareEnvironment } from '../utils'; + +describe('ProjectRoles', () => { + const client = getVersion2Client(); + + beforeAll(async () => { + jest.setTimeout(Constants.testTimeouts); + await prepareEnvironment(); + }); + + afterAll(async () => { + await cleanupEnvironment(); + }); + + it('should get project roles', async () => { + const projectRoles = await client.projectRoles.getProjectRoles({ + projectIdOrKey: Constants.testProjectKey, + }); + + expect(projectRoles.Administrators).toBeDefined(); + expect(typeof projectRoles.Administrators).toBe('string'); + }); +}); diff --git a/tests/system/version2/projects.test.ts b/tests/system/version2/projects.test.ts index de6501f748..f87f9b8c05 100644 --- a/tests/system/version2/projects.test.ts +++ b/tests/system/version2/projects.test.ts @@ -1,12 +1,13 @@ import { prepareEnvironment, cleanupEnvironment, - getVersion2Client, Constants, + getVersion2Client, } from '../utils'; +import { Constants } from '../constants'; describe('Projects', () => { beforeAll(async () => { - jest.setTimeout(10_000); + jest.setTimeout(Constants.testTimeouts); await prepareEnvironment(); }); diff --git a/tests/system/version2/users.test.ts b/tests/system/version2/users.test.ts new file mode 100644 index 0000000000..56cb138431 --- /dev/null +++ b/tests/system/version2/users.test.ts @@ -0,0 +1,12 @@ +import { getVersion2Client } from '../utils'; + +describe('Users', () => { + const client = getVersion2Client(); + + it('should set default user columns', async () => { + const response = await client.users.setUserColumns(); + + expect(typeof response).toBe('string'); + expect(response.trim()).toBe(''); + }); +}); diff --git a/tests/system/version3/dashboards.test.ts b/tests/system/version3/dashboards.test.ts new file mode 100644 index 0000000000..f1b9dc4445 --- /dev/null +++ b/tests/system/version3/dashboards.test.ts @@ -0,0 +1,37 @@ +import { Version3Models } from '../../../src'; +import { Constants } from '../constants'; +import { cleanupEnvironment, getVersion3Client, prepareEnvironment } from '../utils'; + +describe('Dashboards', () => { + let dashboard: Version3Models.Dashboard; + const client = getVersion3Client(); + + beforeAll(async () => { + jest.setTimeout(Constants.testTimeouts); + await prepareEnvironment(); + }); + + afterAll(async () => { + await cleanupEnvironment(); + }); + + it('should create dashboard', async () => { + dashboard = await client.dashboards.createDashboard({ + name: Constants.testDashboardName, + sharePermissions: [], + }); + + expect(dashboard).toBeDefined(); + expect(dashboard.name).toBe(Constants.testDashboardName); + expect(dashboard.sharePermissions).toEqual([]); + }); + + it('should remove dashboard', async () => { + const response = await client.dashboards.deleteDashboard({ + id: dashboard.id, + }); + + expect(typeof response).toBe('string'); + expect(response).toBe(''); + }); +}); diff --git a/tests/system/version3/groups.test.ts b/tests/system/version3/groups.test.ts new file mode 100644 index 0000000000..280177fa46 --- /dev/null +++ b/tests/system/version3/groups.test.ts @@ -0,0 +1,24 @@ +import { getVersion3Client } from '../utils'; +import { Constants } from '..'; + +describe('Groups', () => { + const client = getVersion3Client(); + + it('should create a group', async () => { + const group = await client.groups.createGroup({ + name: Constants.testGroupName, + }); + + expect(group).toBeDefined(); + expect(group.name).toBe(Constants.testGroupName); + }); + + it('should remove a group', async () => { + const response = await client.groups.removeGroup({ + groupname: Constants.testGroupName, + }); + + expect(typeof response).toBe('string'); + expect(response.trim()).toBe(''); + }); +}); diff --git a/tests/system/version3/issueAttachments.test.ts b/tests/system/version3/issueAttachments.test.ts index 03edf838ca..d4f3cf529d 100644 --- a/tests/system/version3/issueAttachments.test.ts +++ b/tests/system/version3/issueAttachments.test.ts @@ -1,14 +1,14 @@ import * as fs from 'fs'; import { cleanupEnvironment, - Constants, getVersion3Client, prepareEnvironment, } from '../utils'; +import { Constants } from '../constants'; -describe('System tests. IssueAttachments', () => { +describe('IssueAttachments', () => { beforeAll(async () => { - jest.setTimeout(10_000); + jest.setTimeout(Constants.testTimeouts); await prepareEnvironment(); }); diff --git a/tests/system/version3/issueSearch.test.ts b/tests/system/version3/issueSearch.test.ts index fdc8abfdf9..975290869b 100644 --- a/tests/system/version3/issueSearch.test.ts +++ b/tests/system/version3/issueSearch.test.ts @@ -3,10 +3,11 @@ import { getVersion3Client, prepareEnvironment, } from '../utils'; +import { Constants } from '../constants'; -describe('System tests. IssueSearch', () => { +describe('IssueSearch', () => { beforeAll(async () => { - jest.setTimeout(10_000); + jest.setTimeout(Constants.testTimeouts); await prepareEnvironment(); }); diff --git a/tests/system/version3/issues.test.ts b/tests/system/version3/issues.test.ts new file mode 100644 index 0000000000..09fe22bbea --- /dev/null +++ b/tests/system/version3/issues.test.ts @@ -0,0 +1,61 @@ +import { Version3Models } from '../../../src'; +import { Constants } from '../constants'; +import { + cleanupEnvironment, + getVersion3Client, + prepareEnvironment, +} from '../utils'; + +describe('Issues', () => { + let createdIssue: Version3Models.CreatedIssue; + const client = getVersion3Client(); + + beforeAll(async () => { + jest.setTimeout(Constants.testTimeouts); + await prepareEnvironment(); + }); + + afterAll(async () => { + await cleanupEnvironment(); + }); + + it('should create issue', async () => { + createdIssue = await client.issues.createIssue({ + fields: { + summary: Constants.testIssueSummary, + issuetype: { + name: 'Task', + }, + project: { + key: Constants.testProjectKey, + }, + description: { + type: 'doc', + version: 1, + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Description', + type: 'text', + }, + ], + }, + ], + }, + }, + }); + + expect(createdIssue).toBeDefined(); + expect(createdIssue.id).toBeDefined(); + expect(createdIssue.key).toBe(`${Constants.testProjectKey}-1`); + expect(createdIssue.self).toBeDefined(); + }); + + it('should remove issue', async () => { + const removedIssue = await client.issues.deleteIssue({ issueIdOrKey: createdIssue.id }); + + expect(removedIssue).toBe(''); + }); +}); diff --git a/tests/system/version3/projectRoles.test.ts b/tests/system/version3/projectRoles.test.ts new file mode 100644 index 0000000000..ec0e3cf4f9 --- /dev/null +++ b/tests/system/version3/projectRoles.test.ts @@ -0,0 +1,24 @@ +import { Constants } from '../constants'; +import { cleanupEnvironment, getVersion3Client, prepareEnvironment } from '../utils'; + +describe('ProjectRoles', () => { + const client = getVersion3Client(); + + beforeAll(async () => { + jest.setTimeout(Constants.testTimeouts); + await prepareEnvironment(); + }); + + afterAll(async () => { + await cleanupEnvironment(); + }); + + it('should get project roles', async () => { + const projectRoles = await client.projectRoles.getProjectRoles({ + projectIdOrKey: Constants.testProjectKey, + }); + + expect(projectRoles.Administrators).toBeDefined(); + expect(typeof projectRoles.Administrators).toBe('string'); + }); +}); diff --git a/tests/system/version3/projects.test.ts b/tests/system/version3/projects.test.ts index 3fc39a1b7d..f3c705deb1 100644 --- a/tests/system/version3/projects.test.ts +++ b/tests/system/version3/projects.test.ts @@ -1,12 +1,13 @@ import { prepareEnvironment, cleanupEnvironment, - getVersion3Client, Constants, + getVersion3Client, } from '../utils'; +import { Constants } from '../constants'; describe('Projects', () => { beforeAll(async () => { - jest.setTimeout(10_000); + jest.setTimeout(Constants.testTimeouts); await prepareEnvironment(); }); diff --git a/tests/system/version3/users.test.ts b/tests/system/version3/users.test.ts new file mode 100644 index 0000000000..0960bf711a --- /dev/null +++ b/tests/system/version3/users.test.ts @@ -0,0 +1,12 @@ +import { getVersion3Client } from '../utils'; + +describe('Users', () => { + const client = getVersion3Client(); + + it('should set default user columns', async () => { + const response = await client.users.setUserColumns(); + + expect(typeof response).toBe('string'); + expect(response.trim()).toBe(''); + }); +});