diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..1a6b79cc --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "plugins": [ + "prettier-plugin-jsdoc" + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..8d4fe69a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +### 1.0.1 + +- Minor internal improvements +- New endpoint added + +### 1.0.0 + +- Initial upload diff --git a/package-lock.json b/package-lock.json index 93d70115..bd2c5666 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "confluence.js", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -14,26 +14,26 @@ } }, "@babel/compat-data": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", + "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==", "dev": true }, "@babel/core": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", - "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.3.tgz", + "integrity": "sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.14", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", + "@babel/generator": "^7.14.3", + "@babel/helper-compilation-targets": "^7.13.16", + "@babel/helper-module-transforms": "^7.14.2", + "@babel/helpers": "^7.14.0", + "@babel/parser": "^7.14.3", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14", + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -75,12 +75,12 @@ } }, "@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.3.tgz", + "integrity": "sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA==", "dev": true, "requires": { - "@babel/types": "^7.13.0", + "@babel/types": "^7.14.2", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -94,12 +94,12 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", - "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", + "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", "dev": true, "requires": { - "@babel/compat-data": "^7.13.12", + "@babel/compat-data": "^7.13.15", "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" @@ -114,14 +114,14 @@ } }, "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.2.tgz", + "integrity": "sha512-NYZlkZRydxw+YT56IlhIcS8PAhb+FEUiOzuhFTfqDyPmzAhRge6ua0dQYT/Uh0t/EDHq05/i+e5M2d4XvjgarQ==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.12.13", "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" + "@babel/types": "^7.14.2" } }, "@babel/helper-get-function-arity": { @@ -152,19 +152,19 @@ } }, "@babel/helper-module-transforms": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", - "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.2.tgz", + "integrity": "sha512-OznJUda/soKXv0XhpvzGWDnml4Qnwp16GN+D/kZIdLsWoHj05kyu8Rm5kXmMef+rVJZ0+4pSGLkeixdqNUATDA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.13.12", "@babel/helper-replace-supers": "^7.13.12", "@babel/helper-simple-access": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14" + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2" } }, "@babel/helper-optimise-call-expression": { @@ -183,15 +183,15 @@ "dev": true }, "@babel/helper-replace-supers": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", - "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.3.tgz", + "integrity": "sha512-Rlh8qEWZSTfdz+tgNV/N4gz1a0TMNwCUcENhMjHTHKp3LseYH5Jha0NSlyTQWMnjbYcwFt+bqAMqSLHVXkQ6UA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2" } }, "@babel/helper-simple-access": { @@ -213,9 +213,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", "dev": true }, "@babel/helper-validator-option": { @@ -225,23 +225,23 @@ "dev": true }, "@babel/helpers": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", + "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", "dev": true, "requires": { "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", + "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -256,13 +256,19 @@ "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true } } }, "@babel/parser": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", - "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.3.tgz", + "integrity": "sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -396,17 +402,17 @@ } }, "@babel/traverse": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", - "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.2.tgz", + "integrity": "sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-function-name": "^7.12.13", + "@babel/generator": "^7.14.2", + "@babel/helper-function-name": "^7.14.2", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", + "@babel/parser": "^7.14.2", + "@babel/types": "^7.14.2", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -429,13 +435,12 @@ } }, "@babel/types": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", - "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.2.tgz", + "integrity": "sha512-SdjAG/3DikRHpUOjxZgnkbR11xUlyDMUFJdvnIgZEE16mqmY0BINMmc4//JMJglEmn6i7sq6p+mGrFWyZ98EEw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-validator-identifier": "^7.14.0", "to-fast-properties": "^2.0.0" } }, @@ -456,9 +461,9 @@ } }, "@eslint/eslintrc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", + "integrity": "sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -480,6 +485,12 @@ "requires": { "type-fest": "^0.8.1" } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true } } }, @@ -778,9 +789,9 @@ } }, "@sinonjs/commons": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", - "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -795,6 +806,12 @@ "@sinonjs/commons": "^1.7.0" } }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, "@types/babel__core": { "version": "7.1.14", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", @@ -856,9 +873,9 @@ } }, "@types/express": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.11.tgz", - "integrity": "sha512-no+R6rW60JEc59977wIxreQVsIEOAYwgCqldrA/vkpCnbD7MqTefO97lmoBe4WE0F156bC4uLSP1XHDOySnChg==", + "version": "4.17.12", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.12.tgz", + "integrity": "sha512-pTYas6FrP15B1Oa0bkN5tQMNqOcVXa9j4FTFtO8DWI9kppKib+6NJtfTOOLcwxuuYvcX2+dVG6et1SxW/Kc17Q==", "dev": true, "requires": { "@types/body-parser": "*", @@ -868,9 +885,9 @@ } }, "@types/express-serve-static-core": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.19.tgz", - "integrity": "sha512-DJOSHzX7pCiSElWaGR8kCprwibCB/3yW6vcT8VG3P0SJjnv19gnWG/AZMfM60Xj/YJIp/YCaDHyvzsFVeniARA==", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.20.tgz", + "integrity": "sha512-8qqFN4W53IEWa9bdmuVrUcVkFemQWnt5DKPQ/oa8xKDYgtjCr2OO6NX5TIK49NLFr3mPYU2cLh92DQquC3oWWQ==", "dev": true, "requires": { "@types/node": "*", @@ -912,9 +929,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", @@ -933,6 +950,15 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/mdast": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz", + "integrity": "sha512-SXPBMnFVQg1s00dlMCc/jCdvPqdE4mXaMMCeRlxLDmTAEoegHT53xKtkDnzDTOcmMHUfcjyf36/YYZ6SxRdnsw==", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, "@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -994,6 +1020,12 @@ "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", "dev": true }, + "@types/unist": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", + "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==", + "dev": true + }, "@types/yargs": { "version": "15.0.13", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", @@ -1010,13 +1042,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", - "integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.25.0.tgz", + "integrity": "sha512-Qfs3dWkTMKkKwt78xp2O/KZQB8MPS1UQ5D3YW2s6LQWBE1074BE+Rym+b1pXZIX3M3fSvPUDaCvZLKV2ylVYYQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.22.0", - "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/experimental-utils": "4.25.0", + "@typescript-eslint/scope-manager": "4.25.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -1026,55 +1058,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz", - "integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.25.0.tgz", + "integrity": "sha512-f0doRE76vq7NEEU0tw+ajv6CrmPelw5wLoaghEHkA2dNLFb3T/zJQqGPQ0OYt5XlZaS13MtnN+GTPCuUVg338w==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.22.0", - "@typescript-eslint/types": "4.22.0", - "@typescript-eslint/typescript-estree": "4.22.0", + "@typescript-eslint/scope-manager": "4.25.0", + "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/typescript-estree": "4.25.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz", - "integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.25.0.tgz", + "integrity": "sha512-OZFa1SKyEJpAhDx8FcbWyX+vLwh7OEtzoo2iQaeWwxucyfbi0mT4DijbOSsTgPKzGHr6GrF2V5p/CEpUH/VBxg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.22.0", - "@typescript-eslint/types": "4.22.0", - "@typescript-eslint/typescript-estree": "4.22.0", + "@typescript-eslint/scope-manager": "4.25.0", + "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/typescript-estree": "4.25.0", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz", - "integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.25.0.tgz", + "integrity": "sha512-2NElKxMb/0rya+NJG1U71BuNnp1TBd1JgzYsldsdA83h/20Tvnf/HrwhiSlNmuq6Vqa0EzidsvkTArwoq+tH6w==", "dev": true, "requires": { - "@typescript-eslint/types": "4.22.0", - "@typescript-eslint/visitor-keys": "4.22.0" + "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/visitor-keys": "4.25.0" } }, "@typescript-eslint/types": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz", - "integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.25.0.tgz", + "integrity": "sha512-+CNINNvl00OkW6wEsi32wU5MhHti2J25TJsJJqgQmJu3B3dYDBcmOxcE5w9cgoM13TrdE/5ND2HoEnBohasxRQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz", - "integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.25.0.tgz", + "integrity": "sha512-1B8U07TGNAFMxZbSpF6jqiDs1cVGO0izVkf18Q/SPcUAc9LhHxzvSowXDTvkHMWUVuPpagupaW63gB6ahTXVlg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.22.0", - "@typescript-eslint/visitor-keys": "4.22.0", + "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/visitor-keys": "4.25.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -1083,12 +1115,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz", - "integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.25.0.tgz", + "integrity": "sha512-AmkqV9dDJVKP/TcZrbf6s6i1zYXt5Hl8qOLrRDTFfRNae4+LB8A4N3i+FLZPW85zIxRy39BgeWOfMS3HoH5ngg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/types": "4.25.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -1126,6 +1158,15 @@ "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1177,9 +1218,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -1249,21 +1290,6 @@ "es-abstract": "^1.18.0-next.1" } }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -1289,9 +1315,9 @@ "dev": true }, "atlassian-jwt": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/atlassian-jwt/-/atlassian-jwt-1.0.3.tgz", - "integrity": "sha512-x5+tZVhR0Rpy8QvaEFQmJdKgjO0MJSDANj69E2yJYhoik8ufvBDJ7rxiZ98tjcUYDAiF2u6aKs5kk/akS0j6HQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/atlassian-jwt/-/atlassian-jwt-2.0.0.tgz", + "integrity": "sha512-naIFzFJZDCioYnxxyi8MG4mf1eL1YZDyuej9VDLRQC81sxHUKivp14BhuVVinFjTO3cqSj3DPYRQnl3eVidkRQ==", "requires": { "jsuri": "^1.3.1", "lodash": "^4.17.11" @@ -1303,18 +1329,6 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, "axios": { "version": "0.21.1", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", @@ -1455,14 +1469,11 @@ } } }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } + "binary-search-bounds": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/binary-search-bounds/-/binary-search-bounds-2.0.5.tgz", + "integrity": "sha512-H0ea4Fd3lS1+sTEB2TgcLoK21lLhwEJzlQv3IN47pJS976Gx4zoWe0ak3q+uYh60ppQxg9F16Ri4tS1sfD4+jA==", + "dev": true }, "brace-expansion": { "version": "1.1.11", @@ -1490,16 +1501,16 @@ "dev": true }, "browserslist": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", - "node-releases": "^1.1.70" + "node-releases": "^1.1.71" } }, "bs-logger": { @@ -1566,9 +1577,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001207", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001207.tgz", - "integrity": "sha512-UPQZdmAsyp2qfCTiMU/zqGSWOYaY9F9LL61V8f+8MrubsaDGpaHD9HRV/EWZGULZn0Hxu48SKzI5DgFwTvHuYw==", + "version": "1.0.30001230", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz", + "integrity": "sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==", "dev": true }, "capture-exit": { @@ -1580,12 +1591,6 @@ "rsvp": "^4.8.4" } }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -1643,6 +1648,24 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true + }, "ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", @@ -1747,6 +1770,12 @@ "delayed-stream": "~1.0.0" } }, + "comment-parser": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.5.tgz", + "integrity": "sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA==", + "dev": true + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -1765,12 +1794,6 @@ "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", "dev": true }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, "convert-source-map": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", @@ -1786,12 +1809,6 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1826,15 +1843,6 @@ } } }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -1989,25 +1997,15 @@ } }, "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", "dev": true }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "electron-to-chromium": { - "version": "1.3.707", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.707.tgz", - "integrity": "sha512-BqddgxNPrcWnbDdJw7SzXVzPmp+oiyjVrc7tkQVaznPGSS9SKZatw6qxoP857M+HbOyyqJQwYQtsuFIMSTNSZA==", + "version": "1.3.738", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.738.tgz", + "integrity": "sha512-vCMf4gDOpEylPSLPLSwAEsz+R3ShP02Y3cAKMZvTqule3XcPp7tgc/0ESI7IS6ZeyBlGClE50N53fIOkcIVnpw==", "dev": true }, "emittery": { @@ -2091,9 +2089,9 @@ "dev": true }, "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "escodegen": { @@ -2157,25 +2155,27 @@ } }, "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.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.27.0.tgz", + "integrity": "sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.0", + "@eslint/eslintrc": "^0.4.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", @@ -2187,7 +2187,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.21", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -2196,9 +2196,17 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^6.0.4", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + } } }, "eslint-config-airbnb": { @@ -2275,50 +2283,46 @@ } }, "eslint-module-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", - "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz", + "integrity": "sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==", "dev": true, "requires": { - "debug": "^2.6.9", + "debug": "^3.2.7", "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, "eslint-plugin-import": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "version": "2.23.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.3.tgz", + "integrity": "sha512-wDxdYbSB55F7T5CC7ucDjY641VvKmlRwT0Vxh7PkY1mI4rclVRFWYfsrjDgZvwYYDZ5ee0ZtfFKXowWjqvEoRQ==", "dev": true, "requires": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", + "array-includes": "^3.1.3", + "array.prototype.flat": "^1.2.4", "debug": "^2.6.9", - "doctrine": "1.5.0", + "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.4", - "eslint-module-utils": "^2.6.0", + "eslint-module-utils": "^2.6.1", + "find-up": "^2.0.0", "has": "^1.0.3", + "is-core-module": "^2.4.0", "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", + "object.values": "^1.1.3", + "pkg-up": "^2.0.0", + "read-pkg-up": "^3.0.0", + "resolve": "^1.20.0", "tsconfig-paths": "^3.9.0" }, "dependencies": { @@ -2332,13 +2336,21 @@ } }, "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" + } + }, + "is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "dev": true, + "requires": { + "has": "^1.0.3" } }, "ms": { @@ -2377,9 +2389,9 @@ } }, "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true }, "espree": { @@ -2621,12 +2633,6 @@ } } }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -2713,12 +2719,6 @@ } } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2823,20 +2823,14 @@ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, "requires": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, @@ -2938,15 +2932,6 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -2999,14 +2984,6 @@ "ignore": "^5.1.4", "merge2": "^1.3.0", "slash": "^3.0.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - } } }, "graceful-fs": { @@ -3035,22 +3012,6 @@ "wordwrap": "^1.0.0" } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -3131,9 +3092,9 @@ } }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "html-encoding-sniffer": { @@ -3151,15 +3112,25 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" } }, "human-signals": { @@ -3178,9 +3149,9 @@ } }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", "dev": true }, "import-fresh": { @@ -3311,6 +3282,22 @@ } } }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -3388,6 +3375,12 @@ "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -3408,9 +3401,9 @@ } }, "is-docker": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.0.tgz", - "integrity": "sha512-K4GwB4i/HzhAzwP/XSlspzRdFTI9N8OxJOyOU7Y5Rz+p+WBokXWVWblaJeBkggthmoSV0OoGTH5thJNvplpkvQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, "optional": true }, @@ -3447,6 +3440,12 @@ "is-extglob": "^2.1.1" } }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true + }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", @@ -3475,9 +3474,9 @@ } }, "is-potential-custom-element-name": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", - "integrity": "sha1-DFLlS8yjkbssSUsh6GJtczbG45c=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, "is-regex": { @@ -3551,12 +3550,6 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, "istanbul-lib-coverage": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", @@ -4245,20 +4238,14 @@ "esprima": "^4.0.0" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, "jsdom": { - "version": "16.5.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.2.tgz", - "integrity": "sha512-JxNtPt9C1ut85boCbJmffaQ06NBnzkQY/MWO3YxPW8IWS38A26z+B1oBvA9LwKrytewdfymnhi4UNH3/RAgZrg==", + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.6.0.tgz", + "integrity": "sha512-Ty1vmF4NHJkolaEmdjtxTfSfkdb8Ywarwf63f+F8/mDD1uLSSWDxDuMiZxiPhwunLrn9LOSVItWj4bLYsLN3Dg==", "dev": true, "requires": { "abab": "^2.0.5", - "acorn": "^8.1.0", + "acorn": "^8.2.4", "acorn-globals": "^6.0.0", "cssom": "^0.4.4", "cssstyle": "^2.3.0", @@ -4266,12 +4253,13 @@ "decimal.js": "^10.2.1", "domexception": "^2.0.1", "escodegen": "^2.0.0", + "form-data": "^3.0.0", "html-encoding-sniffer": "^2.0.1", - "is-potential-custom-element-name": "^1.0.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", "parse5": "6.0.1", - "request": "^2.88.2", - "request-promise-native": "^1.0.9", "saxes": "^5.0.1", "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", @@ -4281,14 +4269,14 @@ "whatwg-encoding": "^1.0.5", "whatwg-mimetype": "^2.3.0", "whatwg-url": "^8.5.0", - "ws": "^7.4.4", + "ws": "^7.4.5", "xml-name-validator": "^3.0.0" }, "dependencies": { "acorn": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.0.tgz", - "integrity": "sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz", + "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==", "dev": true } } @@ -4299,18 +4287,18 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4323,12 +4311,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, "json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -4356,18 +4338,6 @@ } } }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, "jsuri": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsuri/-/jsuri-1.3.1.tgz", @@ -4407,15 +4377,21 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, + "linguist-languages": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/linguist-languages/-/linguist-languages-7.14.0.tgz", + "integrity": "sha512-VqnUYHOSqRqAGnIl+7SCnFxK+sX0x7LXe5qn0TG6t9SViofQgN7272PLCFZ/lgkT7tAO5CA/2pCsZGlGvGhfWA==", + "dev": true + }, "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", + "parse-json": "^4.0.0", + "pify": "^3.0.0", "strip-bom": "^3.0.0" } }, @@ -4440,10 +4416,10 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "lodash.truncate": { @@ -4520,6 +4496,25 @@ "integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==", "dev": true }, + "mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -4532,6 +4527,16 @@ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, + "micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, "micromatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", @@ -4681,9 +4686,9 @@ } }, "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", + "integrity": "sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==", "dev": true }, "normalize-package-data": { @@ -4740,12 +4745,6 @@ "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", "integrity": "sha1-vR/vr2hslrdUda7VGWQS/2DPucE=" }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -4946,13 +4945,28 @@ "callsites": "^3.0.0" } }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "parse5": { @@ -4997,12 +5011,6 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", @@ -5010,9 +5018,9 @@ "dev": true }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pirates": { @@ -5033,6 +5041,15 @@ "find-up": "^2.1.0" } }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -5045,6 +5062,24 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prettier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz", + "integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==", + "dev": true + }, + "prettier-plugin-jsdoc": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-0.3.22.tgz", + "integrity": "sha512-8CuzIovyy0FQmt2QgrueYlnqOiYfC68TZsMQ5NRJJEb+JkWJekpO/3KWRJIkBQE/9dIT4Y0CVDqng6TqnoKJvA==", + "dev": true, + "requires": { + "binary-search-bounds": "^2.0.5", + "comment-parser": "^1.1.4", + "linguist-languages": "^7.13.0", + "mdast-util-from-markdown": "^0.8.5" + } + }, "pretty-format": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", @@ -5121,12 +5156,6 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5140,35 +5169,35 @@ "dev": true }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "load-json-file": "^2.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "path-type": "^3.0.0" }, "dependencies": { "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "pify": "^2.0.0" + "pify": "^3.0.0" } } } }, "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "dev": true, "requires": { "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "read-pkg": "^3.0.0" } }, "rechoir": { @@ -5203,9 +5232,9 @@ "dev": true }, "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", "dev": true }, "repeat-string": { @@ -5214,84 +5243,6 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - } - } - }, - "request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "dev": true, - "requires": { - "lodash": "^4.17.19" - } - }, - "request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "dev": true, - "requires": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - }, - "dependencies": { - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - } - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5882,9 +5833,9 @@ } }, "spdx-license-ids": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", - "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", "dev": true }, "split-string": { @@ -5902,23 +5853,6 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, "stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", @@ -5957,12 +5891,6 @@ } } }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", - "dev": true - }, "string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -6047,9 +5975,9 @@ } }, "supports-hyperlinks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", - "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", "dev": true, "requires": { "has-flag": "^4.0.0", @@ -6080,26 +6008,23 @@ "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.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", "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.5.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.5.0.tgz", + "integrity": "sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -6222,18 +6147,18 @@ } }, "tr46": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.0.2.tgz", - "integrity": "sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, "requires": { "punycode": "^2.1.1" } }, "ts-jest": { - "version": "26.5.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.4.tgz", - "integrity": "sha512-I5Qsddo+VTm94SukBJ4cPimOoFZsYTeElR2xy6H2TOVs+NsvgYglW8KuQgKoApOKuaU/Ix/vrF9ebFZlb5D2Pg==", + "version": "26.5.6", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.6.tgz", + "integrity": "sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA==", "dev": true, "requires": { "bs-logger": "0.x", @@ -6292,21 +6217,6 @@ "tslib": "^1.8.1" } }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -6338,9 +6248,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", @@ -6348,12 +6258,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" } }, "typedoc-default-themes": { @@ -6369,9 +6279,9 @@ "dev": true }, "uglify-js": { - "version": "3.13.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", - "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", + "version": "3.13.6", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.6.tgz", + "integrity": "sha512-rRprLwl8RVaS+Qvx3Wh5hPfPBn9++G6xkGlUupya0s5aDmNjI7z3lnRLB3u7sN4OmbB0pWgzhM9BEJyiWAwtAA==", "dev": true, "optional": true }, @@ -6399,6 +6309,15 @@ "set-value": "^2.0.1" } }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -6480,9 +6399,9 @@ "dev": true }, "v8-to-istanbul": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.1.tgz", - "integrity": "sha512-p0BB09E5FRjx0ELN6RgusIPsSPhtgexSRcKETybEs6IGOTXJSZqfwxp7r//55nnu0f1AxltY5VvdVqy2vZf9AA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", + "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.1", @@ -6508,17 +6427,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, "vscode-textmate": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.4.0.tgz", @@ -6680,9 +6588,9 @@ } }, "ws": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", - "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "dev": true }, "xml-name-validator": { @@ -6698,9 +6606,9 @@ "dev": true }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yallist": { diff --git a/package.json b/package.json index 24093d54..948349b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "confluence.js", - "version": "1.0.0", + "version": "1.0.1", "description": "confluence.js is a powerful Node.JS/Browser module that allows you to interact with the Confluence API very easily", "main": "out/index.js", "types": "out/index.d.ts", @@ -10,6 +10,7 @@ "test": "npm run test:unit && npm run test:system", "test:unit": "jest tests/unit", "test:system": "jest tests/system --setupFiles=./tests/setup.ts --runInBand", + "prettier": "prettier --write src/**/*.ts", "doc": "typedoc --name Confluence.js --out docs ./src", "lint": "eslint src --ext .ts", "lint:fix": "npm run lint -- --fix" @@ -32,25 +33,27 @@ "license": "MIT", "homepage": "https://github.com/MrRefactoring/confluence.js#readme", "devDependencies": { - "@types/express": "^4.17.11", - "@types/jest": "^26.0.22", + "@types/express": "^4.17.12", + "@types/jest": "^26.0.23", "@types/oauth": "^0.9.1", - "@typescript-eslint/eslint-plugin": "^4.22.0", - "@typescript-eslint/parser": "^4.22.0", - "dotenv": "^8.2.0", - "eslint": "^7.24.0", + "@typescript-eslint/eslint-plugin": "^4.25.0", + "@typescript-eslint/parser": "^4.25.0", + "dotenv": "^10.0.0", + "eslint": "^7.27.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", - "ts-jest": "^26.5.4", - "typedoc": "^0.20.35", + "eslint-plugin-import": "^2.23.3", + "jest": "^26.0.23", + "prettier": "^2.3.0", + "prettier-plugin-jsdoc": "^0.3.22", + "ts-jest": "^26.5.6", + "typedoc": "^0.20.36", "typescript": "^4.2.4" }, "dependencies": { - "atlassian-jwt": "^1.0.3", + "atlassian-jwt": "^2.0.0", "axios": "^0.21.1", "oauth": "^0.9.15", - "telemetry.confluence.js": "*" + "telemetry.confluence.js": "<2" } } diff --git a/src/api/audit.ts b/src/api/audit.ts index e7ad35dc..fbb3639b 100644 --- a/src/api/audit.ts +++ b/src/api/audit.ts @@ -5,30 +5,35 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Audit { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns all records in the audit log, optionally for a certain date range. - * This contains information about events like space exports, group membership - * changes, app installations, etc. For more information, see - * [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) - * in the Confluence administrator's guide. + * Returns all records in the audit log, optionally for a certain date range. This contains information about events + * like space exports, group membership changes, app installations, etc. For more information, see [Audit + * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async getAuditRecords(parameters: Parameters.GetAuditRecords | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async getAuditRecords( + parameters: Parameters.GetAuditRecords | undefined, + callback: Callback + ): Promise; /** - * Returns all records in the audit log, optionally for a certain date range. - * This contains information about events like space exports, group membership - * changes, app installations, etc. For more information, see - * [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) - * in the Confluence administrator's guide. + * Returns all records in the audit log, optionally for a certain date range. This contains information about events + * like space exports, group membership changes, app installations, etc. For more information, see [Audit + * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async getAuditRecords(parameters?: Parameters.GetAuditRecords, callback?: never): Promise; - async getAuditRecords(parameters?: Parameters.GetAuditRecords, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async getAuditRecords( + parameters?: Parameters.GetAuditRecords, + callback?: never + ): Promise; + async getAuditRecords( + parameters?: Parameters.GetAuditRecords, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/audit', method: 'GET', params: { @@ -38,7 +43,7 @@ export class Audit { start: parameters?.start, limit: parameters?.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getAuditRecords' }); } @@ -46,17 +51,26 @@ export class Audit { /** * Creates a record in the audit log. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async createAuditRecord(parameters: Parameters.CreateAuditRecord | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async createAuditRecord( + parameters: Parameters.CreateAuditRecord | undefined, + callback: Callback + ): Promise; /** * Creates a record in the audit log. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async createAuditRecord(parameters?: Parameters.CreateAuditRecord, callback?: never): Promise; - async createAuditRecord(parameters?: Parameters.CreateAuditRecord, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async createAuditRecord( + parameters?: Parameters.CreateAuditRecord, + callback?: never + ): Promise; + async createAuditRecord( + parameters?: Parameters.CreateAuditRecord, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/audit', method: 'POST', data: { @@ -71,7 +85,7 @@ export class Audit { changedValues: parameters?.changedValues, associatedObjects: parameters?.associatedObjects, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createAuditRecord' }); } @@ -79,17 +93,23 @@ export class Audit { /** * Exports audit records as a CSV file or ZIP file. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async exportAuditRecords(parameters: Parameters.ExportAuditRecords | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async exportAuditRecords( + parameters: Parameters.ExportAuditRecords | undefined, + callback: Callback + ): Promise; /** * Exports audit records as a CSV file or ZIP file. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ async exportAuditRecords(parameters?: Parameters.ExportAuditRecords, callback?: never): Promise; - async exportAuditRecords(parameters?: Parameters.ExportAuditRecords, callback?: Callback): Promise { - const config = { + async exportAuditRecords( + parameters?: Parameters.ExportAuditRecords, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/audit/export', method: 'GET', params: { @@ -98,89 +118,101 @@ export class Audit { searchString: parameters?.searchString, format: parameters?.format, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'exportAuditRecords' }); } /** - * Returns the retention period for records in the audit log. The retention - * period is how long an audit record is kept for, from creation date until - * it is deleted. + * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept + * for, from creation date until it is deleted. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ async getRetentionPeriod(callback: Callback): Promise; /** - * Returns the retention period for records in the audit log. The retention - * period is how long an audit record is kept for, from creation date until - * it is deleted. + * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept + * for, from creation date until it is deleted. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ async getRetentionPeriod(callback?: never): Promise; async getRetentionPeriod(callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/audit/retention', method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getRetentionPeriod' }); } /** - * Sets the retention period for records in the audit log. The retention period - * can be set to a maximum of 20 years. + * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 20 years. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async setRetentionPeriod(parameters: Parameters.SetRetentionPeriod | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async setRetentionPeriod( + parameters: Parameters.SetRetentionPeriod | undefined, + callback: Callback + ): Promise; /** - * Sets the retention period for records in the audit log. The retention period - * can be set to a maximum of 20 years. + * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 20 years. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async setRetentionPeriod(parameters?: Parameters.SetRetentionPeriod, callback?: never): Promise; - async setRetentionPeriod(parameters?: Parameters.SetRetentionPeriod, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async setRetentionPeriod( + parameters?: Parameters.SetRetentionPeriod, + callback?: never + ): Promise; + async setRetentionPeriod( + parameters?: Parameters.SetRetentionPeriod, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/audit/retention', method: 'PUT', data: { number: parameters?.number, units: parameters?.units, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'setRetentionPeriod' }); } /** - * Returns records from the audit log, for a time period back from the current - * date. For example, you can use this method to get the last 3 months of records. + * Returns records from the audit log, for a time period back from the current date. For example, you can use this + * method to get the last 3 months of records. * - * This contains information about events like space exports, group membership - * changes, app installations, etc. For more information, see - * [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) - * in the Confluence administrator's guide. + * This contains information about events like space exports, group membership changes, app installations, etc. For + * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the + * Confluence administrator's guide. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async getAuditRecordsForTimePeriod(parameters: Parameters.GetAuditRecordsForTimePeriod | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async getAuditRecordsForTimePeriod( + parameters: Parameters.GetAuditRecordsForTimePeriod | undefined, + callback: Callback + ): Promise; /** - * Returns records from the audit log, for a time period back from the current - * date. For example, you can use this method to get the last 3 months of records. + * Returns records from the audit log, for a time period back from the current date. For example, you can use this + * method to get the last 3 months of records. * - * This contains information about events like space exports, group membership - * changes, app installations, etc. For more information, see - * [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) - * in the Confluence administrator's guide. + * This contains information about events like space exports, group membership changes, app installations, etc. For + * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the + * Confluence administrator's guide. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission. */ - async getAuditRecordsForTimePeriod(parameters?: Parameters.GetAuditRecordsForTimePeriod, callback?: never): Promise; - async getAuditRecordsForTimePeriod(parameters?: Parameters.GetAuditRecordsForTimePeriod, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ + async getAuditRecordsForTimePeriod( + parameters?: Parameters.GetAuditRecordsForTimePeriod, + callback?: never + ): Promise; + async getAuditRecordsForTimePeriod( + parameters?: Parameters.GetAuditRecordsForTimePeriod, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/audit/since', method: 'GET', params: { @@ -190,7 +222,7 @@ export class Audit { start: parameters?.start, limit: parameters?.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getAuditRecordsForTimePeriod' }); } diff --git a/src/api/content.ts b/src/api/content.ts index d43d25d5..45bbe00a 100644 --- a/src/api/content.ts +++ b/src/api/content.ts @@ -5,28 +5,34 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Content { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns all content in a Confluence instance. * * By default, the following objects are expanded: `space`, `history`, `version`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). - * Only content that the user has permission to view will be returned. */ - async getContent(parameters: Parameters.GetContent | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Only content that the user has permission to view will be returned. + */ + async getContent( + parameters: Parameters.GetContent | undefined, + callback: Callback + ): Promise; /** * Returns all content in a Confluence instance. * * By default, the following objects are expanded: `space`, `history`, `version`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). - * Only content that the user has permission to view will be returned. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Only content that the user has permission to view will be returned. + */ async getContent(parameters?: Parameters.GetContent, callback?: never): Promise; - async getContent(parameters?: Parameters.GetContent, callback?: Callback): Promise { - const config = { + async getContent( + parameters?: Parameters.GetContent, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/content', method: 'GET', params: { @@ -40,7 +46,7 @@ export class Content { start: parameters?.start, limit: parameters?.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContent' }); } @@ -48,31 +54,37 @@ export class Content { /** * Creates a new piece of content or publishes an existing draft. * - * To publish a draft, add the `id` and `status` properties to the body of the request. - * Set the `id` to the ID of the draft and set the `status` to 'current'. When the - * request is sent, a new piece of content will be created and the metadata from the - * draft will be transferred into it. + * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the + * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the + * metadata from the draft will be transferred into it. * * By default, the following objects are expanded: `space`, `history`, `version`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the - * space that the content will be created in, and permission to view the draft if publishing a draft. */ - async createContent(parameters: Parameters.CreateContent | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the + * content will be created in, and permission to view the draft if publishing a draft. + */ + async createContent( + parameters: Parameters.CreateContent | undefined, + callback: Callback + ): Promise; /** * Creates a new piece of content or publishes an existing draft. * - * To publish a draft, add the `id` and `status` properties to the body of the request. - * Set the `id` to the ID of the draft and set the `status` to 'current'. When the - * request is sent, a new piece of content will be created and the metadata from the - * draft will be transferred into it. + * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the + * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the + * metadata from the draft will be transferred into it. * * By default, the following objects are expanded: `space`, `history`, `version`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the - * space that the content will be created in, and permission to view the draft if publishing a draft. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the + * content will be created in, and permission to view the draft if publishing a draft. + */ async createContent(parameters?: Parameters.CreateContent, callback?: never): Promise; - async createContent(parameters?: Parameters.CreateContent, callback?: Callback): Promise { - const config = { + async createContent( + parameters?: Parameters.CreateContent, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/content', method: 'POST', params: { @@ -82,41 +94,45 @@ export class Content { status: undefined, ...parameters, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createContent' }); } /** - * Publishes a legacy draft of a page created from a blueprint. Legacy drafts - * will eventually be removed in favor of shared drafts. For now, this method - * works the same as [Publish shared draft](#api-content-blueprint-instance-draftId-put). + * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of + * shared drafts. For now, this method works the same as [Publish shared draft](#api-content-blueprint-instance-draftId-put). * * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the draft and 'Add' permission for the space that - * the content will be created in. */ - async publishLegacyDraft(parameters: Parameters.PublishLegacyDraft, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' + * permission for the space that the content will be created in. + */ + async publishLegacyDraft( + parameters: Parameters.PublishLegacyDraft, + callback: Callback + ): Promise; /** - * Publishes a legacy draft of a page created from a blueprint. Legacy drafts - * will eventually be removed in favor of shared drafts. For now, this method - * works the same as [Publish shared draft](#api-content-blueprint-instance-draftId-put). + * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of + * shared drafts. For now, this method works the same as [Publish shared draft](#api-content-blueprint-instance-draftId-put). * * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the draft and 'Add' permission for the space that - * the content will be created in. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' + * permission for the space that the content will be created in. + */ async publishLegacyDraft(parameters: Parameters.PublishLegacyDraft, callback?: never): Promise; - async publishLegacyDraft(parameters: Parameters.PublishLegacyDraft, callback?: Callback): Promise { - const config = { + async publishLegacyDraft( + parameters: Parameters.PublishLegacyDraft, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/blueprint/instance/${parameters.draftId}`, method: 'POST', params: { status: parameters.status, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'publishLegacyDraft' }); } @@ -126,34 +142,39 @@ export class Content { * * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the draft and 'Add' permission for the space that - * the content will be created in. */ - async publishSharedDraft(parameters: Parameters.PublishSharedDraft, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' + * permission for the space that the content will be created in. + */ + async publishSharedDraft( + parameters: Parameters.PublishSharedDraft, + callback: Callback + ): Promise; /** * Publishes a shared draft of a page created from a blueprint. * * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the draft and 'Add' permission for the space that - * the content will be created in. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' + * permission for the space that the content will be created in. + */ async publishSharedDraft(parameters: Parameters.PublishSharedDraft, callback?: never): Promise; - async publishSharedDraft(parameters: Parameters.PublishSharedDraft, callback?: Callback): Promise { - const config = { + async publishSharedDraft( + parameters: Parameters.PublishSharedDraft, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/blueprint/instance/${parameters.draftId}`, method: 'PUT', params: { status: parameters.status, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'publishSharedDraft' }); } /** - * Returns the list of content that matches a Confluence Query Language - * (CQL) query. For information on CQL, see: + * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see: * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). * * Example initial call: @@ -182,20 +203,23 @@ export class Content { * } * ``` * - * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of results returned in each call. - * Example subsequent call (taken from example response): + * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The + * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of + * results returned in each call. Example subsequent call (taken from example response): * ``` * https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg * ``` * The response to this will have a `prev` URL similar to the `next` in the example response. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). - * Only content that the user has permission to view will be returned. */ - async searchContentByCQL(parameters: Parameters.SearchContentByCQL, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Only content that the user has permission to view will be returned. + */ + async searchContentByCQL( + parameters: Parameters.SearchContentByCQL, + callback: Callback + ): Promise; /** - * Returns the list of content that matches a Confluence Query Language - * (CQL) query. For information on CQL, see: + * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see: * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). * * Example initial call: @@ -224,19 +248,26 @@ export class Content { * } * ``` * - * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of results returned in each call. - * Example subsequent call (taken from example response): + * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The + * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of + * results returned in each call. Example subsequent call (taken from example response): * ``` * https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg * ``` * The response to this will have a `prev` URL similar to the `next` in the example response. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). - * Only content that the user has permission to view will be returned. */ - async searchContentByCQL(parameters: Parameters.SearchContentByCQL, callback?: never): Promise; - async searchContentByCQL(parameters: Parameters.SearchContentByCQL, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Only content that the user has permission to view will be returned. + */ + async searchContentByCQL( + parameters: Parameters.SearchContentByCQL, + callback?: never + ): Promise; + async searchContentByCQL( + parameters: Parameters.SearchContentByCQL, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/content/search', method: 'GET', params: { @@ -245,7 +276,7 @@ export class Content { cursor: parameters.cursor, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'searchContentByCQL' }); } @@ -255,21 +286,24 @@ export class Content { * * By default, the following objects are expanded: `space`, `history`, `version`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. If the content is a blog post, 'View' permission - * for the space is required. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the + * content is a blog post, 'View' permission for the space is required. + */ async getContentById(parameters: Parameters.GetContentById, callback: Callback): Promise; /** * Returns a single piece of content, like a page or a blog post. * * By default, the following objects are expanded: `space`, `history`, `version`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. If the content is a blog post, 'View' permission - * for the space is required. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the + * content is a blog post, 'View' permission for the space is required. + */ async getContentById(parameters: Parameters.GetContentById, callback?: never): Promise; - async getContentById(parameters: Parameters.GetContentById, callback?: Callback): Promise { - const config = { + async getContentById( + parameters: Parameters.GetContentById, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}`, method: 'GET', params: { @@ -278,31 +312,34 @@ export class Content { embeddedContentRender: parameters.embeddedContentRender, trigger: parameters.trigger, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentById' }); } /** - * Updates a piece of content. Use this method to update the title or body - * of a piece of content, change the status, change the parent page, and more. + * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status, + * change the parent page, and more. * * Note, updating draft content is currently not supported. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ async updateContent(parameters: Parameters.UpdateContent, callback: Callback): Promise; /** - * Updates a piece of content. Use this method to update the title or body - * of a piece of content, change the status, change the parent page, and more. + * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status, + * change the parent page, and more. * * Note, updating draft content is currently not supported. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ async updateContent(parameters: Parameters.UpdateContent, callback?: never): Promise; - async updateContent(parameters: Parameters.UpdateContent, callback?: Callback): Promise { - const config = { + async updateContent( + parameters: Parameters.UpdateContent, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}`, method: 'PUT', params: { @@ -310,49 +347,43 @@ export class Content { conflictPolicy: parameters.conflictPolicy, }, data: parameters.body, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateContent' }); } /** - * Moves a piece of content to the space's trash or purges it from the trash, - * depending on the content's type and status: - * - * - If the content's type is `page` or `blogpost` and its status is `current`, - * it will be trashed. - * - If the content's type is `page` or `blogpost` and its status is `trashed`, - * the content will be purged from the trash and deleted permanently. Note, - * you must also set the `status` query parameter to `trashed` in your request. - * - If the content's type is `comment` or `attachment`, it will be deleted - * permanently without being trashed. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Delete' permission for the space that the content is in, and permission to edit the content. */ + * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and status: + * + * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed. + * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the + * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your request. + * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the + * content is in, and permission to edit the content. + */ async deleteContent(parameters: Parameters.DeleteContent, callback: Callback): Promise; /** - * Moves a piece of content to the space's trash or purges it from the trash, - * depending on the content's type and status: - * - * - If the content's type is `page` or `blogpost` and its status is `current`, - * it will be trashed. - * - If the content's type is `page` or `blogpost` and its status is `trashed`, - * the content will be purged from the trash and deleted permanently. Note, - * you must also set the `status` query parameter to `trashed` in your request. - * - If the content's type is `comment` or `attachment`, it will be deleted - * permanently without being trashed. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Delete' permission for the space that the content is in, and permission to edit the content. */ + * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and status: + * + * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed. + * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the + * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your request. + * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the + * content is in, and permission to edit the content. + */ async deleteContent(parameters: Parameters.DeleteContent, callback?: never): Promise; async deleteContent(parameters: Parameters.DeleteContent, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/content/${parameters.id}`, method: 'DELETE', params: { status: parameters.status, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'deleteContent' }); } @@ -360,21 +391,32 @@ export class Content { /** * Returns the most recent update for a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. */ - async getHistoryForContent(parameters: Parameters.GetHistoryForContent, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getHistoryForContent( + parameters: Parameters.GetHistoryForContent, + callback: Callback + ): Promise; /** * Returns the most recent update for a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. */ - async getHistoryForContent(parameters: Parameters.GetHistoryForContent, callback?: never): Promise; - async getHistoryForContent(parameters: Parameters.GetHistoryForContent, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getHistoryForContent( + parameters: Parameters.GetHistoryForContent, + callback?: never + ): Promise; + async getHistoryForContent( + parameters: Parameters.GetHistoryForContent, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/history`, method: 'GET', params: { expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getHistoryForContent' }); } diff --git a/src/api/contentAttachments.ts b/src/api/contentAttachments.ts index 272c27d0..270406a2 100644 --- a/src/api/contentAttachments.ts +++ b/src/api/contentAttachments.ts @@ -5,28 +5,34 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentAttachments { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns the attachments for a piece of content. * * By default, the following objects are expanded: `metadata`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. If the content is a blog post, 'View' permission - * for the space is required. */ - async getAttachments(parameters: Parameters.GetAttachments, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the + * content is a blog post, 'View' permission for the space is required. + */ + async getAttachments( + parameters: Parameters.GetAttachments, + callback: Callback + ): Promise; /** * Returns the attachments for a piece of content. * * By default, the following objects are expanded: `metadata`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. If the content is a blog post, 'View' permission - * for the space is required. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the + * content is a blog post, 'View' permission for the space is required. + */ async getAttachments(parameters: Parameters.GetAttachments, callback?: never): Promise; - async getAttachments(parameters: Parameters.GetAttachments, callback?: Callback): Promise { - const config = { + async getAttachments( + parameters: Parameters.GetAttachments, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/child/attachment`, method: 'GET', params: { @@ -35,36 +41,31 @@ export class ContentAttachments { filename: parameters.filename, mediaType: parameters.mediaType, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getAttachments' }); } /** - * Adds an attachment to a piece of content. This method only adds a new - * attachment. If you want to update an existing attachment, use - * [Create or update attachments](#api-content-id-child-attachment-put). - * - * Note, you must set a `X-Atlassian-Token: nocheck` header on the request - * for this method, otherwise it will be blocked. This protects against XSRF - * attacks, which is necessary as this method accepts multipart/form-data. - * - * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). - * Most client libraries have classes that make it easier to implement - * multipart posts, like the [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) - * Java class provided by Apache HTTP Components. - * - * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), - * in the case where the form data is text, - * the charset parameter for the "text/plain" Content-Type may be used to - * indicate the character encoding used in that part. In the case of this - * API endpoint, the `comment` body parameter should be sent with `type=text/plain` + * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing + * attachment, use [Create or update attachments](#api-content-id-child-attachment-put). + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used + * in that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` * and `charset=utf-8` values. This will force the charset to be UTF-8. * - * Example: This curl command attaches a file ('example.txt') to a container - * (id='123') with a comment and `minorEdits`=true. + * Example: This curl command attaches a file ('example.txt') to a container (id='123') with a comment and `minorEdits`=true. * - * ``` bash + * ```bash * curl -D- \ * -u admin:admin \ * -X POST \ @@ -74,34 +75,33 @@ export class ContentAttachments { * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ * http://myhost/rest/api/content/123/child/attachment * ``` - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async createAttachments(parameters: Parameters.CreateAttachments, callback: Callback): Promise; + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async createAttachments( + parameters: Parameters.CreateAttachments, + callback: Callback + ): Promise; /** - * Adds an attachment to a piece of content. This method only adds a new - * attachment. If you want to update an existing attachment, use - * [Create or update attachments](#api-content-id-child-attachment-put). - * - * Note, you must set a `X-Atlassian-Token: nocheck` header on the request - * for this method, otherwise it will be blocked. This protects against XSRF - * attacks, which is necessary as this method accepts multipart/form-data. - * - * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). - * Most client libraries have classes that make it easier to implement - * multipart posts, like the [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) - * Java class provided by Apache HTTP Components. - * - * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), - * in the case where the form data is text, - * the charset parameter for the "text/plain" Content-Type may be used to - * indicate the character encoding used in that part. In the case of this - * API endpoint, the `comment` body parameter should be sent with `type=text/plain` + * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing + * attachment, use [Create or update attachments](#api-content-id-child-attachment-put). + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used + * in that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` * and `charset=utf-8` values. This will force the charset to be UTF-8. * - * Example: This curl command attaches a file ('example.txt') to a container - * (id='123') with a comment and `minorEdits`=true. + * Example: This curl command attaches a file ('example.txt') to a container (id='123') with a comment and `minorEdits`=true. * - * ``` bash + * ```bash * curl -D- \ * -u admin:admin \ * -X POST \ @@ -111,47 +111,49 @@ export class ContentAttachments { * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ * http://myhost/rest/api/content/123/child/attachment * ``` - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async createAttachments(parameters: Parameters.CreateAttachments, callback?: never): Promise; - async createAttachments(parameters: Parameters.CreateAttachments, callback?: Callback): Promise { - const config = { + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async createAttachments( + parameters: Parameters.CreateAttachments, + callback?: never + ): Promise; + async createAttachments( + parameters: Parameters.CreateAttachments, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/child/attachment`, method: 'POST', params: { status: parameters.status, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createAttachments' }); } /** - * Adds an attachment to a piece of content. If the attachment already exists - * for the content, then the attachment is updated (i.e. a new version of the - * attachment is created). - * - * Note, you must set a `X-Atlassian-Token: nocheck` header on the request - * for this method, otherwise it will be blocked. This protects against XSRF - * attacks, which is necessary as this method accepts multipart/form-data. - * - * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). - * Most client libraries have classes that make it easier to implement - * multipart posts, like the [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) - * Java class provided by Apache HTTP Components. - * - * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), - * in the case where the form data is text, - * the charset parameter for the "text/plain" Content-Type may be used to - * indicate the character encoding used in that part. In the case of this - * API endpoint, the `comment` body parameter should be sent with `type=text/plain` + * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is + * updated (i.e. a new version of the attachment is created). + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used + * in that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` * and `charset=utf-8` values. This will force the charset to be UTF-8. * - * Example: This curl command attaches a file ('example.txt') to a piece of - * content (id='123') with a comment and `minorEdits`=true. If the 'example.txt' - * file already exists, it will update it with a new version of the attachment. + * Example: This curl command attaches a file ('example.txt') to a piece of content (id='123') with a comment and + * `minorEdits`=true. If the 'example.txt' file already exists, it will update it with a new version of the attachment. * - * ``` bash + * ```bash * curl -D- \ * -u admin:admin \ * -X PUT \ @@ -161,35 +163,34 @@ export class ContentAttachments { * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ * http://myhost/rest/api/content/123/child/attachment * ``` - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async createOrUpdateAttachments(parameters: Parameters.CreateOrUpdateAttachments, callback: Callback): Promise; + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async createOrUpdateAttachments( + parameters: Parameters.CreateOrUpdateAttachments, + callback: Callback + ): Promise; /** - * Adds an attachment to a piece of content. If the attachment already exists - * for the content, then the attachment is updated (i.e. a new version of the - * attachment is created). - * - * Note, you must set a `X-Atlassian-Token: nocheck` header on the request - * for this method, otherwise it will be blocked. This protects against XSRF - * attacks, which is necessary as this method accepts multipart/form-data. - * - * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). - * Most client libraries have classes that make it easier to implement - * multipart posts, like the [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) - * Java class provided by Apache HTTP Components. - * - * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), - * in the case where the form data is text, - * the charset parameter for the "text/plain" Content-Type may be used to - * indicate the character encoding used in that part. In the case of this - * API endpoint, the `comment` body parameter should be sent with `type=text/plain` + * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is + * updated (i.e. a new version of the attachment is created). + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used + * in that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` * and `charset=utf-8` values. This will force the charset to be UTF-8. * - * Example: This curl command attaches a file ('example.txt') to a piece of - * content (id='123') with a comment and `minorEdits`=true. If the 'example.txt' - * file already exists, it will update it with a new version of the attachment. + * Example: This curl command attaches a file ('example.txt') to a piece of content (id='123') with a comment and + * `minorEdits`=true. If the 'example.txt' file already exists, it will update it with a new version of the attachment. * - * ``` bash + * ```bash * curl -D- \ * -u admin:admin \ * -X PUT \ @@ -199,72 +200,84 @@ export class ContentAttachments { * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ * http://myhost/rest/api/content/123/child/attachment * ``` - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async createOrUpdateAttachments(parameters: Parameters.CreateOrUpdateAttachments, callback?: never): Promise; - async createOrUpdateAttachments(parameters: Parameters.CreateOrUpdateAttachments, callback?: Callback): Promise { - const config = { + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async createOrUpdateAttachments( + parameters: Parameters.CreateOrUpdateAttachments, + callback?: never + ): Promise; + async createOrUpdateAttachments( + parameters: Parameters.CreateOrUpdateAttachments, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/child/attachment`, method: 'PUT', params: { status: parameters.status, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createOrUpdateAttachments' }); } /** - * Updates the attachment properties, i.e. the non-binary data of an attachment - * like the filename, media-type, comment, and parent container. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async updateAttachmentProperties(parameters: Parameters.UpdateAttachmentProperties, callback: Callback): Promise; + * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type, + * comment, and parent container. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async updateAttachmentProperties( + parameters: Parameters.UpdateAttachmentProperties, + callback: Callback + ): Promise; /** - * Updates the attachment properties, i.e. the non-binary data of an attachment - * like the filename, media-type, comment, and parent container. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async updateAttachmentProperties(parameters: Parameters.UpdateAttachmentProperties, callback?: never): Promise; - async updateAttachmentProperties(parameters: Parameters.UpdateAttachmentProperties, callback?: Callback): Promise { - const config = { + * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type, + * comment, and parent container. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async updateAttachmentProperties( + parameters: Parameters.UpdateAttachmentProperties, + callback?: never + ): Promise; + async updateAttachmentProperties( + parameters: Parameters.UpdateAttachmentProperties, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}`, method: 'PUT', data: parameters.body, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateAttachmentProperties' }); } /** - * Updates the binary data of an attachment, given the attachment ID, and - * optionally the comment and the minor edit field. - * - * This method is essentially the same as [Create or update attachments](#api-content-id-child-attachment-put), - * except that it matches the attachment ID rather than the name. - * - * Note, you must set a `X-Atlassian-Token: nocheck` header on the request - * for this method, otherwise it will be blocked. This protects against XSRF - * attacks, which is necessary as this method accepts multipart/form-data. - * - * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). - * Most client libraries have classes that make it easier to implement - * multipart posts, like the [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) - * Java class provided by Apache HTTP Components. - * - * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), - * in the case where the form data is text, - * the charset parameter for the "text/plain" Content-Type may be used to - * indicate the character encoding used in that part. In the case of this - * API endpoint, the `comment` body parameter should be sent with `type=text/plain` + * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit field. + * + * This method is essentially the same as [Create or update attachments](#api-content-id-child-attachment-put), except + * that it matches the attachment ID rather than the name. + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used + * in that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` * and `charset=utf-8` values. This will force the charset to be UTF-8. * - * Example: This curl command updates an attachment (id='att456') that is attached - * to a piece of content (id='123') with a comment and `minorEdits`=true. + * Example: This curl command updates an attachment (id='att456') that is attached to a piece of content (id='123') + * with a comment and `minorEdits`=true. * - * ``` bash + * ```bash * curl -D- \ * -u admin:admin \ * -X POST \ @@ -274,36 +287,36 @@ export class ContentAttachments { * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ * http://myhost/rest/api/content/123/child/attachment/att456/data * ``` - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async updateAttachmentData(parameters: Parameters.UpdateAttachmentData, callback: Callback): Promise; + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async updateAttachmentData( + parameters: Parameters.UpdateAttachmentData, + callback: Callback + ): Promise; /** - * Updates the binary data of an attachment, given the attachment ID, and - * optionally the comment and the minor edit field. - * - * This method is essentially the same as [Create or update attachments](#api-content-id-child-attachment-put), - * except that it matches the attachment ID rather than the name. - * - * Note, you must set a `X-Atlassian-Token: nocheck` header on the request - * for this method, otherwise it will be blocked. This protects against XSRF - * attacks, which is necessary as this method accepts multipart/form-data. - * - * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). - * Most client libraries have classes that make it easier to implement - * multipart posts, like the [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) - * Java class provided by Apache HTTP Components. - * - * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), - * in the case where the form data is text, - * the charset parameter for the "text/plain" Content-Type may be used to - * indicate the character encoding used in that part. In the case of this - * API endpoint, the `comment` body parameter should be sent with `type=text/plain` + * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit field. + * + * This method is essentially the same as [Create or update attachments](#api-content-id-child-attachment-put), except + * that it matches the attachment ID rather than the name. + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](http://hc.apache.org/httpcomponents-client-5.0.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used + * in that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` * and `charset=utf-8` values. This will force the charset to be UTF-8. * - * Example: This curl command updates an attachment (id='att456') that is attached - * to a piece of content (id='123') with a comment and `minorEdits`=true. + * Example: This curl command updates an attachment (id='att456') that is attached to a piece of content (id='123') + * with a comment and `minorEdits`=true. * - * ``` bash + * ```bash * curl -D- \ * -u admin:admin \ * -X POST \ @@ -313,14 +326,21 @@ export class ContentAttachments { * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ * http://myhost/rest/api/content/123/child/attachment/att456/data * ``` - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async updateAttachmentData(parameters: Parameters.UpdateAttachmentData, callback?: never): Promise; - async updateAttachmentData(parameters: Parameters.UpdateAttachmentData, callback?: Callback): Promise { - const config = { + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async updateAttachmentData( + parameters: Parameters.UpdateAttachmentData, + callback?: never + ): Promise; + async updateAttachmentData( + parameters: Parameters.UpdateAttachmentData, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/data`, method: 'POST', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateAttachmentData' }); } diff --git a/src/api/contentBody.ts b/src/api/contentBody.ts index 60fed55c..4a278cfc 100644 --- a/src/api/contentBody.ts +++ b/src/api/contentBody.ts @@ -5,38 +5,49 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentBody { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Converts a content body from one format to another format. * * Supported conversions: * - * - storage: view, export_view, styled_view, editor - * - editor: storage - * - view: none - * - export_view: none - * - styled_view: none + * - Storage: view, export_view, styled_view, editor + * - Editor: storage + * - View: none + * - Export_view: none + * - Styled_view: none * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * If request specifies 'contentIdContext', 'View' permission for the space, and permission to view the content. */ - async convertContentBody(parameters: Parameters.ConvertContentBody, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', + * 'View' permission for the space, and permission to view the content. + */ + async convertContentBody( + parameters: Parameters.ConvertContentBody, + callback: Callback + ): Promise; /** * Converts a content body from one format to another format. * * Supported conversions: * - * - storage: view, export_view, styled_view, editor - * - editor: storage - * - view: none - * - export_view: none - * - styled_view: none + * - Storage: view, export_view, styled_view, editor + * - Editor: storage + * - View: none + * - Export_view: none + * - Styled_view: none * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * If request specifies 'contentIdContext', 'View' permission for the space, and permission to view the content. */ - async convertContentBody(parameters: Parameters.ConvertContentBody, callback?: never): Promise; - async convertContentBody(parameters: Parameters.ConvertContentBody, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', + * 'View' permission for the space, and permission to view the content. + */ + async convertContentBody( + parameters: Parameters.ConvertContentBody, + callback?: never + ): Promise; + async convertContentBody( + parameters: Parameters.ConvertContentBody, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/contentbody/convert/${parameters.to}`, method: 'POST', params: { @@ -48,7 +59,7 @@ export class ContentBody { value: parameters.value, representation: parameters.representation, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'convertContentBody' }); } diff --git a/src/api/contentChildrenAndDescendants.ts b/src/api/contentChildrenAndDescendants.ts index 19943a9e..06cd04c0 100644 --- a/src/api/contentChildrenAndDescendants.ts +++ b/src/api/contentChildrenAndDescendants.ts @@ -5,57 +5,64 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentChildrenAndDescendants { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns a map of the direct children of a piece of content. A piece of content - * has different types of child content, depending on its type. These are - * the default parent-child content type relationships: + * Returns a map of the direct children of a piece of content. A piece of content has different types of child + * content, depending on its type. These are the default parent-child content type relationships: * * - `page`: child content is `page`, `comment`, `attachment` * - `blogpost`: child content is `comment`, `attachment` * - `attachment`: child content is `comment` * - `comment`: child content is `attachment` * - * Apps can override these default relationships. Apps can also introduce - * new content types that create new parent-child content relationships. + * Apps can override these default relationships. Apps can also introduce new content types that create new + * parent-child content relationships. * - * Note, the map will always include all child content types that are valid - * for the content. However, if the content has no instances of a child content - * type, the map will contain an empty array for that child content type. + * Note, the map will always include all child content types that are valid for the content. However, if the content + * has no instances of a child content type, the map will contain an empty array for that child content type. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, - * and permission to view the content if it is a page. */ - async getContentChildren(parameters: Parameters.GetContentChildren, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentChildren( + parameters: Parameters.GetContentChildren, + callback: Callback + ): Promise; /** - * Returns a map of the direct children of a piece of content. A piece of content - * has different types of child content, depending on its type. These are - * the default parent-child content type relationships: + * Returns a map of the direct children of a piece of content. A piece of content has different types of child + * content, depending on its type. These are the default parent-child content type relationships: * * - `page`: child content is `page`, `comment`, `attachment` * - `blogpost`: child content is `comment`, `attachment` * - `attachment`: child content is `comment` * - `comment`: child content is `attachment` * - * Apps can override these default relationships. Apps can also introduce - * new content types that create new parent-child content relationships. - * - * Note, the map will always include all child content types that are valid - * for the content. However, if the content has no instances of a child content - * type, the map will contain an empty array for that child content type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, - * and permission to view the content if it is a page. */ - async getContentChildren(parameters: Parameters.GetContentChildren, callback?: never): Promise; - async getContentChildren(parameters: Parameters.GetContentChildren, callback?: Callback): Promise { - const config = { + * Apps can override these default relationships. Apps can also introduce new content types that create new + * parent-child content relationships. + * + * Note, the map will always include all child content types that are valid for the content. However, if the content + * has no instances of a child content type, the map will contain an empty array for that child content type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentChildren( + parameters: Parameters.GetContentChildren, + callback?: never + ): Promise; + async getContentChildren( + parameters: Parameters.GetContentChildren, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/child`, method: 'GET', params: { expand: parameters.expand, parentVersion: parameters.parentVersion, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentChildren' }); } @@ -63,37 +70,39 @@ export class ContentChildrenAndDescendants { /** * Move a page to a new location relative to a target page: * - * * `before` - move the page under the same parent as the target, before the target in the list of children - * * `after` - move the page under the same parent as the target, after the target in the list of children - * * `append` - move the page to be a child of the target + * - `before` - move the page under the same parent as the target, before the target in the list of children + * - `after` - move the page under the same parent as the target, after the target in the list of children + * - `append` - move the page to be a child of the target * * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI - * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions - * when the `targetId` is a top-level page. */ + * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when + * the `targetId` is a top-level page. + */ async movePage(parameters: Parameters.MovePage, callback: Callback): Promise; /** * Move a page to a new location relative to a target page: * - * * `before` - move the page under the same parent as the target, before the target in the list of children - * * `after` - move the page under the same parent as the target, after the target in the list of children - * * `append` - move the page to be a child of the target + * - `before` - move the page under the same parent as the target, before the target in the list of children + * - `after` - move the page under the same parent as the target, after the target in the list of children + * - `append` - move the page to be a child of the target * * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI - * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions - * when the `targetId` is a top-level page. */ + * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when + * the `targetId` is a top-level page. + */ async movePage(parameters: Parameters.MovePage, callback?: never): Promise; async movePage(parameters: Parameters.MovePage, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/content/${parameters.id}/move/${parameters.position}/${parameters.targetId}`, method: 'PUT', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'movePage' }); } /** - * Returns all children of a given type, for a piece of content. - * A piece of content has different types of child content, depending on its type: + * Returns all children of a given type, for a piece of content. A piece of content has different types of child + * content, depending on its type: * * - `page`: child content is `page`, `comment`, `attachment` * - `blogpost`: child content is `comment`, `attachment` @@ -102,15 +111,19 @@ export class ContentChildrenAndDescendants { * * Custom content types that are provided by apps can also be returned. * - * Note, this method only returns direct children. To return children at all - * levels, use [Get descendants by type](#api-content-id-descendant-type-get). + * Note, this method only returns direct children. To return children at all levels, use [Get descendants by + * type](#api-content-id-descendant-type-get). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, - * and permission to view the content if it is a page. */ - async getContentChildrenByType(parameters: Parameters.GetContentChildrenByType, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentChildrenByType( + parameters: Parameters.GetContentChildrenByType, + callback: Callback + ): Promise; /** - * Returns all children of a given type, for a piece of content. - * A piece of content has different types of child content, depending on its type: + * Returns all children of a given type, for a piece of content. A piece of content has different types of child + * content, depending on its type: * * - `page`: child content is `page`, `comment`, `attachment` * - `blogpost`: child content is `comment`, `attachment` @@ -119,14 +132,21 @@ export class ContentChildrenAndDescendants { * * Custom content types that are provided by apps can also be returned. * - * Note, this method only returns direct children. To return children at all - * levels, use [Get descendants by type](#api-content-id-descendant-type-get). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, - * and permission to view the content if it is a page. */ - async getContentChildrenByType(parameters: Parameters.GetContentChildrenByType, callback?: never): Promise; - async getContentChildrenByType(parameters: Parameters.GetContentChildrenByType, callback?: Callback): Promise { - const config = { + * Note, this method only returns direct children. To return children at all levels, use [Get descendants by + * type](#api-content-id-descendant-type-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentChildrenByType( + parameters: Parameters.GetContentChildrenByType, + callback?: never + ): Promise; + async getContentChildrenByType( + parameters: Parameters.GetContentChildrenByType, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/child/${parameters.type}`, method: 'GET', params: { @@ -134,16 +154,15 @@ export class ContentChildrenAndDescendants { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentChildrenByType' }); } /** - * Returns a map of the descendants of a piece of content. This is similar - * to [Get content children](#api-content-id-child-get), except that this - * method returns child pages at all levels, rather than just the direct - * child pages. + * Returns a map of the descendants of a piece of content. This is similar to [Get content + * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just + * the direct child pages. * * A piece of content has different types of descendants, depending on its type: * @@ -152,19 +171,20 @@ export class ContentChildrenAndDescendants { * - `attachment`: descendant is `comment` * - `comment`: descendant is `attachment` * - * The map will always include all descendant types that are valid for the content. - * However, if the content has no instances of a descendant type, the map will - * contain an empty array for that descendant type. + * The map will always include all descendant types that are valid for the content. However, if the content has no + * instances of a descendant type, the map will contain an empty array for that descendant type. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space, and permission to view the content if it - * is a page. */ - async getContentDescendants(parameters: Parameters.GetContentDescendants, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentDescendants( + parameters: Parameters.GetContentDescendants, + callback: Callback + ): Promise; /** - * Returns a map of the descendants of a piece of content. This is similar - * to [Get content children](#api-content-id-child-get), except that this - * method returns child pages at all levels, rather than just the direct - * child pages. + * Returns a map of the descendants of a piece of content. This is similar to [Get content + * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just + * the direct child pages. * * A piece of content has different types of descendants, depending on its type: * @@ -173,30 +193,34 @@ export class ContentChildrenAndDescendants { * - `attachment`: descendant is `comment` * - `comment`: descendant is `attachment` * - * The map will always include all descendant types that are valid for the content. - * However, if the content has no instances of a descendant type, the map will - * contain an empty array for that descendant type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space, and permission to view the content if it - * is a page. */ - async getContentDescendants(parameters: Parameters.GetContentDescendants, callback?: never): Promise; - async getContentDescendants(parameters: Parameters.GetContentDescendants, callback?: Callback): Promise { - const config = { + * The map will always include all descendant types that are valid for the content. However, if the content has no + * instances of a descendant type, the map will contain an empty array for that descendant type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentDescendants( + parameters: Parameters.GetContentDescendants, + callback?: never + ): Promise; + async getContentDescendants( + parameters: Parameters.GetContentDescendants, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/descendant`, method: 'GET', params: { expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentDescendants' }); } /** - * Returns all descendants of a given type, for a piece of content. This is - * similar to [Get content children by type](#api-content-id-child-type-get), - * except that this method returns child pages at all levels, rather than just + * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by + * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just * the direct child pages. * * A piece of content has different types of descendants, depending on its type: @@ -208,14 +232,16 @@ export class ContentChildrenAndDescendants { * * Custom content types that are provided by apps can also be returned. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space, and permission to view the content if it - * is a page. */ - async descendantsOfType(parameters: Parameters.DescendantsOfType, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async descendantsOfType( + parameters: Parameters.DescendantsOfType, + callback: Callback + ): Promise; /** - * Returns all descendants of a given type, for a piece of content. This is - * similar to [Get content children by type](#api-content-id-child-type-get), - * except that this method returns child pages at all levels, rather than just + * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by + * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just * the direct child pages. * * A piece of content has different types of descendants, depending on its type: @@ -227,28 +253,36 @@ export class ContentChildrenAndDescendants { * * Custom content types that are provided by apps can also be returned. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space, and permission to view the content if it - * is a page. */ - async descendantsOfType(parameters: Parameters.DescendantsOfType, callback?: never): Promise; - async descendantsOfType(parameters: Parameters.DescendantsOfType, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async descendantsOfType( + parameters: Parameters.DescendantsOfType, + callback?: never + ): Promise; + async descendantsOfType( + parameters: Parameters.DescendantsOfType, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/descendant/${parameters.type}`, method: 'GET', params: { + depth: parameters.depth, start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'descendantsOfType' }); } /** - * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions and attachments. - * The id path parameter refers to the content id of the page to copy, and the new parent of this copied page is defined using the destinationPageId in the request body. - * The titleOptions object defines the rules of renaming page titles during the copy; - * for example, search and replace can be used in conjunction to rewrite the copied page titles. + * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions + * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this + * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules + * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the + * copied page titles. * * Response example: *
@@ -259,13 +293,15 @@ export class ContentChildrenAndDescendants {
    *       }
    *  }
    *  
- * Use the /longtask/ REST API to get the copy task status. */ + * Use the /longtask/ REST API to get the copy task status. + */ async copyPageHierarchy(parameters: Parameters.CopyPageHierarchy, callback: Callback): Promise; /** - * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions and attachments. - * The id path parameter refers to the content id of the page to copy, and the new parent of this copied page is defined using the destinationPageId in the request body. - * The titleOptions object defines the rules of renaming page titles during the copy; - * for example, search and replace can be used in conjunction to rewrite the copied page titles. + * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions + * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this + * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules + * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the + * copied page titles. * * Response example: *
@@ -276,10 +312,14 @@ export class ContentChildrenAndDescendants {
    *       }
    *  }
    *  
- * Use the /longtask/ REST API to get the copy task status. */ + * Use the /longtask/ REST API to get the copy task status. + */ async copyPageHierarchy(parameters: Parameters.CopyPageHierarchy, callback?: never): Promise; - async copyPageHierarchy(parameters: Parameters.CopyPageHierarchy, callback?: Callback): Promise { - const config = { + async copyPageHierarchy( + parameters: Parameters.CopyPageHierarchy, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/pagehierarchy/copy`, method: 'POST', data: { @@ -291,46 +331,50 @@ export class ContentChildrenAndDescendants { destinationPageId: parameters.destinationPageId, titleOptions: parameters.titleOptions, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'copyPageHierarchy' }); } /** - * Copies a single page and its associated properties, permissions, attachments, and custom contents. - * The `id` path parameter refers to the content ID of the page to copy. The target of the page to be copied - * is defined using the `destination` in the request body and can be one of the following types. + * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path + * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the + * `destination` in the request body and can be one of the following types. * - * - `space`: page will be copied to the specified space as a root page on the space - * - `parent_page`: page will be copied as a child of the specified parent page - * - `existing_page`: page will be copied and replace the specified page + * - `space`: page will be copied to the specified space as a root page on the space + * - `parent_page`: page will be copied as a child of the specified parent page + * - `existing_page`: page will be copied and replace the specified page * * By default, the following objects are expanded: `space`, `history`, `version`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the content will be copied in and permission to update the content if copying to an `existing_page`. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the + * content will be copied in and permission to update the content if copying to an `existing_page`. + */ async copyPage(parameters: Parameters.CopyPage, callback: Callback): Promise; /** - * Copies a single page and its associated properties, permissions, attachments, and custom contents. - * The `id` path parameter refers to the content ID of the page to copy. The target of the page to be copied - * is defined using the `destination` in the request body and can be one of the following types. + * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path + * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the + * `destination` in the request body and can be one of the following types. * - * - `space`: page will be copied to the specified space as a root page on the space - * - `parent_page`: page will be copied as a child of the specified parent page - * - `existing_page`: page will be copied and replace the specified page + * - `space`: page will be copied to the specified space as a root page on the space + * - `parent_page`: page will be copied as a child of the specified parent page + * - `existing_page`: page will be copied and replace the specified page * * By default, the following objects are expanded: `space`, `history`, `version`. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the content will be copied in and permission to update the content if copying to an `existing_page`. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the + * content will be copied in and permission to update the content if copying to an `existing_page`. + */ async copyPage(parameters: Parameters.CopyPage, callback?: never): Promise; async copyPage(parameters: Parameters.CopyPage, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/content/${parameters.id}/copy`, method: 'POST', params: { expand: parameters.expand, }, data: parameters.bodyParameters, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'copyPage' }); } diff --git a/src/api/contentComments.ts b/src/api/contentComments.ts index 68c8d1b9..ddb28f7b 100644 --- a/src/api/contentComments.ts +++ b/src/api/contentComments.ts @@ -5,22 +5,33 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentComments { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns the comments on a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, - * and permission to view the content if it is a page. */ - async getContentComments(parameters: Parameters.GetContentComments, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentComments( + parameters: Parameters.GetContentComments, + callback: Callback + ): Promise; /** * Returns the comments on a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, - * and permission to view the content if it is a page. */ - async getContentComments(parameters: Parameters.GetContentComments, callback?: never): Promise; - async getContentComments(parameters: Parameters.GetContentComments, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentComments( + parameters: Parameters.GetContentComments, + callback?: never + ): Promise; + async getContentComments( + parameters: Parameters.GetContentComments, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/child/comment`, method: 'GET', params: { @@ -30,7 +41,7 @@ export class ContentComments { location: parameters.location, depth: parameters.depth, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentComments' }); } diff --git a/src/api/contentLabels.ts b/src/api/contentLabels.ts index 0980890e..68ffdf1a 100644 --- a/src/api/contentLabels.ts +++ b/src/api/contentLabels.ts @@ -5,22 +5,33 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentLabels { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns the labels on a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space and permission to view the content if it is a page. */ - async getLabelsForContent(parameters: Parameters.GetLabelsForContent, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and + * permission to view the content if it is a page. + */ + async getLabelsForContent( + parameters: Parameters.GetLabelsForContent, + callback: Callback + ): Promise; /** * Returns the labels on a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space and permission to view the content if it is a page. */ - async getLabelsForContent(parameters: Parameters.GetLabelsForContent, callback?: never): Promise; - async getLabelsForContent(parameters: Parameters.GetLabelsForContent, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and + * permission to view the content if it is a page. + */ + async getLabelsForContent( + parameters: Parameters.GetLabelsForContent, + callback?: never + ): Promise; + async getLabelsForContent( + parameters: Parameters.GetLabelsForContent, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/label`, method: 'GET', params: { @@ -28,7 +39,7 @@ export class ContentLabels { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getLabelsForContent' }); } @@ -39,104 +50,120 @@ export class ContentLabels { * Notes: * * - Labels can also be added when creating content ([Create content](#api-content-post)). - * - Labels can be updated when updating content ([Update content](#api-content-id-put)). - * This will delete the existing labels and replace them with the labels in - * the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async addLabelsToContent(parameters: Parameters.AddLabelsToContent, callback: Callback): Promise; + * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing + * labels and replace them with the labels in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async addLabelsToContent( + parameters: Parameters.AddLabelsToContent, + callback: Callback + ): Promise; /** * Adds labels to a piece of content. Does not modify the existing labels. * * Notes: * * - Labels can also be added when creating content ([Create content](#api-content-post)). - * - Labels can be updated when updating content ([Update content](#api-content-id-put)). - * This will delete the existing labels and replace them with the labels in - * the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async addLabelsToContent(parameters: Parameters.AddLabelsToContent, callback?: never): Promise; - async addLabelsToContent(parameters: Parameters.AddLabelsToContent, callback?: Callback): Promise { - const config = { + * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing + * labels and replace them with the labels in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async addLabelsToContent( + parameters: Parameters.AddLabelsToContent, + callback?: never + ): Promise; + async addLabelsToContent( + parameters: Parameters.AddLabelsToContent, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/label`, method: 'POST', params: { 'use-400-error-response': parameters['use-400-error-response'], }, data: parameters.body, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addLabelsToContent' }); } /** - * Removes a label from a piece of content. This is similar to - * [Remove label from content](#api-content-id-label-label-delete) - * except that the label name is specified via a query parameter. - * - * Use this method if the label name has "/" characters, as - * [Remove label from content using query parameter](#api-content-id-label-delete) - * does not accept "/" characters for the label name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async removeLabelFromContentUsingQueryParameter(parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, callback: Callback): Promise; + * Removes a label from a piece of content. This is similar to [Remove label from + * content](#api-content-id-label-label-delete) except that the label name is specified via a query parameter. + * + * Use this method if the label name has "/" characters, as [Remove label from content using query + * parameter](#api-content-id-label-delete) does not accept "/" characters for the label name. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async removeLabelFromContentUsingQueryParameter( + parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, + callback: Callback + ): Promise; /** - * Removes a label from a piece of content. This is similar to - * [Remove label from content](#api-content-id-label-label-delete) - * except that the label name is specified via a query parameter. - * - * Use this method if the label name has "/" characters, as - * [Remove label from content using query parameter](#api-content-id-label-delete) - * does not accept "/" characters for the label name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async removeLabelFromContentUsingQueryParameter(parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, callback?: never): Promise; - async removeLabelFromContentUsingQueryParameter(parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, callback?: Callback): Promise { - const config = { + * Removes a label from a piece of content. This is similar to [Remove label from + * content](#api-content-id-label-label-delete) except that the label name is specified via a query parameter. + * + * Use this method if the label name has "/" characters, as [Remove label from content using query + * parameter](#api-content-id-label-delete) does not accept "/" characters for the label name. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async removeLabelFromContentUsingQueryParameter( + parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, + callback?: never + ): Promise; + async removeLabelFromContentUsingQueryParameter( + parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/label`, method: 'DELETE', params: { name: parameters.name, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeLabelFromContentUsingQueryParameter' }); } /** - * Removes a label from a piece of content. This is similar to - * [Remove label from content using query parameter](#api-content-id-label-delete) - * except that the label name is specified via a path parameter. - * - * Use this method if the label name does not have "/" characters, as the path - * parameter does not accept "/" characters for security reasons. Otherwise, - * use [Remove label from content using query parameter](#api-content-id-label-delete). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async removeLabelFromContent(parameters: Parameters.RemoveLabelFromContent, callback: Callback): Promise; + * Removes a label from a piece of content. This is similar to [Remove label from content using query + * parameter](#api-content-id-label-delete) except that the label name is specified via a path parameter. + * + * Use this method if the label name does not have "/" characters, as the path parameter does not accept "/" + * characters for security reasons. Otherwise, use [Remove label from content using query + * parameter](#api-content-id-label-delete). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async removeLabelFromContent( + parameters: Parameters.RemoveLabelFromContent, + callback: Callback + ): Promise; /** - * Removes a label from a piece of content. This is similar to - * [Remove label from content using query parameter](#api-content-id-label-delete) - * except that the label name is specified via a path parameter. + * Removes a label from a piece of content. This is similar to [Remove label from content using query + * parameter](#api-content-id-label-delete) except that the label name is specified via a path parameter. * - * Use this method if the label name does not have "/" characters, as the path - * parameter does not accept "/" characters for security reasons. Otherwise, - * use [Remove label from content using query parameter](#api-content-id-label-delete). + * Use this method if the label name does not have "/" characters, as the path parameter does not accept "/" + * characters for security reasons. Otherwise, use [Remove label from content using query + * parameter](#api-content-id-label-delete). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ async removeLabelFromContent(parameters: Parameters.RemoveLabelFromContent, callback?: never): Promise; - async removeLabelFromContent(parameters: Parameters.RemoveLabelFromContent, callback?: Callback): Promise { - const config = { + async removeLabelFromContent( + parameters: Parameters.RemoveLabelFromContent, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/label/${parameters.label}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeLabelFromContent' }); } diff --git a/src/api/contentMacroBody.ts b/src/api/contentMacroBody.ts index 7cdff134..4d639c61 100644 --- a/src/api/contentMacroBody.ts +++ b/src/api/contentMacroBody.ts @@ -5,51 +5,54 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentMacroBody { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns the body of a macro in storage format, for the given macro ID. - * This includes information like the name of the macro, the body of the macro, - * and any macro parameters. This method is mainly used by Cloud apps. + * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of + * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps. * - * About the macro ID: When a macro is created in a new version of content, - * Confluence will generate a random ID for it, unless an ID is specified - * (by an app). The macro ID will look similar to this: '50884bd9-0cb8-41d5-98be-f80943c14f96'. - * The ID is then persisted as new versions of content are created, and is + * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for + * it, unless an ID is specified (by an app). The macro ID will look similar to this: + * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is * only modified by Confluence if there are conflicting IDs. * - * Note, to preserve backwards compatibility this resource will also match on - * the hash of the macro body, even if a macro ID is found. This check will - * eventually become redundant, as macro IDs are generated for pages and + * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a + * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and * transparently propagate out to all instances. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content that the macro is in. */ - async getMacroBodyByMacroId(parameters: Parameters.GetMacroBodyByMacroId, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the macro is in. + */ + async getMacroBodyByMacroId( + parameters: Parameters.GetMacroBodyByMacroId, + callback: Callback + ): Promise; /** - * Returns the body of a macro in storage format, for the given macro ID. - * This includes information like the name of the macro, the body of the macro, - * and any macro parameters. This method is mainly used by Cloud apps. + * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of + * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps. * - * About the macro ID: When a macro is created in a new version of content, - * Confluence will generate a random ID for it, unless an ID is specified - * (by an app). The macro ID will look similar to this: '50884bd9-0cb8-41d5-98be-f80943c14f96'. - * The ID is then persisted as new versions of content are created, and is + * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for + * it, unless an ID is specified (by an app). The macro ID will look similar to this: + * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is * only modified by Confluence if there are conflicting IDs. * - * Note, to preserve backwards compatibility this resource will also match on - * the hash of the macro body, even if a macro ID is found. This check will - * eventually become redundant, as macro IDs are generated for pages and + * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a + * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and * transparently propagate out to all instances. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content that the macro is in. */ - async getMacroBodyByMacroId(parameters: Parameters.GetMacroBodyByMacroId, callback?: never): Promise; - async getMacroBodyByMacroId(parameters: Parameters.GetMacroBodyByMacroId, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the macro is in. + */ + async getMacroBodyByMacroId( + parameters: Parameters.GetMacroBodyByMacroId, + callback?: never + ): Promise; + async getMacroBodyByMacroId( + parameters: Parameters.GetMacroBodyByMacroId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getMacroBodyByMacroId' }); } diff --git a/src/api/contentPermissions.ts b/src/api/contentPermissions.ts index 2bbc55e0..747c4d7a 100644 --- a/src/api/contentPermissions.ts +++ b/src/api/contentPermissions.ts @@ -5,45 +5,56 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentPermissions { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Check if a user or a group can perform an operation to the specified content. The `operation` to check - * must be provided. The user’s account ID or the ID of the group can be provided in the `subject` to check - * permissions against a specified user or group. The following permission checks are done to make sure that the - * user or group has the proper access: + * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be + * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions + * against a specified user or group. The following permission checks are done to make sure that the user or group has + * the proper access: * - * - site permissions - * - space permissions - * - content restrictions + * - Site permissions + * - Space permissions + * - Content restrictions * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission) if checking permission for self, - * otherwise 'Confluence Administrator' global permission is required. */ - async permissionCheck(parameters: Parameters.PermissionCheck, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global + * permission is required. + */ + async permissionCheck( + parameters: Parameters.PermissionCheck, + callback: Callback + ): Promise; /** - * Check if a user or a group can perform an operation to the specified content. The `operation` to check - * must be provided. The user’s account ID or the ID of the group can be provided in the `subject` to check - * permissions against a specified user or group. The following permission checks are done to make sure that the - * user or group has the proper access: + * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be + * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions + * against a specified user or group. The following permission checks are done to make sure that the user or group has + * the proper access: * - * - site permissions - * - space permissions - * - content restrictions + * - Site permissions + * - Space permissions + * - Content restrictions * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission) if checking permission for self, - * otherwise 'Confluence Administrator' global permission is required. */ - async permissionCheck(parameters: Parameters.PermissionCheck, callback?: never): Promise; - async permissionCheck(parameters: Parameters.PermissionCheck, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global + * permission is required. + */ + async permissionCheck( + parameters: Parameters.PermissionCheck, + callback?: never + ): Promise; + async permissionCheck( + parameters: Parameters.PermissionCheck, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/permission/check`, method: 'POST', data: { subject: parameters.subject, operation: parameters.operation, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'permissionCheck' }); } diff --git a/src/api/contentProperties.ts b/src/api/contentProperties.ts index bfe4464a..8ae6b042 100644 --- a/src/api/contentProperties.ts +++ b/src/api/contentProperties.ts @@ -5,24 +5,35 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentProperties { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns the properties for a piece of content. For more information - * about content properties, see [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space, and permission to view the content if it is a page. */ - async getContentProperties(parameters: Parameters.GetContentProperties, callback: Callback): Promise; + * Returns the properties for a piece of content. For more information about content properties, see [Confluence + * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentProperties( + parameters: Parameters.GetContentProperties, + callback: Callback + ): Promise; /** - * Returns the properties for a piece of content. For more information - * about content properties, see [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space, and permission to view the content if it is a page. */ - async getContentProperties(parameters: Parameters.GetContentProperties, callback?: never): Promise; - async getContentProperties(parameters: Parameters.GetContentProperties, callback?: Callback): Promise { - const config = { + * Returns the properties for a piece of content. For more information about content properties, see [Confluence + * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentProperties( + parameters: Parameters.GetContentProperties, + callback?: never + ): Promise; + async getContentProperties( + parameters: Parameters.GetContentProperties, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/property`, method: 'GET', params: { @@ -30,168 +41,206 @@ export class ContentProperties { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentProperties' }); } /** - * Creates a property for an existing piece of content. For more information - * about content properties, see [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * Creates a property for an existing piece of content. For more information about content properties, see [Confluence + * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). * - * This is the same as [Create content property for key](#api-content-id-property-key-post) - * except that the key is specified in the request body instead of as a - * path parameter. + * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is + * specified in the request body instead of as a path parameter. * - * Content properties can also be added when creating a new piece of content - * by including them in the `metadata.properties` of the request. + * Content properties can also be added when creating a new piece of content by including them in the + * `metadata.properties` of the request. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async createContentProperty(parameters: Parameters.CreateContentProperty, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async createContentProperty( + parameters: Parameters.CreateContentProperty, + callback: Callback + ): Promise; /** - * Creates a property for an existing piece of content. For more information - * about content properties, see [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * This is the same as [Create content property for key](#api-content-id-property-key-post) - * except that the key is specified in the request body instead of as a - * path parameter. - * - * Content properties can also be added when creating a new piece of content - * by including them in the `metadata.properties` of the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async createContentProperty(parameters: Parameters.CreateContentProperty, callback?: never): Promise; - async createContentProperty(parameters: Parameters.CreateContentProperty, callback?: Callback): Promise { - const config = { + * Creates a property for an existing piece of content. For more information about content properties, see [Confluence + * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * + * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is + * specified in the request body instead of as a path parameter. + * + * Content properties can also be added when creating a new piece of content by including them in the + * `metadata.properties` of the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async createContentProperty( + parameters: Parameters.CreateContentProperty, + callback?: never + ): Promise; + async createContentProperty( + parameters: Parameters.CreateContentProperty, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/property`, method: 'POST', data: { key: parameters.key, value: parameters.value, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createContentProperty' }); } /** - * Returns a content property for a piece of content. For more information, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space, and permission to view the content if it is a page. */ - async getContentProperty(parameters: Parameters.GetContentProperty, callback: Callback): Promise; + * Returns a content property for a piece of content. For more information, see [Confluence entity + * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentProperty( + parameters: Parameters.GetContentProperty, + callback: Callback + ): Promise; /** - * Returns a content property for a piece of content. For more information, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space, and permission to view the content if it is a page. */ - async getContentProperty(parameters: Parameters.GetContentProperty, callback?: never): Promise; - async getContentProperty(parameters: Parameters.GetContentProperty, callback?: Callback): Promise { - const config = { + * Returns a content property for a piece of content. For more information, see [Confluence entity + * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ + async getContentProperty( + parameters: Parameters.GetContentProperty, + callback?: never + ): Promise; + async getContentProperty( + parameters: Parameters.GetContentProperty, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/property/${parameters.key}`, method: 'GET', params: { expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentProperty' }); } /** - * Creates a property for an existing piece of content. For more information - * about content properties, see [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * Creates a property for an existing piece of content. For more information about content properties, see [Confluence + * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). * - * This is the same as [Create content property](#api-content-id-property-post) - * except that the key is specified as a path parameter instead of in the - * request body. + * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a + * path parameter instead of in the request body. * - * Content properties can also be added when creating a new piece of content - * by including them in the `metadata.properties` of the request. + * Content properties can also be added when creating a new piece of content by including them in the + * `metadata.properties` of the request. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async createContentPropertyForKey(parameters: Parameters.CreateContentPropertyForKey, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async createContentPropertyForKey( + parameters: Parameters.CreateContentPropertyForKey, + callback: Callback + ): Promise; /** - * Creates a property for an existing piece of content. For more information - * about content properties, see [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * This is the same as [Create content property](#api-content-id-property-post) - * except that the key is specified as a path parameter instead of in the - * request body. - * - * Content properties can also be added when creating a new piece of content - * by including them in the `metadata.properties` of the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async createContentPropertyForKey(parameters: Parameters.CreateContentPropertyForKey, callback?: never): Promise; - async createContentPropertyForKey(parameters: Parameters.CreateContentPropertyForKey, callback?: Callback): Promise { - const config = { + * Creates a property for an existing piece of content. For more information about content properties, see [Confluence + * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * + * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a + * path parameter instead of in the request body. + * + * Content properties can also be added when creating a new piece of content by including them in the + * `metadata.properties` of the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async createContentPropertyForKey( + parameters: Parameters.CreateContentPropertyForKey, + callback?: never + ): Promise; + async createContentPropertyForKey( + parameters: Parameters.CreateContentPropertyForKey, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/property/${parameters.key}`, method: 'POST', data: { value: parameters.value, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createContentPropertyForKey' }); } /** - * Updates an existing content property. This method will also create a new - * property for a piece of content, if the property key does not exist and - * the property version is 1. For more information about content properties, see + * Updates an existing content property. This method will also create a new property for a piece of content, if the + * property key does not exist and the property version is 1. For more information about content properties, see * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async updateContentProperty(parameters: Parameters.UpdateContentProperty, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async updateContentProperty( + parameters: Parameters.UpdateContentProperty, + callback: Callback + ): Promise; /** - * Updates an existing content property. This method will also create a new - * property for a piece of content, if the property key does not exist and - * the property version is 1. For more information about content properties, see + * Updates an existing content property. This method will also create a new property for a piece of content, if the + * property key does not exist and the property version is 1. For more information about content properties, see * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async updateContentProperty(parameters: Parameters.UpdateContentProperty, callback?: never): Promise; - async updateContentProperty(parameters: Parameters.UpdateContentProperty, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async updateContentProperty( + parameters: Parameters.UpdateContentProperty, + callback?: never + ): Promise; + async updateContentProperty( + parameters: Parameters.UpdateContentProperty, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/property/${parameters.key}`, method: 'PUT', data: { value: parameters.value, version: parameters.version, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateContentProperty' }); } /** - * Deletes a content property. For more information about content properties, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async deleteContentProperty(parameters: Parameters.DeleteContentProperty, callback: Callback): Promise; + * Deletes a content property. For more information about content properties, see [Confluence entity + * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async deleteContentProperty( + parameters: Parameters.DeleteContentProperty, + callback: Callback + ): Promise; /** - * Deletes a content property. For more information about content properties, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * Deletes a content property. For more information about content properties, see [Confluence entity + * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ async deleteContentProperty(parameters: Parameters.DeleteContentProperty, callback?: never): Promise; - async deleteContentProperty(parameters: Parameters.DeleteContentProperty, callback?: Callback): Promise { - const config = { + async deleteContentProperty( + parameters: Parameters.DeleteContentProperty, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/property/${parameters.key}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'deleteContentProperty' }); } diff --git a/src/api/contentRestrictions.ts b/src/api/contentRestrictions.ts index 6c16668c..1361572e 100644 --- a/src/api/contentRestrictions.ts +++ b/src/api/contentRestrictions.ts @@ -5,22 +5,31 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentRestrictions { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns the restrictions on a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getRestrictions(parameters: Parameters.GetRestrictions, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getRestrictions( + parameters: Parameters.GetRestrictions, + callback: Callback + ): Promise; /** * Returns the restrictions on a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getRestrictions(parameters: Parameters.GetRestrictions, callback?: never): Promise; - async getRestrictions(parameters: Parameters.GetRestrictions, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getRestrictions( + parameters: Parameters.GetRestrictions, + callback?: never + ): Promise; + async getRestrictions( + parameters: Parameters.GetRestrictions, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction`, method: 'GET', params: { @@ -28,61 +37,77 @@ export class ContentRestrictions { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getRestrictions' }); } /** - * Adds restrictions to a piece of content. Note, this does not change any - * existing restrictions on the content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async addRestrictions(parameters: Parameters.AddRestrictions, callback: Callback): Promise; + * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async addRestrictions( + parameters: Parameters.AddRestrictions, + callback: Callback + ): Promise; /** - * Adds restrictions to a piece of content. Note, this does not change any - * existing restrictions on the content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async addRestrictions(parameters: Parameters.AddRestrictions, callback?: never): Promise; - async addRestrictions(parameters: Parameters.AddRestrictions, callback?: Callback): Promise { - const config = { + * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async addRestrictions( + parameters: Parameters.AddRestrictions, + callback?: never + ): Promise; + async addRestrictions( + parameters: Parameters.AddRestrictions, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction`, method: 'POST', params: { expand: parameters.expand, }, data: parameters.body, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addRestrictions' }); } /** - * Updates restrictions for a piece of content. This removes the existing - * restrictions and replaces them with the restrictions in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async updateRestrictions(parameters: Parameters.UpdateRestrictions, callback: Callback): Promise; + * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the + * restrictions in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async updateRestrictions( + parameters: Parameters.UpdateRestrictions, + callback: Callback + ): Promise; /** - * Updates restrictions for a piece of content. This removes the existing - * restrictions and replaces them with the restrictions in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async updateRestrictions(parameters: Parameters.UpdateRestrictions, callback?: never): Promise; - async updateRestrictions(parameters: Parameters.UpdateRestrictions, callback?: Callback): Promise { - const config = { + * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the + * restrictions in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async updateRestrictions( + parameters: Parameters.UpdateRestrictions, + callback?: never + ): Promise; + async updateRestrictions( + parameters: Parameters.UpdateRestrictions, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction`, method: 'PUT', params: { expand: parameters.expand, }, data: parameters.body, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateRestrictions' }); } @@ -90,73 +115,96 @@ export class ContentRestrictions { /** * Removes all restrictions (read and update) on a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async deleteRestrictions(parameters: Parameters.DeleteRestrictions, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async deleteRestrictions( + parameters: Parameters.DeleteRestrictions, + callback: Callback + ): Promise; /** * Removes all restrictions (read and update) on a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async deleteRestrictions(parameters: Parameters.DeleteRestrictions, callback?: never): Promise; - async deleteRestrictions(parameters: Parameters.DeleteRestrictions, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async deleteRestrictions( + parameters: Parameters.DeleteRestrictions, + callback?: never + ): Promise; + async deleteRestrictions( + parameters: Parameters.DeleteRestrictions, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction`, method: 'DELETE', params: { expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'deleteRestrictions' }); } /** - * Returns restrictions on a piece of content by operation. This method is - * similar to [Get restrictions](#api-content-id-restriction-get) except that - * the operations are properties of the return object, rather than items in - * a results array. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getRestrictionsByOperation(parameters: Parameters.GetRestrictionsByOperation, callback: Callback): Promise; + * Returns restrictions on a piece of content by operation. This method is similar to [Get + * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object, + * rather than items in a results array. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getRestrictionsByOperation( + parameters: Parameters.GetRestrictionsByOperation, + callback: Callback + ): Promise; /** - * Returns restrictions on a piece of content by operation. This method is - * similar to [Get restrictions](#api-content-id-restriction-get) except that - * the operations are properties of the return object, rather than items in - * a results array. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getRestrictionsByOperation(parameters: Parameters.GetRestrictionsByOperation, callback?: never): Promise; - async getRestrictionsByOperation(parameters: Parameters.GetRestrictionsByOperation, callback?: Callback): Promise { - const config = { + * Returns restrictions on a piece of content by operation. This method is similar to [Get + * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object, + * rather than items in a results array. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getRestrictionsByOperation( + parameters: Parameters.GetRestrictionsByOperation, + callback?: never + ): Promise; + async getRestrictionsByOperation( + parameters: Parameters.GetRestrictionsByOperation, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation`, method: 'GET', params: { expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getRestrictionsByOperation' }); } /** - * Returns the restictions on a piece of content for a given operation (read - * or update). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getRestrictionsForOperation(parameters: Parameters.GetRestrictionsForOperation, callback: Callback): Promise; + * Returns the restictions on a piece of content for a given operation (read or update). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getRestrictionsForOperation( + parameters: Parameters.GetRestrictionsForOperation, + callback: Callback + ): Promise; /** - * Returns the restictions on a piece of content for a given operation (read - * or update). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getRestrictionsForOperation(parameters: Parameters.GetRestrictionsForOperation, callback?: never): Promise; - async getRestrictionsForOperation(parameters: Parameters.GetRestrictionsForOperation, callback?: Callback): Promise { - const config = { + * Returns the restictions on a piece of content for a given operation (read or update). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getRestrictionsForOperation( + parameters: Parameters.GetRestrictionsForOperation, + callback?: never + ): Promise; + async getRestrictionsForOperation( + parameters: Parameters.GetRestrictionsForOperation, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}`, method: 'GET', params: { @@ -164,207 +212,248 @@ export class ContentRestrictions { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getRestrictionsForOperation' }); } /** - * Returns whether the specified content restriction applies to a group. - * For example, if a page with `id=123` has a `read` restriction for the `admins` group, - * the following request will return `true`: + * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a + * `read` restriction for the `admins` group, the following request will return `true`: * * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/group/admins` * * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more - * information, see [Confluence permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getContentRestrictionStatusForGroup(parameters: Parameters.GetContentRestrictionStatusForGroup, callback: Callback): Promise; + * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence + * permissions](https://confluence.atlassian.com/x/_AozKw). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getContentRestrictionStatusForGroup( + parameters: Parameters.GetContentRestrictionStatusForGroup, + callback: Callback + ): Promise; /** - * Returns whether the specified content restriction applies to a group. - * For example, if a page with `id=123` has a `read` restriction for the `admins` group, - * the following request will return `true`: + * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a + * `read` restriction for the `admins` group, the following request will return `true`: * * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/group/admins` * * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more - * information, see [Confluence permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getContentRestrictionStatusForGroup(parameters: Parameters.GetContentRestrictionStatusForGroup, callback?: never): Promise; - async getContentRestrictionStatusForGroup(parameters: Parameters.GetContentRestrictionStatusForGroup, callback?: Callback): Promise { - const config = { + * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence + * permissions](https://confluence.atlassian.com/x/_AozKw). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getContentRestrictionStatusForGroup( + parameters: Parameters.GetContentRestrictionStatusForGroup, + callback?: never + ): Promise; + async getContentRestrictionStatusForGroup( + parameters: Parameters.GetContentRestrictionStatusForGroup, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentRestrictionStatusForGroup' }); } /** - * Adds a group to a content restriction. That is, grant read or update - * permission to the group for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async addGroupToContentRestriction(parameters: Parameters.AddGroupToContentRestriction, callback: Callback): Promise; + * Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async addGroupToContentRestriction( + parameters: Parameters.AddGroupToContentRestriction, + callback: Callback + ): Promise; /** - * Adds a group to a content restriction. That is, grant read or update - * permission to the group for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async addGroupToContentRestriction(parameters: Parameters.AddGroupToContentRestriction, callback?: never): Promise; - async addGroupToContentRestriction(parameters: Parameters.AddGroupToContentRestriction, callback?: Callback): Promise { - const config = { + * Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async addGroupToContentRestriction( + parameters: Parameters.AddGroupToContentRestriction, + callback?: never + ): Promise; + async addGroupToContentRestriction( + parameters: Parameters.AddGroupToContentRestriction, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`, method: 'PUT', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addGroupToContentRestriction' }); } /** - * Removes a group from a content restriction. That is, remove read or update - * permission for the group for a piece of content. + * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ async removeGroupByName(parameters: Parameters.RemoveGroupByName, callback: Callback): Promise; /** - * Removes a group from a content restriction. That is, remove read or update - * permission for the group for a piece of content. + * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ async removeGroupByName(parameters: Parameters.RemoveGroupByName, callback?: never): Promise; - async removeGroupByName(parameters: Parameters.RemoveGroupByName, callback?: Callback): Promise { - const config = { + async removeGroupByName( + parameters: Parameters.RemoveGroupByName, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeGroupByName' }); } /** - * Returns whether the specified content restriction applies to a group. - * For example, if a page with `id=123` has a `read` restriction for the `123456` group id, - * the following request will return `true`: + * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a + * `read` restriction for the `123456` group id, the following request will return `true`: * * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/byGroupId/123456` * * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more - * information, see [Confluence permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getIndividualGroupRestrictionStatusByGroupId(parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, callback: Callback): Promise; + * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence + * permissions](https://confluence.atlassian.com/x/_AozKw). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getIndividualGroupRestrictionStatusByGroupId( + parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, + callback: Callback + ): Promise; /** - * Returns whether the specified content restriction applies to a group. - * For example, if a page with `id=123` has a `read` restriction for the `123456` group id, - * the following request will return `true`: + * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a + * `read` restriction for the `123456` group id, the following request will return `true`: * * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/byGroupId/123456` * * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more - * information, see [Confluence permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getIndividualGroupRestrictionStatusByGroupId(parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, callback?: never): Promise; - async getIndividualGroupRestrictionStatusByGroupId(parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, callback?: Callback): Promise { - const config = { + * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence + * permissions](https://confluence.atlassian.com/x/_AozKw). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getIndividualGroupRestrictionStatusByGroupId( + parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, + callback?: never + ): Promise; + async getIndividualGroupRestrictionStatusByGroupId( + parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getIndividualGroupRestrictionStatusByGroupId' }); } /** - * Adds a group to a content restriction by Group Id. That is, grant read or update - * permission to the group for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async addGroupToContentRestrictionByGroupId(parameters: Parameters.AddGroupToContentRestrictionByGroupId, callback: Callback): Promise; + * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a + * piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async addGroupToContentRestrictionByGroupId( + parameters: Parameters.AddGroupToContentRestrictionByGroupId, + callback: Callback + ): Promise; /** - * Adds a group to a content restriction by Group Id. That is, grant read or update - * permission to the group for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async addGroupToContentRestrictionByGroupId(parameters: Parameters.AddGroupToContentRestrictionByGroupId, callback?: never): Promise; - async addGroupToContentRestrictionByGroupId(parameters: Parameters.AddGroupToContentRestrictionByGroupId, callback?: Callback): Promise { - const config = { + * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a + * piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async addGroupToContentRestrictionByGroupId( + parameters: Parameters.AddGroupToContentRestrictionByGroupId, + callback?: never + ): Promise; + async addGroupToContentRestrictionByGroupId( + parameters: Parameters.AddGroupToContentRestrictionByGroupId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, method: 'PUT', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addGroupToContentRestrictionByGroupId' }); } /** - * Removes a group from a content restriction. That is, remove read or update - * permission for the group for a piece of content. + * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ async removeGroupById(parameters: Parameters.RemoveGroupById, callback: Callback): Promise; /** - * Removes a group from a content restriction. That is, remove read or update - * permission for the group for a piece of content. + * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ async removeGroupById(parameters: Parameters.RemoveGroupById, callback?: never): Promise; - async removeGroupById(parameters: Parameters.RemoveGroupById, callback?: Callback): Promise { - const config = { + async removeGroupById( + parameters: Parameters.RemoveGroupById, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeGroupById' }); } /** - * Returns whether the specified content restriction applies to a user. - * For example, if a page with `id=123` has a `read` restriction for a user with an account ID of - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following request will return `true`: + * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a + * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following + * request will return `true`: * * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192` * * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more - * information, see [Confluence permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getContentRestrictionStatusForUser(parameters: Parameters.GetContentRestrictionStatusForUser, callback: Callback): Promise; + * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence + * permissions](https://confluence.atlassian.com/x/_AozKw). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getContentRestrictionStatusForUser( + parameters: Parameters.GetContentRestrictionStatusForUser, + callback: Callback + ): Promise; /** - * Returns whether the specified content restriction applies to a user. - * For example, if a page with `id=123` has a `read` restriction for a user with an account ID of - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following request will return `true`: + * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a + * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following + * request will return `true`: * * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192` * * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more - * information, see [Confluence permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. */ - async getContentRestrictionStatusForUser(parameters: Parameters.GetContentRestrictionStatusForUser, callback?: never): Promise; - async getContentRestrictionStatusForUser(parameters: Parameters.GetContentRestrictionStatusForUser, callback?: Callback): Promise { - const config = { + * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence + * permissions](https://confluence.atlassian.com/x/_AozKw). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ + async getContentRestrictionStatusForUser( + parameters: Parameters.GetContentRestrictionStatusForUser, + callback?: never + ): Promise; + async getContentRestrictionStatusForUser( + parameters: Parameters.GetContentRestrictionStatusForUser, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, method: 'GET', params: { @@ -372,27 +461,34 @@ export class ContentRestrictions { userName: parameters.userName, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentRestrictionStatusForUser' }); } /** - * Adds a user to a content restriction. That is, grant read or update - * permission to the user for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async addUserToContentRestriction(parameters: Parameters.AddUserToContentRestriction, callback: Callback): Promise; + * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async addUserToContentRestriction( + parameters: Parameters.AddUserToContentRestriction, + callback: Callback + ): Promise; /** - * Adds a user to a content restriction. That is, grant read or update - * permission to the user for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async addUserToContentRestriction(parameters: Parameters.AddUserToContentRestriction, callback?: never): Promise; - async addUserToContentRestriction(parameters: Parameters.AddUserToContentRestriction, callback?: Callback): Promise { - const config = { + * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async addUserToContentRestriction( + parameters: Parameters.AddUserToContentRestriction, + callback?: never + ): Promise; + async addUserToContentRestriction( + parameters: Parameters.AddUserToContentRestriction, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, method: 'PUT', params: { @@ -400,27 +496,34 @@ export class ContentRestrictions { userName: parameters.userName, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addUserToContentRestriction' }); } /** - * Removes a group from a content restriction. That is, remove read or update - * permission for the group for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async removeUserFromContentRestriction(parameters: Parameters.RemoveUserFromContentRestriction, callback: Callback): Promise; + * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async removeUserFromContentRestriction( + parameters: Parameters.RemoveUserFromContentRestriction, + callback: Callback + ): Promise; /** - * Removes a group from a content restriction. That is, remove read or update - * permission for the group for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to edit the content. */ - async removeUserFromContentRestriction(parameters: Parameters.RemoveUserFromContentRestriction, callback?: never): Promise; - async removeUserFromContentRestriction(parameters: Parameters.RemoveUserFromContentRestriction, callback?: Callback): Promise { - const config = { + * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ + async removeUserFromContentRestriction( + parameters: Parameters.RemoveUserFromContentRestriction, + callback?: never + ): Promise; + async removeUserFromContentRestriction( + parameters: Parameters.RemoveUserFromContentRestriction, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, method: 'DELETE', params: { @@ -428,7 +531,7 @@ export class ContentRestrictions { userName: parameters.userName, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeUserFromContentRestriction' }); } diff --git a/src/api/contentVersions.ts b/src/api/contentVersions.ts index 94c2c50f..364b0102 100644 --- a/src/api/contentVersions.ts +++ b/src/api/contentVersions.ts @@ -5,24 +5,33 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentVersions { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns the versions for a piece of content in descending order. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. If the content is a blog post, 'View' permission - * for the space is required. */ - async getContentVersions(parameters: Parameters.GetContentVersions, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the + * content is a blog post, 'View' permission for the space is required. + */ + async getContentVersions( + parameters: Parameters.GetContentVersions, + callback: Callback + ): Promise; /** * Returns the versions for a piece of content in descending order. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. If the content is a blog post, 'View' permission - * for the space is required. */ - async getContentVersions(parameters: Parameters.GetContentVersions, callback?: never): Promise; - async getContentVersions(parameters: Parameters.GetContentVersions, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the + * content is a blog post, 'View' permission for the space is required. + */ + async getContentVersions( + parameters: Parameters.GetContentVersions, + callback?: never + ): Promise; + async getContentVersions( + parameters: Parameters.GetContentVersions, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/version`, method: 'GET', params: { @@ -30,27 +39,36 @@ export class ContentVersions { limit: parameters.limit, expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentVersions' }); } /** - * Restores a historical version to be the latest version. That is, a new version - * is created with the content of the historical version. + * Restores a historical version to be the latest version. That is, a new version is created with the content of the + * historical version. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async restoreContentVersion(parameters: Parameters.RestoreContentVersion, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async restoreContentVersion( + parameters: Parameters.RestoreContentVersion, + callback: Callback + ): Promise; /** - * Restores a historical version to be the latest version. That is, a new version - * is created with the content of the historical version. + * Restores a historical version to be the latest version. That is, a new version is created with the content of the + * historical version. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async restoreContentVersion(parameters: Parameters.RestoreContentVersion, callback?: never): Promise; - async restoreContentVersion(parameters: Parameters.RestoreContentVersion, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async restoreContentVersion( + parameters: Parameters.RestoreContentVersion, + callback?: never + ): Promise; + async restoreContentVersion( + parameters: Parameters.RestoreContentVersion, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/version`, method: 'POST', params: { @@ -60,7 +78,7 @@ export class ContentVersions { operationKey: parameters.operationKey, params: parameters.params, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'restoreContentVersion' }); } @@ -68,50 +86,60 @@ export class ContentVersions { /** * Returns a version for a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. If the content is a blog post, 'View' permission - * for the space is required. */ - async getContentVersion(parameters: Parameters.GetContentVersion, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the + * content is a blog post, 'View' permission for the space is required. + */ + async getContentVersion( + parameters: Parameters.GetContentVersion, + callback: Callback + ): Promise; /** * Returns a version for a piece of content. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the content. If the content is a blog post, 'View' permission - * for the space is required. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the + * content is a blog post, 'View' permission for the space is required. + */ async getContentVersion(parameters: Parameters.GetContentVersion, callback?: never): Promise; - async getContentVersion(parameters: Parameters.GetContentVersion, callback?: Callback): Promise { - const config = { + async getContentVersion( + parameters: Parameters.GetContentVersion, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/version/${parameters.versionNumber}`, method: 'GET', params: { expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentVersion' }); } /** - * Delete a historical version. This does not delete the changes made to the - * content in that version, rather the changes for the deleted version are - * rolled up into the next version. Note, you cannot delete the current version. + * Delete a historical version. This does not delete the changes made to the content in that version, rather the + * changes for the deleted version are rolled up into the next version. Note, you cannot delete the current version. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ - async deleteContentVersion(parameters: Parameters.DeleteContentVersion, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async deleteContentVersion( + parameters: Parameters.DeleteContentVersion, + callback: Callback + ): Promise; /** - * Delete a historical version. This does not delete the changes made to the - * content in that version, rather the changes for the deleted version are - * rolled up into the next version. Note, you cannot delete the current version. + * Delete a historical version. This does not delete the changes made to the content in that version, rather the + * changes for the deleted version are rolled up into the next version. Note, you cannot delete the current version. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to update the content. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ async deleteContentVersion(parameters: Parameters.DeleteContentVersion, callback?: never): Promise; - async deleteContentVersion(parameters: Parameters.DeleteContentVersion, callback?: Callback): Promise { - const config = { + async deleteContentVersion( + parameters: Parameters.DeleteContentVersion, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/version/${parameters.versionNumber}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'deleteContentVersion' }); } diff --git a/src/api/contentWatches.ts b/src/api/contentWatches.ts index 41d9fce6..3a094bb0 100644 --- a/src/api/contentWatches.ts +++ b/src/api/contentWatches.ts @@ -5,11 +5,10 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ContentWatches { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns the watches for a page. A user that watches a page will receive - * receive notifications when the page is updated. + * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is updated. * * If you want to manage watches for a page, use the following `user` methods: * @@ -17,12 +16,15 @@ export class ContentWatches { * - [Add content watch](#api-user-watch-content-contentId-post) * - [Remove content watch](#api-user-watch-content-contentId-delete) * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getWatchesForPage(parameters: Parameters.GetWatchesForPage, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getWatchesForPage( + parameters: Parameters.GetWatchesForPage, + callback: Callback + ): Promise; /** - * Returns the watches for a page. A user that watches a page will receive - * receive notifications when the page is updated. + * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is updated. * * If you want to manage watches for a page, use the following `user` methods: * @@ -30,26 +32,32 @@ export class ContentWatches { * - [Add content watch](#api-user-watch-content-contentId-post) * - [Remove content watch](#api-user-watch-content-contentId-delete) * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getWatchesForPage(parameters: Parameters.GetWatchesForPage, callback?: never): Promise; - async getWatchesForPage(parameters: Parameters.GetWatchesForPage, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getWatchesForPage( + parameters: Parameters.GetWatchesForPage, + callback?: never + ): Promise; + async getWatchesForPage( + parameters: Parameters.GetWatchesForPage, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/notification/child-created`, method: 'GET', params: { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getWatchesForPage' }); } /** - * Returns all space watches for the space that the content is in. A user that - * watches a space will receive receive notifications when any content in the - * space is updated. + * Returns all space watches for the space that the content is in. A user that watches a space will receive receive + * notifications when any content in the space is updated. * * If you want to manage watches for a space, use the following `user` methods: * @@ -57,13 +65,16 @@ export class ContentWatches { * - [Add space watch](#api-user-watch-space-spaceKey-post) * - [Remove space watch](#api-user-watch-space-spaceKey-delete) * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getWatchesForSpace(parameters: Parameters.GetWatchesForSpace, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getWatchesForSpace( + parameters: Parameters.GetWatchesForSpace, + callback: Callback + ): Promise; /** - * Returns all space watches for the space that the content is in. A user that - * watches a space will receive receive notifications when any content in the - * space is updated. + * Returns all space watches for the space that the content is in. A user that watches a space will receive receive + * notifications when any content in the space is updated. * * If you want to manage watches for a space, use the following `user` methods: * @@ -71,65 +82,86 @@ export class ContentWatches { * - [Add space watch](#api-user-watch-space-spaceKey-post) * - [Remove space watch](#api-user-watch-space-spaceKey-delete) * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getWatchesForSpace(parameters: Parameters.GetWatchesForSpace, callback?: never): Promise; - async getWatchesForSpace(parameters: Parameters.GetWatchesForSpace, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getWatchesForSpace( + parameters: Parameters.GetWatchesForSpace, + callback?: never + ): Promise; + async getWatchesForSpace( + parameters: Parameters.GetWatchesForSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/content/${parameters.id}/notification/created`, method: 'GET', params: { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getWatchesForSpace' }); } - /** - * Returns a list of watchers of a space */ - async getWatchersForSpace(parameters: Parameters.GetWatchersForSpace, callback: Callback): Promise; - /** - * Returns a list of watchers of a space */ - async getWatchersForSpace(parameters: Parameters.GetWatchersForSpace, callback?: never): Promise; - async getWatchersForSpace(parameters: Parameters.GetWatchersForSpace, callback?: Callback): Promise { - const config = { + /** Returns a list of watchers of a space */ + async getWatchersForSpace( + parameters: Parameters.GetWatchersForSpace, + callback: Callback + ): Promise; + /** Returns a list of watchers of a space */ + async getWatchersForSpace( + parameters: Parameters.GetWatchersForSpace, + callback?: never + ): Promise; + async getWatchersForSpace( + parameters: Parameters.GetWatchersForSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/watch`, method: 'GET', params: { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getWatchersForSpace' }); } /** - * Returns whether a user is watching a piece of content. Choose the user by - * doing one of the following: + * Returns whether a user is watching a piece of content. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ - async getContentWatchStatus(parameters: Parameters.GetContentWatchStatus, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ + async getContentWatchStatus( + parameters: Parameters.GetContentWatchStatus, + callback: Callback + ): Promise; /** - * Returns whether a user is watching a piece of content. Choose the user by - * doing one of the following: + * Returns whether a user is watching a piece of content. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ - async getContentWatchStatus(parameters: Parameters.GetContentWatchStatus, callback?: never): Promise; - async getContentWatchStatus(parameters: Parameters.GetContentWatchStatus, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ + async getContentWatchStatus( + parameters: Parameters.GetContentWatchStatus, + callback?: never + ): Promise; + async getContentWatchStatus( + parameters: Parameters.GetContentWatchStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/user/watch/content/${parameters.contentId}`, method: 'GET', params: { @@ -137,41 +169,40 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentWatchStatus' }); } /** - * Adds a user as a watcher to a piece of content. Choose the user by doing - * one of the following: + * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a - * request, as this operation has XSRF protection. + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async addContentWatcher(parameters: Parameters.AddContentWatcher, callback: Callback): Promise; /** - * Adds a user as a watcher to a piece of content. Choose the user by doing - * one of the following: + * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a - * request, as this operation has XSRF protection. + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async addContentWatcher(parameters: Parameters.AddContentWatcher, callback?: never): Promise; - async addContentWatcher(parameters: Parameters.AddContentWatcher, callback?: Callback): Promise { - const config = { + async addContentWatcher( + parameters: Parameters.AddContentWatcher, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/user/watch/content/${parameters.contentId}`, method: 'POST', params: { @@ -179,35 +210,39 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addContentWatcher' }); } /** - * Removes a user as a watcher from a piece of content. Choose the user by - * doing one of the following: + * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ - async removeContentWatcher(parameters: Parameters.RemoveContentWatcher, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ + async removeContentWatcher( + parameters: Parameters.RemoveContentWatcher, + callback: Callback + ): Promise; /** - * Removes a user as a watcher from a piece of content. Choose the user by - * doing one of the following: + * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async removeContentWatcher(parameters: Parameters.RemoveContentWatcher, callback?: never): Promise; - async removeContentWatcher(parameters: Parameters.RemoveContentWatcher, callback?: Callback): Promise { - const config = { + async removeContentWatcher( + parameters: Parameters.RemoveContentWatcher, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/user/watch/content/${parameters.contentId}`, method: 'DELETE', headers: { @@ -218,35 +253,39 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeContentWatcher' }); } /** - * Returns whether a user is watching a label. Choose the user by doing one - * of the following: + * Returns whether a user is watching a label. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ - async isWatchingLabel(parameters: Parameters.IsWatchingLabel, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ + async isWatchingLabel( + parameters: Parameters.IsWatchingLabel, + callback: Callback + ): Promise; /** - * Returns whether a user is watching a label. Choose the user by doing one - * of the following: + * Returns whether a user is watching a label. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async isWatchingLabel(parameters: Parameters.IsWatchingLabel, callback?: never): Promise; - async isWatchingLabel(parameters: Parameters.IsWatchingLabel, callback?: Callback): Promise { - const config = { + async isWatchingLabel( + parameters: Parameters.IsWatchingLabel, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/user/watch/label/${parameters.labelName}`, method: 'GET', params: { @@ -254,41 +293,37 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'isWatchingLabel' }); } /** - * Adds a user as a watcher to a label. Choose the user by doing one of the - * following: + * Adds a user as a watcher to a label. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a - * request, as this operation has XSRF protection. + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async addLabelWatcher(parameters: Parameters.AddLabelWatcher, callback: Callback): Promise; /** - * Adds a user as a watcher to a label. Choose the user by doing one of the - * following: + * Adds a user as a watcher to a label. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a - * request, as this operation has XSRF protection. + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async addLabelWatcher(parameters: Parameters.AddLabelWatcher, callback?: never): Promise; async addLabelWatcher(parameters: Parameters.AddLabelWatcher, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/user/watch/label/${parameters.labelName}`, method: 'POST', headers: { @@ -299,35 +334,36 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addLabelWatcher' }); } /** - * Removes a user as a watcher from a label. Choose the user by doing one of - * the following: + * Removes a user as a watcher from a label. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async removeLabelWatcher(parameters: Parameters.RemoveLabelWatcher, callback: Callback): Promise; /** - * Removes a user as a watcher from a label. Choose the user by doing one of - * the following: + * Removes a user as a watcher from a label. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async removeLabelWatcher(parameters: Parameters.RemoveLabelWatcher, callback?: never): Promise; - async removeLabelWatcher(parameters: Parameters.RemoveLabelWatcher, callback?: Callback): Promise { - const config = { + async removeLabelWatcher( + parameters: Parameters.RemoveLabelWatcher, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/user/watch/label/${parameters.labelName}`, method: 'DELETE', params: { @@ -335,35 +371,39 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeLabelWatcher' }); } /** - * Returns whether a user is watching a space. Choose the user by - * doing one of the following: + * Returns whether a user is watching a space. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ - async isWatchingSpace(parameters: Parameters.IsWatchingSpace, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ + async isWatchingSpace( + parameters: Parameters.IsWatchingSpace, + callback: Callback + ): Promise; /** - * Returns whether a user is watching a space. Choose the user by - * doing one of the following: + * Returns whether a user is watching a space. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async isWatchingSpace(parameters: Parameters.IsWatchingSpace, callback?: never): Promise; - async isWatchingSpace(parameters: Parameters.IsWatchingSpace, callback?: Callback): Promise { - const config = { + async isWatchingSpace( + parameters: Parameters.IsWatchingSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/user/watch/space/${parameters.spaceKey}`, method: 'GET', params: { @@ -371,41 +411,37 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'isWatchingSpace' }); } /** - * Adds a user as a watcher to a space. Choose the user by doing one of the - * following: + * Adds a user as a watcher to a space. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a - * request, as this operation has XSRF protection. + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async addSpaceWatcher(parameters: Parameters.AddSpaceWatcher, callback: Callback): Promise; /** - * Adds a user as a watcher to a space. Choose the user by doing one of the - * following: + * Adds a user as a watcher to a space. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a - * request, as this operation has XSRF protection. + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async addSpaceWatcher(parameters: Parameters.AddSpaceWatcher, callback?: never): Promise; async addSpaceWatcher(parameters: Parameters.AddSpaceWatcher, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/user/watch/space/${parameters.spaceKey}`, method: 'POST', headers: { @@ -416,35 +452,33 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addSpaceWatcher' }); } /** - * Removes a user as a watcher from a space. Choose the user by doing one of - * the following: + * Removes a user as a watcher from a space. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async removeSpaceWatch(parameters: Parameters.RemoveSpaceWatch, callback: Callback): Promise; /** - * Removes a user as a watcher from a space. Choose the user by doing one of - * the following: + * Removes a user as a watcher from a space. Choose the user by doing one of the following: * * - Specify a user via a query parameter: Use the `accountId` to identify the user. * - Do not specify a user: The currently logged-in user will be used. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ async removeSpaceWatch(parameters: Parameters.RemoveSpaceWatch, callback?: never): Promise; async removeSpaceWatch(parameters: Parameters.RemoveSpaceWatch, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/user/watch/space/${parameters.spaceKey}`, method: 'DELETE', params: { @@ -452,7 +486,7 @@ export class ContentWatches { username: parameters.username, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeSpaceWatch' }); } diff --git a/src/api/dynamicModules.ts b/src/api/dynamicModules.ts index b52b1d64..62eb4d7c 100644 --- a/src/api/dynamicModules.ts +++ b/src/api/dynamicModules.ts @@ -4,42 +4,54 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class DynamicModules { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns all modules registered dynamically by the calling app. * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. */ + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ async getModules(callback: Callback): Promise; /** * Returns all modules registered dynamically by the calling app. * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. */ + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ async getModules(callback?: never): Promise; async getModules(callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/atlassian-connect/1/app/module/dynamic', method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getModules' }); } /** - * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/). + * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic + * modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/). * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. */ - async registerModules(parameters: Parameters.RegisterModules | undefined, callback: Callback): Promise; + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ + async registerModules( + parameters: Parameters.RegisterModules | undefined, + callback: Callback + ): Promise; /** - * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/). + * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic + * modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/). * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. */ + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ async registerModules(parameters?: Parameters.RegisterModules, callback?: never): Promise; - async registerModules(parameters?: Parameters.RegisterModules, callback?: Callback): Promise { - const config = { + async registerModules( + parameters?: Parameters.RegisterModules, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/atlassian-connect/1/app/module/dynamic', method: 'POST', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'registerModules' }); } @@ -47,21 +59,23 @@ export class DynamicModules { /** * Remove all or a list of modules registered by the calling app. * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. */ + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ async removeModules(parameters: Parameters.RemoveModules, callback: Callback): Promise; /** * Remove all or a list of modules registered by the calling app. * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. */ + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ async removeModules(parameters: Parameters.RemoveModules, callback?: never): Promise; async removeModules(parameters: Parameters.RemoveModules, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/atlassian-connect/1/app/module/dynamic', method: 'DELETE', params: { moduleKey: parameters.moduleKey, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeModules' }); } diff --git a/src/api/group.ts b/src/api/group.ts index 4a641005..381c7fbb 100644 --- a/src/api/group.ts +++ b/src/api/group.ts @@ -5,31 +5,37 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Group { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns all user groups. The returned groups are ordered alphabetically in - * ascending order by group name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroups(parameters: Parameters.GetGroups | undefined, callback: Callback): Promise; + * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group name. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroups( + parameters: Parameters.GetGroups | undefined, + callback: Callback + ): Promise; /** - * Returns all user groups. The returned groups are ordered alphabetically in - * ascending order by group name. + * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group name. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getGroups(parameters?: Parameters.GetGroups, callback?: never): Promise; - async getGroups(parameters?: Parameters.GetGroups, callback?: Callback): Promise { - const config = { + async getGroups( + parameters?: Parameters.GetGroups, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/group', method: 'GET', params: { start: parameters?.start, limit: parameters?.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGroups' }); } @@ -37,23 +43,26 @@ export class Group { /** * Creates a new user group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ - async createGroup(parameters: Parameters.CreateGroup | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ + async createGroup( + parameters: Parameters.CreateGroup | undefined, + callback: Callback + ): Promise; /** * Creates a new user group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ - async createGroup(parameters: Parameters.CreateGroup, callback?: never): Promise; - async createGroup(parameters: Parameters.CreateGroup, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ + async createGroup(parameters?: Parameters.CreateGroup, callback?: never): Promise; + async createGroup(parameters?: Parameters.CreateGroup, callback?: Callback): Promise { + const config: RequestConfig = { url: '/api/group', method: 'POST', data: { - name: parameters.name, + name: parameters?.name, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createGroup' }); } @@ -61,23 +70,23 @@ export class Group { /** * Delete user group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ async removeGroup(parameters: Parameters.RemoveGroup, callback: Callback): Promise; /** * Delete user group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ async removeGroup(parameters: Parameters.RemoveGroup, callback?: never): Promise; async removeGroup(parameters: Parameters.RemoveGroup, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/group', method: 'DELETE', params: { name: parameters.name, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeGroup' }); } @@ -85,23 +94,34 @@ export class Group { /** * Returns a user group for a given group name. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupByQueryParam(parameters: Parameters.GetGroupByQueryParam, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupByQueryParam( + parameters: Parameters.GetGroupByQueryParam, + callback: Callback + ): Promise; /** * Returns a user group for a given group name. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupByQueryParam(parameters: Parameters.GetGroupByQueryParam, callback?: never): Promise; - async getGroupByQueryParam(parameters: Parameters.GetGroupByQueryParam, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupByQueryParam( + parameters: Parameters.GetGroupByQueryParam, + callback?: never + ): Promise; + async getGroupByQueryParam( + parameters: Parameters.GetGroupByQueryParam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/group/by-name', method: 'GET', params: { name: parameters.name, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGroupByQueryParam' }); } @@ -109,23 +129,31 @@ export class Group { /** * Returns a user group for a given group id. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupByGroupId(parameters: Parameters.GetGroupByGroupId, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupByGroupId( + parameters: Parameters.GetGroupByGroupId, + callback: Callback + ): Promise; /** * Returns a user group for a given group id. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getGroupByGroupId(parameters: Parameters.GetGroupByGroupId, callback?: never): Promise; - async getGroupByGroupId(parameters: Parameters.GetGroupByGroupId, callback?: Callback): Promise { - const config = { + async getGroupByGroupId( + parameters: Parameters.GetGroupByGroupId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/group/by-id', method: 'GET', params: { id: parameters.id, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGroupByGroupId' }); } @@ -135,22 +163,24 @@ export class Group { * * Use updated Get group API * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getGroup(parameters: Parameters.GetGroup, callback: Callback): Promise; /** * Returns a user group for a given group name. * * Use updated Get group API * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getGroup(parameters: Parameters.GetGroup, callback?: never): Promise; async getGroup(parameters: Parameters.GetGroup, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/group/${parameters.groupName}`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGroup' }); } @@ -158,17 +188,28 @@ export class Group { /** * Returns the users that are members of a group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getMembersByQueryParam(parameters: Parameters.GetMembersByQueryParam, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getMembersByQueryParam( + parameters: Parameters.GetMembersByQueryParam, + callback: Callback + ): Promise; /** * Returns the users that are members of a group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getMembersByQueryParam(parameters: Parameters.GetMembersByQueryParam, callback?: never): Promise; - async getMembersByQueryParam(parameters: Parameters.GetMembersByQueryParam, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getMembersByQueryParam( + parameters: Parameters.GetMembersByQueryParam, + callback?: never + ): Promise; + async getMembersByQueryParam( + parameters: Parameters.GetMembersByQueryParam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/group/member', method: 'GET', params: { @@ -176,7 +217,7 @@ export class Group { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getMembersByQueryParam' }); } @@ -186,38 +227,56 @@ export class Group { * * Use updated Get group API * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupMembers(parameters: Parameters.GetGroupMembers, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupMembers( + parameters: Parameters.GetGroupMembers, + callback: Callback + ): Promise; /** * Returns the users that are members of a group. * * Use updated Get group API * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupMembers(parameters: Parameters.GetGroupMembers, callback?: never): Promise; - async getGroupMembers(parameters: Parameters.GetGroupMembers, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupMembers( + parameters: Parameters.GetGroupMembers, + callback?: never + ): Promise; + async getGroupMembers( + parameters: Parameters.GetGroupMembers, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/group/${parameters.groupName}/member`, method: 'GET', params: { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGroupMembers' }); } - /** - * Get search results of groups by partial query provided. */ - async getGroupsSearch(parameters: Parameters.GetGroupsSearch, callback: Callback): Promise; - /** - * Get search results of groups by partial query provided. */ - async getGroupsSearch(parameters: Parameters.GetGroupsSearch, callback?: never): Promise; - async getGroupsSearch(parameters: Parameters.GetGroupsSearch, callback?: Callback): Promise { - const config = { + /** Get search results of groups by partial query provided. */ + async getGroupsSearch( + parameters: Parameters.GetGroupsSearch, + callback: Callback + ): Promise; + /** Get search results of groups by partial query provided. */ + async getGroupsSearch( + parameters: Parameters.GetGroupsSearch, + callback?: never + ): Promise; + async getGroupsSearch( + parameters: Parameters.GetGroupsSearch, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/group/picker', method: 'GET', params: { @@ -225,7 +284,7 @@ export class Group { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGroupsSearch' }); } @@ -233,23 +292,32 @@ export class Group { /** * Adds a user as a member in a group represented by its groupId * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ - async addUserToGroupByGroupId(parameters: Parameters.AddUserToGroupByGroupId, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ + async addUserToGroupByGroupId( + parameters: Parameters.AddUserToGroupByGroupId, + callback: Callback + ): Promise; /** * Adds a user as a member in a group represented by its groupId * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ - async addUserToGroupByGroupId(parameters: Parameters.AddUserToGroupByGroupId, callback?: never): Promise; - async addUserToGroupByGroupId(parameters: Parameters.AddUserToGroupByGroupId, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ + async addUserToGroupByGroupId( + parameters: Parameters.AddUserToGroupByGroupId, + callback?: never + ): Promise; + async addUserToGroupByGroupId( + parameters: Parameters.AddUserToGroupByGroupId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/group/userByGroupId', method: 'POST', params: { groupId: parameters.groupId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addUserToGroupByGroupId' }); } @@ -257,24 +325,33 @@ export class Group { /** * Remove user as a member from a group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ - async removeMemberFromGroupByGroupId(parameters: Parameters.RemoveMemberFromGroupByGroupId, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ + async removeMemberFromGroupByGroupId( + parameters: Parameters.RemoveMemberFromGroupByGroupId, + callback: Callback + ): Promise; /** * Remove user as a member from a group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ - async removeMemberFromGroupByGroupId(parameters: Parameters.RemoveMemberFromGroupByGroupId, callback?: never): Promise; - async removeMemberFromGroupByGroupId(parameters: Parameters.RemoveMemberFromGroupByGroupId, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ + async removeMemberFromGroupByGroupId( + parameters: Parameters.RemoveMemberFromGroupByGroupId, + callback?: never + ): Promise; + async removeMemberFromGroupByGroupId( + parameters: Parameters.RemoveMemberFromGroupByGroupId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/group/userByGroupId', method: 'DELETE', params: { groupId: parameters.groupId, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeMemberFromGroupByGroupId' }); } @@ -284,26 +361,37 @@ export class Group { * * Use updated Get group API * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupMembersByGroupId(parameters: Parameters.GetGroupMembersByGroupId, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupMembersByGroupId( + parameters: Parameters.GetGroupMembersByGroupId, + callback: Callback + ): Promise; /** * Returns the users that are members of a group. * * Use updated Get group API * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupMembersByGroupId(parameters: Parameters.GetGroupMembersByGroupId, callback?: never): Promise; - async getGroupMembersByGroupId(parameters: Parameters.GetGroupMembersByGroupId, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupMembersByGroupId( + parameters: Parameters.GetGroupMembersByGroupId, + callback?: never + ): Promise; + async getGroupMembersByGroupId( + parameters: Parameters.GetGroupMembersByGroupId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/group/${parameters.groupId}/membersByGroupId`, method: 'GET', params: { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGroupMembersByGroupId' }); } @@ -311,23 +399,23 @@ export class Group { /** * Adds a user as a member in a group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ async addUserToGroup(parameters: Parameters.AddUserToGroup, callback: Callback): Promise; /** * Adds a user as a member in a group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ async addUserToGroup(parameters: Parameters.AddUserToGroup, callback?: never): Promise; async addUserToGroup(parameters: Parameters.AddUserToGroup, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/group/user', method: 'POST', params: { name: parameters.name, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addUserToGroup' }); } @@ -335,24 +423,30 @@ export class Group { /** * Remove user as a member from a group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ - async removeMemberFromGroup(parameters: Parameters.RemoveMemberFromGroup, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ + async removeMemberFromGroup( + parameters: Parameters.RemoveMemberFromGroup, + callback: Callback + ): Promise; /** * Remove user as a member from a group. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * User must be a site admin. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ async removeMemberFromGroup(parameters: Parameters.RemoveMemberFromGroup, callback?: never): Promise; - async removeMemberFromGroup(parameters: Parameters.RemoveMemberFromGroup, callback?: Callback): Promise { - const config = { + async removeMemberFromGroup( + parameters: Parameters.RemoveMemberFromGroup, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/group/user', method: 'DELETE', params: { name: parameters.name, accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeMemberFromGroup' }); } diff --git a/src/api/index.ts b/src/api/index.ts index c85df2c7..a1a56b58 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,11 +1,11 @@ export * from './audit'; -export * from './contentAttachments'; -export * from './contentChildrenAndDescendants'; -export * from './contentMacroBody'; export * from './content'; +export * from './contentAttachments'; export * from './contentBody'; +export * from './contentChildrenAndDescendants'; export * from './contentComments'; export * from './contentLabels'; +export * from './contentMacroBody'; export * from './contentPermissions'; export * from './contentProperties'; export * from './contentRestrictions'; diff --git a/src/api/inlineTasks.ts b/src/api/inlineTasks.ts index 7fc6cd8c..40ca361f 100644 --- a/src/api/inlineTasks.ts +++ b/src/api/inlineTasks.ts @@ -5,24 +5,30 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class InlineTasks { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns inline tasks based on the search query. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). Only tasks - * in contents that the user has permission to view are returned. */ - async searchTasks(parameters: Parameters.SearchTasks | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Only tasks in contents that the user has permission to view are returned. + */ + async searchTasks( + parameters: Parameters.SearchTasks | undefined, + callback: Callback + ): Promise; /** * Returns inline tasks based on the search query. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). Only tasks - * in contents that the user has permission to view are returned. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Only tasks in contents that the user has permission to view are returned. + */ async searchTasks(parameters?: Parameters.SearchTasks, callback?: never): Promise; - async searchTasks(parameters?: Parameters.SearchTasks, callback?: Callback): Promise { - const config = { + async searchTasks( + parameters?: Parameters.SearchTasks, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/inlinetasks/search', method: 'GET', params: { @@ -41,7 +47,7 @@ export class InlineTasks { completedateTo: parameters?.completedateTo, status: parameters?.status, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'searchTasks' }); } diff --git a/src/api/labelInfo.ts b/src/api/labelInfo.ts index de540fd4..b689cabe 100644 --- a/src/api/labelInfo.ts +++ b/src/api/labelInfo.ts @@ -5,24 +5,33 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class LabelInfo { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns label information and a list of contents associated with the label. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). Only contents - * that the user is permitted to view is returned. */ - async getAllLabelContent(parameters: Parameters.GetAllLabelContent, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Only contents that the user is permitted to view is returned. + */ + async getAllLabelContent( + parameters: Parameters.GetAllLabelContent, + callback: Callback + ): Promise; /** * Returns label information and a list of contents associated with the label. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). Only contents - * that the user is permitted to view is returned. */ - async getAllLabelContent(parameters: Parameters.GetAllLabelContent, callback?: never): Promise; - async getAllLabelContent(parameters: Parameters.GetAllLabelContent, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Only contents that the user is permitted to view is returned. + */ + async getAllLabelContent( + parameters: Parameters.GetAllLabelContent, + callback?: never + ): Promise; + async getAllLabelContent( + parameters: Parameters.GetAllLabelContent, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/label', method: 'GET', params: { @@ -31,7 +40,7 @@ export class LabelInfo { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getAllLabelContent' }); } diff --git a/src/api/longRunningTask.ts b/src/api/longRunningTask.ts index 4c73a2c7..60b3055c 100644 --- a/src/api/longRunningTask.ts +++ b/src/api/longRunningTask.ts @@ -5,58 +5,70 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class LongRunningTask { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns information about all active long-running tasks (e.g. space export), - * such as how long each task has been running and the percentage of each task - * that has completed. + * Returns information about all active long-running tasks (e.g. space export), such as how long each task has been + * running and the percentage of each task that has completed. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getTasks(parameters: Parameters.GetTasks | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getTasks( + parameters: Parameters.GetTasks | undefined, + callback: Callback + ): Promise; /** - * Returns information about all active long-running tasks (e.g. space export), - * such as how long each task has been running and the percentage of each task - * that has completed. + * Returns information about all active long-running tasks (e.g. space export), such as how long each task has been + * running and the percentage of each task that has completed. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getTasks(parameters?: Parameters.GetTasks, callback?: never): Promise; - async getTasks(parameters?: Parameters.GetTasks, callback?: Callback): Promise { - const config = { + async getTasks( + parameters?: Parameters.GetTasks, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/longtask', method: 'GET', params: { start: parameters?.start, limit: parameters?.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getTasks' }); } /** - * Returns information about an active long-running task (e.g. space export), - * such as how long it has been running and the percentage of the task that - * has completed. + * Returns information about an active long-running task (e.g. space export), such as how long it has been running and + * the percentage of the task that has completed. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getTask(parameters: Parameters.GetTask, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getTask( + parameters: Parameters.GetTask, + callback: Callback + ): Promise; /** - * Returns information about an active long-running task (e.g. space export), - * such as how long it has been running and the percentage of the task that - * has completed. + * Returns information about an active long-running task (e.g. space export), such as how long it has been running and + * the percentage of the task that has completed. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getTask(parameters: Parameters.GetTask, callback?: never): Promise; - async getTask(parameters: Parameters.GetTask, callback?: Callback): Promise { - const config = { + async getTask( + parameters: Parameters.GetTask, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/longtask/${parameters.id}`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getTask' }); } diff --git a/src/api/models/addContentRestriction.ts b/src/api/models/addContentRestriction.ts index 3e964341..4d22b61d 100644 --- a/src/api/models/addContentRestriction.ts +++ b/src/api/models/addContentRestriction.ts @@ -1,28 +1,35 @@ export interface AddContentRestriction { /** The restriction operation applied to content. */ operation: string; - /** The users/groups that the restrictions will be applied to. At least one of - `user` or `group` must be specified for this object. */ + /** + * The users/groups that the restrictions will be applied to. At least one of `user` or `group` must be specified for + * this object. + */ restrictions: { - /** The users that the restrictions will be applied to. This array must - have at least one item, otherwise it should be omitted. */ + /** The users that the restrictions will be applied to. This array must have at least one item, otherwise it should be omitted. */ user?: { /** Set to 'known'. */ type: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. + * See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. + * See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userKey?: string; - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; }[]; - /** The groups that the restrictions will be applied to. This array must - have at least one item, otherwise it should be omitted. */ + /** + * The groups that the restrictions will be applied to. This array must have at least one item, otherwise it should + * be omitted. + */ group?: { /** Set to 'group'. */ type: string; diff --git a/src/api/models/appDescriptor.ts b/src/api/models/appDescriptor.ts index 1c6e43c3..98336070 100644 --- a/src/api/models/appDescriptor.ts +++ b/src/api/models/appDescriptor.ts @@ -1,13 +1,9 @@ import { Lifecycle } from './lifecycle'; export interface AppDescriptor { - /** - * Defines the authentication type to use when signing requests between the host application and the connect app. - */ + /** Defines the authentication type to use when signing requests between the host application and the connect app. */ authentication: { - /** - * The type of authentication to use. - */ + /** The type of authentication to use. */ type: 'jwt' | 'JWT' | 'none' | 'NONE'; }; @@ -16,87 +12,72 @@ export interface AppDescriptor { * * The baseUrl must start with `https://` to ensure that all data is sent securely between our cloud instances and your app. * - * Note: each app must have a unique baseUrl. - * If you would like to serve multiple apps from the same host, consider adding a path prefix into the baseUrl. + * Note: each app must have a unique baseUrl. If you would like to serve multiple apps from the same host, consider + * adding a path prefix into the baseUrl. */ baseUrl: string; - /** - * A unique key to identify the app. This key must be <= 64 characters. - */ + /** A unique key to identify the app. This key must be <= 64 characters. */ key: string; /** * The API version is an OPTIONAL integer. If omitted we will infer an API version of 1. * - * The intention behind the API version is to allow vendors the ability to beta test a major revision to their - * Connect app as a private version, and have a seamless transition for those beta customers (and existing customers) - * once the major revision is launched. + * The intention behind the API version is to allow vendors the ability to beta test a major revision to their Connect + * app as a private version, and have a seamless transition for those beta customers (and existing customers) once the + * major revision is launched. * * Vendors can accomplish this by listing a new private version of their app, with a new descriptor hosted at a new URL. * - * They use the Atlassian Marketplace's access token facilities to share this version with customers (or for internal use). - * When this version is ready to be taken live, it can be transitioned from private to public, and all customers will be seamlessly updated. + * They use the Atlassian Marketplace's access token facilities to share this version with customers (or for internal + * use). When this version is ready to be taken live, it can be transitioned from private to public, and all customers + * will be seamlessly updated. * - * It's important to note that this approach allows vendors to create new versions manually, - * despite the fact that in the common case, the versions are automatically created. - * This has a few benefits-- for example, it gives vendors the ability to change their descriptor URL if they need to - * (the descriptor URL will be immutable for existing versions). + * It's important to note that this approach allows vendors to create new versions manually, despite the fact that in + * the common case, the versions are automatically created. This has a few benefits-- for example, it gives vendors + * the ability to change their descriptor URL if they need to (the descriptor URL will be immutable for existing versions). */ apiVersion?: number; /** - * A human readable description of what the app does. - * The description will be visible in the **Manage Apps** section of the administration console. - * Provide meaningful and identifying information for the instance administrator. + * A human readable description of what the app does. The description will be visible in the **Manage Apps** section + * of the administration console. Provide meaningful and identifying information for the instance administrator. */ description?: string; /** * Whether or not to enable licensing options in the UPM/Marketplace for this app. + * * @default false */ enableLicensing?: boolean; - /** - * Allows the app to register for app lifecycle notifications. - */ + /** Allows the app to register for app lifecycle notifications. */ lifecycle?: Lifecycle; - /** - * A set of links that the app wishes to publish. - */ + /** A set of links that the app wishes to publish. */ links?: Record; - /** - * The list of modules this app provides. - */ + /** The list of modules this app provides. */ modules?: Record; /** * The human-readable name of the app. The app's name is visible to customers and must therefore be consistent with - * the name used to distribute the app such as any listing in the [Atlassian Marketplace](https://marketplace.atlassian.com/). - * Immutable records are created during the first installation of an app, one of which includes the name of the app. - * It is therefore important that the name of the app is correct as it can not be changed. + * the name used to distribute the app such as any listing in the [Atlassian + * Marketplace](https://marketplace.atlassian.com/). Immutable records are created during the first installation of an + * app, one of which includes the name of the app. It is therefore important that the name of the app is correct as it + * can not be changed. */ name?: string; - /** - * Set of [scopes](https://developer.atlassian.com/cloud/jira/platform/scopes/) requested by this app. - */ + /** Set of [scopes](https://developer.atlassian.com/cloud/jira/platform/scopes/) requested by this app. */ scopes?: string[]; - /** - * The vendor who is offering the app. - */ + /** The vendor who is offering the app. */ vendor?: { - /** - * The name of the app vendor. Supply your name or the name of the company you work for. - */ + /** The name of the app vendor. Supply your name or the name of the company you work for. */ name: string; - /** - * The URL for the vendor's website. - */ + /** The URL for the vendor's website. */ url: string; }; } diff --git a/src/api/models/attachmentUpdate.ts b/src/api/models/attachmentUpdate.ts index 7e88602d..7e371a3b 100644 --- a/src/api/models/attachmentUpdate.ts +++ b/src/api/models/attachmentUpdate.ts @@ -1,7 +1,8 @@ export interface AttachmentUpdate { - /** The attachment version. Set this to the current version number of the - attachment. Note, the version number only needs to be incremented when - updating the actual attachment, not its properties. */ + /** + * The attachment version. Set this to the current version number of the attachment. Note, the version number only + * needs to be incremented when updating the actual attachment, not its properties. + */ version: { /** The version number. */ number: number; @@ -22,8 +23,7 @@ export interface AttachmentUpdate { container?: { /** The `id` of the parent content. */ id: string; - /** The content type. You can only attach attachments to content - of type: `page`, `blogpost`. */ + /** The content type. You can only attach attachments to content of type: `page`, `blogpost`. */ type: string; }; } diff --git a/src/api/models/auditRecord.ts b/src/api/models/auditRecord.ts index 32dd0264..665317d4 100644 --- a/src/api/models/auditRecord.ts +++ b/src/api/models/auditRecord.ts @@ -6,13 +6,9 @@ export interface AuditRecord { type: string; displayName: string; operations: {}; - /** - * @deprecated This property has been deprecated and will be removed soon. - */ + /** @deprecated This property has been deprecated and will be removed soon. */ username: string; - /** - * @deprecated This property has been deprecated and will be removed soon. - */ + /** @deprecated This property has been deprecated and will be removed soon. */ userKey: string; }; remoteAddress: string; diff --git a/src/api/models/auditRecordCreate.ts b/src/api/models/auditRecordCreate.ts index e495156d..64f3f533 100644 --- a/src/api/models/auditRecordCreate.ts +++ b/src/api/models/auditRecordCreate.ts @@ -2,9 +2,10 @@ import { AffectedObject } from './affectedObject'; import { ChangedValue } from './changedValue'; export interface AuditRecordCreate { - /** The user that actioned the event. If `author` is not specified, then all - `author` properties will be set to null/empty, except for `type` which - will be set to 'user'. */ + /** + * The user that actioned the event. If `author` is not specified, then all `author` properties will be set to + * null/empty, except for `type` which will be set to 'user'. + */ author?: { /** Set to 'user'. */ type: string; @@ -19,26 +20,25 @@ export interface AuditRecordCreate { }; /** The IP address of the computer where the event was initiated from. */ remoteAddress: string; - /** The creation date-time of the audit record, as a timestamp. This is converted - to a date-time display in the Confluence UI. If the `creationDate` is not - specified, then it will be set to the timestamp for the current date-time. */ + /** + * The creation date-time of the audit record, as a timestamp. This is converted to a date-time display in the + * Confluence UI. If the `creationDate` is not specified, then it will be set to the timestamp for the current date-time. + */ creationDate?: number; - /** The summary of the event, which is displayed in the 'Change' column on - the audit log in the Confluence UI. */ + /** The summary of the event, which is displayed in the 'Change' column on the audit log in the Confluence UI. */ summary?: string; - /** A long description of the event, which is displayed in the 'Description' - field on the audit log in the Confluence UI. */ + /** A long description of the event, which is displayed in the 'Description' field on the audit log in the Confluence UI. */ description?: string; - /** The category of the event, which is displayed in the 'Event type' column - on the audit log in the Confluence UI. */ + /** The category of the event, which is displayed in the 'Event type' column on the audit log in the Confluence UI. */ category?: string; /** Indicates whether the event was actioned by a system administrator. */ sysAdmin?: boolean; affectedObject?: AffectedObject; /** The values that were changed in the event. */ changedValues?: ChangedValue[]; - /** Objects that were associated with the event. For example, if the event - was a space permission change then the associated object would be the - space. */ + /** + * Objects that were associated with the event. For example, if the event was a space permission change then the + * associated object would be the space. + */ associatedObjects?: AffectedObject[]; } diff --git a/src/api/models/bulkUserLookup.ts b/src/api/models/bulkUserLookup.ts index ea3ab33f..1235d24a 100644 --- a/src/api/models/bulkUserLookup.ts +++ b/src/api/models/bulkUserLookup.ts @@ -6,16 +6,20 @@ import { GenericLinks } from './genericLinks'; export interface BulkUserLookup { type: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userKey?: string; - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; /** The account type of the user, may return empty string if unavailable. */ accountType: string; diff --git a/src/api/models/cQLPersonalDataConvertedQueries.ts b/src/api/models/cQLPersonalDataConvertedQueries.ts index 8e9a1724..5724850e 100644 --- a/src/api/models/cQLPersonalDataConvertedQueries.ts +++ b/src/api/models/cQLPersonalDataConvertedQueries.ts @@ -1,7 +1,5 @@ -/** - * The converted CQL queries. */ +/** The converted CQL queries. */ export interface CQLPersonalDataConvertedQueries { - /** The list of converted CQL query strings with account IDs in - place of user identifiers. */ + /** The list of converted CQL query strings with account IDs in place of user identifiers. */ queryStrings: string[]; } diff --git a/src/api/models/cQLPersonalDataMigrationRequest.ts b/src/api/models/cQLPersonalDataMigrationRequest.ts index 904fdb21..8503528d 100644 --- a/src/api/models/cQLPersonalDataMigrationRequest.ts +++ b/src/api/models/cQLPersonalDataMigrationRequest.ts @@ -1,5 +1,4 @@ -/** - * The CQL queries to be converted. */ +/** The CQL queries to be converted. */ export interface CQLPersonalDataMigrationRequest { /** A list of queries with user identifiers. Maximum of 100 queries. */ queryStrings: string[]; diff --git a/src/api/models/connectModule.ts b/src/api/models/connectModule.ts new file mode 100644 index 00000000..71bac799 --- /dev/null +++ b/src/api/models/connectModule.ts @@ -0,0 +1,5 @@ +/** + * A [Connect module](https://developer.atlassian.com/cloud/confluence/modules/admin-page/) in the same format as in + * the* [app descriptor](https://developer.atlassian.com/cloud/confluence/app-descriptor/). + */ +export interface ConnectModule {} diff --git a/src/api/models/connectModules.ts b/src/api/models/connectModules.ts index 152194a3..63b7d431 100644 --- a/src/api/models/connectModules.ts +++ b/src/api/models/connectModules.ts @@ -1,6 +1,7 @@ import { AppDescriptor } from './appDescriptor'; /** - * A list of app modules in the same format as the `modules` property in the - * [app descriptor](https://developer.atlassian.com/cloud/confluence/app-descriptor/). */ + * A list of app modules in the same format as the `modules` property in the [app + * descriptor](https://developer.atlassian.com/cloud/confluence/app-descriptor/). + */ export type ConnectModules = AppDescriptor[]; diff --git a/src/api/models/container.ts b/src/api/models/container.ts index 9ba8443c..bd5c5b5e 100644 --- a/src/api/models/container.ts +++ b/src/api/models/container.ts @@ -1,4 +1,5 @@ /** - * Container for content. This can be either a space (containing a page or blogpost)* - * or a page/blog post (containing an attachment or comment) */ + * Container for content. This can be either a space (containing a page or blogpost)* or a page/blog post (containing an + * attachment or comment) + */ export type Container = Record; diff --git a/src/api/models/content.ts b/src/api/models/content.ts index d9ded2d8..a3398835 100644 --- a/src/api/models/content.ts +++ b/src/api/models/content.ts @@ -9,8 +9,7 @@ import { ContentBody } from './contentBody'; import { ContentRestriction } from './contentRestriction'; import { GenericLinks } from './genericLinks'; -/** - * Base object for all content types. */ +/** Base object for all content types. */ export interface Content { id: string; type: string; @@ -22,9 +21,6 @@ export interface Content { ancestors?: Content[]; operations?: OperationCheckResult[]; children?: ContentChildren; - /** - * Shows whether a piece of content has attachments, comments, or child pages. Note, this doesn't actually contain the child objects. - */ childTypes?: ContentChildType; descendants?: ContentChildren; container?: Container; diff --git a/src/api/models/contentAttachment.ts b/src/api/models/contentAttachment.ts new file mode 100644 index 00000000..887c8272 --- /dev/null +++ b/src/api/models/contentAttachment.ts @@ -0,0 +1,2 @@ +/** Representation of an attachment (content) */ +export interface ContentAttachment {} diff --git a/src/api/models/contentBlogpost.ts b/src/api/models/contentBlogpost.ts new file mode 100644 index 00000000..b2eb219c --- /dev/null +++ b/src/api/models/contentBlogpost.ts @@ -0,0 +1,2 @@ +/** Representation of a blogpost (content) */ +export interface ContentBlogpost {} diff --git a/src/api/models/contentBlueprintDraft.ts b/src/api/models/contentBlueprintDraft.ts index ca5da163..25b4c5f7 100644 --- a/src/api/models/contentBlueprintDraft.ts +++ b/src/api/models/contentBlueprintDraft.ts @@ -4,8 +4,7 @@ export interface ContentBlueprintDraft { /** The version number. Set this to `1`. */ number: number; }; - /** The title of the content. If you don't want to change the title, - set this to the current title of the draft. */ + /** The title of the content. If you don't want to change the title, set this to the current title of the draft. */ title: string; /** The type of content. Set this to `page`. */ type: string; @@ -16,12 +15,12 @@ export interface ContentBlueprintDraft { /** The key of the space */ key: string; }; - /** The new ancestor (i.e. parent page) for the content. If you have - specified an ancestor, you must also specify a `space` property - in the request body for the space that the ancestor is in. - - Note, if you specify more than one ancestor, the last ID in the array - will be selected as the parent page for the content. */ + /** + * The new ancestor (i.e. parent page) for the content. If you have specified an ancestor, you must also specify a + * `space` property in the request body for the space that the ancestor is in. + * + * Note, if you specify more than one ancestor, the last ID in the array will be selected as the parent page for the content. + */ ancestors?: { /** The content ID of the ancestor. */ id: string; diff --git a/src/api/models/contentBodyCreate.ts b/src/api/models/contentBodyCreate.ts index ee002dd2..b0547baf 100644 --- a/src/api/models/contentBodyCreate.ts +++ b/src/api/models/contentBodyCreate.ts @@ -1,9 +1,7 @@ -/** - * This object is used when creating or updating content. */ +/** This object is used when creating or updating content. */ export interface ContentBodyCreate { /** The body of the content in the relevant format. */ value: string; - /** The content format type. Set the value of this property to - the name of the format being used, e.g. 'storage'. */ + /** The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'. */ representation: string; } diff --git a/src/api/models/contentBodyCreateStorage.ts b/src/api/models/contentBodyCreateStorage.ts index aadf98d1..84002980 100644 --- a/src/api/models/contentBodyCreateStorage.ts +++ b/src/api/models/contentBodyCreateStorage.ts @@ -1,9 +1,7 @@ -/** - * This object is used when creating or updating content. */ +/** This object is used when creating or updating content. */ export interface ContentBodyCreateStorage { /** The body of the content in the relevant format. */ value: string; - /** The content format type. Set the value of this property to - the name of the format being used, e.g. 'storage'. */ + /** The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'. */ representation: string; } diff --git a/src/api/models/contentChildType.ts b/src/api/models/contentChildType.ts index 5b124037..0fc40146 100644 --- a/src/api/models/contentChildType.ts +++ b/src/api/models/contentChildType.ts @@ -1,8 +1,9 @@ import { GenericLinks } from './genericLinks'; /** - * Shows whether a piece of content has attachments, comments, or child pages.* - * Note, this doesn't actually contain the child objects. */ + * Shows whether a piece of content has attachments, comments, or child pages.* Note, this doesn't actually contain the + * child objects. + */ export interface ContentChildType { attachment?: { value: boolean; diff --git a/src/api/models/contentComment.ts b/src/api/models/contentComment.ts new file mode 100644 index 00000000..ccfddded --- /dev/null +++ b/src/api/models/contentComment.ts @@ -0,0 +1,2 @@ +/** Representation of a comment (content) */ +export interface ContentComment {} diff --git a/src/api/models/contentCreate.ts b/src/api/models/contentCreate.ts index 4c1832b1..a22e6906 100644 --- a/src/api/models/contentCreate.ts +++ b/src/api/models/contentCreate.ts @@ -13,19 +13,33 @@ export interface ContentCreate { }; /** The status of the new content. */ status?: string; - /** The parent content of the new content. Only one parent content - `id` can be specified. */ + /** + * The container of the content. Required if type is `comment` or certain types of custom content. If you are trying + * to create a comment that is a child of another comment, specify the parent comment in the ancestors field, not in + * this field. + */ + container?: { + /** The `id` of the container. */ + id: string; + /** The `type` of the container. */ + type: string; + }; + /** + * The parent content of the new content. If you are creating a top-level `page` or `comment`, this can be left blank. + * If you are creating a child page, this is where the parent page id goes. If you are creating a child comment, this + * is where the parent comment id goes. Only one parent content id can be specified. + */ ancestors?: { /** The `id` of the parent content. */ id: string; }[]; - /** The body of the new content. Does not apply to attachments. - Only one body format should be specified as the property for - this object, e.g. `storage`. - - Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is - the same as 'export_view' format but only content viewable by an anonymous - user is included. */ + /** + * The body of the new content. Does not apply to attachments. Only one body format should be specified as the + * property for this object, e.g. `storage`. + * + * Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is the same as 'export_view' format but + * only content viewable by an anonymous user is included. + */ body: { view?: ContentBodyCreate; export_view?: ContentBodyCreate; diff --git a/src/api/models/contentId.ts b/src/api/models/contentId.ts new file mode 100644 index 00000000..43b0b381 --- /dev/null +++ b/src/api/models/contentId.ts @@ -0,0 +1 @@ +export interface ContentId {} diff --git a/src/api/models/contentMetadata.ts b/src/api/models/contentMetadata.ts index fd031a75..9f09371b 100644 --- a/src/api/models/contentMetadata.ts +++ b/src/api/models/contentMetadata.ts @@ -2,8 +2,7 @@ import { Version } from './version'; import { GenericLinks } from './genericLinks'; import { LabelArray } from './labelArray'; -/** - * Metadata object for page, blogpost, comment content */ +/** Metadata object for page, blogpost, comment content */ export interface ContentMetadata { currentuser?: { favourited?: { diff --git a/src/api/models/contentPage.ts b/src/api/models/contentPage.ts new file mode 100644 index 00000000..fc39f897 --- /dev/null +++ b/src/api/models/contentPage.ts @@ -0,0 +1,2 @@ +/** Representation of a page (content) */ +export interface ContentPage {} diff --git a/src/api/models/contentPermissionRequest.ts b/src/api/models/contentPermissionRequest.ts index 4468067b..5f0aea06 100644 --- a/src/api/models/contentPermissionRequest.ts +++ b/src/api/models/contentPermissionRequest.ts @@ -1,7 +1,6 @@ import { PermissionSubjectWithGroupId } from './permissionSubjectWithGroupId'; -/** - * This object represents the request for the content permission check API. */ +/** This object represents the request for the content permission check API. */ export interface ContentPermissionRequest { subject: PermissionSubjectWithGroupId; /** The content permission operation to check. */ diff --git a/src/api/models/contentPropertyUpdate.ts b/src/api/models/contentPropertyUpdate.ts index 7aefbe15..2fa5a8c9 100644 --- a/src/api/models/contentPropertyUpdate.ts +++ b/src/api/models/contentPropertyUpdate.ts @@ -3,13 +3,12 @@ export interface ContentPropertyUpdate { value: {}; /** The version number of the property. */ version: { - /** The new version for the updated content property. Set this to the - current version number incremented by one. To get the current - version number, use 'Get content property' and retrieve - `version.number`. */ + /** + * The new version for the updated content property. Set this to the current version number incremented by one. To + * get the current version number, use 'Get content property' and retrieve `version.number`. + */ number: number; - /** If `minorEdit` is set to 'true', no notification email or activity - stream will be generated for the change. */ + /** If `minorEdit` is set to 'true', no notification email or activity stream will be generated for the change. */ minorEdit?: boolean; }; } diff --git a/src/api/models/contentRestrictionArray.ts b/src/api/models/contentRestrictionArray.ts index f30bc409..38b96670 100644 --- a/src/api/models/contentRestrictionArray.ts +++ b/src/api/models/contentRestrictionArray.ts @@ -6,8 +6,7 @@ export interface ContentRestrictionArray { start: number; limit: number; size: number; - /** This property is used by the UI to figure out whether a set of restrictions - has changed. */ + /** This property is used by the UI to figure out whether a set of restrictions has changed. */ restrictionsHash: string; _links: GenericLinks; } diff --git a/src/api/models/contentRestrictionUpdate.ts b/src/api/models/contentRestrictionUpdate.ts index cbdc1f69..87e592cd 100644 --- a/src/api/models/contentRestrictionUpdate.ts +++ b/src/api/models/contentRestrictionUpdate.ts @@ -1,28 +1,35 @@ export interface ContentRestrictionUpdate { /** The restriction operation applied to content. */ operation: string; - /** The users/groups that the restrictions will be applied to. At least one of - `user` or `group` must be specified for this object. */ + /** + * The users/groups that the restrictions will be applied to. At least one of `user` or `group` must be specified for + * this object. + */ restrictions: { - /** The users that the restrictions will be applied to. This array must - have at least one item, otherwise it should be omitted. */ + /** The users that the restrictions will be applied to. This array must have at least one item, otherwise it should be omitted. */ user?: { /** Set to 'known'. */ type: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. + * See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. + * See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userKey?: string; - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; }[]; - /** The groups that the restrictions will be applied to. This array must - have at least one item, otherwise it should be omitted. */ + /** + * The groups that the restrictions will be applied to. This array must have at least one item, otherwise it should + * be omitted. + */ group?: { /** Set to 'group'. */ type: string; diff --git a/src/api/models/contentTemplateBodyCreate.ts b/src/api/models/contentTemplateBodyCreate.ts index 7ffe5d36..81a3df3b 100644 --- a/src/api/models/contentTemplateBodyCreate.ts +++ b/src/api/models/contentTemplateBodyCreate.ts @@ -1,7 +1,6 @@ import { ContentBodyCreate } from './contentBodyCreate'; -/** - * This object is used when creating or updating content. */ +/** This object is used when creating or updating content. */ export interface ContentTemplateBodyCreate { storage?: ContentBodyCreate; } diff --git a/src/api/models/contentTemplateCreate.ts b/src/api/models/contentTemplateCreate.ts index 40064c84..3d3f67ba 100644 --- a/src/api/models/contentTemplateCreate.ts +++ b/src/api/models/contentTemplateCreate.ts @@ -1,8 +1,7 @@ import { ContentTemplateBodyCreate } from './contentTemplateBodyCreate'; import { Label } from './label'; -/** - * This object is used to create content templates. */ +/** This object is used to create content templates. */ export interface ContentTemplateCreate { /** The name of the new template. */ name: string; @@ -13,9 +12,10 @@ export interface ContentTemplateCreate { description?: string; /** Labels for the new template. */ labels?: Label[]; - /** The key for the space of the new template. Only applies to space templates. - If the spaceKey is not specified, the template will be created as a global - template. */ + /** + * The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the + * template will be created as a global template. + */ space?: { key: string; }; diff --git a/src/api/models/contentTemplateUpdate.ts b/src/api/models/contentTemplateUpdate.ts index e017eaf6..4149f97b 100644 --- a/src/api/models/contentTemplateUpdate.ts +++ b/src/api/models/contentTemplateUpdate.ts @@ -1,14 +1,11 @@ import { ContentBodyCreate } from './contentBodyCreate'; import { Label } from './label'; -/** - * This object is used to update content templates. - */ +/** This object is used to update content templates. */ export interface ContentTemplateUpdate { /** The ID of the template being updated. */ templateId: string; - /** The name of the template. Set to the current `name` if this field is - not being updated. */ + /** The name of the template. Set to the current `name` if this field is not being updated. */ name: string; /** The type of the template. Set to `page`. */ templateType: string; @@ -17,8 +14,7 @@ export interface ContentTemplateUpdate { description?: string; /** Labels for the template. */ labels?: Label[]; - /** The key for the space of the template. Required if the template is a - space template. Set this to the current `space.key`. */ + /** The key for the space of the template. Required if the template is a space template. Set this to the current `space.key`. */ space?: { key: string; }; diff --git a/src/api/models/contentUpdate.ts b/src/api/models/contentUpdate.ts index 706c1d4d..df5bce9a 100644 --- a/src/api/models/contentUpdate.ts +++ b/src/api/models/contentUpdate.ts @@ -2,9 +2,12 @@ import { ContentBodyCreate } from './contentBodyCreate'; import { ContentBodyCreateStorage } from './contentBodyCreateStorage'; export interface ContentUpdate { - /** The new version for the updated content. Set this to the current version number incremented by one, unless you are changing the status to 'draft' which must have a version number of 1. - - To get the current version number, use [Get content by ID](#api-content-id-get) and retrieve `version.number`. */ + /** + * The new version for the updated content. Set this to the current version number incremented by one, unless you are + * changing the status to 'draft' which must have a version number of 1. + * + * To get the current version number, use [Get content by ID](#api-content-id-get) and retrieve `version.number`. + */ version: { /** The version number. */ number: number; @@ -13,19 +16,21 @@ export interface ContentUpdate { title: string; /** The type of content. Set this to the current type of the content. */ type: string; - /** The updated status of the content. Note, if you change the status of a page from - 'current' to 'draft' and it has an existing draft, the existing draft will be deleted - in favor of the updated page. */ + /** + * The updated status of the content. Note, if you change the status of a page from 'current' to 'draft' and it has an + * existing draft, the existing draft will be deleted in favor of the updated page. + */ status?: string; /** The new parent for the content. Only one parent content 'id' can be specified. */ ancestors?: { /** The `id` of the parent content. */ id: string; }[]; - /** The updated body of the content. Does not apply to attachments. - If you are not sure how to generate these formats, you can create a page in the - Confluence application, retrieve the content using [Get content](#api-content-get), - and expand the desired content format, e.g. `expand=body.storage`. */ + /** + * The updated body of the content. Does not apply to attachments. If you are not sure how to generate these formats, + * you can create a page in the Confluence application, retrieve the content using [Get content](#api-content-get), + * and expand the desired content format, e.g. `expand=body.storage`. + */ body?: { view?: ContentBodyCreate; export_view?: ContentBodyCreate; diff --git a/src/api/models/copyPageHierarchyTitleOptions.ts b/src/api/models/copyPageHierarchyTitleOptions.ts index 9b978857..02faaa86 100644 --- a/src/api/models/copyPageHierarchyTitleOptions.ts +++ b/src/api/models/copyPageHierarchyTitleOptions.ts @@ -1,5 +1,4 @@ -/** - * Required for copying page in the same space. */ +/** Required for copying page in the same space. */ export interface CopyPageHierarchyTitleOptions { prefix?: string; replace?: string; diff --git a/src/api/models/copyPageRequestDestination.ts b/src/api/models/copyPageRequestDestination.ts index d47cb862..f548218b 100644 --- a/src/api/models/copyPageRequestDestination.ts +++ b/src/api/models/copyPageRequestDestination.ts @@ -1,9 +1,10 @@ /** * Defines where the page will be copied to, and can be one of the following types.* * - * - `parent_page`: page will be copied as a child of the specified parent page - * - `space`: page will be copied to the specified space as a root page on the space - * - `existing_page`: page will be copied and replace the specified page */ + * - `parent_page`: page will be copied as a child of the specified parent page + * - `space`: page will be copied to the specified space as a root page on the space + * - `existing_page`: page will be copied and replace the specified page + */ export interface CopyPageRequestDestination { type: string; /** The space key for `space` type, and content id for `parent_page` and `existing_page` */ diff --git a/src/api/models/groupArrayWithLinks.ts b/src/api/models/groupArrayWithLinks.ts index 8fd97900..24536f72 100644 --- a/src/api/models/groupArrayWithLinks.ts +++ b/src/api/models/groupArrayWithLinks.ts @@ -1,8 +1,6 @@ import { GroupArray } from './groupArray'; -/** - * Same as GroupArray but with `_links` property. - */ +/** Same as GroupArray but with `_links` property. */ export interface GroupArrayWithLinks extends GroupArray { _links: Record; } diff --git a/src/api/models/icon.ts b/src/api/models/icon.ts index a2281154..5e602646 100644 --- a/src/api/models/icon.ts +++ b/src/api/models/icon.ts @@ -1,5 +1,7 @@ /** - * This object represents an icon. If used as a profilePicture, this may be returned as null, depending on the user's privacy setting. */ + * This object represents an icon. If used as a profilePicture, this may be returned as null, depending on the user's + * privacy setting. + */ export interface Icon { path: string; width: number; diff --git a/src/api/models/index.ts b/src/api/models/index.ts index 99a64ffc..fec7c089 100644 --- a/src/api/models/index.ts +++ b/src/api/models/index.ts @@ -17,22 +17,28 @@ export * from './buttonLookAndFeel'; export * from './cQLPersonalDataConvertedQueries'; export * from './cQLPersonalDataMigrationRequest'; export * from './changedValue'; +export * from './connectModule'; export * from './connectModules'; export * from './container'; export * from './containerLookAndFeel'; export * from './containerSummary'; export * from './content'; export * from './contentArray'; +export * from './contentAttachment'; +export * from './contentBlogpost'; export * from './contentBlueprintDraft'; export * from './contentBody'; export * from './contentBodyCreate'; export * from './contentBodyCreateStorage'; export * from './contentChildType'; export * from './contentChildren'; +export * from './contentComment'; export * from './contentCreate'; export * from './contentHistory'; +export * from './contentId'; export * from './contentLookAndFeel'; export * from './contentMetadata'; +export * from './contentPage'; export * from './contentPermissionRequest'; export * from './contentProperty'; export * from './contentPropertyArray'; @@ -77,6 +83,7 @@ export * from './longTaskStatus'; export * from './longTaskStatusArray'; export * from './longTaskStatusWithLinks'; export * from './lookAndFeel'; +export * from './lookAndFeelSelection'; export * from './lookAndFeelSettings'; export * from './lookAndFeelUpdated'; export * from './macroInstance'; diff --git a/src/api/models/lifecycle.ts b/src/api/models/lifecycle.ts index a563cd20..a8a49f74 100644 --- a/src/api/models/lifecycle.ts +++ b/src/api/models/lifecycle.ts @@ -1,88 +1,77 @@ /** - * Allows an app to register callbacks for events that occur in the lifecycle of an installation. - * When a lifecycle event is fired, a POST request will be made to the appropriate URL registered for the event. + * Allows an app to register callbacks for events that occur in the lifecycle of an installation. When a lifecycle event + * is fired, a POST request will be made to the appropriate URL registered for the event. * - * The installed lifecycle callback is an integral part of the installation process of an app, - * whereas the remaining lifecycle events are essentially webhooks. + * The installed lifecycle callback is an integral part of the installation process of an app, whereas the remaining + * lifecycle events are essentially webhooks. * * Each property in this object is a URL relative to the app's base URL. */ export interface Lifecycle { - /** - * App key that was installed into the Atlassian Product, as it appears in your app's descriptor. - */ + /** App key that was installed into the Atlassian Product, as it appears in your app's descriptor. */ key?: string; /** - * Identifying key for the Atlassian product tenant that the app was installed into. - * This will never change for an Atlassian product tenant. However, be aware that importing data into a site - * will result in a new tenant. In this case, any app installations into the new tenant (using the same baseUrl as - * the previous tenant) will result in an installation payload containing a different clientKey. - * Determining the contract between the instance and app in this situation is tracked by - * [AC-1528](https://ecosystem.atlassian.net/browse/AC-1528) in the Connect backlog. + * Identifying key for the Atlassian product tenant that the app was installed into. This will never change for an + * Atlassian product tenant. However, be aware that importing data into a site will result in a new tenant. In this + * case, any app installations into the new tenant (using the same baseUrl as the previous tenant) will result in an + * installation payload containing a different clientKey. Determining the contract between the instance and app in + * this situation is tracked by [AC-1528](https://ecosystem.atlassian.net/browse/AC-1528) in the Connect backlog. */ clientKey?: string; - /** - * @deprecated This is the public key for this Atlassian product instance. This field is deprecated and should not be used. - */ + /** @deprecated This is the public key for this Atlassian product instance. This field is deprecated and should not be used. */ publicKey?: string; /** - * The account ID for identifying users in the `sub` claim sent in JWT during calls. - * This is the user associated with the relevant action, and may not be present if there is no logged in user. + * The account ID for identifying users in the `sub` claim sent in JWT during calls. This is the user associated with + * the relevant action, and may not be present if there is no logged in user. */ accountId?: string; /** * Use this string to sign outgoing JWT tokens and validate incoming JWT tokens. Optional: and may not be present on - * non-JWT app installations, and is only sent on the `installed` event. - * All instances of your app use the same shared secret. + * non-JWT app installations, and is only sent on the `installed` event. All instances of your app use the same shared secret. */ sharedSecret?: string; - /** - * @deprecated This is a string representation of the host product's version. Generally you should not need it. - */ + /** @deprecated This is a string representation of the host product's version. Generally you should not need it. */ serverVersion?: string; /** - * @deprecated This is a [SemVer-compliant](https://semver.org/) version of Atlassian Connect which is running on the host server, for example: `1.1.15`. + * @deprecated This is a [SemVer-compliant](https://semver.org/) version of Atlassian Connect which is running on the + * host server, for example: `1.1.15`. */ pluginsVersion?: string; - /** - * URL prefix for this Atlassian product instance. All of its REST endpoints begin with this `baseUrl`. - */ + /** URL prefix for this Atlassian product instance. All of its REST endpoints begin with this `baseUrl`. */ baseUrl: string; /** - * If the Atlassian product instance has an associated custom domain, this is the URL - * through which users will access the product. Any links which an app renders server-side should use this as - * the prefix of the link. This ensures links are rendered in the same context as the remainder of the user's site. + * If the Atlassian product instance has an associated custom domain, this is the URL through which users will access + * the product. Any links which an app renders server-side should use this as the prefix of the link. This ensures + * links are rendered in the same context as the remainder of the user's site. * * This field may not be present, in which case the baseUrl value should be used. API requests from your App should * always use the baseUrl value and not be based on the URL specified here. */ displayUrl?: string; - /** - * Identifies the category of Atlassian product, e.g. `jira` or `confluence`. - */ + /** Identifies the category of Atlassian product, e.g. `jira` or `confluence`. */ productType?: string; - /** - * The host product description - this is customisable by an instance administrator. - */ + /** The host product description - this is customisable by an instance administrator. */ description?: string; /** - * Also known as the SEN, the service entitlement number is the app license ID. This attribute will only be included during installation of a paid app. + * Also known as the SEN, the service entitlement number is the app license ID. This attribute will only be included + * during installation of a paid app. */ serviceEntitlementNumber?: string; /** - * The OAuth 2.0 client ID for your app. For more information, see [OAuth 2.0 - JWT Bearer token authorization grant type](https://developer.atlassian.com/cloud/jira/platform/oauth-2-jwt-bearer-token-authorization-grant-type/) + * The OAuth 2.0 client ID for your app. For more information, see [OAuth 2.0 - JWT Bearer token authorization grant + * type](https://developer.atlassian.com/cloud/jira/platform/oauth-2-jwt-bearer-token-authorization-grant-type/) */ oauthClientId?: string; } diff --git a/src/api/models/longTaskStatus.ts b/src/api/models/longTaskStatus.ts index e41f833e..d4c9caf3 100644 --- a/src/api/models/longTaskStatus.ts +++ b/src/api/models/longTaskStatus.ts @@ -22,7 +22,8 @@ import { Message } from './message'; * - `WARN_IGNORE_VIEW_RESTRICTED` - Permission changed - view restricted * - `WARN_IGNORE_EDIT_RESTRICTED` - Permission changed - edit restricted * - `INITIALIZING_TASK` - Message when initializing task - * - `UNKNOWN_STATUS` - Message when status is unknown */ + * - `UNKNOWN_STATUS` - Message when status is unknown + */ export interface LongTaskStatus { id: string; name: { diff --git a/src/api/models/longTaskStatusWithLinks.ts b/src/api/models/longTaskStatusWithLinks.ts index 9c1c89a5..57e40972 100644 --- a/src/api/models/longTaskStatusWithLinks.ts +++ b/src/api/models/longTaskStatusWithLinks.ts @@ -1,8 +1,6 @@ import { LongTaskStatus } from './longTaskStatus'; -/** - * Same as LongTaskStatus but with `_links` property. - */ +/** Same as LongTaskStatus but with `_links` property. */ export interface LongTaskStatusWithLinks extends LongTaskStatus { _links: Record; } diff --git a/src/api/models/lookAndFeelSelection.ts b/src/api/models/lookAndFeelSelection.ts new file mode 100644 index 00000000..4af7130c --- /dev/null +++ b/src/api/models/lookAndFeelSelection.ts @@ -0,0 +1,6 @@ +/** Look and feel selection */ +export interface LookAndFeelSelection { + /** The key of the space for which the look and feel settings will be set. */ + spaceKey: string; + lookAndFeelType: string; +} diff --git a/src/api/models/lookAndFeelUpdated.ts b/src/api/models/lookAndFeelUpdated.ts index 980c0611..67a280fd 100644 --- a/src/api/models/lookAndFeelUpdated.ts +++ b/src/api/models/lookAndFeelUpdated.ts @@ -1,8 +1,6 @@ import { LookAndFeel } from './lookAndFeel'; -/** - * Look and feel settings returned after an update. - */ +/** Look and feel settings returned after an update. */ export interface LookAndFeelUpdated extends LookAndFeel { _links: Record; } diff --git a/src/api/models/operationCheckResult.ts b/src/api/models/operationCheckResult.ts index 51956a9c..ef859fd0 100644 --- a/src/api/models/operationCheckResult.ts +++ b/src/api/models/operationCheckResult.ts @@ -1,5 +1,4 @@ -/** - * An operation and the target entity that it applies to, e.g. create page. */ +/** An operation and the target entity that it applies to, e.g. create page. */ export interface OperationCheckResult { /** The operation itself. */ operation: string; diff --git a/src/api/models/permissionCheckResponse.ts b/src/api/models/permissionCheckResponse.ts index 31b89d34..ecb6bace 100644 --- a/src/api/models/permissionCheckResponse.ts +++ b/src/api/models/permissionCheckResponse.ts @@ -11,7 +11,8 @@ import { Message } from './message'; * - User does not have permission to the content * - Anonymous users are not allowed to use Confluence * - Anonymous user does not have permission to the space - * - Anonymous user does not have permission to the content */ + * - Anonymous user does not have permission to the content + */ export interface PermissionCheckResponse { hasPermission: boolean; errors?: Message[]; diff --git a/src/api/models/permissionSubject.ts b/src/api/models/permissionSubject.ts index 112579b8..7f412f63 100644 --- a/src/api/models/permissionSubject.ts +++ b/src/api/models/permissionSubject.ts @@ -1,9 +1,10 @@ -/** - * The user or group that the permission applies to. */ +/** The user or group that the permission applies to. */ export interface PermissionSubject { type: string; - /** for `type=user`, identifier should be user's accountId or `anonymous` for anonymous users - - for `type=group`, identifier should be name of the group or groupId */ + /** + * For `type=user`, identifier should be user's accountId or `anonymous` for anonymous users + * + * For `type=group`, identifier should be name of the group or groupId + */ identifier: string; } diff --git a/src/api/models/permissionSubjectWithGroupId.ts b/src/api/models/permissionSubjectWithGroupId.ts index 8958c1f3..788ef239 100644 --- a/src/api/models/permissionSubjectWithGroupId.ts +++ b/src/api/models/permissionSubjectWithGroupId.ts @@ -1,9 +1,10 @@ -/** - * The user or group that the permission applies to. */ +/** The user or group that the permission applies to. */ export interface PermissionSubjectWithGroupId { type: string; - /** for `type=user`, identifier should be user's accountId or `anonymous` for anonymous users - - for `type=group`, identifier should be ID of the group */ + /** + * For `type=user`, identifier should be user's accountId or `anonymous` for anonymous users + * + * For `type=group`, identifier should be ID of the group + */ identifier: string; } diff --git a/src/api/models/propertyValue.ts b/src/api/models/propertyValue.ts index 8f499a4f..15988e3a 100644 --- a/src/api/models/propertyValue.ts +++ b/src/api/models/propertyValue.ts @@ -1,11 +1,10 @@ /** - * The value of the property. This can be empty or a complex object.* - * For example, - * ``` - * "value": { - * "example1": "value", - * "example2": true, - * "example3": 123 - * } - * ``` */ + * The value of the property. This can be empty or a complex object.* For example, + * + * "value": { + * "example1": "value", + * "example2": true, + * "example3": 123 + * } + */ export type PropertyValue = Record; diff --git a/src/api/models/spaceCreate.ts b/src/api/models/spaceCreate.ts index 108f37d0..ee7f62cd 100644 --- a/src/api/models/spaceCreate.ts +++ b/src/api/models/spaceCreate.ts @@ -1,26 +1,19 @@ import { SpaceDescriptionCreate } from './spaceDescriptionCreate'; import { SpacePermission } from './spacePermission'; -/** - * This is the request object used when creating a new space. */ +/** This is the request object used when creating a new space. */ export interface SpaceCreate { - /** The key for the new space. Format: See [Space - keys](https://confluence.atlassian.com/x/lqNMMQ). */ + /** The key for the new space. Format: See [Space keys](https://confluence.atlassian.com/x/lqNMMQ). */ key: string; /** The name of the new space. */ name: string; + description?: SpaceDescriptionCreate; /** - * The description of the new/updated space. Note, only the 'plain' representation can be used for the description - * when creating or updating a space. + * The permissions for the new space. If no permissions are provided, the [Confluence default space + * permissions](https://confluence.atlassian.com/x/UAgzKw#CreateaSpace-Spacepermissions) are applied. Note that if + * permissions are provided, the space is created with only the provided set of permissions, not including the default + * space permissions. Space permissions can be modified after creation using the space permissions endpoints, and a + * private space can be created using the create private space endpoint. */ - description?: SpaceDescriptionCreate; - /** The permissions for the new space. If no permissions are provided, the - [Confluence default space permissions](https://confluence.atlassian.com/x/UAgzKw#CreateaSpace-Spacepermissions) - are applied. Note that if permissions are provided, the space is - created with only the provided set of permissions, not - including the default space permissions. Space permissions - can be modified after creation using the space permissions - endpoints, and a private space can be created using the - create private space endpoint. */ permissions?: SpacePermission[]; } diff --git a/src/api/models/spaceDescriptionCreate.ts b/src/api/models/spaceDescriptionCreate.ts index a3e31e10..27061076 100644 --- a/src/api/models/spaceDescriptionCreate.ts +++ b/src/api/models/spaceDescriptionCreate.ts @@ -1,6 +1,7 @@ /** - * The description of the new/updated space. Note, only the 'plain' representation* - * can be used for the description when creating or updating a space. */ + * The description of the new/updated space. Note, only the 'plain' representation* can be used for the description when + * creating or updating a space. + */ export interface SpaceDescriptionCreate { plain: { /** The space description. */ diff --git a/src/api/models/spacePermission.ts b/src/api/models/spacePermission.ts index d3824aaf..f3d2eaef 100644 --- a/src/api/models/spacePermission.ts +++ b/src/api/models/spacePermission.ts @@ -3,17 +3,17 @@ import { Group } from './group'; import { OperationCheckResult } from './operationCheckResult'; /** - * This object represents a permission for given space. Permissions consist of* - * at least one operation object with an accompanying subjects object. + * This object represents a permission for given space. Permissions consist of* at least one operation object with an + * accompanying subjects object. * - * The following combinations of `operation` and `targetType` values are - * valid for the `operation` object: + * The following combinations of `operation` and `targetType` values are valid for the `operation` object: * - * - 'create': 'page', 'blogpost', 'comment', 'attachment' - * - 'read': 'space' - * - 'delete': 'page', 'blogpost', 'comment', 'attachment' - * - 'export': 'space' - * - 'administer': 'space' */ + * - 'create': 'page', 'blogpost', 'comment', 'attachment' + * - 'read': 'space' + * - 'delete': 'page', 'blogpost', 'comment', 'attachment' + * - 'export': 'space' + * - 'administer': 'space' + */ export interface SpacePermission { /** The users and/or groups that the permission applies to. */ subjects: { @@ -33,7 +33,6 @@ export interface SpacePermission { operation: OperationCheckResult; /** Grant anonymous users permission to use the operation. */ anonymousAccess: boolean; - /** Grants access to unlicensed users from JIRA Service Desk when used - with the 'read space' operation. */ + /** Grants access to unlicensed users from JIRA Service Desk when used with the 'read space' operation. */ unlicensedAccess: boolean; } diff --git a/src/api/models/spacePermissionV2.ts b/src/api/models/spacePermissionV2.ts index 5333c34f..57a51cb1 100644 --- a/src/api/models/spacePermissionV2.ts +++ b/src/api/models/spacePermissionV2.ts @@ -2,18 +2,19 @@ import { PermissionSubject } from './permissionSubject'; import { GenericLinks } from './genericLinks'; /** - * This object represents a single space permission. Permissions consist of* - * at least one operation object with an accompanying subjects object. + * This object represents a single space permission. Permissions consist of* at least one operation object with an + * accompanying subjects object. * - * The following combinations of `operation.key` and `operation.target` values are - * valid for the `operation` object: - * ``` bash + * The following combinations of `operation.key` and `operation.target` values are valid for the `operation` object: + * + * ```bash * 'create': 'page', 'blogpost', 'comment', 'attachment' * 'read': 'space' * 'delete': 'page', 'blogpost', 'comment', 'attachment' * 'export': 'space' * 'administer': 'space' - * ``` */ + * ``` + */ export interface SpacePermissionV2 { id?: number; subject: PermissionSubject; diff --git a/src/api/models/spacePrivateCreate.ts b/src/api/models/spacePrivateCreate.ts index 2ab040bf..ae8fd92a 100644 --- a/src/api/models/spacePrivateCreate.ts +++ b/src/api/models/spacePrivateCreate.ts @@ -1,17 +1,10 @@ import { SpaceDescriptionCreate } from './spaceDescriptionCreate'; -/** - * This is the request object used when creating a new private space. */ +/** This is the request object used when creating a new private space. */ export interface SpacePrivateCreate { - /** - * The key for the new space. Format: See [Space keys](https://confluence.atlassian.com/x/lqNMMQ). - */ + /** The key for the new space. Format: See [Space keys](https://confluence.atlassian.com/x/lqNMMQ). */ key: string; /** The name of the new space. */ name: string; - /** - * The description of the new/updated space. Note, only the 'plain' representation can be used for the - * description when creating or updating a space. - */ description?: SpaceDescriptionCreate; } diff --git a/src/api/models/spacePropertyUpdate.ts b/src/api/models/spacePropertyUpdate.ts index bce16b84..da3447c4 100644 --- a/src/api/models/spacePropertyUpdate.ts +++ b/src/api/models/spacePropertyUpdate.ts @@ -3,13 +3,12 @@ export interface SpacePropertyUpdate { value: Record; /** The version number of the property. */ version: { - /** The new version for the updated space property. Set this to the - current version number incremented by one. To get the current - version number, use 'Get space property' and retrieve - `version.number`. */ + /** + * The new version for the updated space property. Set this to the current version number incremented by one. To get + * the current version number, use 'Get space property' and retrieve `version.number`. + */ number: number; - /** If `minorEdit` is set to 'true', no notification email or activity - stream will be generated for the change. */ + /** If `minorEdit` is set to 'true', no notification email or activity stream will be generated for the change. */ minorEdit?: boolean; }; } diff --git a/src/api/models/spaceSettings.ts b/src/api/models/spaceSettings.ts index 9a8be110..e4985460 100644 --- a/src/api/models/spaceSettings.ts +++ b/src/api/models/spaceSettings.ts @@ -1,12 +1,12 @@ import { GenericLinks } from './genericLinks'; export interface SpaceSettings { - /** Defines whether an override for the space home should be used. This is - used in conjunction with a space theme provided by an app. For - example, if this property is set to true, a theme can display a page - other than the space homepage when users visit the root URL for a - space. This property allows apps to provide content-only theming - without overriding the space home. */ + /** + * Defines whether an override for the space home should be used. This is used in conjunction with a space theme + * provided by an app. For example, if this property is set to true, a theme can display a page other than the space + * homepage when users visit the root URL for a space. This property allows apps to provide content-only theming + * without overriding the space home. + */ routeOverrideEnabled: boolean; _links: GenericLinks; } diff --git a/src/api/models/spaceSettingsUpdate.ts b/src/api/models/spaceSettingsUpdate.ts index 1faf03ac..bf8b7a15 100644 --- a/src/api/models/spaceSettingsUpdate.ts +++ b/src/api/models/spaceSettingsUpdate.ts @@ -1,9 +1,9 @@ export interface SpaceSettingsUpdate { - /** Defines whether an override for the space home should be used. This is - used in conjunction with a space theme provided by an app. For - example, if this property is set to true, a theme can display a page - other than the space homepage when users visit the root URL for a - space. This property allows apps to provide content-only theming - without overriding the space home. */ + /** + * Defines whether an override for the space home should be used. This is used in conjunction with a space theme + * provided by an app. For example, if this property is set to true, a theme can display a page other than the space + * homepage when users visit the root URL for a space. This property allows apps to provide content-only theming + * without overriding the space home. + */ routeOverrideEnabled?: boolean; } diff --git a/src/api/models/spaceWatchUser.ts b/src/api/models/spaceWatchUser.ts index ca0c3a55..dc2a37d0 100644 --- a/src/api/models/spaceWatchUser.ts +++ b/src/api/models/spaceWatchUser.ts @@ -3,20 +3,25 @@ import { OperationCheckResult } from './operationCheckResult'; import { UserDetails } from './userDetails'; /** - * This essentially the same as the `User` object, but no `_links` property and* - * no `_expandable` property (therefore, different required fields). */ + * This essentially the same as the `User` object, but no `_links` property and* no `_expandable` property (therefore, + * different required fields). + */ export interface SpaceWatchUser { type: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userKey?: string; - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; profilePicture: Icon; displayName: string; diff --git a/src/api/models/themeNoLinks.ts b/src/api/models/themeNoLinks.ts index 51bbbbd7..8e82c9eb 100644 --- a/src/api/models/themeNoLinks.ts +++ b/src/api/models/themeNoLinks.ts @@ -1,8 +1,6 @@ import { Icon } from './icon'; -/** - * Theme object without links. Used in ThemeArray. - */ +/** Theme object without links. Used in ThemeArray. */ export interface ThemeNoLinks { themeKey: string; name: string; diff --git a/src/api/models/user.ts b/src/api/models/user.ts index c2c39704..41e4b672 100644 --- a/src/api/models/user.ts +++ b/src/api/models/user.ts @@ -6,16 +6,20 @@ import { GenericLinks } from './genericLinks'; export interface User { type: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userKey?: string; - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; /** The account type of the user, may return empty string if unavailable. */ accountType: string; diff --git a/src/api/models/userArrayWithLinks.ts b/src/api/models/userArrayWithLinks.ts index ff738e56..1a2bd750 100644 --- a/src/api/models/userArrayWithLinks.ts +++ b/src/api/models/userArrayWithLinks.ts @@ -1,8 +1,6 @@ import { UserArray } from './userArray'; -/** - * Same as UserArray but with `_links` property. - */ +/** Same as UserArray but with `_links` property. */ export interface UserArrayWithLinks extends UserArray { _links: Record; } diff --git a/src/api/models/userDetails.ts b/src/api/models/userDetails.ts index f4645cd2..fa94dad1 100644 --- a/src/api/models/userDetails.ts +++ b/src/api/models/userDetails.ts @@ -1,47 +1,48 @@ export interface UserDetails { business?: { /** - * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the - * [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ position?: string; /** - * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the - * [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ department?: string; /** - * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the - * [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ location?: string; }; personal?: { /** - * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the - * [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ phone?: string; /** - * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the - * [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ im?: string; /** - * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the - * [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This property has been deprecated due to privacy changes. There is no replacement. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ website?: string; /** - * @deprecated This property has been deprecated due to privacy changes. Use the `User.email` property instead. See the - * [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This property has been deprecated due to privacy changes. Use the `User.email` property instead. See + * the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ email?: string; }; diff --git a/src/api/models/watchUser.ts b/src/api/models/watchUser.ts index 5b9b7082..b6c21744 100644 --- a/src/api/models/watchUser.ts +++ b/src/api/models/watchUser.ts @@ -3,20 +3,25 @@ import { OperationCheckResult } from './operationCheckResult'; import { UserDetails } from './userDetails'; /** - * This essentially the same as the `User` object, but no `_links` property and* - * no `_expandable` property (therefore, different required fields). */ + * This essentially the same as the `User` object, but no `_links` property and* no `_expandable` property (therefore, + * different required fields). + */ export interface WatchUser { type: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** This property is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userKey?: string; - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; profilePicture: Icon; displayName: string; diff --git a/src/api/parameters/addContentWatcher.ts b/src/api/parameters/addContentWatcher.ts index 95ae1c56..a198e446 100644 --- a/src/api/parameters/addContentWatcher.ts +++ b/src/api/parameters/addContentWatcher.ts @@ -1,15 +1,19 @@ export interface AddContentWatcher { /** The ID of the content to add the watcher to. */ contentId: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all + * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/addLabelWatcher.ts b/src/api/parameters/addLabelWatcher.ts index 266a46f5..1268f819 100644 --- a/src/api/parameters/addLabelWatcher.ts +++ b/src/api/parameters/addLabelWatcher.ts @@ -1,18 +1,21 @@ export interface AddLabelWatcher { - /** Note, you must add header when making a - request, as this operation has XSRF protection. */ + /** Note, you must add header when making a request, as this operation has XSRF protection. */ 'X-Atlassian-Token': string; /** The name of the label to add the watcher to. */ labelName: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all + * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/addLabelsToContent.ts b/src/api/parameters/addLabelsToContent.ts index e39697f6..77b363dd 100644 --- a/src/api/parameters/addLabelsToContent.ts +++ b/src/api/parameters/addLabelsToContent.ts @@ -3,13 +3,14 @@ import { LabelCreateArray } from '../models'; export interface AddLabelsToContent { /** The ID of the content that will have labels added to it. */ id: string; - /** If true, return the new 400 error response on invalid requests. Otherwise return a server error response - on invalid requests. - - Why does this parameter exist? Previously, our API was returning a 500 status code with - a difficult-to-consume response body. We've fixed the response to have a 400 status code and a more useful - body. This parameter enables a smooth transition without a breaking change; eventually, we'll - completely remove the 500 response and this parameter won't be needed. */ + /** + * If true, return the new 400 error response on invalid requests. Otherwise return a server error response on invalid requests. + * + * Why does this parameter exist? Previously, our API was returning a 500 status code with a difficult-to-consume + * response body. We've fixed the response to have a 400 status code and a more useful body. This parameter enables a + * smooth transition without a breaking change; eventually, we'll completely remove the 500 response and this + * parameter won't be needed. + */ 'use-400-error-response'?: boolean; body: LabelCreateArray; } diff --git a/src/api/parameters/addRestrictions.ts b/src/api/parameters/addRestrictions.ts index 063e19d6..0dbd258a 100644 --- a/src/api/parameters/addRestrictions.ts +++ b/src/api/parameters/addRestrictions.ts @@ -3,15 +3,13 @@ import { AddContentRestrictionUpdateArray } from '../models'; export interface AddRestrictions { /** The ID of the content to add restrictions to. */ id: string; - /** A multi-value parameter indicating which properties of the content - restrictions (returned in response) to expand. - - - `restrictions.user` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `restrictions.group` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `content` returns the piece of content that the restrictions are - applied to. */ + /** + * A multi-value parameter indicating which properties of the content restrictions (returned in response) to expand. + * + * - `restrictions.user` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `restrictions.group` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `content` returns the piece of content that the restrictions are applied to. + */ expand?: string[]; body: AddContentRestrictionUpdateArray; } diff --git a/src/api/parameters/addSpaceWatcher.ts b/src/api/parameters/addSpaceWatcher.ts index 9ba50701..52d769b7 100644 --- a/src/api/parameters/addSpaceWatcher.ts +++ b/src/api/parameters/addSpaceWatcher.ts @@ -1,18 +1,21 @@ export interface AddSpaceWatcher { - /** Note, you must add header when making a - request, as this operation has XSRF protection. */ + /** Note, you must add header when making a request, as this operation has XSRF protection. */ 'X-Atlassian-Token': string; /** The key of the space to add the watcher to. */ spaceKey: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all - Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all + * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/addUserToContentRestriction.ts b/src/api/parameters/addUserToContentRestriction.ts index e34f7cd3..13ab0b8b 100644 --- a/src/api/parameters/addUserToContentRestriction.ts +++ b/src/api/parameters/addUserToContentRestriction.ts @@ -3,15 +3,19 @@ export interface AddUserToContentRestriction { id: string; /** The operation that the restriction applies to. */ operationKey: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userName?: string; - /** The account ID of the user to add to the content restriction. The accountId uniquely identifies the user across - all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user to add to the content restriction. The accountId uniquely identifies the user across all + * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/convertContentBody.ts b/src/api/parameters/convertContentBody.ts index dd842650..0adb830d 100644 --- a/src/api/parameters/convertContentBody.ts +++ b/src/api/parameters/convertContentBody.ts @@ -3,28 +3,28 @@ import { ContentBodyCreate } from '../models'; export interface ConvertContentBody extends ContentBodyCreate { /** The name of the target format for the content body. */ to: string; + /** A multi-value parameter indicating which properties of the content to expand. */ + expand?: string[]; /** - * A multi-value parameter indicating which properties of the content to expand. + * The space key used for resolving embedded content (page includes, files, and links) in the content body. For + * example, if the source content contains the link `` + * and the `spaceKeyContext=TEST` parameter is provided, then the link will be converted to a link to the "Example + * page" page in the "TEST" space. */ - expand?: string[]; - /** The space key used for resolving embedded content (page includes, - files, and links) in the content body. For example, if the source content - contains the link `` - and the `spaceKeyContext=TEST` parameter is provided, then the link - will be converted to a link to the "Example page" page in the "TEST" space. */ spaceKeyContext?: string; - /** The content ID used to find the space for resolving embedded content - (page includes, files, and links) in the content body. For example, - if the source content contains the link `` - and the `contentIdContext=123` parameter is provided, then the link - will be converted to a link to the "Example page" page in the same space - that has the content with ID=123. Note, `spaceKeyContext` will be ignored - if this parameter is provided. */ + /** + * The content ID used to find the space for resolving embedded content (page includes, files, and links) in the + * content body. For example, if the source content contains the link `` and the `contentIdContext=123` parameter is provided, then the link will be converted to a link + * to the "Example page" page in the same space that has the content with ID=123. Note, `spaceKeyContext` will be + * ignored if this parameter is provided. + */ contentIdContext?: string; - /** Mode used for rendering embedded content, like attachments. - - - `current` renders the embedded content using the latest version. - - `version-at-save` renders the embedded content using the version at - the time of save. */ + /** + * Mode used for rendering embedded content, like attachments. + * + * - `current` renders the embedded content using the latest version. + * - `version-at-save` renders the embedded content using the version at the time of save. + */ embeddedContentRender?: string; } diff --git a/src/api/parameters/createAuditRecord.ts b/src/api/parameters/createAuditRecord.ts index b2d93379..97dfa55d 100644 --- a/src/api/parameters/createAuditRecord.ts +++ b/src/api/parameters/createAuditRecord.ts @@ -1,4 +1,3 @@ import { AuditRecordCreate } from '../models'; -export interface CreateAuditRecord extends AuditRecordCreate { -} +export interface CreateAuditRecord extends AuditRecordCreate {} diff --git a/src/api/parameters/createContent.ts b/src/api/parameters/createContent.ts index b8de3eac..5454c909 100644 --- a/src/api/parameters/createContent.ts +++ b/src/api/parameters/createContent.ts @@ -3,8 +3,6 @@ import { ContentCreate } from '../models'; export interface CreateContent extends ContentCreate { /** Filter the returned content by status. */ status?: string; - /** - * A multi-value parameter indicating which properties of the content to expand. - */ + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; } diff --git a/src/api/parameters/createContentTemplate.ts b/src/api/parameters/createContentTemplate.ts index 34fce75d..c8aa119e 100644 --- a/src/api/parameters/createContentTemplate.ts +++ b/src/api/parameters/createContentTemplate.ts @@ -1,4 +1,3 @@ import { ContentTemplateCreate } from '../models'; -export interface CreateContentTemplate extends ContentTemplateCreate { -} +export interface CreateContentTemplate extends ContentTemplateCreate {} diff --git a/src/api/parameters/createGroup.ts b/src/api/parameters/createGroup.ts index db92b52b..d5ca8ff0 100644 --- a/src/api/parameters/createGroup.ts +++ b/src/api/parameters/createGroup.ts @@ -1,4 +1,3 @@ import { GroupName } from '../models'; -export interface CreateGroup extends GroupName { -} +export interface CreateGroup extends GroupName {} diff --git a/src/api/parameters/createOrUpdateAttachments.ts b/src/api/parameters/createOrUpdateAttachments.ts index 57700c33..d8aa7063 100644 --- a/src/api/parameters/createOrUpdateAttachments.ts +++ b/src/api/parameters/createOrUpdateAttachments.ts @@ -1,7 +1,6 @@ export interface CreateOrUpdateAttachments { /** The ID of the content to add the attachment to. */ id: string; - /** The status of the content that the attachment is being added to. - This should always be set to 'current'. */ + /** The status of the content that the attachment is being added to. This should always be set to 'current'. */ status?: string; } diff --git a/src/api/parameters/createPrivateSpace.ts b/src/api/parameters/createPrivateSpace.ts index d153c957..88a63dda 100644 --- a/src/api/parameters/createPrivateSpace.ts +++ b/src/api/parameters/createPrivateSpace.ts @@ -1,4 +1,3 @@ import { SpacePrivateCreate } from '../models'; -export interface CreatePrivateSpace extends SpacePrivateCreate { -} +export interface CreatePrivateSpace extends SpacePrivateCreate {} diff --git a/src/api/parameters/createRelationship.ts b/src/api/parameters/createRelationship.ts index dc333d46..6b02815b 100644 --- a/src/api/parameters/createRelationship.ts +++ b/src/api/parameters/createRelationship.ts @@ -1,38 +1,41 @@ export interface CreateRelationship { - /** The name of the relationship. This method supports the 'favourite' - (i.e. 'save for later') relationship. You can also specify any other - value for this parameter to create a custom relationship type. */ + /** + * The name of the relationship. This method supports the 'favourite' (i.e. 'save for later') relationship. You can + * also specify any other value for this parameter to create a custom relationship type. + */ relationName: string; - /** The source entity type of the relationship. This must be 'user', if - the `relationName` is 'favourite'. */ + /** The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'. */ sourceType: string; - /** - The identifier for the source entity: - - - If `sourceType` is 'user', then specify either 'current' (logged-in - user) or the user key. - - If `sourceType` is 'content', then specify the content ID. - - If `sourceType` is 'space', then specify the space key. */ + /** + * - The identifier for the source entity: + * + * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key. + * - If `sourceType` is 'content', then specify the content ID. + * - If `sourceType` is 'space', then specify the space key. + */ sourceKey: string; - /** The target entity type of the relationship. This must be 'space' or - 'content', if the `relationName` is 'favourite'. */ + /** The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is 'favourite'. */ targetType: string; - /** - The identifier for the target entity: - - - If `sourceType` is 'user', then specify either 'current' (logged-in - user) or the user key. - - If `sourceType` is 'content', then specify the content ID. - - If `sourceType` is 'space', then specify the space key. */ + /** + * - The identifier for the target entity: + * + * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key. + * - If `sourceType` is 'content', then specify the content ID. + * - If `sourceType` is 'space', then specify the space key. + */ targetKey: string; - /** The status of the source. This parameter is only used when the - `sourceType` is 'content'. */ + /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */ sourceStatus?: string; - /** The status of the target. This parameter is only used when the - `targetType` is 'content'. */ + /** The status of the target. This parameter is only used when the `targetType` is 'content'. */ targetStatus?: string; - /** The version of the source. This parameter is only used when the - `sourceType` is 'content' and the `sourceStatus` is 'historical'. */ + /** + * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is + * 'historical'. + */ sourceVersion?: number; - /** The version of the target. This parameter is only used when the - `targetType` is 'content' and the `targetStatus` is 'historical'. */ + /** + * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is + * 'historical'. + */ targetVersion?: number; } diff --git a/src/api/parameters/createSpace.ts b/src/api/parameters/createSpace.ts index 6c467b00..2044dba8 100644 --- a/src/api/parameters/createSpace.ts +++ b/src/api/parameters/createSpace.ts @@ -1,4 +1,3 @@ import { SpaceCreate } from '../models'; -export interface CreateSpace extends SpaceCreate { -} +export interface CreateSpace extends SpaceCreate {} diff --git a/src/api/parameters/delete.ts b/src/api/parameters/delete.ts index dd3ca92b..e71224a4 100644 --- a/src/api/parameters/delete.ts +++ b/src/api/parameters/delete.ts @@ -1,36 +1,38 @@ export interface Delete { /** The name of the relationship. */ relationName: string; - /** The source entity type of the relationship. This must be 'user', if - the `relationName` is 'favourite'. */ + /** The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'. */ sourceType: string; - /** - The identifier for the source entity: - - - If `sourceType` is 'user', then specify either 'current' (logged-in - user) or the user key. - - If `sourceType` is 'content', then specify the content ID. - - If `sourceType` is 'space', then specify the space key. */ + /** + * - The identifier for the source entity: + * + * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key. + * - If `sourceType` is 'content', then specify the content ID. + * - If `sourceType` is 'space', then specify the space key. + */ sourceKey: string; - /** The target entity type of the relationship. This must be 'space' or - 'content', if the `relationName` is 'favourite'. */ + /** The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is 'favourite'. */ targetType: string; - /** - The identifier for the target entity: - - - If `sourceType` is 'user', then specify either 'current' (logged-in - user) or the user key. - - If `sourceType` is 'content', then specify the content ID. - - If `sourceType` is 'space', then specify the space key. */ + /** + * - The identifier for the target entity: + * + * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key. + * - If `sourceType` is 'content', then specify the content ID. + * - If `sourceType` is 'space', then specify the space key. + */ targetKey: string; - /** The status of the source. This parameter is only used when the - `sourceType` is 'content'. */ + /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */ sourceStatus?: string; - /** The status of the target. This parameter is only used when the - `targetType` is 'content'. */ + /** The status of the target. This parameter is only used when the `targetType` is 'content'. */ targetStatus?: string; - /** The version of the source. This parameter is only used when the - `sourceType` is 'content' and the `sourceStatus` is 'historical'. */ + /** + * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is + * 'historical'. + */ sourceVersion?: number; - /** The version of the target. This parameter is only used when the - `targetType` is 'content' and the `targetStatus` is 'historical'. */ + /** + * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is + * 'historical'. + */ targetVersion?: number; } diff --git a/src/api/parameters/deleteContentVersion.ts b/src/api/parameters/deleteContentVersion.ts index 05ea5a76..186a8fae 100644 --- a/src/api/parameters/deleteContentVersion.ts +++ b/src/api/parameters/deleteContentVersion.ts @@ -1,7 +1,6 @@ export interface DeleteContentVersion { /** The ID of the content that the version will be deleted from. */ id: string; - /** The number of the version to be deleted. The version number starts - from 1 up to current version. */ + /** The number of the version to be deleted. The version number starts from 1 up to current version. */ versionNumber: number; } diff --git a/src/api/parameters/deleteRestrictions.ts b/src/api/parameters/deleteRestrictions.ts index c6266a07..7086ea11 100644 --- a/src/api/parameters/deleteRestrictions.ts +++ b/src/api/parameters/deleteRestrictions.ts @@ -1,14 +1,12 @@ export interface DeleteRestrictions { /** The ID of the content to remove restrictions from. */ id: string; - /** A multi-value parameter indicating which properties of the content - restrictions (returned in response) to expand. - - - `restrictions.user` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `restrictions.group` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `content` returns the piece of content that the restrictions are - applied to. */ + /** + * A multi-value parameter indicating which properties of the content restrictions (returned in response) to expand. + * + * - `restrictions.user` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `restrictions.group` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `content` returns the piece of content that the restrictions are applied to. + */ expand?: string[]; } diff --git a/src/api/parameters/descendantsOfType.ts b/src/api/parameters/descendantsOfType.ts index 20079875..ff0c6eea 100644 --- a/src/api/parameters/descendantsOfType.ts +++ b/src/api/parameters/descendantsOfType.ts @@ -3,13 +3,16 @@ export interface DescendantsOfType { id: string; /** The type of descendants to return. */ type: string; + /** A multi-value parameter indicating which properties of the content to expand. */ + expand?: string[]; /** - * A multi-value parameter indicating which properties of the content to expand. + * Filter the results to descendants upto a desired level of the content. Note, the maximum value supported is 100. + * root level of the content means immediate (level 1) descendants of the type requested. all represents returning all + * descendants of the type requested. */ - expand?: string[]; + depth?: string; /** The starting index of the returned content. */ start?: number; - /** The maximum number of content to return per page. Note, - this may be restricted by fixed system limits. */ + /** The maximum number of content to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/exportAuditRecords.ts b/src/api/parameters/exportAuditRecords.ts index b693f549..66059c18 100644 --- a/src/api/parameters/exportAuditRecords.ts +++ b/src/api/parameters/exportAuditRecords.ts @@ -1,12 +1,15 @@ export interface ExportAuditRecords { - /** Filters the exported results to the records on or after the `startDate`. - The `startDate` must be specified as a [timestamp](https://www.unixtimestamp.com/). */ + /** + * Filters the exported results to the records on or after the `startDate`. The `startDate` must be specified as a + * [timestamp](https://www.unixtimestamp.com/). + */ startDate?: string; - /** Filters the exported results to the records on or before the `endDate`. - The `endDate` must be specified as a [timestamp](https://www.unixtimestamp.com/). */ + /** + * Filters the exported results to the records on or before the `endDate`. The `endDate` must be specified as a + * [timestamp](https://www.unixtimestamp.com/). + */ endDate?: string; - /** Filters the exported results to records that have string property values - matching the `searchString`. */ + /** Filters the exported results to records that have string property values matching the `searchString`. */ searchString?: string; /** The format of the export file for the audit records. */ format?: string; diff --git a/src/api/parameters/findSourcesForTarget.ts b/src/api/parameters/findSourcesForTarget.ts index 241b8ea8..a5447d0b 100644 --- a/src/api/parameters/findSourcesForTarget.ts +++ b/src/api/parameters/findSourcesForTarget.ts @@ -1,44 +1,49 @@ export interface FindSourcesForTarget { - /** The name of the relationship. This method supports relationships created via - [Create relationship](#api-relation-relationName-from-sourceType-sourceKey-to-targetType-targetKey-put). - Note, this method does not support 'favourite' relationships. */ + /** + * The name of the relationship. This method supports relationships created via [Create + * relationship](#api-relation-relationName-from-sourceType-sourceKey-to-targetType-targetKey-put). Note, this method + * does not support 'favourite' relationships. + */ relationName: string; /** The source entity type of the relationship. */ sourceType: string; /** The target entity type of the relationship. */ targetType: string; - /** The identifier for the target entity: - - - If `targetType` is `user`, then specify either `current` (logged-in user), the user key of the user, or - the account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - If `targetType` is 'content', then specify the content ID. - - If `targetType` is 'space', then specify the space key. */ + /** + * The identifier for the target entity: + * + * - If `targetType` is `user`, then specify either `current` (logged-in user), the user key of the user, or the account + * ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the + * [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - If `targetType` is 'content', then specify the content ID. + * - If `targetType` is 'space', then specify the space key. + */ targetKey: string; - /** The status of the source. This parameter is only used when the - `sourceType` is 'content'. */ + /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */ sourceStatus?: string; - /** The status of the target. This parameter is only used when the - `targetType` is 'content'. */ + /** The status of the target. This parameter is only used when the `targetType` is 'content'. */ targetStatus?: string; - /** The version of the source. This parameter is only used when the - `sourceType` is 'content' and the `sourceStatus` is 'historical'. */ + /** + * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is + * 'historical'. + */ sourceVersion?: number; - /** The version of the target. This parameter is only used when the - `targetType` is 'content' and the `targetStatus` is 'historical'. */ + /** + * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is + * 'historical'. + */ targetVersion?: number; - /** A multi-value parameter indicating which properties of the response - object to expand. - - - `relationData` returns information about the relationship, such as - who created it and when it was created. - - `source` returns the source entity. - - `target` returns the target entity. */ + /** + * A multi-value parameter indicating which properties of the response object to expand. + * + * - `relationData` returns information about the relationship, such as who created it and when it was created. + * - `source` returns the source entity. + * - `target` returns the target entity. + */ expand?: string[]; /** The starting index of the returned relationships. */ start?: number; - /** The maximum number of relationships to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of relationships to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/findTargetFromSource.ts b/src/api/parameters/findTargetFromSource.ts index a2b0f94f..35e6a729 100644 --- a/src/api/parameters/findTargetFromSource.ts +++ b/src/api/parameters/findTargetFromSource.ts @@ -1,44 +1,49 @@ export interface FindTargetFromSource { - /** The name of the relationship. This method supports relationships created via - [Create relationship](#api-relation-relationName-from-sourceType-sourceKey-to-targetType-targetKey-put). - Note, this method does not support 'favourite' relationships. */ + /** + * The name of the relationship. This method supports relationships created via [Create + * relationship](#api-relation-relationName-from-sourceType-sourceKey-to-targetType-targetKey-put). Note, this method + * does not support 'favourite' relationships. + */ relationName: string; /** The source entity type of the relationship. */ sourceType: string; - /** The identifier for the source entity: - - - If `sourceType` is `user`, then specify either `current` (logged-in user), the user key of the user, or - the account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - If `sourceType` is 'content', then specify the content ID. - - If `sourceType` is 'space', then specify the space key. */ + /** + * The identifier for the source entity: + * + * - If `sourceType` is `user`, then specify either `current` (logged-in user), the user key of the user, or the account + * ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the + * [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - If `sourceType` is 'content', then specify the content ID. + * - If `sourceType` is 'space', then specify the space key. + */ sourceKey: string; /** The target entity type of the relationship. */ targetType: string; - /** The status of the source. This parameter is only used when the - `sourceType` is 'content'. */ + /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */ sourceStatus?: string; - /** The status of the target. This parameter is only used when the - `targetType` is 'content'. */ + /** The status of the target. This parameter is only used when the `targetType` is 'content'. */ targetStatus?: string; - /** The version of the source. This parameter is only used when the - `sourceType` is 'content' and the `sourceStatus` is 'historical'. */ + /** + * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is + * 'historical'. + */ sourceVersion?: number; - /** The version of the target. This parameter is only used when the - `targetType` is 'content' and the `targetStatus` is 'historical'. */ + /** + * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is + * 'historical'. + */ targetVersion?: number; - /** A multi-value parameter indicating which properties of the response - object to expand. - - - `relationData` returns information about the relationship, such as - who created it and when it was created. - - `source` returns the source entity. - - `target` returns the target entity. */ + /** + * A multi-value parameter indicating which properties of the response object to expand. + * + * - `relationData` returns information about the relationship, such as who created it and when it was created. + * - `source` returns the source entity. + * - `target` returns the target entity. + */ expand?: string[]; /** The starting index of the returned relationships. */ start?: number; - /** The maximum number of relationships to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of relationships to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getAnonymousUser.ts b/src/api/parameters/getAnonymousUser.ts index 4413dbe9..0bb765f0 100644 --- a/src/api/parameters/getAnonymousUser.ts +++ b/src/api/parameters/getAnonymousUser.ts @@ -1,7 +1,8 @@ export interface GetAnonymousUser { - /** A multi-value parameter indicating which properties of the user to - expand. - - - `operations` returns the operations that the user is allowed to do. */ + /** + * A multi-value parameter indicating which properties of the user to expand. + * + * - `operations` returns the operations that the user is allowed to do. + */ expand?: string[]; } diff --git a/src/api/parameters/getAttachments.ts b/src/api/parameters/getAttachments.ts index 687bdc54..f0b1f9ea 100644 --- a/src/api/parameters/getAttachments.ts +++ b/src/api/parameters/getAttachments.ts @@ -1,14 +1,11 @@ export interface GetAttachments { /** The ID of the content to be queried for its attachments. */ id: string; - /** - * A multi-value parameter indicating which properties of the content to expand. - */ + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; /** The starting index of the returned attachments. */ start?: number; - /** The maximum number of attachments to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of attachments to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; /** Filter the results to attachments that match the filename. */ filename?: string; diff --git a/src/api/parameters/getAuditRecords.ts b/src/api/parameters/getAuditRecords.ts index d7b99c75..8f936a33 100644 --- a/src/api/parameters/getAuditRecords.ts +++ b/src/api/parameters/getAuditRecords.ts @@ -1,16 +1,18 @@ export interface GetAuditRecords { - /** Filters the results to the records on or after the `startDate`. - The `startDate` must be specified as a [timestamp](https://www.unixtimestamp.com/). */ + /** + * Filters the results to the records on or after the `startDate`. The `startDate` must be specified as a + * [timestamp](https://www.unixtimestamp.com/). + */ startDate?: string; - /** Filters the results to the records on or before the `endDate`. - The `endDate` must be specified as a [timestamp](https://www.unixtimestamp.com/). */ + /** + * Filters the results to the records on or before the `endDate`. The `endDate` must be specified as a + * [timestamp](https://www.unixtimestamp.com/). + */ endDate?: string; - /** Filters the results to records that have string property values - matching the `searchString`. */ + /** Filters the results to records that have string property values matching the `searchString`. */ searchString?: string; /** The starting index of the returned records. */ start?: number; - /** The maximum number of records to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of records to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getAuditRecordsForTimePeriod.ts b/src/api/parameters/getAuditRecordsForTimePeriod.ts index 7eb00418..5f9a28f7 100644 --- a/src/api/parameters/getAuditRecordsForTimePeriod.ts +++ b/src/api/parameters/getAuditRecordsForTimePeriod.ts @@ -3,12 +3,10 @@ export interface GetAuditRecordsForTimePeriod { number?: number; /** The unit of time that the time period is measured in. */ units?: string; - /** Filters the results to records that have string property values - matching the `searchString`. */ + /** Filters the results to records that have string property values matching the `searchString`. */ searchString?: string; /** The starting index of the returned records. */ start?: number; - /** The maximum number of records to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of records to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getBlueprintTemplates.ts b/src/api/parameters/getBlueprintTemplates.ts index 02c7ab0a..433379b1 100644 --- a/src/api/parameters/getBlueprintTemplates.ts +++ b/src/api/parameters/getBlueprintTemplates.ts @@ -1,15 +1,17 @@ export interface GetBlueprintTemplates { - /** The key of the space to be queried for templates. If the `spaceKey` - is not specified, global blueprint templates will be returned. */ + /** + * The key of the space to be queried for templates. If the `spaceKey` is not specified, global blueprint templates + * will be returned. + */ spaceKey?: string; /** The starting index of the returned templates. */ start?: number; - /** The maximum number of templates to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of templates to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; - /** A multi-value parameter indicating which properties of the template - to expand. - - - `body` returns the content of the template in storage format. */ + /** + * A multi-value parameter indicating which properties of the template to expand. + * + * - `body` returns the content of the template in storage format. + */ expand?: string[]; } diff --git a/src/api/parameters/getBulkUserLookup.ts b/src/api/parameters/getBulkUserLookup.ts index 6da203f1..32748fe2 100644 --- a/src/api/parameters/getBulkUserLookup.ts +++ b/src/api/parameters/getBulkUserLookup.ts @@ -1,22 +1,22 @@ export interface GetBulkUserLookup { /** A list of accountId's of users to be returned. */ accountId: string; - /** A multi-value parameter indicating which properties of the user to - expand. - - - `operations` returns the operations that the user is allowed to do. - - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. - Note that these fields have been deprecated due to privacy changes. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. - Note that these fields have been deprecated due to privacy changes. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - personalSpace returns the user's personal space, if it exists. */ + /** + * A multi-value parameter indicating which properties of the user to expand. + * + * - `operations` returns the operations that the user is allowed to do. + * - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that + * these fields have been deprecated due to privacy changes. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note + * that these fields have been deprecated due to privacy changes. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - PersonalSpace returns the user's personal space, if it exists. + */ expand?: string[]; - /** The maximum number of results returned. - Currently API returns 200 results max. - If more that 200 ids are passed first 200 will be returned. */ + /** + * The maximum number of results returned. Currently API returns 200 results max. If more that 200 ids are passed + * first 200 will be returned. + */ limit?: number; } diff --git a/src/api/parameters/getBulkUserMigration.ts b/src/api/parameters/getBulkUserMigration.ts index 8ad82c9e..a367ca3b 100644 --- a/src/api/parameters/getBulkUserMigration.ts +++ b/src/api/parameters/getBulkUserMigration.ts @@ -1,13 +1,16 @@ export interface GetBulkUserMigration { - /** The key of a user. To specify multiple users, pass multiple key parameters separated by ampersands. - For example, key=mia&key=alana. Required if username isn't provided. Cannot be provided if username is present. */ + /** + * The key of a user. To specify multiple users, pass multiple key parameters separated by ampersands. For example, + * key=mia&key=alana. Required if username isn't provided. Cannot be provided if username is present. + */ key: string[]; - /** The username of a user. To specify multiple users, pass multiple username parameters separated by ampersands. - For example, username=mia&username=alana. Required if key isn't provided. Cannot be provided if key is present. */ + /** + * The username of a user. To specify multiple users, pass multiple username parameters separated by ampersands. For + * example, username=mia&username=alana. Required if key isn't provided. Cannot be provided if key is present. + */ username?: string[]; /** The index of the first item to return in a page of results (page offset). */ start?: number; - /** The maximum number of results to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of results to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getContent.ts b/src/api/parameters/getContent.ts index 07515880..0b803a96 100644 --- a/src/api/parameters/getContent.ts +++ b/src/api/parameters/getContent.ts @@ -5,27 +5,27 @@ export interface GetContent { spaceKey?: string; /** The title of the page to be returned. Required for page type. */ title?: string; - /** Filter the results to a set of content based on their status. If set to `any`, - content with any status is returned. Note, the `historical` status is currently - not supported. */ + /** + * Filter the results to a set of content based on their status. If set to `any`, content with any status is returned. + * Note, the `historical` status is currently not supported. + */ status?: string[]; - /** The posting date of the blog post to be returned. Required for - blogpost type. Format: yyyy-mm-dd. */ + /** The posting date of the blog post to be returned. Required for blogpost type. Format: yyyy-mm-dd. */ postingDay?: string; + /** A multi-value parameter indicating which properties of the content to expand. */ + expand?: string[]; /** - * A multi-value parameter indicating which properties of the content to expand. + * If set to `viewed`, the request will trigger a 'viewed' event for the content. When this event is triggered, the + * page/blogpost will appear on the 'Recently visited' tab of the user's Confluence dashboard. */ - expand?: string[]; - /** If set to `viewed`, the request will trigger a 'viewed' event for the content. - When this event is triggered, the page/blogpost will appear on the 'Recently visited' - tab of the user's Confluence dashboard. */ trigger?: string; - /** Orders the content by a particular field. Specify the field and sort direction for - this parameter, as follows: 'fieldpath asc/desc'. For example, 'history.createdDate desc'. */ + /** + * Orders the content by a particular field. Specify the field and sort direction for this parameter, as follows: + * 'fieldpath asc/desc'. For example, 'history.createdDate desc'. + */ orderby?: string; /** The starting index of the returned content. */ start?: number; - /** The maximum number of content objects to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getContentById.ts b/src/api/parameters/getContentById.ts index fa6e5fbf..4ddfa2e7 100644 --- a/src/api/parameters/getContentById.ts +++ b/src/api/parameters/getContentById.ts @@ -1,25 +1,28 @@ export interface GetContentById { - /** The ID of the content to be returned. If you don't know the content ID, - use [Get content](#api-content-get) and filter the results. */ + /** + * The ID of the content to be returned. If you don't know the content ID, use [Get content](#api-content-get) and + * filter the results. + */ id: string; - /** Filter the results to a set of content based on their status. - If set to `any`, content with any status is returned. Note, the - `historical` status is currently not supported. */ + /** + * Filter the results to a set of content based on their status. If set to `any`, content with any status is returned. + * Note, the `historical` status is currently not supported. + */ status?: string[]; /** The version number of the content to be returned. */ version?: number; - /** The version of embedded content (e.g. attachments) to render. - - - current renders the latest version of the embedded content. - - version-at-save renders the version of the embedded content - at the time of save. */ - embeddedContentRender?: string; /** - * A multi-value parameter indicating which properties of the content to expand. + * The version of embedded content (e.g. attachments) to render. + * + * - current renders the latest version of the embedded content. + * - version-at-save renders the version of the embedded content at the time of save. */ + embeddedContentRender?: string; + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; - /** If set to `viewed`, the request will trigger a 'viewed' event for the content. - When this event is triggered, the page/blogpost will appear on the 'Recently visited' - tab of the user's Confluence dashboard. */ + /** + * If set to `viewed`, the request will trigger a 'viewed' event for the content. When this event is triggered, the + * page/blogpost will appear on the 'Recently visited' tab of the user's Confluence dashboard. + */ trigger?: string; } diff --git a/src/api/parameters/getContentByTypeForSpace.ts b/src/api/parameters/getContentByTypeForSpace.ts index 878c18c8..ae49421b 100644 --- a/src/api/parameters/getContentByTypeForSpace.ts +++ b/src/api/parameters/getContentByTypeForSpace.ts @@ -3,16 +3,12 @@ export interface GetContentByTypeForSpace { spaceKey: string; /** The type of content to return. */ type: string; - /** Filter the results to content at the root level of the space or all - content. */ + /** Filter the results to content at the root level of the space or all content. */ depth?: string; - /** - * A multi-value parameter indicating which properties of the content to expand. - */ + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; /** The starting index of the returned content. */ start?: number; - /** The maximum number of content objects to return per page. Note, this - may be restricted by fixed system limits. */ + /** The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getContentChildren.ts b/src/api/parameters/getContentChildren.ts index 3c4b2d24..c381eb01 100644 --- a/src/api/parameters/getContentChildren.ts +++ b/src/api/parameters/getContentChildren.ts @@ -1,13 +1,14 @@ export interface GetContentChildren { /** The ID of the content to be queried for its children. */ id: string; - /** A multi-value parameter indicating which properties of the children to expand, where: - - - `attachment` returns all attachments for the content. - - `comments` returns all comments for the content. - - `page` returns all child pages of the content. */ + /** + * A multi-value parameter indicating which properties of the children to expand, where: + * + * - `attachment` returns all attachments for the content. + * - `comments` returns all comments for the content. + * - `page` returns all child pages of the content. + */ expand?: string[]; - /** The version of the parent content to retrieve children for. - Currently, this only works for the latest version. */ + /** The version of the parent content to retrieve children for. Currently, this only works for the latest version. */ parentVersion?: number; } diff --git a/src/api/parameters/getContentChildrenByType.ts b/src/api/parameters/getContentChildrenByType.ts index 0fcbbaa1..01f08466 100644 --- a/src/api/parameters/getContentChildrenByType.ts +++ b/src/api/parameters/getContentChildrenByType.ts @@ -3,16 +3,12 @@ export interface GetContentChildrenByType { id: string; /** The type of children to return. */ type: string; - /** - * A multi-value parameter indicating which properties of the content to expand. - */ + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; - /** The version of the parent content to retrieve children for. - Currently, this only works for the latest version. */ + /** The version of the parent content to retrieve children for. Currently, this only works for the latest version. */ parentVersion?: number; /** The starting index of the returned content. */ start?: number; - /** The maximum number of content to return per page. Note, - this may be restricted by fixed system limits. */ + /** The maximum number of content to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getContentComments.ts b/src/api/parameters/getContentComments.ts index 9f42a32c..020992cf 100644 --- a/src/api/parameters/getContentComments.ts +++ b/src/api/parameters/getContentComments.ts @@ -1,22 +1,19 @@ export interface GetContentComments { /** The ID of the content to be queried for its comments. */ id: string; - /** - * A multi-value parameter indicating which properties of the content to expand. - */ + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; - /** The version of the parent content to retrieve children for. - Currently, this only works for the latest version. */ + /** The version of the parent content to retrieve children for. Currently, this only works for the latest version. */ parentVersion?: number; /** The starting index of the returned comments. */ start?: number; - /** The maximum number of comments to return per page. Note, - this may be restricted by fixed system limits. */ + /** The maximum number of comments to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; - /** The location of the comments in the page. Multiple locations can be specified. - If no location is specified, comments from all locations are returned. */ + /** + * The location of the comments in the page. Multiple locations can be specified. If no location is specified, + * comments from all locations are returned. + */ location?: string[]; - /** Currently, this parameter is not used. - Comments are returned at the root level only. */ + /** Currently, this parameter is not used. Comments are returned at the root level only. */ depth?: string; } diff --git a/src/api/parameters/getContentDescendants.ts b/src/api/parameters/getContentDescendants.ts index 83402323..6f708ab0 100644 --- a/src/api/parameters/getContentDescendants.ts +++ b/src/api/parameters/getContentDescendants.ts @@ -1,11 +1,12 @@ export interface GetContentDescendants { /** The ID of the content to be queried for its descendants. */ id: string; - /** A multi-value parameter indicating which properties of the children to - expand, where: - - - `attachment` returns all attachments for the content. - - `comments` returns all comments for the content. - - `page` returns all child pages of the content. */ + /** + * A multi-value parameter indicating which properties of the children to expand, where: + * + * - `attachment` returns all attachments for the content. + * - `comments` returns all comments for the content. + * - `page` returns all child pages of the content. + */ expand?: string[]; } diff --git a/src/api/parameters/getContentForSpace.ts b/src/api/parameters/getContentForSpace.ts index 5c221bc4..26cae921 100644 --- a/src/api/parameters/getContentForSpace.ts +++ b/src/api/parameters/getContentForSpace.ts @@ -3,13 +3,10 @@ export interface GetContentForSpace { spaceKey: string; /** Filter the results to content at the root level of the space or all content. */ depth?: string; - /** - * A multi-value parameter indicating which properties of the content to expand. - */ + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; /** The starting index of the returned content. */ start?: number; - /** The maximum number of content objects to return per page. Note, this - may be restricted by fixed system limits. */ + /** The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getContentProperties.ts b/src/api/parameters/getContentProperties.ts index 7025ac1d..d5ba738d 100644 --- a/src/api/parameters/getContentProperties.ts +++ b/src/api/parameters/getContentProperties.ts @@ -1,16 +1,15 @@ export interface GetContentProperties { /** The ID of the content to be queried for its properties. */ id: string; - /** A multi-value parameter indicating which properties of the content to - expand. By default, the `version` object is expanded. - - - `content` returns the content that the property is stored against. - - `version` returns information about the version of the property, such - as the version number, when it was created, etc. */ + /** + * A multi-value parameter indicating which properties of the content to expand. By default, the `version` object is expanded. + * + * - `content` returns the content that the property is stored against. + * - `version` returns information about the version of the property, such as the version number, when it was created, etc. + */ expand?: string[]; /** The starting index of the returned properties. */ start?: number; - /** The maximum number of properties to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of properties to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getContentProperty.ts b/src/api/parameters/getContentProperty.ts index 4d3311b0..a7f1989a 100644 --- a/src/api/parameters/getContentProperty.ts +++ b/src/api/parameters/getContentProperty.ts @@ -3,11 +3,11 @@ export interface GetContentProperty { id: string; /** The key of the content property. */ key: string; - /** A multi-value parameter indicating which properties of the content to - expand. By default, the `version` object is expanded. - - - `content` returns the content that the property is stored against. - - `version` returns information about the version of the property, such - as the version number, when it was created, etc. */ + /** + * A multi-value parameter indicating which properties of the content to expand. By default, the `version` object is expanded. + * + * - `content` returns the content that the property is stored against. + * - `version` returns information about the version of the property, such as the version number, when it was created, etc. + */ expand?: string[]; } diff --git a/src/api/parameters/getContentRestrictionStatusForGroup.ts b/src/api/parameters/getContentRestrictionStatusForGroup.ts index 5bd1fba5..9d9c8d60 100644 --- a/src/api/parameters/getContentRestrictionStatusForGroup.ts +++ b/src/api/parameters/getContentRestrictionStatusForGroup.ts @@ -3,7 +3,6 @@ export interface GetContentRestrictionStatusForGroup { id: string; /** The operation that the restriction applies to. */ operationKey: string; - /** The name of the group to be queried for whether the content restriction - applies to it. */ + /** The name of the group to be queried for whether the content restriction applies to it. */ groupName: string; } diff --git a/src/api/parameters/getContentRestrictionStatusForUser.ts b/src/api/parameters/getContentRestrictionStatusForUser.ts index 48d5d9a7..7043ad37 100644 --- a/src/api/parameters/getContentRestrictionStatusForUser.ts +++ b/src/api/parameters/getContentRestrictionStatusForUser.ts @@ -3,15 +3,19 @@ export interface GetContentRestrictionStatusForUser { id: string; /** The operation that is restricted. */ operationKey: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userName?: string; - /** The account ID of the user to be queried for whether the content restriction applies to it. The accountId - uniquely identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user to be queried for whether the content restriction applies to it. The accountId uniquely + * identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/getContentTemplates.ts b/src/api/parameters/getContentTemplates.ts index 56e42974..d2aab909 100644 --- a/src/api/parameters/getContentTemplates.ts +++ b/src/api/parameters/getContentTemplates.ts @@ -1,15 +1,14 @@ export interface GetContentTemplates { - /** The key of the space to be queried for templates. If the `spaceKey` - is not specified, global templates will be returned. */ + /** The key of the space to be queried for templates. If the `spaceKey` is not specified, global templates will be returned. */ spaceKey?: string; /** The starting index of the returned templates. */ start?: number; - /** The maximum number of templates to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of templates to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; - /** A multi-value parameter indicating which properties of the template - to expand. - - - `body` returns the content of the template in storage format. */ + /** + * A multi-value parameter indicating which properties of the template to expand. + * + * - `body` returns the content of the template in storage format. + */ expand?: string[]; } diff --git a/src/api/parameters/getContentVersion.ts b/src/api/parameters/getContentVersion.ts index a4132853..47d8e531 100644 --- a/src/api/parameters/getContentVersion.ts +++ b/src/api/parameters/getContentVersion.ts @@ -3,10 +3,11 @@ export interface GetContentVersion { id: string; /** The number of the version to be retrieved. */ versionNumber: number; - /** A multi-value parameter indicating which properties of the content to - expand. By default, the `content` object is expanded. - - - `collaborators` returns the users that collaborated on the version. - - `content` returns the content for the version. */ + /** + * A multi-value parameter indicating which properties of the content to expand. By default, the `content` object is expanded. + * + * - `collaborators` returns the users that collaborated on the version. + * - `content` returns the content for the version. + */ expand?: string[]; } diff --git a/src/api/parameters/getContentVersions.ts b/src/api/parameters/getContentVersions.ts index 952260ac..77256391 100644 --- a/src/api/parameters/getContentVersions.ts +++ b/src/api/parameters/getContentVersions.ts @@ -3,12 +3,13 @@ export interface GetContentVersions { id: string; /** The starting index of the returned versions. */ start?: number; - /** The maximum number of versions to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of versions to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; - /** A multi-value parameter indicating which properties of the content to expand. - - - `collaborators` returns the users that collaborated on the version. - - `content` returns the content for the version. */ + /** + * A multi-value parameter indicating which properties of the content to expand. + * + * - `collaborators` returns the users that collaborated on the version. + * - `content` returns the content for the version. + */ expand?: string[]; } diff --git a/src/api/parameters/getContentWatchStatus.ts b/src/api/parameters/getContentWatchStatus.ts index 9d6242b0..f32174cb 100644 --- a/src/api/parameters/getContentWatchStatus.ts +++ b/src/api/parameters/getContentWatchStatus.ts @@ -1,16 +1,19 @@ export interface GetContentWatchStatus { - /** The ID of the content to be queried for whether the specified user is - watching it. */ + /** The ID of the content to be queried for whether the specified user is watching it. */ contentId: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be queried for whether they are watching the content. The accountId uniquely - identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be queried for whether they are watching the content. The accountId uniquely + * identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/getCurrentUser.ts b/src/api/parameters/getCurrentUser.ts index b16ad605..cffdff9e 100644 --- a/src/api/parameters/getCurrentUser.ts +++ b/src/api/parameters/getCurrentUser.ts @@ -1,16 +1,15 @@ export interface GetCurrentUser { - /** A multi-value parameter indicating which properties of the user to - expand. - - - `operations` returns the operations that the user is allowed to do. - - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. - Note that these fields have been deprecated due to privacy changes. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. - Note that these fields have been deprecated due to privacy changes. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - personalSpace returns the user's personal space, if it exists. */ + /** + * A multi-value parameter indicating which properties of the user to expand. + * + * - `operations` returns the operations that the user is allowed to do. + * - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that + * these fields have been deprecated due to privacy changes. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note + * that these fields have been deprecated due to privacy changes. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - PersonalSpace returns the user's personal space, if it exists. + */ expand?: string[]; } diff --git a/src/api/parameters/getGroup.ts b/src/api/parameters/getGroup.ts index c631b155..cba9021f 100644 --- a/src/api/parameters/getGroup.ts +++ b/src/api/parameters/getGroup.ts @@ -1,5 +1,4 @@ export interface GetGroup { - /** The name of the group. This is the same as the group name shown in - the Confluence administration console. */ + /** The name of the group. This is the same as the group name shown in the Confluence administration console. */ groupName: string; } diff --git a/src/api/parameters/getGroupByQueryParam.ts b/src/api/parameters/getGroupByQueryParam.ts index fe1a3c57..069114bd 100644 --- a/src/api/parameters/getGroupByQueryParam.ts +++ b/src/api/parameters/getGroupByQueryParam.ts @@ -1,5 +1,4 @@ export interface GetGroupByQueryParam { - /** The name of the group. This is the same as the group name shown in - the Confluence administration console. */ + /** The name of the group. This is the same as the group name shown in the Confluence administration console. */ name: string; } diff --git a/src/api/parameters/getGroupMembers.ts b/src/api/parameters/getGroupMembers.ts index f9d1901c..3abf348f 100644 --- a/src/api/parameters/getGroupMembers.ts +++ b/src/api/parameters/getGroupMembers.ts @@ -3,7 +3,6 @@ export interface GetGroupMembers { groupName: string; /** The starting index of the returned users. */ start?: number; - /** The maximum number of users to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of users to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getGroupMembersByGroupId.ts b/src/api/parameters/getGroupMembersByGroupId.ts index fe54f426..a7f2de88 100644 --- a/src/api/parameters/getGroupMembersByGroupId.ts +++ b/src/api/parameters/getGroupMembersByGroupId.ts @@ -3,7 +3,6 @@ export interface GetGroupMembersByGroupId { groupId: string; /** The starting index of the returned users. */ start?: number; - /** The maximum number of users to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of users to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getGroupMembershipsForUser.ts b/src/api/parameters/getGroupMembershipsForUser.ts index f09a00a0..95f12da1 100644 --- a/src/api/parameters/getGroupMembershipsForUser.ts +++ b/src/api/parameters/getGroupMembershipsForUser.ts @@ -1,18 +1,21 @@ export interface GetGroupMembershipsForUser { - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; /** The starting index of the returned groups. */ start?: number; - /** The maximum number of groups to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of groups to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getGroups.ts b/src/api/parameters/getGroups.ts index 261bc360..87d13011 100644 --- a/src/api/parameters/getGroups.ts +++ b/src/api/parameters/getGroups.ts @@ -1,7 +1,6 @@ export interface GetGroups { /** The starting index of the returned groups. */ start?: number; - /** The maximum number of groups to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of groups to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getGroupsSearch.ts b/src/api/parameters/getGroupsSearch.ts index cf7848f4..a5168f53 100644 --- a/src/api/parameters/getGroupsSearch.ts +++ b/src/api/parameters/getGroupsSearch.ts @@ -1,9 +1,8 @@ export interface GetGroupsSearch { - /** the search term used to query results. */ + /** The search term used to query results. */ query: string; /** The starting index of the returned groups. */ start?: number; - /** The maximum number of groups to return per page. - Note, this is restricted to a maximum limit of 200 groups. */ + /** The maximum number of groups to return per page. Note, this is restricted to a maximum limit of 200 groups. */ limit?: number; } diff --git a/src/api/parameters/getHistoryForContent.ts b/src/api/parameters/getHistoryForContent.ts index 27df6240..e4b9aed1 100644 --- a/src/api/parameters/getHistoryForContent.ts +++ b/src/api/parameters/getHistoryForContent.ts @@ -1,13 +1,15 @@ export interface GetHistoryForContent { /** The ID of the content to be queried for its history. */ id: string; - /** A multi-value parameter indicating which properties of the content history to expand. - - - `lastUpdated` returns information about the most recent update of the content, - including who updated it and when it was updated. - - `previousVersion` returns information about the update prior to the current content - update. For this method, it contains the same information as `lastUpdated`. - - `contributors` returns all of the users who have contributed to the content. - - `nextVersion` This parameter is not used for this method. */ + /** + * A multi-value parameter indicating which properties of the content history to expand. + * + * - `lastUpdated` returns information about the most recent update of the content, including who updated it and when it + * was updated. + * - `previousVersion` returns information about the update prior to the current content update. For this method, it + * contains the same information as `lastUpdated`. + * - `contributors` returns all of the users who have contributed to the content. + * - `nextVersion` This parameter is not used for this method. + */ expand?: string[]; } diff --git a/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts b/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts index e4ab987c..355e0cea 100644 --- a/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts +++ b/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts @@ -3,7 +3,6 @@ export interface GetIndividualGroupRestrictionStatusByGroupId { id: string; /** The operation that the restriction applies to. */ operationKey: string; - /** The id of the group to be queried for whether the content restriction - applies to it. */ + /** The id of the group to be queried for whether the content restriction applies to it. */ groupId: string; } diff --git a/src/api/parameters/getLabelsForContent.ts b/src/api/parameters/getLabelsForContent.ts index 9c0541fe..1860ab44 100644 --- a/src/api/parameters/getLabelsForContent.ts +++ b/src/api/parameters/getLabelsForContent.ts @@ -1,20 +1,18 @@ export interface GetLabelsForContent { /** The ID of the content to be queried for its labels. */ id: string; - /** Filters the results to labels with the specified prefix. If this parameter - is not specified, then labels with any prefix will be returned. - - - `global` prefix is used by default when a user adds a label - via the UI. - - `my` prefix can be explicitly added by a user when adding a label - via the UI, e.g. 'my:example-label'. Also, when a page is selected as - a favourite, the 'my:favourite' label is automatically added. - - `team` can used when adding labels via [Add labels to content](#api-content-id-label-post) - but is not used in the UI. */ + /** + * Filters the results to labels with the specified prefix. If this parameter is not specified, then labels with any + * prefix will be returned. + * + * - `global` prefix is used by default when a user adds a label via the UI. + * - `my` prefix can be explicitly added by a user when adding a label via the UI, e.g. 'my:example-label'. Also, when a + * page is selected as a favourite, the 'my:favourite' label is automatically added. + * - `team` can used when adding labels via [Add labels to content](#api-content-id-label-post) but is not used in the UI. + */ prefix?: string; /** The starting index of the returned labels. */ start?: number; - /** The maximum number of labels to return per page. Note, - this may be restricted by fixed system limits. */ + /** The maximum number of labels to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getLookAndFeelSettings.ts b/src/api/parameters/getLookAndFeelSettings.ts index 3cf4df97..acb48664 100644 --- a/src/api/parameters/getLookAndFeelSettings.ts +++ b/src/api/parameters/getLookAndFeelSettings.ts @@ -1,6 +1,7 @@ export interface GetLookAndFeelSettings { - /** The key of the space for which the look and feel settings will be - returned. If this is not set, only the global look and feel settings - are returned. */ + /** + * The key of the space for which the look and feel settings will be returned. If this is not set, only the global + * look and feel settings are returned. + */ spaceKey?: string; } diff --git a/src/api/parameters/getMacroBodyByMacroId.ts b/src/api/parameters/getMacroBodyByMacroId.ts index 10c97128..70f77e66 100644 --- a/src/api/parameters/getMacroBodyByMacroId.ts +++ b/src/api/parameters/getMacroBodyByMacroId.ts @@ -3,9 +3,10 @@ export interface GetMacroBodyByMacroId { id: string; /** The version of the content that contains the macro. */ version: number; - /** The ID of the macro. This is usually passed by the app that the - macro is in. Otherwise, find the macro ID by querying the desired - content and version, then expanding the body in storage format. - For example, '/content/196611/version/7?expand=content.body.storage'. */ + /** + * The ID of the macro. This is usually passed by the app that the macro is in. Otherwise, find the macro ID by + * querying the desired content and version, then expanding the body in storage format. For example, + * '/content/196611/version/7?expand=content.body.storage'. + */ macroId: string; } diff --git a/src/api/parameters/getMembersByQueryParam.ts b/src/api/parameters/getMembersByQueryParam.ts index 93ab8312..37d9702c 100644 --- a/src/api/parameters/getMembersByQueryParam.ts +++ b/src/api/parameters/getMembersByQueryParam.ts @@ -3,8 +3,9 @@ export interface GetMembersByQueryParam { name: string; /** The starting index of the returned users. */ start?: number; - /** The maximum number of users to return per page. - Note, this is restricted by fixed system limit of 200 which is to say if the limit parameter - exceeds 200, this API will return a maximum of 200 users per page. */ + /** + * The maximum number of users to return per page. Note, this is restricted by fixed system limit of 200 which is to + * say if the limit parameter exceeds 200, this API will return a maximum of 200 users per page. + */ limit?: number; } diff --git a/src/api/parameters/getPrivacyUnsafeUserEmail.ts b/src/api/parameters/getPrivacyUnsafeUserEmail.ts index 77e01167..b32b28d4 100644 --- a/src/api/parameters/getPrivacyUnsafeUserEmail.ts +++ b/src/api/parameters/getPrivacyUnsafeUserEmail.ts @@ -1,5 +1,7 @@ export interface GetPrivacyUnsafeUserEmail { - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. Required. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. Required. + */ accountId: string; } diff --git a/src/api/parameters/getRelationship.ts b/src/api/parameters/getRelationship.ts index e419205b..921b8125 100644 --- a/src/api/parameters/getRelationship.ts +++ b/src/api/parameters/getRelationship.ts @@ -1,50 +1,57 @@ export interface GetRelationship { - /** The name of the relationship. This method supports the 'favourite' - (i.e. 'save for later') relationship as well as any other relationship - types created via [Create relationship](#api-relation-relationName-from-sourceType-sourceKey-to-targetType-targetKey-put). */ + /** + * The name of the relationship. This method supports the 'favourite' (i.e. 'save for later') relationship as well as + * any other relationship types created via [Create + * relationship](#api-relation-relationName-from-sourceType-sourceKey-to-targetType-targetKey-put). + */ relationName: string; - /** The source entity type of the relationship. This must be 'user', if - the `relationName` is 'favourite'. */ + /** The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'. */ sourceType: string; - /** - The identifier for the source entity: - - - If `sourceType` is `user`, then specify either `current` (logged-in user), the user key of the user, or - the account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - If `sourceType` is 'content', then specify the content ID. - - If `sourceType` is 'space', then specify the space key. */ + /** + * - The identifier for the source entity: + * + * - If `sourceType` is `user`, then specify either `current` (logged-in user), the user key of the user, or the account + * ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See + * the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) + * for details. + * - If `sourceType` is 'content', then specify the content ID. + * - If `sourceType` is 'space', then specify the space key. + */ sourceKey: string; - /** The target entity type of the relationship. This must be 'space' or - 'content', if the `relationName` is 'favourite'. */ + /** The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is 'favourite'. */ targetType: string; - /** The identifier for the target entity: - - - If `targetType` is `user`, then specify either `current` (logged-in user), the user key of the user, or - the account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - If `targetType` is 'content', then specify the content ID. - - If `targetType` is 'space', then specify the space key. */ + /** + * The identifier for the target entity: + * + * - If `targetType` is `user`, then specify either `current` (logged-in user), the user key of the user, or the account + * ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the + * [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - If `targetType` is 'content', then specify the content ID. + * - If `targetType` is 'space', then specify the space key. + */ targetKey: string; - /** The status of the source. This parameter is only used when the - `sourceType` is 'content'. */ + /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */ sourceStatus?: string; - /** The status of the target. This parameter is only used when the - `targetType` is 'content'. */ + /** The status of the target. This parameter is only used when the `targetType` is 'content'. */ targetStatus?: string; - /** The version of the source. This parameter is only used when the - `sourceType` is 'content' and the `sourceStatus` is 'historical'. */ + /** + * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is + * 'historical'. + */ sourceVersion?: number; - /** The version of the target. This parameter is only used when the - `targetType` is 'content' and the `targetStatus` is 'historical'. */ + /** + * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is + * 'historical'. + */ targetVersion?: number; - /** A multi-value parameter indicating which properties of the response - object to expand. - - - `relationData` returns information about the relationship, such as - who created it and when it was created. - - `source` returns the source entity. - - `target` returns the target entity. */ + /** + * A multi-value parameter indicating which properties of the response object to expand. + * + * - `relationData` returns information about the relationship, such as who created it and when it was created. + * - `source` returns the source entity. + * - `target` returns the target entity. + */ expand?: string[]; } diff --git a/src/api/parameters/getRestrictions.ts b/src/api/parameters/getRestrictions.ts index 5ed2ec29..9202d693 100644 --- a/src/api/parameters/getRestrictions.ts +++ b/src/api/parameters/getRestrictions.ts @@ -1,21 +1,20 @@ export interface GetRestrictions { /** The ID of the content to be queried for its restrictions. */ id: string; - /** A multi-value parameter indicating which properties of the content - restrictions to expand. By default, the following objects are expanded: - `restrictions.user`, `restrictions.group`. - - - `restrictions.user` returns the piece of content that the restrictions are - applied to. - - `restrictions.group` returns the piece of content that the restrictions are - applied to. - - `content` returns the piece of content that the restrictions are - applied to. */ + /** + * A multi-value parameter indicating which properties of the content restrictions to expand. By default, the + * following objects are expanded: `restrictions.user`, `restrictions.group`. + * + * - `restrictions.user` returns the piece of content that the restrictions are applied to. + * - `restrictions.group` returns the piece of content that the restrictions are applied to. + * - `content` returns the piece of content that the restrictions are applied to. + */ expand?: string[]; /** The starting index of the users and groups in the returned restrictions. */ start?: number; - /** The maximum number of users and the maximum number of groups, in the - returned restrictions, to return per page. Note, this may be restricted - by fixed system limits. */ + /** + * The maximum number of users and the maximum number of groups, in the returned restrictions, to return per page. + * Note, this may be restricted by fixed system limits. + */ limit?: number; } diff --git a/src/api/parameters/getRestrictionsByOperation.ts b/src/api/parameters/getRestrictionsByOperation.ts index f1e1948e..5b892d05 100644 --- a/src/api/parameters/getRestrictionsByOperation.ts +++ b/src/api/parameters/getRestrictionsByOperation.ts @@ -1,14 +1,12 @@ export interface GetRestrictionsByOperation { /** The ID of the content to be queried for its restrictions. */ id: string; - /** A multi-value parameter indicating which properties of the content - restrictions to expand. - - - `restrictions.user` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `restrictions.group` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `content` returns the piece of content that the restrictions are - applied to. */ + /** + * A multi-value parameter indicating which properties of the content restrictions to expand. + * + * - `restrictions.user` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `restrictions.group` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `content` returns the piece of content that the restrictions are applied to. + */ expand?: string[]; } diff --git a/src/api/parameters/getRestrictionsForOperation.ts b/src/api/parameters/getRestrictionsForOperation.ts index 0adc7504..b2bb58ce 100644 --- a/src/api/parameters/getRestrictionsForOperation.ts +++ b/src/api/parameters/getRestrictionsForOperation.ts @@ -3,20 +3,19 @@ export interface GetRestrictionsForOperation { id: string; /** The operation type of the restrictions to be returned. */ operationKey: string; - /** A multi-value parameter indicating which properties of the content - restrictions to expand. - - - `restrictions.user` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `restrictions.group` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `content` returns the piece of content that the restrictions are - applied to. */ + /** + * A multi-value parameter indicating which properties of the content restrictions to expand. + * + * - `restrictions.user` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `restrictions.group` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `content` returns the piece of content that the restrictions are applied to. + */ expand?: string[]; /** The starting index of the users and groups in the returned restrictions. */ start?: number; - /** The maximum number of users and the maximum number of groups, in the - returned restrictions, to return per page. Note, this may be restricted - by fixed system limits. */ + /** + * The maximum number of users and the maximum number of groups, in the returned restrictions, to return per page. + * Note, this may be restricted by fixed system limits. + */ limit?: number; } diff --git a/src/api/parameters/getSpace.ts b/src/api/parameters/getSpace.ts index 77db2967..755a78c0 100644 --- a/src/api/parameters/getSpace.ts +++ b/src/api/parameters/getSpace.ts @@ -1,8 +1,6 @@ export interface GetSpace { /** The key of the space to be returned. */ spaceKey: string; - /** - * A multi-value parameter indicating which properties of the content to expand. - */ + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; } diff --git a/src/api/parameters/getSpaceProperties.ts b/src/api/parameters/getSpaceProperties.ts index b54ba83f..a8d2931e 100644 --- a/src/api/parameters/getSpaceProperties.ts +++ b/src/api/parameters/getSpaceProperties.ts @@ -1,15 +1,16 @@ export interface GetSpaceProperties { /** The key of the space to be queried for its properties. */ spaceKey: string; - /** A multi-value parameter indicating which properties of the space - property to expand. By default, the `version` object is expanded. - - - `version` returns information about the version of the content. - - `space` returns the space that the properties are in. */ + /** + * A multi-value parameter indicating which properties of the space property to expand. By default, the `version` + * object is expanded. + * + * - `version` returns information about the version of the content. + * - `space` returns the space that the properties are in. + */ expand?: string[]; /** The starting index of the returned objects. */ start?: number; - /** The maximum number of properties to return per page. Note, this may be - restricted by fixed system limits. */ + /** The maximum number of properties to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getSpaceProperty.ts b/src/api/parameters/getSpaceProperty.ts index 69442b78..9d32fc44 100644 --- a/src/api/parameters/getSpaceProperty.ts +++ b/src/api/parameters/getSpaceProperty.ts @@ -3,10 +3,12 @@ export interface GetSpaceProperty { spaceKey: string; /** The key of the space property. */ key: string; - /** A multi-value parameter indicating which properties of the space - property to expand. By default, the `version` object is expanded. - - - `version` returns information about the version of the content. - - `space` returns the space that the properties are in. */ + /** + * A multi-value parameter indicating which properties of the space property to expand. By default, the `version` + * object is expanded. + * + * - `version` returns information about the version of the content. + * - `space` returns the space that the properties are in. + */ expand?: string[]; } diff --git a/src/api/parameters/getSpaces.ts b/src/api/parameters/getSpaces.ts index 452b7cff..fc11a280 100644 --- a/src/api/parameters/getSpaces.ts +++ b/src/api/parameters/getSpaces.ts @@ -1,9 +1,7 @@ export interface GetSpaces { - /** The key of the space to be returned. To return multiple spaces, - specify this parameter multiple times with different values. */ + /** The key of the space to be returned. To return multiple spaces, specify this parameter multiple times with different values. */ spaceKey?: string[]; - /** The id of the space to be returned. To return multiple spaces, - specify this parameter multiple times with different values. */ + /** The id of the space to be returned. To return multiple spaces, specify this parameter multiple times with different values. */ spaceId?: number[]; /** Filter the results to spaces based on their type. */ type?: string; @@ -11,23 +9,21 @@ export interface GetSpaces { status?: string; /** Filter the results to spaces based on their label. */ label?: string[]; - /** Filter the results to the favourite spaces of the user specified by - `favouriteUserKey`. Note, 'favourite' spaces are also - known as 'saved for later' spaces. */ + /** + * Filter the results to the favourite spaces of the user specified by `favouriteUserKey`. Note, 'favourite' spaces + * are also known as 'saved for later' spaces. + */ favourite?: boolean; - /** The userKey of the user, whose favourite spaces are used to filter - the results when using the `favourite` parameter. - - Leave blank for the current user. Use [Get user](#api-user-get) to - get the userKey for a user. */ - favouriteUserKey?: string; /** - * A multi-value parameter indicating which properties of the content to expand. + * The userKey of the user, whose favourite spaces are used to filter the results when using the `favourite` parameter. + * + * Leave blank for the current user. Use [Get user](#api-user-get) to get the userKey for a user. */ + favouriteUserKey?: string; + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; /** The starting index of the returned spaces. */ start?: number; - /** The maximum number of spaces to return per page. Note, this may be - restricted by fixed system limits. */ + /** The maximum number of spaces to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getTasks.ts b/src/api/parameters/getTasks.ts index 0b9028a0..eeeb995a 100644 --- a/src/api/parameters/getTasks.ts +++ b/src/api/parameters/getTasks.ts @@ -1,7 +1,6 @@ export interface GetTasks { /** The starting index of the returned tasks. */ start?: number; - /** The maximum number of tasks to return per page. Note, this may be - restricted by fixed system limits. */ + /** The maximum number of tasks to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getThemes.ts b/src/api/parameters/getThemes.ts index 2bdad07d..fdf2f56d 100644 --- a/src/api/parameters/getThemes.ts +++ b/src/api/parameters/getThemes.ts @@ -1,7 +1,6 @@ export interface GetThemes { /** The starting index of the returned themes. */ start?: number; - /** The maximum number of themes to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of themes to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getUser.ts b/src/api/parameters/getUser.ts index 2cb04a6d..859d1453 100644 --- a/src/api/parameters/getUser.ts +++ b/src/api/parameters/getUser.ts @@ -1,28 +1,31 @@ export interface GetUser { - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The account ID of the user, which uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; - /** A multi-value parameter indicating which properties of the user to - expand. - - - `operations` returns the operations that the user is allowed to do. - - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. - Note that these fields have been deprecated due to privacy changes. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. - Note that these fields have been deprecated due to privacy changes. See the - [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - for details. - - personalSpace returns the user's personal space, if it exists. - - `isExternalCollaborator` returns whether the user is an external collaborator user */ + /** + * A multi-value parameter indicating which properties of the user to expand. + * + * - `operations` returns the operations that the user is allowed to do. + * - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that + * these fields have been deprecated due to privacy changes. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note + * that these fields have been deprecated due to privacy changes. See the [migration + * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + * - PersonalSpace returns the user's personal space, if it exists. + * - `isExternalCollaborator` returns whether the user is an external collaborator user + */ expand?: string[]; } diff --git a/src/api/parameters/getWatchesForPage.ts b/src/api/parameters/getWatchesForPage.ts index 1b8c465b..ac9f6a6d 100644 --- a/src/api/parameters/getWatchesForPage.ts +++ b/src/api/parameters/getWatchesForPage.ts @@ -3,7 +3,6 @@ export interface GetWatchesForPage { id: string; /** The starting index of the returned watches. */ start?: number; - /** The maximum number of watches to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of watches to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/getWatchesForSpace.ts b/src/api/parameters/getWatchesForSpace.ts index a414076b..a16c9181 100644 --- a/src/api/parameters/getWatchesForSpace.ts +++ b/src/api/parameters/getWatchesForSpace.ts @@ -3,7 +3,6 @@ export interface GetWatchesForSpace { id: string; /** The starting index of the returned watches. */ start?: number; - /** The maximum number of watches to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of watches to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/index.ts b/src/api/parameters/index.ts index 368cf0df..884af8a3 100644 --- a/src/api/parameters/index.ts +++ b/src/api/parameters/index.ts @@ -95,6 +95,7 @@ export * from './findSourcesForTarget'; export * from './search'; export * from './userSearch'; export * from './getLookAndFeelSettings'; +export * from './updateLookAndFeel'; export * from './updateLookAndFeelSettings'; export * from './resetLookAndFeelSettings'; export * from './setLookAndFeelSettings'; diff --git a/src/api/parameters/isWatchingLabel.ts b/src/api/parameters/isWatchingLabel.ts index 16cc13fc..2899fe4e 100644 --- a/src/api/parameters/isWatchingLabel.ts +++ b/src/api/parameters/isWatchingLabel.ts @@ -1,16 +1,19 @@ export interface IsWatchingLabel { - /** The name of the label to be queried for whether the specified user is - watching it. */ + /** The name of the label to be queried for whether the specified user is watching it. */ labelName: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be queried for whether they are watching the label. The accountId uniquely identifies - the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be queried for whether they are watching the label. The accountId uniquely + * identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/isWatchingSpace.ts b/src/api/parameters/isWatchingSpace.ts index eb590e52..0936a299 100644 --- a/src/api/parameters/isWatchingSpace.ts +++ b/src/api/parameters/isWatchingSpace.ts @@ -1,16 +1,19 @@ export interface IsWatchingSpace { - /** The key of the space to be queried for whether the specified user is - watching it. */ + /** The key of the space to be queried for whether the specified user is watching it. */ spaceKey: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be queried for whether they are watching the space. The accountId uniquely identifies - the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be queried for whether they are watching the space. The accountId uniquely + * identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/movePage.ts b/src/api/parameters/movePage.ts index 2573ae16..d805aa96 100644 --- a/src/api/parameters/movePage.ts +++ b/src/api/parameters/movePage.ts @@ -1,10 +1,11 @@ export interface MovePage { /** The ID of the page to be moved */ id: string; - /** The position to move the page to relative to the target page: - * `before` - move the page under the same parent as the target, before the target in the list of children - * `after` - move the page under the same parent as the target, after the target in the list of children - * `append` - move the page to be a child of the target */ + /** + * The position to move the page to relative to the target page: `before` - move the page under the same parent as the + * target, before the target in the list of children `after` - move the page under the same parent as the target, + * after the target in the list of children `append` - move the page to be a child of the target + */ position: string; /** The ID of the target page for this operation */ targetId: string; diff --git a/src/api/parameters/publishLegacyDraft.ts b/src/api/parameters/publishLegacyDraft.ts index 09c5fbc0..3e8e111c 100644 --- a/src/api/parameters/publishLegacyDraft.ts +++ b/src/api/parameters/publishLegacyDraft.ts @@ -1,13 +1,14 @@ export interface PublishLegacyDraft { - /** The ID of the draft page that was created from a blueprint. - You can find the `draftId` in the Confluence application by - opening the draft page and checking the page URL. */ + /** + * The ID of the draft page that was created from a blueprint. You can find the `draftId` in the Confluence + * application by opening the draft page and checking the page URL. + */ draftId: string; - /** The status of the content to be updated, i.e. the draft. This is set - to 'draft' by default, so you shouldn't need to specify it. */ - status?: string; /** - * A multi-value parameter indicating which properties of the content to expand. + * The status of the content to be updated, i.e. the draft. This is set to 'draft' by default, so you shouldn't need + * to specify it. */ + status?: string; + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; } diff --git a/src/api/parameters/publishSharedDraft.ts b/src/api/parameters/publishSharedDraft.ts index 0602cbce..7faca71d 100644 --- a/src/api/parameters/publishSharedDraft.ts +++ b/src/api/parameters/publishSharedDraft.ts @@ -1,13 +1,14 @@ export interface PublishSharedDraft { - /** The ID of the draft page that was created from a blueprint. - You can find the `draftId` in the Confluence application by - opening the draft page and checking the page URL. */ + /** + * The ID of the draft page that was created from a blueprint. You can find the `draftId` in the Confluence + * application by opening the draft page and checking the page URL. + */ draftId: string; - /** The status of the content to be updated, i.e. the draft. This is set - to 'draft' by default, so you shouldn't need to specify it. */ - status?: string; /** - * A multi-value parameter indicating which properties of the content to expand. + * The status of the content to be updated, i.e. the draft. This is set to 'draft' by default, so you shouldn't need + * to specify it. */ + status?: string; + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; } diff --git a/src/api/parameters/removeContentWatcher.ts b/src/api/parameters/removeContentWatcher.ts index b4cfb504..24ca7db9 100644 --- a/src/api/parameters/removeContentWatcher.ts +++ b/src/api/parameters/removeContentWatcher.ts @@ -1,18 +1,21 @@ export interface RemoveContentWatcher { - /** Note, you must add header when making a - request, as this operation has XSRF protection. */ + /** Note, you must add header when making a request, as this operation has XSRF protection. */ 'X-Atlassian-Token': string; /** The ID of the content to remove the watcher from. */ contentId: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all + * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/removeGroupById.ts b/src/api/parameters/removeGroupById.ts index 1e9aa165..2a7e6d39 100644 --- a/src/api/parameters/removeGroupById.ts +++ b/src/api/parameters/removeGroupById.ts @@ -3,9 +3,10 @@ export interface RemoveGroupById { id: string; /** * The operation that the restriction applies to. + * * @example - * 'read' - * 'update' + * "read"; + * "update"; */ operationKey: string; /** The id of the group to remove from the content restriction. */ diff --git a/src/api/parameters/removeGroupByName.ts b/src/api/parameters/removeGroupByName.ts index 708482e5..f06a9e93 100644 --- a/src/api/parameters/removeGroupByName.ts +++ b/src/api/parameters/removeGroupByName.ts @@ -3,9 +3,10 @@ export interface RemoveGroupByName { id: string; /** * The operation that the restriction applies to. + * * @example - * 'read' - * 'update' + * "read"; + * "update"; */ operationKey: string; /** The name of the group to remove from the content restriction. */ diff --git a/src/api/parameters/removeLabelWatcher.ts b/src/api/parameters/removeLabelWatcher.ts index 7b79d19c..47d276e1 100644 --- a/src/api/parameters/removeLabelWatcher.ts +++ b/src/api/parameters/removeLabelWatcher.ts @@ -1,15 +1,19 @@ export interface RemoveLabelWatcher { /** The name of the label to remove the watcher from. */ labelName: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all Atlassian products. - For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all + * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/removeModules.ts b/src/api/parameters/removeModules.ts index 9cf1a48c..7a4eb0da 100644 --- a/src/api/parameters/removeModules.ts +++ b/src/api/parameters/removeModules.ts @@ -1,6 +1,7 @@ export interface RemoveModules { - /** The key of the module to remove. To include multiple module keys, provide multiple copies of this parameter. - For example, `moduleKey=dynamic-attachment-entity-property&moduleKey=dynamic-select-field`. - Nonexistent keys are ignored. */ + /** + * The key of the module to remove. To include multiple module keys, provide multiple copies of this parameter. For + * example, `moduleKey=dynamic-attachment-entity-property&moduleKey=dynamic-select-field`. Nonexistent keys are ignored. + */ moduleKey: string[]; } diff --git a/src/api/parameters/removeSpaceWatch.ts b/src/api/parameters/removeSpaceWatch.ts index 07cdd893..00d28b29 100644 --- a/src/api/parameters/removeSpaceWatch.ts +++ b/src/api/parameters/removeSpaceWatch.ts @@ -1,15 +1,19 @@ export interface RemoveSpaceWatch { /** The key of the space to remove the watcher from. */ spaceKey: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ username?: string; - /** The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all - Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all + * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/removeUserFromContentRestriction.ts b/src/api/parameters/removeUserFromContentRestriction.ts index c1dd1297..9f608d86 100644 --- a/src/api/parameters/removeUserFromContentRestriction.ts +++ b/src/api/parameters/removeUserFromContentRestriction.ts @@ -3,15 +3,19 @@ export interface RemoveUserFromContentRestriction { id: string; /** The operation that the restriction applies to. */ operationKey: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ key?: string; - /** This parameter is no longer available and will be removed from the documentation soon. - Use `accountId` instead. - See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. */ + /** + * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See + * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. + */ userName?: string; - /** The account ID of the user to remove from the content restriction. The accountId uniquely identifies the user - across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. */ + /** + * The account ID of the user to remove from the content restriction. The accountId uniquely identifies the user + * across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ accountId: string; } diff --git a/src/api/parameters/resetLookAndFeelSettings.ts b/src/api/parameters/resetLookAndFeelSettings.ts index 7f9327f9..f948420a 100644 --- a/src/api/parameters/resetLookAndFeelSettings.ts +++ b/src/api/parameters/resetLookAndFeelSettings.ts @@ -1,6 +1,7 @@ export interface ResetLookAndFeelSettings { - /** The key of the space for which the look and feel settings will be - reset. If this is not set, the global look and feel settings will - be reset. */ + /** + * The key of the space for which the look and feel settings will be reset. If this is not set, the global look and + * feel settings will be reset. + */ spaceKey?: string; } diff --git a/src/api/parameters/restoreContentVersion.ts b/src/api/parameters/restoreContentVersion.ts index 3f40578f..ba335432 100644 --- a/src/api/parameters/restoreContentVersion.ts +++ b/src/api/parameters/restoreContentVersion.ts @@ -3,10 +3,11 @@ import { VersionRestore } from '../models'; export interface RestoreContentVersion extends VersionRestore { /** The ID of the content for which the history will be restored. */ id: string; - /** A multi-value parameter indicating which properties of the returned - content to expand. - - - `collaborators` returns the users that collaborated on the version. - - `content` returns the content for the version. */ + /** + * A multi-value parameter indicating which properties of the returned content to expand. + * + * - `collaborators` returns the users that collaborated on the version. + * - `content` returns the content for the version. + */ expand?: string[]; } diff --git a/src/api/parameters/search.ts b/src/api/parameters/search.ts index 11e65676..01768c28 100644 --- a/src/api/parameters/search.ts +++ b/src/api/parameters/search.ts @@ -1,45 +1,47 @@ export interface Search { - /** The CQL query to be used for the search. See - * [Advanced Searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) - * for instructions on how to build a CQL query. + /** + * The CQL query to be used for the search. See [Advanced Searching using + * CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) for instructions on how to + * build a CQL query. * * @example - * Example queries: + * Example queries: * - * cql=type=user // will return all users - * cql=user="1234" // will return user with accountId “1234” + * cql=type=user // will return all users + * cql=user="1234" // will return user with accountId “1234” * - * // You can also use IN, NOT IN, != operators + * // You can also use IN, NOT IN, != operators * - * cql=user IN ("12", "34") // will return users with accountids “12” and “34” - * cql=user.fullname~jo // will return users with nickname/full name starting with “jo” - * cql=user.accountid="123" // will return user with accountId “123” + * cql=user IN ("12", "34") // will return users with accountids “12” and “34” + * cql=user.fullname~jo // will return users with nickname/full name starting with “jo” + * cql=user.accountid="123" // will return user with accountId “123” */ cql: string; /** The starting index of the returned users. */ start?: number; /** * The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. + * * @default 25 * @Minimum 0 */ limit?: number; /** * The space, content, and content status to execute the search against. - * * spaceKey Key of the space to search against. Optional. - * * contentId ID of the content to search against. Optional. Must be in the space specified by spaceKey. - * * contentStatuses Content statuses to search against. Optional. - * Specify these values in an object. + * + * - SpaceKey Key of the space to search against. Optional. + * - ContentId ID of the content to search against. Optional. Must be in the space specified by spaceKey. + * - ContentStatuses Content statuses to search against. Optional. Specify these values in an object. + * * @example - * 'cqlcontext={%22spaceKey%22:%22TEST%22, %22contentId%22:%22123%22}' + * "cqlcontext={%22spaceKey%22:%22TEST%22, %22contentId%22:%22123%22}"; */ cqlcontext?: string; - /** - * Pointer to a set of search results, returned as part of the *next* or *prev* URL from the previous search call. - */ + /** Pointer to a set of search results, returned as part of the *next* or *prev* URL from the previous search call. */ cursor?: string; /** * Include content from archived spaces in the results. + * * @default false */ includeArchivedSpaces?: boolean; diff --git a/src/api/parameters/searchContentByCQL.ts b/src/api/parameters/searchContentByCQL.ts index 1712d72d..5c224f86 100644 --- a/src/api/parameters/searchContentByCQL.ts +++ b/src/api/parameters/searchContentByCQL.ts @@ -1,21 +1,19 @@ export interface SearchContentByCQL { /** The CQL string that is used to find the requested content. */ cql: string; - /** The space, content, and content status to execute the search against. - Specify this as an object with the following properties: - - - `spaceKey` Key of the space to search against. Optional. - - `contentId` ID of the content to search against. Optional. Must - be in the space spacified by `spaceKey`. - - `contentStatuses` Content statuses to search against. Optional. */ - cqlcontext?: string; /** - * A multi-value parameter indicating which properties of the content to expand. + * The space, content, and content status to execute the search against. Specify this as an object with the following + * properties: + * + * - `spaceKey` Key of the space to search against. Optional. + * - `contentId` ID of the content to search against. Optional. Must be in the space spacified by `spaceKey`. + * - `contentStatuses` Content statuses to search against. Optional. */ + cqlcontext?: string; + /** A multi-value parameter indicating which properties of the content to expand. */ expand?: string[]; /** Pointer to a set of search results, returned as part of the `next` or `prev` URL from the previous search call. */ cursor?: string; - /** The maximum number of content objects to return per page. - Note, this may be restricted by fixed system limits. */ + /** The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. */ limit?: number; } diff --git a/src/api/parameters/setLookAndFeelSettings.ts b/src/api/parameters/setLookAndFeelSettings.ts index d8089cfd..6273053a 100644 --- a/src/api/parameters/setLookAndFeelSettings.ts +++ b/src/api/parameters/setLookAndFeelSettings.ts @@ -1,6 +1,7 @@ export interface SetLookAndFeelSettings { - /** The key of the space for which the look and feel settings will be - set. If this is not set, the global look and feel settings will be - set. */ + /** + * The key of the space for which the look and feel settings will be set. If this is not set, the global look and feel + * settings will be set. + */ spaceKey?: string; } diff --git a/src/api/parameters/setRetentionPeriod.ts b/src/api/parameters/setRetentionPeriod.ts index f330a340..84ac0dbf 100644 --- a/src/api/parameters/setRetentionPeriod.ts +++ b/src/api/parameters/setRetentionPeriod.ts @@ -1,4 +1,3 @@ import { RetentionPeriod } from '../models'; -export interface SetRetentionPeriod extends RetentionPeriod { -} +export interface SetRetentionPeriod extends RetentionPeriod {} diff --git a/src/api/parameters/updateContent.ts b/src/api/parameters/updateContent.ts index 40676289..5e9b542a 100644 --- a/src/api/parameters/updateContent.ts +++ b/src/api/parameters/updateContent.ts @@ -3,10 +3,11 @@ import { ContentUpdate } from '../models'; export interface UpdateContent extends ContentUpdate { /** The ID of the content to be updated. */ id: string; - /** The updated status of the content. Use this parameter to change the - status of a piece of content without passing the entire request body. */ + /** + * The updated status of the content. Use this parameter to change the status of a piece of content without passing + * the entire request body. + */ status?: string; - /** The action that should be taken when conflicts are discovered. - Only used when publishing a draft page. */ + /** The action that should be taken when conflicts are discovered. Only used when publishing a draft page. */ conflictPolicy?: string; } diff --git a/src/api/parameters/updateContentTemplate.ts b/src/api/parameters/updateContentTemplate.ts index f7d93dda..688b78c3 100644 --- a/src/api/parameters/updateContentTemplate.ts +++ b/src/api/parameters/updateContentTemplate.ts @@ -1,7 +1,4 @@ import { ContentTemplateUpdate } from '../models'; -/** - * This object is used to update content templates. - */ -export interface UpdateContentTemplate extends ContentTemplateUpdate { -} +/** This object is used to update content templates. */ +export interface UpdateContentTemplate extends ContentTemplateUpdate {} diff --git a/src/api/parameters/updateLookAndFeel.ts b/src/api/parameters/updateLookAndFeel.ts new file mode 100644 index 00000000..ce8678ef --- /dev/null +++ b/src/api/parameters/updateLookAndFeel.ts @@ -0,0 +1,3 @@ +import { LookAndFeelSelection } from '../models'; + +export interface UpdateLookAndFeel extends LookAndFeelSelection {} diff --git a/src/api/parameters/updateLookAndFeelSettings.ts b/src/api/parameters/updateLookAndFeelSettings.ts index d2b8410d..0955777b 100644 --- a/src/api/parameters/updateLookAndFeelSettings.ts +++ b/src/api/parameters/updateLookAndFeelSettings.ts @@ -1,8 +1,9 @@ import { LookAndFeel } from '../models'; export interface UpdateLookAndFeelSettings extends LookAndFeel { - /** The key of the space for which the look and feel settings will be - updated. If this is not set, the global look and feel settings will - be updated. */ + /** + * The key of the space for which the look and feel settings will be updated. If this is not set, the global look and + * feel settings will be updated. + */ spaceKey?: string; } diff --git a/src/api/parameters/updateRestrictions.ts b/src/api/parameters/updateRestrictions.ts index a4762ccb..bbdafb9d 100644 --- a/src/api/parameters/updateRestrictions.ts +++ b/src/api/parameters/updateRestrictions.ts @@ -3,15 +3,13 @@ import { ContentRestrictionUpdateArray } from '../models'; export interface UpdateRestrictions { /** The ID of the content to update restrictions for. */ id: string; - /** A multi-value parameter indicating which properties of the content - restrictions (returned in response) to expand. - - - `restrictions.user` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `restrictions.group` returns the piece of content that the restrictions are - applied to. Expanded by default. - - `content` returns the piece of content that the restrictions are - applied to. */ + /** + * A multi-value parameter indicating which properties of the content restrictions (returned in response) to expand. + * + * - `restrictions.user` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `restrictions.group` returns the piece of content that the restrictions are applied to. Expanded by default. + * - `content` returns the piece of content that the restrictions are applied to. + */ expand?: string[]; body: ContentRestrictionUpdateArray; } diff --git a/src/api/parameters/userSearch.ts b/src/api/parameters/userSearch.ts index 153b99f1..91c2c242 100644 --- a/src/api/parameters/userSearch.ts +++ b/src/api/parameters/userSearch.ts @@ -1,29 +1,32 @@ export interface UserSearch { - /** The CQL query to be used for the search. See - * [Advanced Searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) - * for instructions on how to build a CQL query. + /** + * The CQL query to be used for the search. See [Advanced Searching using + * CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) for instructions on how to + * build a CQL query. * * @example - * Example queries: + * Example queries: * - * cql=type=user // will return all users - * cql=user="1234" // will return user with accountId “1234” + * cql=type=user // will return all users + * cql=user="1234" // will return user with accountId “1234” * - * // You can also use IN, NOT IN, != operators + * // You can also use IN, NOT IN, != operators * - * cql=user IN ("12", "34") // will return users with accountids “12” and “34” - * cql=user.fullname~jo // will return users with nickname/full name starting with “jo” - * cql=user.accountid="123" // will return user with accountId “123” + * cql=user IN ("12", "34") // will return users with accountids “12” and “34” + * cql=user.fullname~jo // will return users with nickname/full name starting with “jo” + * cql=user.accountid="123" // will return user with accountId “123” */ cql: string; /** * The starting index of the returned users. + * * @default 0 * @Minimum 0 */ start?: number; /** * The maximum number of user objects to return per page. Note, this may be restricted by fixed system limits. + * * @default 25 * @Minimum 0 */ diff --git a/src/api/relation.ts b/src/api/relation.ts index e6753d85..b370dfd1 100644 --- a/src/api/relation.ts +++ b/src/api/relation.ts @@ -5,34 +5,41 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Relation { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns all target entities that have a particular relationship to the - * source entity. Note, relationships are one way. - * - * For example, the following method finds all content that the current user - * has an 'ignore' relationship with: - * `GET https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content` - * Note, 'ignore' is an example custom relationship type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view both the target entity and source entity. */ - async findTargetFromSource(parameters: Parameters.FindTargetFromSource, callback: Callback): Promise; + * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way. + * + * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET + * https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an + * example custom relationship type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity + * and source entity. + */ + async findTargetFromSource( + parameters: Parameters.FindTargetFromSource, + callback: Callback + ): Promise; /** - * Returns all target entities that have a particular relationship to the - * source entity. Note, relationships are one way. - * - * For example, the following method finds all content that the current user - * has an 'ignore' relationship with: - * `GET https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content` - * Note, 'ignore' is an example custom relationship type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view both the target entity and source entity. */ - async findTargetFromSource(parameters: Parameters.FindTargetFromSource, callback?: never): Promise; - async findTargetFromSource(parameters: Parameters.FindTargetFromSource, callback?: Callback): Promise { - const config = { + * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way. + * + * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET + * https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an + * example custom relationship type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity + * and source entity. + */ + async findTargetFromSource( + parameters: Parameters.FindTargetFromSource, + callback?: never + ): Promise; + async findTargetFromSource( + parameters: Parameters.FindTargetFromSource, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}`, method: 'GET', params: { @@ -44,35 +51,43 @@ export class Relation { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'findTargetFromSource' }); } /** - * Find whether a particular type of relationship exists from a source - * entity to a target entity. Note, relationships are one way. - * - * For example, you can use this method to find whether the current user has - * selected a particular page as a favorite (i.e. 'save for later'): - * `GET https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123` - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view both the target entity and source entity. */ - async GetRelationship(parameters: Parameters.GetRelationship, callback: Callback): Promise; + * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships + * are one way. + * + * For example, you can use this method to find whether the current user has selected a particular page as a favorite + * (i.e. 'save for later'): `GET + * https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123` + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity + * and source entity. + */ + async GetRelationship( + parameters: Parameters.GetRelationship, + callback: Callback + ): Promise; /** - * Find whether a particular type of relationship exists from a source - * entity to a target entity. Note, relationships are one way. + * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships + * are one way. * - * For example, you can use this method to find whether the current user has - * selected a particular page as a favorite (i.e. 'save for later'): - * `GET https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123` + * For example, you can use this method to find whether the current user has selected a particular page as a favorite + * (i.e. 'save for later'): `GET + * https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123` * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view both the target entity and source entity. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity + * and source entity. + */ async GetRelationship(parameters: Parameters.GetRelationship, callback?: never): Promise; - async GetRelationship(parameters: Parameters.GetRelationship, callback?: Callback): Promise { - const config = { + async GetRelationship( + parameters: Parameters.GetRelationship, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, method: 'GET', params: { @@ -82,37 +97,44 @@ export class Relation { targetVersion: parameters.targetVersion, expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'GetRelationship' }); } /** - * Creates a relationship between two entities (user, space, content). The - * 'favourite' relationship is supported by default, but you can use this method - * to create any type of relationship between two entities. - * - * For example, the following method creates a 'sibling' relationship between - * two pieces of content: - * `GET https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456` - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async createRelationship(parameters: Parameters.CreateRelationship, callback: Callback): Promise; + * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by + * default, but you can use this method to create any type of relationship between two entities. + * + * For example, the following method creates a 'sibling' relationship between two pieces of content: `GET + * https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456` + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async createRelationship( + parameters: Parameters.CreateRelationship, + callback: Callback + ): Promise; /** - * Creates a relationship between two entities (user, space, content). The - * 'favourite' relationship is supported by default, but you can use this method - * to create any type of relationship between two entities. - * - * For example, the following method creates a 'sibling' relationship between - * two pieces of content: - * `GET https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456` - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async createRelationship(parameters: Parameters.CreateRelationship, callback?: never): Promise; - async createRelationship(parameters: Parameters.CreateRelationship, callback?: Callback): Promise { - const config = { + * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by + * default, but you can use this method to create any type of relationship between two entities. + * + * For example, the following method creates a 'sibling' relationship between two pieces of content: `GET + * https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456` + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async createRelationship( + parameters: Parameters.CreateRelationship, + callback?: never + ): Promise; + async createRelationship( + parameters: Parameters.CreateRelationship, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, method: 'PUT', params: { @@ -121,7 +143,7 @@ export class Relation { sourceVersion: parameters.sourceVersion, targetVersion: parameters.targetVersion, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createRelationship' }); } @@ -129,23 +151,21 @@ export class Relation { /** * Deletes a relationship between two entities (user, space, content). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). - * For favourite relationships, the current user can only delete their own - * favourite relationships. A space administrator can delete favourite - * relationships for any user. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). For favourite relationships, the current user can only delete their own favourite + * relationships. A space administrator can delete favourite relationships for any user. + */ async delete(parameters: Parameters.Delete, callback: Callback): Promise; /** * Deletes a relationship between two entities (user, space, content). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). - * For favourite relationships, the current user can only delete their own - * favourite relationships. A space administrator can delete favourite - * relationships for any user. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). For favourite relationships, the current user can only delete their own favourite + * relationships. A space administrator can delete favourite relationships for any user. + */ async delete(parameters: Parameters.Delete, callback?: never): Promise; async delete(parameters: Parameters.Delete, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, method: 'DELETE', params: { @@ -154,37 +174,46 @@ export class Relation { sourceVersion: parameters.sourceVersion, targetVersion: parameters.targetVersion, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'delete' }); } /** - * Returns all target entities that have a particular relationship to the - * source entity. Note, relationships are one way. - * - * For example, the following method finds all users that have a 'collaborator' - * relationship to a piece of content with an ID of '1234': - * `GET https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user` - * Note, 'collaborator' is an example custom relationship type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view both the target entity and source entity. */ - async findSourcesForTarget(parameters: Parameters.FindSourcesForTarget, callback: Callback): Promise; + * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way. + * + * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content + * with an ID of '1234': `GET + * https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user` Note, + * 'collaborator' is an example custom relationship type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity + * and source entity. + */ + async findSourcesForTarget( + parameters: Parameters.FindSourcesForTarget, + callback: Callback + ): Promise; /** - * Returns all target entities that have a particular relationship to the - * source entity. Note, relationships are one way. - * - * For example, the following method finds all users that have a 'collaborator' - * relationship to a piece of content with an ID of '1234': - * `GET https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user` - * Note, 'collaborator' is an example custom relationship type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view both the target entity and source entity. */ - async findSourcesForTarget(parameters: Parameters.FindSourcesForTarget, callback?: never): Promise; - async findSourcesForTarget(parameters: Parameters.FindSourcesForTarget, callback?: Callback): Promise { - const config = { + * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way. + * + * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content + * with an ID of '1234': `GET + * https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user` Note, + * 'collaborator' is an example custom relationship type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity + * and source entity. + */ + async findSourcesForTarget( + parameters: Parameters.FindSourcesForTarget, + callback?: never + ): Promise; + async findSourcesForTarget( + parameters: Parameters.FindSourcesForTarget, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/relation/${parameters.relationName}/to/${parameters.targetType}/${parameters.targetKey}/from/${parameters.sourceType}`, method: 'GET', params: { @@ -196,7 +225,7 @@ export class Relation { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'findSourcesForTarget' }); } diff --git a/src/api/search.ts b/src/api/search.ts index 03f590ea..344bde8f 100644 --- a/src/api/search.ts +++ b/src/api/search.ts @@ -5,94 +5,100 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Search { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Searches for content using the - * [Confluence Query Language (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) + * Searches for content using the [Confluence Query Language + * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) * * Example initial call: - * ``` - * https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&limit=25 - * ``` + * + * https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&limit=25 * * Example response: - * ``` - * { - * "results": [ - * { ... }, - * { ... }, - * ... - * { ... } - * ], - * "limit": 25, - * "size": 25, - * ... - * "_links": { - * "base": "", - * "context": "", - * "next": "/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg", - * "self": "" - * } - * } - * ``` - * - * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of results returned in each call. + * + * { + * "results": [ + * { ... }, + * { ... }, + * ... + * { ... } + * ], + * "limit": 25, + * "size": 25, + * ... + * "_links": { + * "base": "", + * "context": "", + * "next": "/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg", + * "self": "" + * } + * } + * + * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The + * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of + * results returned in each call. * * Example subsequent call (taken from example response): - * ``` - * https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg - * ``` + * + * https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg + * * The response to this will have a `prev` URL similar to the `next` in the example response. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the entities. Note, only entities that the user has - * permission to view will be returned. */ - async search(parameters: Parameters.Search, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only + * entities that the user has permission to view will be returned. + */ + async search( + parameters: Parameters.Search, + callback: Callback + ): Promise; /** - * Searches for content using the - * [Confluence Query Language (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) + * Searches for content using the [Confluence Query Language + * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) * * Example initial call: - * ``` - * https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&limit=25 - * ``` + * + * https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&limit=25 * * Example response: - * ``` - * { - * "results": [ - * { ... }, - * { ... }, - * ... - * { ... } - * ], - * "limit": 25, - * "size": 25, - * ... - * "_links": { - * "base": "", - * "context": "", - * "next": "/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg", - * "self": "" - * } - * } - * ``` - * - * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of results returned in each call. + * + * { + * "results": [ + * { ... }, + * { ... }, + * ... + * { ... } + * ], + * "limit": 25, + * "size": 25, + * ... + * "_links": { + * "base": "", + * "context": "", + * "next": "/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg", + * "self": "" + * } + * } + * + * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The + * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of + * results returned in each call. * * Example subsequent call (taken from example response): - * ``` - * https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg - * ``` + * + * https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg + * * The response to this will have a `prev` URL similar to the `next` in the example response. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to view the entities. Note, only entities that the user has - * permission to view will be returned. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only + * entities that the user has permission to view will be returned. + */ async search(parameters: Parameters.Search, callback?: never): Promise; - async search(parameters: Parameters.Search, callback?: Callback): Promise { - const config = { + async search( + parameters: Parameters.Search, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/search', method: 'GET', params: { @@ -102,27 +108,38 @@ export class Search { limit: parameters.limit, includeArchivedSpaces: parameters.includeArchivedSpaces, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'search' }); } /** - * Searches for users using user-specific queries from the - * [Confluence Query Language (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). + * Searches for users using user-specific queries from the [Confluence Query Language + * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). * - * Note that some user fields may be set to null depending on the user's privacy settings. - * These are: email, profilePicture, and displayName. */ - async userSearch(parameters: Parameters.UserSearch, callback: Callback): Promise; + * Note that some user fields may be set to null depending on the user's privacy settings. These are: email, + * profilePicture, and displayName. + */ + async userSearch( + parameters: Parameters.UserSearch, + callback: Callback + ): Promise; /** - * Searches for users using user-specific queries from the - * [Confluence Query Language (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). - * - * Note that some user fields may be set to null depending on the user's privacy settings. - * These are: email, profilePicture, and displayName. */ - async userSearch(parameters: Parameters.UserSearch, callback?: never): Promise; - async userSearch(parameters: Parameters.UserSearch, callback?: Callback): Promise { - const config = { + * Searches for users using user-specific queries from the [Confluence Query Language + * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). + * + * Note that some user fields may be set to null depending on the user's privacy settings. These are: email, + * profilePicture, and displayName. + */ + async userSearch( + parameters: Parameters.UserSearch, + callback?: never + ): Promise; + async userSearch( + parameters: Parameters.UserSearch, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/search/user', method: 'GET', params: { @@ -130,8 +147,8 @@ export class Search { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; - return this.client.sendRequest(config, callback, { methodName: 'userSearch' }); + return this.client.sendRequest(config, callback, { methodName: 'search' }); } } diff --git a/src/api/settings.ts b/src/api/settings.ts index 900b9f5a..674f7b2d 100644 --- a/src/api/settings.ts +++ b/src/api/settings.ts @@ -5,64 +5,116 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Settings { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns the look and feel settings for the site or a single space. This - * includes attributes such as the color scheme, padding, and border radius. + * Returns the look and feel settings for the site or a single space. This includes attributes such as the color + * scheme, padding, and border radius. * - * The look and feel settings for a space can be inherited from the global - * look and feel settings or provided by a theme. + * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a theme. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * None */ - async getLookAndFeelSettings(parameters: Parameters.GetLookAndFeelSettings | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ + async getLookAndFeelSettings( + parameters: Parameters.GetLookAndFeelSettings | undefined, + callback: Callback + ): Promise; /** - * Returns the look and feel settings for the site or a single space. This - * includes attributes such as the color scheme, padding, and border radius. + * Returns the look and feel settings for the site or a single space. This includes attributes such as the color + * scheme, padding, and border radius. * - * The look and feel settings for a space can be inherited from the global - * look and feel settings or provided by a theme. + * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a theme. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * None */ - async getLookAndFeelSettings(parameters?: Parameters.GetLookAndFeelSettings, callback?: never): Promise; - async getLookAndFeelSettings(parameters?: Parameters.GetLookAndFeelSettings, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ + async getLookAndFeelSettings( + parameters?: Parameters.GetLookAndFeelSettings, + callback?: never + ): Promise; + async getLookAndFeelSettings( + parameters?: Parameters.GetLookAndFeelSettings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/settings/lookandfeel', method: 'GET', params: { spaceKey: parameters?.spaceKey, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getLookAndFeelSettings' }); } /** - * Updates the look and feel settings for the site or for a single space. - * If custom settings exist, they are updated. If no custom settings exist, - * then a set of custom settings is created. + * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's + * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a + * space. Note, the default space settings are inherited from the current global settings. * - * Note, if a theme is selected for a space, the space look and feel settings - * are provided by the theme and cannot be overridden. + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async updateLookAndFeel( + parameters: Parameters.UpdateLookAndFeel | undefined, + callback: Callback + ): Promise; + /** + * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's + * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a + * space. Note, the default space settings are inherited from the current global settings. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async updateLookAndFeelSettings(parameters: Parameters.UpdateLookAndFeelSettings | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async updateLookAndFeel( + parameters?: Parameters.UpdateLookAndFeel, + callback?: never + ): Promise; + async updateLookAndFeel( + parameters?: Parameters.UpdateLookAndFeel, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/api/settings/lookandfeel', + method: 'PUT', + data: { + spaceKey: parameters?.spaceKey, + lookAndFeelType: parameters?.lookAndFeelType, + }, + }; + + return this.client.sendRequest(config, callback, { methodName: 'updateLookAndFeel' }); + } + /** - * Updates the look and feel settings for the site or for a single space. - * If custom settings exist, they are updated. If no custom settings exist, - * then a set of custom settings is created. - * - * Note, if a theme is selected for a space, the space look and feel settings - * are provided by the theme and cannot be overridden. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async updateLookAndFeelSettings(parameters?: Parameters.UpdateLookAndFeelSettings, callback?: never): Promise; - async updateLookAndFeelSettings(parameters?: Parameters.UpdateLookAndFeelSettings, callback?: Callback): Promise { - const config = { + * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated. + * If no custom settings exist, then a set of custom settings is created. + * + * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be + * overridden. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async updateLookAndFeelSettings( + parameters: Parameters.UpdateLookAndFeelSettings | undefined, + callback: Callback + ): Promise; + /** + * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated. + * If no custom settings exist, then a set of custom settings is created. + * + * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be + * overridden. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async updateLookAndFeelSettings( + parameters?: Parameters.UpdateLookAndFeelSettings, + callback?: never + ): Promise; + async updateLookAndFeelSettings( + parameters?: Parameters.UpdateLookAndFeelSettings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/settings/lookandfeel/custom', method: 'POST', params: { @@ -76,90 +128,102 @@ export class Settings { content: parameters?.content, bordersAndDividers: parameters?.bordersAndDividers, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateLookAndFeelSettings' }); } /** - * Resets the custom look and feel settings for the site or a single space. - * This changes the values of the custom settings to be the same as the - * default settings. It does not change which settings (default or custom) - * are selected. Note, the default space settings are inherited from the - * current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async resetLookAndFeelSettings(parameters: Parameters.ResetLookAndFeelSettings | undefined, callback: Callback): Promise; + * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom + * settings to be the same as the default settings. It does not change which settings (default or custom) are + * selected. Note, the default space settings are inherited from the current global settings. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async resetLookAndFeelSettings( + parameters: Parameters.ResetLookAndFeelSettings | undefined, + callback: Callback + ): Promise; /** - * Resets the custom look and feel settings for the site or a single space. - * This changes the values of the custom settings to be the same as the - * default settings. It does not change which settings (default or custom) - * are selected. Note, the default space settings are inherited from the - * current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async resetLookAndFeelSettings(parameters?: Parameters.ResetLookAndFeelSettings, callback?: never): Promise; - async resetLookAndFeelSettings(parameters?: Parameters.ResetLookAndFeelSettings, callback?: Callback): Promise { - const config = { + * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom + * settings to be the same as the default settings. It does not change which settings (default or custom) are + * selected. Note, the default space settings are inherited from the current global settings. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async resetLookAndFeelSettings( + parameters?: Parameters.ResetLookAndFeelSettings, + callback?: never + ): Promise; + async resetLookAndFeelSettings( + parameters?: Parameters.ResetLookAndFeelSettings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/settings/lookandfeel/custom', method: 'DELETE', params: { spaceKey: parameters?.spaceKey, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'resetLookAndFeelSettings' }); } /** - * Sets the look and feel settings to either the default settings or the - * custom settings, for the site or a single space. Note, the default - * space settings are inherited from the current global settings. + * Sets the look and feel settings to either the default settings or the custom settings, for the site or a single + * space. Note, the default space settings are inherited from the current global settings. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async setLookAndFeelSettings(parameters: Parameters.SetLookAndFeelSettings | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async setLookAndFeelSettings( + parameters: Parameters.SetLookAndFeelSettings | undefined, + callback: Callback + ): Promise; /** - * Sets the look and feel settings to either the default settings or the - * custom settings, for the site or a single space. Note, the default - * space settings are inherited from the current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async setLookAndFeelSettings(parameters?: Parameters.SetLookAndFeelSettings, callback?: never): Promise; - async setLookAndFeelSettings(parameters?: Parameters.SetLookAndFeelSettings, callback?: Callback): Promise { - const config = { + * Sets the look and feel settings to either the default settings or the custom settings, for the site or a single + * space. Note, the default space settings are inherited from the current global settings. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async setLookAndFeelSettings( + parameters?: Parameters.SetLookAndFeelSettings, + callback?: never + ): Promise; + async setLookAndFeelSettings( + parameters?: Parameters.SetLookAndFeelSettings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/settings/lookandfeel/selected', method: 'PUT', params: { spaceKey: parameters?.spaceKey, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'setLookAndFeelSettings' }); } /** - * Returns the system information for the Confluence Cloud tenant. This - * information is used by Atlassian. + * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getSystemInfo(callback: Callback): Promise; /** - * Returns the system information for the Confluence Cloud tenant. This - * information is used by Atlassian. + * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getSystemInfo(callback?: never): Promise; async getSystemInfo(callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/settings/systemInfo', method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getSystemInfo' }); } diff --git a/src/api/space.ts b/src/api/space.ts index 6943ab69..2170ac5a 100644 --- a/src/api/space.ts +++ b/src/api/space.ts @@ -5,28 +5,29 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Space { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns all spaces. The returned spaces are ordered alphabetically in - * ascending order by space key. + * Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). - * Note, the returned list will only contain spaces that the current user - * has permission to view. */ - async getSpaces(parameters: Parameters.GetSpaces | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Note, the returned list will only contain spaces that the current user has + * permission to view. + */ + async getSpaces( + parameters: Parameters.GetSpaces | undefined, + callback: Callback + ): Promise; /** - * Returns all spaces. The returned spaces are ordered alphabetically in - * ascending order by space key. + * Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). - * Note, the returned list will only contain spaces that the current user - * has permission to view. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). Note, the returned list will only contain spaces that the current user has + * permission to view. + */ async getSpaces(parameters?: Parameters.GetSpaces, callback?: never): Promise; async getSpaces(parameters?: Parameters.GetSpaces, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/space', method: 'GET', params: { @@ -40,27 +41,28 @@ export class Space { start: parameters?.start, limit: parameters?.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getSpaces' }); } /** - * Creates a new space. Note, currently you cannot set space labels when - * creating a space. + * Creates a new space. Note, currently you cannot set space labels when creating a space. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Create Space(s)' global permission. */ - async createSpace(parameters: Parameters.CreateSpace | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. + */ + async createSpace( + parameters: Parameters.CreateSpace | undefined, + callback: Callback + ): Promise; /** - * Creates a new space. Note, currently you cannot set space labels when - * creating a space. + * Creates a new space. Note, currently you cannot set space labels when creating a space. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Create Space(s)' global permission. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. + */ async createSpace(parameters?: Parameters.CreateSpace, callback?: never): Promise; async createSpace(parameters?: Parameters.CreateSpace, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/space', method: 'POST', data: { @@ -69,31 +71,35 @@ export class Space { description: parameters?.description, permissions: parameters?.permissions, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createSpace' }); } /** - * Creates a new space that is only visible to the creator. This method is - * the same as the [Create space](#api-space-post) method with permissions - * set to the current user only. Note, currently you cannot set space + * Creates a new space that is only visible to the creator. This method is the same as the [Create + * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space * labels when creating a space. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Create Space(s)' global permission. */ - async createPrivateSpace(parameters: Parameters.CreatePrivateSpace | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. + */ + async createPrivateSpace( + parameters: Parameters.CreatePrivateSpace | undefined, + callback: Callback + ): Promise; /** - * Creates a new space that is only visible to the creator. This method is - * the same as the [Create space](#api-space-post) method with permissions - * set to the current user only. Note, currently you cannot set space + * Creates a new space that is only visible to the creator. This method is the same as the [Create + * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space * labels when creating a space. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Create Space(s)' global permission. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. + */ async createPrivateSpace(parameters?: Parameters.CreatePrivateSpace, callback?: never): Promise; - async createPrivateSpace(parameters?: Parameters.CreatePrivateSpace, callback?: Callback): Promise { - const config = { + async createPrivateSpace( + parameters?: Parameters.CreatePrivateSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/space/_private', method: 'POST', data: { @@ -101,30 +107,28 @@ export class Space { name: parameters?.name, description: parameters?.description, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createPrivateSpace' }); } /** - * Returns a space. This includes information like the name, description, - * and permissions, but not the content in the space. + * Returns a space. This includes information like the name, description, and permissions, but not the content in the space. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. + */ async getSpace(parameters: Parameters.GetSpace, callback: Callback): Promise; /** - * Returns a space. This includes information like the name, description, - * and permissions, but not the content in the space. + * Returns a space. This includes information like the name, description, and permissions, but not the content in the space. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. + */ async getSpace(parameters: Parameters.GetSpace, callback?: never): Promise; async getSpace(parameters: Parameters.GetSpace, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getSpace' }); } @@ -132,25 +136,23 @@ export class Space { /** * Updates the name, description, or homepage of a space. * - * - For security reasons, permissions cannot be updated via the API and - * must be changed via the user interface instead. - * - Currently you cannot set space labels when updating a space. + * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead. + * - Currently you cannot set space labels when updating a space. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async updateSpace(parameters: Parameters.UpdateSpace, callback: Callback): Promise; /** * Updates the name, description, or homepage of a space. * - * - For security reasons, permissions cannot be updated via the API and - * must be changed via the user interface instead. - * - Currently you cannot set space labels when updating a space. + * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead. + * - Currently you cannot set space labels when updating a space. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async updateSpace(parameters: Parameters.UpdateSpace, callback?: never): Promise; async updateSpace(parameters: Parameters.UpdateSpace, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}`, method: 'PUT', data: { @@ -158,56 +160,66 @@ export class Space { description: parameters.description, homepage: parameters.homepage, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateSpace' }); } /** - * Deletes a space. Note, the space will be deleted in a long running task. - * Therefore, the space may not be deleted yet when this method has - * returned. Clients should poll the status link that is returned in the - * response until the task completes. + * Deletes a space. Note, the space will be deleted in a long running task. Therefore, the space may not be deleted + * yet when this method has returned. Clients should poll the status link that is returned in the response until the + * task completes. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async deleteSpace(parameters: Parameters.DeleteSpace, callback: Callback): Promise; /** - * Deletes a space. Note, the space will be deleted in a long running task. - * Therefore, the space may not be deleted yet when this method has - * returned. Clients should poll the status link that is returned in the - * response until the task completes. + * Deletes a space. Note, the space will be deleted in a long running task. Therefore, the space may not be deleted + * yet when this method has returned. Clients should poll the status link that is returned in the response until the + * task completes. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async deleteSpace(parameters: Parameters.DeleteSpace, callback?: never): Promise; - async deleteSpace(parameters: Parameters.DeleteSpace, callback?: Callback): Promise { - const config = { + async deleteSpace( + parameters: Parameters.DeleteSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'deleteSpace' }); } /** - * Returns all content in a space. The returned content is grouped by type - * (pages then blogposts), then ordered by content ID in ascending order. + * Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by + * content ID in ascending order. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space. Note, the returned list will only - * contain content that the current user has permission to view. */ - async getContentForSpace(parameters: Parameters.GetContentForSpace, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the + * returned list will only contain content that the current user has permission to view. + */ + async getContentForSpace( + parameters: Parameters.GetContentForSpace, + callback: Callback + ): Promise; /** - * Returns all content in a space. The returned content is grouped by type - * (pages then blogposts), then ordered by content ID in ascending order. + * Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by + * content ID in ascending order. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space. Note, the returned list will only - * contain content that the current user has permission to view. */ - async getContentForSpace(parameters: Parameters.GetContentForSpace, callback?: never): Promise; - async getContentForSpace(parameters: Parameters.GetContentForSpace, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the + * returned list will only contain content that the current user has permission to view. + */ + async getContentForSpace( + parameters: Parameters.GetContentForSpace, + callback?: never + ): Promise; + async getContentForSpace( + parameters: Parameters.GetContentForSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/content`, method: 'GET', params: { @@ -215,29 +227,36 @@ export class Space { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentForSpace' }); } /** - * Returns all content of a given type, in a space. The returned content is - * ordered by content ID in ascending order. + * Returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space. Note, the returned list will only - * contain content that the current user has permission to view. */ - async getContentByTypeForSpace(parameters: Parameters.GetContentByTypeForSpace, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the + * returned list will only contain content that the current user has permission to view. + */ + async getContentByTypeForSpace( + parameters: Parameters.GetContentByTypeForSpace, + callback: Callback + ): Promise; /** - * Returns all content of a given type, in a space. The returned content is - * ordered by content ID in ascending order. + * Returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space. Note, the returned list will only - * contain content that the current user has permission to view. */ - async getContentByTypeForSpace(parameters: Parameters.GetContentByTypeForSpace, callback?: never): Promise; - async getContentByTypeForSpace(parameters: Parameters.GetContentByTypeForSpace, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the + * returned list will only contain content that the current user has permission to view. + */ + async getContentByTypeForSpace( + parameters: Parameters.GetContentByTypeForSpace, + callback?: never + ): Promise; + async getContentByTypeForSpace( + parameters: Parameters.GetContentByTypeForSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/content/${parameters.type}`, method: 'GET', params: { @@ -245,7 +264,7 @@ export class Space { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentByTypeForSpace' }); } diff --git a/src/api/spacePermissions.ts b/src/api/spacePermissions.ts index 067966d1..dd73d895 100644 --- a/src/api/spacePermissions.ts +++ b/src/api/spacePermissions.ts @@ -5,32 +5,36 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class SpacePermissions { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Adds new permission to space. * - * If the permission to be added is a group permission, the group can be identified - * by its group name or group id. + * If the permission to be added is a group permission, the group can be identified by its group name or group id. * * Note: Apps cannot access this REST resource - including when utilizing user impersonation. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async addPermission(parameters: Parameters.AddPermission, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async addPermission( + parameters: Parameters.AddPermission, + callback: Callback + ): Promise; /** * Adds new permission to space. * - * If the permission to be added is a group permission, the group can be identified - * by its group name or group id. + * If the permission to be added is a group permission, the group can be identified by its group name or group id. * * Note: Apps cannot access this REST resource - including when utilizing user impersonation. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async addPermission(parameters: Parameters.AddPermission, callback?: never): Promise; - async addPermission(parameters: Parameters.AddPermission, callback?: Callback): Promise { - const config = { + async addPermission( + parameters: Parameters.AddPermission, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/permission`, method: 'POST', data: { @@ -39,34 +43,34 @@ export class SpacePermissions { operation: parameters.operation, _links: parameters._links, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'addPermission' }); } /** - * Removes a space permission. Note that removing Read Space permission for a user or group will remove all - * the space permissions for that user or group. + * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space + * permissions for that user or group. * * Note: Apps cannot access this REST resource - including when utilizing user impersonation. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async removePermission(parameters: Parameters.RemovePermission, callback: Callback): Promise; /** - * Removes a space permission. Note that removing Read Space permission for a user or group will remove all - * the space permissions for that user or group. + * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space + * permissions for that user or group. * * Note: Apps cannot access this REST resource - including when utilizing user impersonation. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async removePermission(parameters: Parameters.RemovePermission, callback?: never): Promise; async removePermission(parameters: Parameters.RemovePermission, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/permission/${parameters.id}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removePermission' }); } diff --git a/src/api/spaceProperties.ts b/src/api/spaceProperties.ts index cd78e350..f9cd80fd 100644 --- a/src/api/spaceProperties.ts +++ b/src/api/spaceProperties.ts @@ -5,20 +5,31 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class SpaceProperties { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns all properties for the given space. Space properties are a key-value storage associated with a space. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. */ - async getSpaceProperties(parameters: Parameters.GetSpaceProperties, callback: Callback): Promise; + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. + */ + async getSpaceProperties( + parameters: Parameters.GetSpaceProperties, + callback: Callback + ): Promise; /** * Returns all properties for the given space. Space properties are a key-value storage associated with a space. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. */ - async getSpaceProperties(parameters: Parameters.GetSpaceProperties, callback?: never): Promise; - async getSpaceProperties(parameters: Parameters.GetSpaceProperties, callback?: Callback): Promise { - const config = { + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. + */ + async getSpaceProperties( + parameters: Parameters.GetSpaceProperties, + callback?: never + ): Promise; + async getSpaceProperties( + parameters: Parameters.GetSpaceProperties, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/property`, method: 'GET', params: { @@ -26,7 +37,7 @@ export class SpaceProperties { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getSpaceProperties' }); } @@ -34,24 +45,33 @@ export class SpaceProperties { /** * Creates a new space property. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: - * ‘Admin’ permission for the space. */ - async createSpaceProperty(parameters: Parameters.CreateSpaceProperty, callback: Callback): Promise; + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. + */ + async createSpaceProperty( + parameters: Parameters.CreateSpaceProperty, + callback: Callback + ): Promise; /** * Creates a new space property. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: - * ‘Admin’ permission for the space. */ - async createSpaceProperty(parameters: Parameters.CreateSpaceProperty, callback?: never): Promise; - async createSpaceProperty(parameters: Parameters.CreateSpaceProperty, callback?: Callback): Promise { - const config = { + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. + */ + async createSpaceProperty( + parameters: Parameters.CreateSpaceProperty, + callback?: never + ): Promise; + async createSpaceProperty( + parameters: Parameters.CreateSpaceProperty, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/property`, method: 'POST', data: { key: parameters.key, value: parameters.value, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createSpaceProperty' }); } @@ -59,76 +79,101 @@ export class SpaceProperties { /** * Returns a space property. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. */ - async getSpaceProperty(parameters: Parameters.GetSpaceProperty, callback: Callback): Promise; + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. + */ + async getSpaceProperty( + parameters: Parameters.GetSpaceProperty, + callback: Callback + ): Promise; /** * Returns a space property. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. */ - async getSpaceProperty(parameters: Parameters.GetSpaceProperty, callback?: never): Promise; - async getSpaceProperty(parameters: Parameters.GetSpaceProperty, callback?: Callback): Promise { - const config = { + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. + */ + async getSpaceProperty( + parameters: Parameters.GetSpaceProperty, + callback?: never + ): Promise; + async getSpaceProperty( + parameters: Parameters.GetSpaceProperty, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`, method: 'GET', params: { expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getSpaceProperty' }); } /** - * Creates a new space property. This is the same as `POST - * /api/space/{spaceKey}/property` but the key for the property is passed as a - * path parameter, rather than in the request body. + * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the + * property is passed as a path parameter, rather than in the request body. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: - * ‘Admin’ permission for the space. */ - async createSpacePropertyForKey(parameters: Parameters.CreateSpacePropertyForKey, callback: Callback): Promise; + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. + */ + async createSpacePropertyForKey( + parameters: Parameters.CreateSpacePropertyForKey, + callback: Callback + ): Promise; /** - * Creates a new space property. This is the same as `POST - * /api/space/{spaceKey}/property` but the key for the property is passed as a - * path parameter, rather than in the request body. + * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the + * property is passed as a path parameter, rather than in the request body. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: - * ‘Admin’ permission for the space. */ - async createSpacePropertyForKey(parameters: Parameters.CreateSpacePropertyForKey, callback?: never): Promise; - async createSpacePropertyForKey(parameters: Parameters.CreateSpacePropertyForKey, callback?: Callback): Promise { - const config = { + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. + */ + async createSpacePropertyForKey( + parameters: Parameters.CreateSpacePropertyForKey, + callback?: never + ): Promise; + async createSpacePropertyForKey( + parameters: Parameters.CreateSpacePropertyForKey, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`, method: 'POST', data: { value: parameters.value, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createSpacePropertyForKey' }); } /** - * Updates a space property. Note, you cannot update the key of a space - * property, only the value. + * Updates a space property. Note, you cannot update the key of a space property, only the value. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: - * ‘Admin’ permission for the space. */ - async updateSpaceProperty(parameters: Parameters.UpdateSpaceProperty, callback: Callback): Promise; + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. + */ + async updateSpaceProperty( + parameters: Parameters.UpdateSpaceProperty, + callback: Callback + ): Promise; /** - * Updates a space property. Note, you cannot update the key of a space - * property, only the value. + * Updates a space property. Note, you cannot update the key of a space property, only the value. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: - * ‘Admin’ permission for the space. */ - async updateSpaceProperty(parameters: Parameters.UpdateSpaceProperty, callback?: never): Promise; - async updateSpaceProperty(parameters: Parameters.UpdateSpaceProperty, callback?: Callback): Promise { - const config = { + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. + */ + async updateSpaceProperty( + parameters: Parameters.UpdateSpaceProperty, + callback?: never + ): Promise; + async updateSpaceProperty( + parameters: Parameters.UpdateSpaceProperty, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`, method: 'PUT', data: { value: parameters.value, version: parameters.version, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateSpaceProperty' }); } @@ -136,20 +181,23 @@ export class SpaceProperties { /** * Deletes a space property. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: - * ‘Admin’ permission for the space. */ + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. + */ async deleteSpaceProperty(parameters: Parameters.DeleteSpaceProperty, callback: Callback): Promise; /** * Deletes a space property. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: - * ‘Admin’ permission for the space. */ + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. + */ async deleteSpaceProperty(parameters: Parameters.DeleteSpaceProperty, callback?: never): Promise; - async deleteSpaceProperty(parameters: Parameters.DeleteSpaceProperty, callback?: Callback): Promise { - const config = { + async deleteSpaceProperty( + parameters: Parameters.DeleteSpaceProperty, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'deleteSpaceProperty' }); } diff --git a/src/api/spaceSettings.ts b/src/api/spaceSettings.ts index 29d71548..405b5f14 100644 --- a/src/api/spaceSettings.ts +++ b/src/api/spaceSettings.ts @@ -5,53 +5,67 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class SpaceSettings { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns the settings of a space. Currently only the - * `routeOverrideEnabled` setting can be returned. + * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space. */ - async getSpaceSettings(parameters: Parameters.GetSpaceSettings, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. + */ + async getSpaceSettings( + parameters: Parameters.GetSpaceSettings, + callback: Callback + ): Promise; /** - * Returns the settings of a space. Currently only the - * `routeOverrideEnabled` setting can be returned. + * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'View' permission for the space. */ - async getSpaceSettings(parameters: Parameters.GetSpaceSettings, callback?: never): Promise; - async getSpaceSettings(parameters: Parameters.GetSpaceSettings, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. + */ + async getSpaceSettings( + parameters: Parameters.GetSpaceSettings, + callback?: never + ): Promise; + async getSpaceSettings( + parameters: Parameters.GetSpaceSettings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/settings`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getSpaceSettings' }); } /** - * Updates the settings for a space. Currently only the - * `routeOverrideEnabled` setting can be updated. + * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async updateSpaceSettings(parameters: Parameters.UpdateSpaceSettings, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async updateSpaceSettings( + parameters: Parameters.UpdateSpaceSettings, + callback: Callback + ): Promise; /** - * Updates the settings for a space. Currently only the - * `routeOverrideEnabled` setting can be updated. + * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ - async updateSpaceSettings(parameters: Parameters.UpdateSpaceSettings, callback?: never): Promise; - async updateSpaceSettings(parameters: Parameters.UpdateSpaceSettings, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ + async updateSpaceSettings( + parameters: Parameters.UpdateSpaceSettings, + callback?: never + ): Promise; + async updateSpaceSettings( + parameters: Parameters.UpdateSpaceSettings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/settings`, method: 'PUT', data: { routeOverrideEnabled: parameters.routeOverrideEnabled, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateSpaceSettings' }); } diff --git a/src/api/template.ts b/src/api/template.ts index 9a991a54..43c3ca68 100644 --- a/src/api/template.ts +++ b/src/api/template.ts @@ -5,24 +5,33 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Template { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Creates a new content template. Note, blueprint templates cannot be created via the REST API. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space to create a space template or 'Confluence Administrator' - * global permission to create a global template. */ - async createContentTemplate(parameters: Parameters.CreateContentTemplate | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a + * space template or 'Confluence Administrator' global permission to create a global template. + */ + async createContentTemplate( + parameters: Parameters.CreateContentTemplate | undefined, + callback: Callback + ): Promise; /** * Creates a new content template. Note, blueprint templates cannot be created via the REST API. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space to create a space template or 'Confluence Administrator' - * global permission to create a global template. */ - async createContentTemplate(parameters?: Parameters.CreateContentTemplate, callback?: never): Promise; - async createContentTemplate(parameters?: Parameters.CreateContentTemplate, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a + * space template or 'Confluence Administrator' global permission to create a global template. + */ + async createContentTemplate( + parameters?: Parameters.CreateContentTemplate, + callback?: never + ): Promise; + async createContentTemplate( + parameters?: Parameters.CreateContentTemplate, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/template', method: 'POST', data: { @@ -33,29 +42,36 @@ export class Template { labels: parameters?.labels, space: parameters?.space, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'createContentTemplate' }); } /** - * Updates a content template. Note, blueprint templates cannot be updated - * via the REST API. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space to create a space template or 'Confluence Administrator' - * global permission to create a global template. */ - async updateContentTemplate(parameters: Parameters.UpdateContentTemplate | undefined, callback: Callback): Promise; + * Updates a content template. Note, blueprint templates cannot be updated via the REST API. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a + * space template or 'Confluence Administrator' global permission to create a global template. + */ + async updateContentTemplate( + parameters: Parameters.UpdateContentTemplate | undefined, + callback: Callback + ): Promise; /** - * Updates a content template. Note, blueprint templates cannot be updated - * via the REST API. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space to create a space template or 'Confluence Administrator' - * global permission to create a global template. */ - async updateContentTemplate(parameters?: Parameters.UpdateContentTemplate, callback?: never): Promise; - async updateContentTemplate(parameters?: Parameters.UpdateContentTemplate, callback?: Callback): Promise { - const config = { + * Updates a content template. Note, blueprint templates cannot be updated via the REST API. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a + * space template or 'Confluence Administrator' global permission to create a global template. + */ + async updateContentTemplate( + parameters?: Parameters.UpdateContentTemplate, + callback?: never + ): Promise; + async updateContentTemplate( + parameters?: Parameters.UpdateContentTemplate, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/template', method: 'PUT', data: { @@ -67,33 +83,44 @@ export class Template { labels: parameters?.labels, space: parameters?.space, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'updateContentTemplate' }); } /** - * Returns all templates provided by blueprints. Use this method to retrieve - * all global blueprint templates or all blueprint templates in a space. - * - * Note, all global blueprints are inherited by each space. Space blueprints - * can be customised without affecting the global blueprints. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getBlueprintTemplates(parameters: Parameters.GetBlueprintTemplates | undefined, callback: Callback): Promise; + * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all + * blueprint templates in a space. + * + * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the + * global blueprints. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getBlueprintTemplates( + parameters: Parameters.GetBlueprintTemplates | undefined, + callback: Callback + ): Promise; /** - * Returns all templates provided by blueprints. Use this method to retrieve - * all global blueprint templates or all blueprint templates in a space. - * - * Note, all global blueprints are inherited by each space. Space blueprints - * can be customised without affecting the global blueprints. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getBlueprintTemplates(parameters?: Parameters.GetBlueprintTemplates, callback?: never): Promise; - async getBlueprintTemplates(parameters?: Parameters.GetBlueprintTemplates, callback?: Callback): Promise { - const config = { + * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all + * blueprint templates in a space. + * + * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the + * global blueprints. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getBlueprintTemplates( + parameters?: Parameters.GetBlueprintTemplates, + callback?: never + ): Promise; + async getBlueprintTemplates( + parameters?: Parameters.GetBlueprintTemplates, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/template/blueprint', method: 'GET', params: { @@ -102,29 +129,36 @@ export class Template { limit: parameters?.limit, expand: parameters?.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getBlueprintTemplates' }); } /** - * Returns all content templates. Use this method to retrieve all global - * content templates or all content templates in a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space to view space templates and 'Confluence - * Administrator' global permission to view global templates. */ - async getContentTemplates(parameters: Parameters.GetContentTemplates | undefined, callback: Callback): Promise; + * Returns all content templates. Use this method to retrieve all global content templates or all content templates in a space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to view + * space templates and 'Confluence Administrator' global permission to view global templates. + */ + async getContentTemplates( + parameters: Parameters.GetContentTemplates | undefined, + callback: Callback + ): Promise; /** - * Returns all content templates. Use this method to retrieve all global - * content templates or all content templates in a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space to view space templates and 'Confluence - * Administrator' global permission to view global templates. */ - async getContentTemplates(parameters?: Parameters.GetContentTemplates, callback?: never): Promise; - async getContentTemplates(parameters?: Parameters.GetContentTemplates, callback?: Callback): Promise { - const config = { + * Returns all content templates. Use this method to retrieve all global content templates or all content templates in a space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to view + * space templates and 'Confluence Administrator' global permission to view global templates. + */ + async getContentTemplates( + parameters?: Parameters.GetContentTemplates, + callback?: never + ): Promise; + async getContentTemplates( + parameters?: Parameters.GetContentTemplates, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/template/page', method: 'GET', params: { @@ -133,67 +167,72 @@ export class Template { limit: parameters?.limit, expand: parameters?.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentTemplates' }); } /** - * Returns a content template. This includes information about template, - * like the name, the space or blueprint that the template is in, the body - * of the template, and more. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space to view space templates and 'Confluence - * Administrator' global permission to view global templates. */ - async getContentTemplate(parameters: Parameters.GetContentTemplate, callback: Callback): Promise; + * Returns a content template. This includes information about template, like the name, the space or blueprint that + * the template is in, the body of the template, and more. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to view + * space templates and 'Confluence Administrator' global permission to view global templates. + */ + async getContentTemplate( + parameters: Parameters.GetContentTemplate, + callback: Callback + ): Promise; /** - * Returns a content template. This includes information about template, - * like the name, the space or blueprint that the template is in, the body - * of the template, and more. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space to view space templates and 'Confluence - * Administrator' global permission to view global templates. */ - async getContentTemplate(parameters: Parameters.GetContentTemplate, callback?: never): Promise; - async getContentTemplate(parameters: Parameters.GetContentTemplate, callback?: Callback): Promise { - const config = { + * Returns a content template. This includes information about template, like the name, the space or blueprint that + * the template is in, the body of the template, and more. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to view + * space templates and 'Confluence Administrator' global permission to view global templates. + */ + async getContentTemplate( + parameters: Parameters.GetContentTemplate, + callback?: never + ): Promise; + async getContentTemplate( + parameters: Parameters.GetContentTemplate, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/template/${parameters.contentTemplateId}`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getContentTemplate' }); } /** - * Deletes a template. This results in different actions depending on the - * type of template: + * Deletes a template. This results in different actions depending on the type of template: * * - If the template is a content template, it is deleted. - * - If the template is a modified space-level blueprint template, it reverts - * to the template inherited from the global-level blueprint template. - * - If the template is a modified global-level blueprint template, it reverts - * to the default global-level blueprint template. + * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the + * global-level blueprint template. + * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint template. * - * Note, unmodified blueprint templates cannot be deleted. */ + * Note, unmodified blueprint templates cannot be deleted. + */ async removeTemplate(parameters: Parameters.RemoveTemplate, callback: Callback): Promise; /** - * Deletes a template. This results in different actions depending on the - * type of template: + * Deletes a template. This results in different actions depending on the type of template: * * - If the template is a content template, it is deleted. - * - If the template is a modified space-level blueprint template, it reverts - * to the template inherited from the global-level blueprint template. - * - If the template is a modified global-level blueprint template, it reverts - * to the default global-level blueprint template. + * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the + * global-level blueprint template. + * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint template. * - * Note, unmodified blueprint templates cannot be deleted. */ + * Note, unmodified blueprint templates cannot be deleted. + */ async removeTemplate(parameters: Parameters.RemoveTemplate, callback?: never): Promise; async removeTemplate(parameters: Parameters.RemoveTemplate, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/template/${parameters.contentTemplateId}`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'removeTemplate' }); } diff --git a/src/api/themes.ts b/src/api/themes.ts index dc1cb7d4..a713e144 100644 --- a/src/api/themes.ts +++ b/src/api/themes.ts @@ -5,27 +5,32 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Themes { - constructor(private client: Client) { } + constructor(private client: Client) {} /** * Returns all themes, not including the default theme. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None */ - async getThemes(parameters: Parameters.GetThemes | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ + async getThemes( + parameters: Parameters.GetThemes | undefined, + callback: Callback + ): Promise; /** * Returns all themes, not including the default theme. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ async getThemes(parameters?: Parameters.GetThemes, callback?: never): Promise; async getThemes(parameters?: Parameters.GetThemes, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/settings/theme', method: 'GET', params: { start: parameters?.start, limit: parameters?.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getThemes' }); } @@ -33,113 +38,117 @@ export class Themes { /** * Returns the globally assigned theme. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ async getGlobalTheme(callback: Callback): Promise; /** * Returns the globally assigned theme. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ async getGlobalTheme(callback?: never): Promise; async getGlobalTheme(callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/settings/theme/selected', method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGlobalTheme' }); } /** - * Returns a theme. This includes information about the theme name, - * description, and icon. + * Returns a theme. This includes information about the theme name, description, and icon. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ async getTheme(parameters: Parameters.GetTheme, callback: Callback): Promise; /** - * Returns a theme. This includes information about the theme name, - * description, and icon. + * Returns a theme. This includes information about the theme name, description, and icon. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ async getTheme(parameters: Parameters.GetTheme, callback?: never): Promise; async getTheme(parameters: Parameters.GetTheme, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/settings/theme/${parameters.themeKey}`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getTheme' }); } /** - * Returns the theme selected for a space, if one is set. If no space - * theme is set, this means that the space is inheriting the global look - * and feel settings. + * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is + * inheriting the global look and feel settings. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. */ + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. + */ async getSpaceTheme(parameters: Parameters.GetSpaceTheme, callback: Callback): Promise; /** - * Returns the theme selected for a space, if one is set. If no space - * theme is set, this means that the space is inheriting the global look - * and feel settings. + * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is + * inheriting the global look and feel settings. * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. */ + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. + */ async getSpaceTheme(parameters: Parameters.GetSpaceTheme, callback?: never): Promise; - async getSpaceTheme(parameters: Parameters.GetSpaceTheme, callback?: Callback): Promise { - const config = { + async getSpaceTheme( + parameters: Parameters.GetSpaceTheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/theme`, method: 'GET', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getSpaceTheme' }); } /** - * Sets the theme for a space. Note, if you want to reset the space theme to - * the default Confluence theme, use the 'Reset space theme' method instead - * of this method. + * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the + * 'Reset space theme' method instead of this method. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async setSpaceTheme(parameters: Parameters.SetSpaceTheme, callback: Callback): Promise; /** - * Sets the theme for a space. Note, if you want to reset the space theme to - * the default Confluence theme, use the 'Reset space theme' method instead - * of this method. + * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the + * 'Reset space theme' method instead of this method. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async setSpaceTheme(parameters: Parameters.SetSpaceTheme, callback?: never): Promise; - async setSpaceTheme(parameters: Parameters.SetSpaceTheme, callback?: Callback): Promise { - const config = { + async setSpaceTheme( + parameters: Parameters.SetSpaceTheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/theme`, method: 'PUT', data: { themeKey: parameters.themeKey, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'setSpaceTheme' }); } /** - * Resets the space theme. This means that the space will inherit the - * global look and feel settings + * Resets the space theme. This means that the space will inherit the global look and feel settings * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async resetSpaceTheme(parameters: Parameters.ResetSpaceTheme, callback: Callback): Promise; /** - * Resets the space theme. This means that the space will inherit the - * global look and feel settings + * Resets the space theme. This means that the space will inherit the global look and feel settings * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Admin' permission for the space. */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ async resetSpaceTheme(parameters: Parameters.ResetSpaceTheme, callback?: never): Promise; async resetSpaceTheme(parameters: Parameters.ResetSpaceTheme, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: `/api/space/${parameters.spaceKey}/theme`, method: 'DELETE', - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'resetSpaceTheme' }); } diff --git a/src/api/users.ts b/src/api/users.ts index 08a4e58d..e3fceece 100644 --- a/src/api/users.ts +++ b/src/api/users.ts @@ -5,32 +5,32 @@ import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Users { - constructor(private client: Client) { } + constructor(private client: Client) {} /** - * Returns a user. This includes information about the user, such as the - * display name, account ID, profile picture, and more. The information returned may be - * restricted by the user's profile visibility settings. + * Returns a user. This includes information about the user, such as the display name, account ID, profile picture, + * and more. The information returned may be restricted by the user's profile visibility settings. * - * **Note:** to add, edit, or delete users in your organization, see the - * [user management REST API](/cloud/admin/user-management/about/). + * **Note:** to add, edit, or delete users in your organization, see the [user management REST + * API](/cloud/admin/user-management/about/). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getUser(parameters: Parameters.GetUser, callback: Callback): Promise; /** - * Returns a user. This includes information about the user, such as the - * display name, account ID, profile picture, and more. The information returned may be - * restricted by the user's profile visibility settings. + * Returns a user. This includes information about the user, such as the display name, account ID, profile picture, + * and more. The information returned may be restricted by the user's profile visibility settings. * - * **Note:** to add, edit, or delete users in your organization, see the - * [user management REST API](/cloud/admin/user-management/about/). + * **Note:** to add, edit, or delete users in your organization, see the [user management REST + * API](/cloud/admin/user-management/about/). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getUser(parameters: Parameters.GetUser, callback?: never): Promise; async getUser(parameters: Parameters.GetUser, callback?: Callback): Promise { - const config = { + const config: RequestConfig = { url: '/api/user', method: 'GET', params: { @@ -39,61 +39,76 @@ export class Users { accountId: parameters.accountId, expand: parameters.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getUser' }); } /** - * Returns information about how anonymous users are represented, like the - * profile picture and display name. + * Returns information about how anonymous users are represented, like the profile picture and display name. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getAnonymousUser(parameters: Parameters.GetAnonymousUser | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getAnonymousUser( + parameters: Parameters.GetAnonymousUser | undefined, + callback: Callback + ): Promise; /** - * Returns information about how anonymous users are represented, like the - * profile picture and display name. + * Returns information about how anonymous users are represented, like the profile picture and display name. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getAnonymousUser(parameters?: Parameters.GetAnonymousUser, callback?: never): Promise; - async getAnonymousUser(parameters?: Parameters.GetAnonymousUser, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getAnonymousUser( + parameters?: Parameters.GetAnonymousUser, + callback?: never + ): Promise; + async getAnonymousUser( + parameters?: Parameters.GetAnonymousUser, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/user/anonymous', method: 'GET', params: { expand: parameters?.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getAnonymousUser' }); } /** - * Returns the currently logged-in user. This includes information about - * the user, like the display name, userKey, account ID, profile picture, - * and more. + * Returns the currently logged-in user. This includes information about the user, like the display name, userKey, + * account ID, profile picture, and more. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getCurrentUser(parameters: Parameters.GetCurrentUser | undefined, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getCurrentUser( + parameters: Parameters.GetCurrentUser | undefined, + callback: Callback + ): Promise; /** - * Returns the currently logged-in user. This includes information about - * the user, like the display name, userKey, account ID, profile picture, - * and more. + * Returns the currently logged-in user. This includes information about the user, like the display name, userKey, + * account ID, profile picture, and more. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ async getCurrentUser(parameters?: Parameters.GetCurrentUser, callback?: never): Promise; - async getCurrentUser(parameters?: Parameters.GetCurrentUser, callback?: Callback): Promise { - const config = { + async getCurrentUser( + parameters?: Parameters.GetCurrentUser, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/user/current', method: 'GET', params: { expand: parameters?.expand, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getCurrentUser' }); } @@ -101,17 +116,28 @@ export class Users { /** * Returns the groups that a user is a member of. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupMembershipsForUser(parameters: Parameters.GetGroupMembershipsForUser, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupMembershipsForUser( + parameters: Parameters.GetGroupMembershipsForUser, + callback: Callback + ): Promise; /** * Returns the groups that a user is a member of. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getGroupMembershipsForUser(parameters: Parameters.GetGroupMembershipsForUser, callback?: never): Promise; - async getGroupMembershipsForUser(parameters: Parameters.GetGroupMembershipsForUser, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getGroupMembershipsForUser( + parameters: Parameters.GetGroupMembershipsForUser, + callback?: never + ): Promise; + async getGroupMembershipsForUser( + parameters: Parameters.GetGroupMembershipsForUser, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/user/memberof', method: 'GET', params: { @@ -121,7 +147,7 @@ export class Users { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getGroupMembershipsForUser' }); } @@ -129,17 +155,28 @@ export class Users { /** * Returns user details for the ids provided in request. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getBulkUserLookup(parameters: Parameters.GetBulkUserLookup, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getBulkUserLookup( + parameters: Parameters.GetBulkUserLookup, + callback: Callback + ): Promise; /** * Returns user details for the ids provided in request. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getBulkUserLookup(parameters: Parameters.GetBulkUserLookup, callback?: never): Promise; - async getBulkUserLookup(parameters: Parameters.GetBulkUserLookup, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getBulkUserLookup( + parameters: Parameters.GetBulkUserLookup, + callback?: never + ): Promise; + async getBulkUserLookup( + parameters: Parameters.GetBulkUserLookup, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/user/bulk', method: 'GET', params: { @@ -147,83 +184,118 @@ export class Users { expand: parameters.expand, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getBulkUserLookup' }); } /** - * Returns a user's email address. This API is only available to apps approved by - * Atlassian, according to these [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getPrivacyUnsafeUserEmail(parameters: Parameters.GetPrivacyUnsafeUserEmail, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getPrivacyUnsafeUserEmail( + parameters: Parameters.GetPrivacyUnsafeUserEmail, + callback: Callback + ): Promise; /** - * Returns a user's email address. This API is only available to apps approved by - * Atlassian, according to these [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getPrivacyUnsafeUserEmail(parameters: Parameters.GetPrivacyUnsafeUserEmail, callback?: never): Promise; - async getPrivacyUnsafeUserEmail(parameters: Parameters.GetPrivacyUnsafeUserEmail, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getPrivacyUnsafeUserEmail( + parameters: Parameters.GetPrivacyUnsafeUserEmail, + callback?: never + ): Promise; + async getPrivacyUnsafeUserEmail( + parameters: Parameters.GetPrivacyUnsafeUserEmail, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/user/email', method: 'GET', params: { accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getPrivacyUnsafeUserEmail' }); } /** - * Returns user email addresses for a set of accountIds. This API is only available to apps approved by - * Atlassian, according to these [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * Returns user email addresses for a set of accountIds. This API is only available to apps approved by Atlassian, + * according to these + * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). * * Any accounts which are not available will not be included in the result. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getPrivacyUnsafeUserEmailBulk(parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getPrivacyUnsafeUserEmailBulk( + parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, + callback: Callback + ): Promise; /** - * Returns user email addresses for a set of accountIds. This API is only available to apps approved by - * Atlassian, according to these [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * Returns user email addresses for a set of accountIds. This API is only available to apps approved by Atlassian, + * according to these + * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). * * Any accounts which are not available will not be included in the result. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * Permission to access the Confluence site ('Can use' global permission). */ - async getPrivacyUnsafeUserEmailBulk(parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, callback?: never): Promise; - async getPrivacyUnsafeUserEmailBulk(parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site + * ('Can use' global permission). + */ + async getPrivacyUnsafeUserEmailBulk( + parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, + callback?: never + ): Promise; + async getPrivacyUnsafeUserEmailBulk( + parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/user/email/bulk', method: 'GET', params: { accountId: parameters.accountId, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getPrivacyUnsafeUserEmailBulk' }); } /** - * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and username parameters can be specified. + * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and + * username parameters can be specified. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ - async getBulkUserMigration(parameters: Parameters.GetBulkUserMigration, callback: Callback): Promise; + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ + async getBulkUserMigration( + parameters: Parameters.GetBulkUserMigration, + callback: Callback + ): Promise; /** - * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and username parameters can be specified. + * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and + * username parameters can be specified. * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: - * 'Confluence Administrator' global permission if specifying a user, otherwise - * permission to access the Confluence site ('Can use' global permission). */ - async getBulkUserMigration(parameters: Parameters.GetBulkUserMigration, callback?: never): Promise; - async getBulkUserMigration(parameters: Parameters.GetBulkUserMigration, callback?: Callback): Promise { - const config = { + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ + async getBulkUserMigration( + parameters: Parameters.GetBulkUserMigration, + callback?: never + ): Promise; + async getBulkUserMigration( + parameters: Parameters.GetBulkUserMigration, + callback?: Callback, + ): Promise { + const config: RequestConfig = { url: '/api/user/bulk/migration', method: 'GET', params: { @@ -232,7 +304,7 @@ export class Users { start: parameters.start, limit: parameters.limit, }, - } as RequestConfig; + }; return this.client.sendRequest(config, callback, { methodName: 'getBulkUserMigration' }); } diff --git a/src/clients/baseClient.ts b/src/clients/baseClient.ts index ce7b97af..c0483a6f 100644 --- a/src/clients/baseClient.ts +++ b/src/clients/baseClient.ts @@ -72,8 +72,16 @@ export class BaseClient implements Client { } async sendRequest(requestConfig: RequestConfig, callback: never, telemetryData?: Partial): Promise; - async sendRequest(requestConfig: RequestConfig, callback: Callback, telemetryData?: Partial): Promise; - async sendRequest(requestConfig: RequestConfig, callback: Callback | never, telemetryData?: Partial): Promise { + async sendRequest( + requestConfig: RequestConfig, + callback: Callback, + telemetryData?: Partial + ): Promise; + async sendRequest( + requestConfig: RequestConfig, + callback: Callback | never, + telemetryData?: Partial, + ): Promise { const startDateTime = new Date(); const telemetry: Telemetry = { @@ -82,8 +90,8 @@ export class BaseClient implements Client { bodyExists: !!requestConfig.data, callbackUsed: !!callback, headersExists: !!requestConfig.headers, - libVersion: '1.0.0', - libVersionHash: 'a2c18f37c29299af8db8230ec35e59cd', + libVersion: '1.0.1', + libVersionHash: '152f5dc0f7ac734f8e8ee17d4a482462', methodName: telemetryData?.methodName || 'sendRequest', onErrorMiddlewareUsed: !!this.config.middlewares?.onError, onResponseMiddlewareUsed: !!this.config.middlewares?.onResponse, diff --git a/src/clients/client.ts b/src/clients/client.ts index d2dcbffb..1c0bd7b4 100644 --- a/src/clients/client.ts +++ b/src/clients/client.ts @@ -4,5 +4,9 @@ import type { RequestConfig } from '../requestConfig'; export interface Client { sendRequest(requestConfig: RequestConfig, callback?: never, telemetryData?: Partial): Promise; - sendRequest(requestConfig: RequestConfig, callback?: Callback, telemetryData?: Partial): Promise; + sendRequest( + requestConfig: RequestConfig, + callback?: Callback, + telemetryData?: Partial + ): Promise; } diff --git a/src/services/authenticationService/authentications/createJWTAuthentication.ts b/src/services/authenticationService/authentications/createJWTAuthentication.ts index dd4865dc..868be09d 100644 --- a/src/services/authenticationService/authentications/createJWTAuthentication.ts +++ b/src/services/authenticationService/authentications/createJWTAuthentication.ts @@ -24,7 +24,7 @@ export function createJWTAuthentication( exp: expire, }; - const token = jwt.encode(tokenData, authenticationData.secret); + const token = jwt.encodeSymmetric(tokenData, authenticationData.secret); return `JWT ${token}`; }