From 32134b0dc2c65e8e97dade910ecf91d537e0c80b Mon Sep 17 00:00:00 2001 From: Vladislav Tupikin Date: Fri, 10 Dec 2021 15:09:17 +0300 Subject: [PATCH 1/2] telemetry data removed from endpoints --- package-lock.json | 256 +++++++++++------------ package.json | 6 +- src/api/audit.ts | 12 +- src/api/content.ts | 20 +- src/api/contentAttachments.ts | 12 +- src/api/contentBody.ts | 2 +- src/api/contentChildrenAndDescendants.ts | 14 +- src/api/contentComments.ts | 2 +- src/api/contentLabels.ts | 8 +- src/api/contentMacroBody.ts | 2 +- src/api/contentPermissions.ts | 2 +- src/api/contentProperties.ts | 12 +- src/api/contentRestrictions.ts | 30 +-- src/api/contentVersions.ts | 8 +- src/api/contentWatches.ts | 24 +-- src/api/dynamicModules.ts | 6 +- src/api/experimental.ts | 10 +- src/api/group.ts | 31 +-- src/api/inlineTasks.ts | 6 +- src/api/labelInfo.ts | 2 +- src/api/longRunningTask.ts | 4 +- src/api/relation.ts | 10 +- src/api/search.ts | 10 +- src/api/settings.ts | 12 +- src/api/space.ts | 18 +- src/api/spacePermissions.ts | 6 +- src/api/spaceProperties.ts | 12 +- src/api/spaceSettings.ts | 4 +- src/api/template.ts | 12 +- src/api/themes.ts | 12 +- src/api/users.ts | 16 +- 31 files changed, 292 insertions(+), 289 deletions(-) diff --git a/package-lock.json b/package-lock.json index acf8d3ec..210a024c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "confluence.js", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -631,15 +631,15 @@ } }, "@jest/core": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.3.tgz", - "integrity": "sha512-V9ms3zSxUHxh1E/ZLAiXF7SLejsdFnjWTFizWotMOWvjho0lW5kSjZymhQSodNW0T0ZMQRiha7f8+NcFVm3hJQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.4.tgz", + "integrity": "sha512-xBNPVqYAdAiAMXnb4ugx9Cdmr0S52lBsLbQMR/sGBRO0810VSPKiuSDtuup6qdkK1e9vxbv3KK3IAP1QFAp8mw==", "dev": true, "requires": { "@jest/console": "^27.4.2", - "@jest/reporters": "^27.4.2", + "@jest/reporters": "^27.4.4", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", @@ -648,15 +648,15 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.3", - "jest-haste-map": "^27.4.2", + "jest-config": "^27.4.4", + "jest-haste-map": "^27.4.4", "jest-message-util": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-resolve-dependencies": "^27.4.2", - "jest-runner": "^27.4.3", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-resolve-dependencies": "^27.4.4", + "jest-runner": "^27.4.4", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "jest-watcher": "^27.4.2", @@ -667,9 +667,9 @@ } }, "@jest/environment": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.2.tgz", - "integrity": "sha512-uSljKxh/rGlHlmhyeG4ZoVK9hOec+EPBkwTHkHKQ2EqDu5K+MaG9uJZ8o1CbRsSdZqSuhXvJCYhBWsORPPg6qw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.4.tgz", + "integrity": "sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ==", "dev": true, "requires": { "@jest/fake-timers": "^27.4.2", @@ -704,26 +704,26 @@ } }, "@jest/globals": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.2.tgz", - "integrity": "sha512-KkfaHEttlGpXYAQTZHgrESiEPx2q/DKAFLGLFda1uGVrqc17snd3YVPhOxlXOHIzVPs+lQ/SDB2EIvxyGzb3Ew==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.4.tgz", + "integrity": "sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ==", "dev": true, "requires": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/types": "^27.4.2", "expect": "^27.4.2" } }, "@jest/reporters": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.2.tgz", - "integrity": "sha512-sp4aqmdBJtjKetEakzDPcZggPcVIF6w9QLkYBbaWDV6e/SIsHnF1S4KtIH91eEc2fp7ep6V/e1xvdfEoho1d2w==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.4.tgz", + "integrity": "sha512-ssyJSw9B9Awb1QaxDhIPSs4de1b7SE2kv7tqFehQL13xpn5HUkMYZK/ufTOXiCAnXFOZS+XDl1GaQ/LmJAzI1A==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^27.4.2", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -736,10 +736,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.4.2", - "jest-resolve": "^27.4.2", + "jest-haste-map": "^27.4.4", + "jest-resolve": "^27.4.4", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -771,21 +771,21 @@ } }, "@jest/test-sequencer": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.2.tgz", - "integrity": "sha512-HmHp5mlh9f9GyNej5yCS1JZIFfUGnP9+jEOH5zoq5EmsuZeYD+dGULqyvGDPtuzzbyAFJ6R4+z4SS0VvnFwwGQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.4.tgz", + "integrity": "sha512-mCh+d4JTGTtX7vr13d7q2GHJy33nAobEwtEJ8X3u7R8+0ImVO2eAsQzsLfX8lyvdYHBxYABhqbYuaUNo42/pQw==", "dev": true, "requires": { "@jest/test-result": "^27.4.2", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-runtime": "^27.4.2" + "jest-haste-map": "^27.4.4", + "jest-runtime": "^27.4.4" } }, "@jest/transform": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.2.tgz", - "integrity": "sha512-RTKcPZllfcmLfnlxBya7aypofhdz05+E6QITe55Ex0rxyerkgjmmpMlvVn11V0cP719Ps6WcDYCnDzxnnJUwKg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.4.tgz", + "integrity": "sha512-7U/nDSrGsGzL7+X8ScNFV71w8u8knJQWSa9C2xsrrKLMOgb+rWuCG4VAyWke/53BU96GnT+Ka81xCAHA5gk6zA==", "dev": true, "requires": { "@babel/core": "^7.1.0", @@ -795,7 +795,7 @@ "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-regex-util": "^27.4.0", "jest-util": "^27.4.2", "micromatch": "^4.0.4", @@ -1371,12 +1371,12 @@ } }, "babel-jest": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.2.tgz", - "integrity": "sha512-MADrjb3KBO2eyZCAc6QaJg6RT5u+6oEdDyHO5HEalnpwQ6LrhTsQF2Kj1Wnz2t6UPXIXPk18dSXXOT0wF5yTxA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.4.tgz", + "integrity": "sha512-+6RVutZxOQgJkt4svgTHPFtOQlVe9dUg3wrimIAM38pY6hL/nsL8glfFSUjD9jNVjaVjzkCzj6loFFecrjr9Qw==", "dev": true, "requires": { - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.0.0", @@ -1837,9 +1837,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.14.tgz", - "integrity": "sha512-RsGkAN9JEAYMObS72kzUsPPcPGMqX1rBqGuXi9aa4TBKLzICoLf+DAAtd0fVFzrniJqYzpby47gthCUoObfs0Q==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.15.tgz", + "integrity": "sha512-WDw2IUL3k4QpbzInV3JZK+Zd1NjWJPDZ28oUSchWb/kf6AVj7/niaAlgcJlvojFa1d7pJSyQ/KSZsEtq5W7aGQ==", "dev": true }, "emittery": { @@ -3024,30 +3024,30 @@ } }, "jest": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.3.tgz", - "integrity": "sha512-jwsfVABBzuN3Atm+6h6vIEpTs9+VApODLt4dk2qv1WMOpb1weI1IIZfuwpMiWZ62qvWj78MvdvMHIYdUfqrFaA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.4.tgz", + "integrity": "sha512-AXwEIFa58Uf1Jno3/KSo5HZZ0/2Xwqvfrz0/3bmTwImkFlbOvz5vARAW9nTrxRLkojjkitaZ1KNKAtw3JRFAaA==", "dev": true, "requires": { - "@jest/core": "^27.4.3", + "@jest/core": "^27.4.4", "import-local": "^3.0.2", - "jest-cli": "^27.4.3" + "jest-cli": "^27.4.4" }, "dependencies": { "jest-cli": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.3.tgz", - "integrity": "sha512-zZSJBXNC/i8UnJPwcKWsqnhGgIF3uoTYP7th32Zej7KNQJdxzOMj+wCfy2Ox3kU7nXErJ36DtYyXDhfiqaiDRw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.4.tgz", + "integrity": "sha512-+MfsHnZPUOBigCBURuQFRpgYoPCgmIFkICkqt4SrramZCUp/UAuWcst4pMZb84O3VU8JyKJmnpGG4qH8ClQloA==", "dev": true, "requires": { - "@jest/core": "^27.4.3", + "@jest/core": "^27.4.4", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "jest-config": "^27.4.3", + "jest-config": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "prompts": "^2.0.1", @@ -3068,12 +3068,12 @@ } }, "jest-circus": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.2.tgz", - "integrity": "sha512-2ePUSru1BGMyzxsMvRfu+tNb+PW60rUyMLJBfw1Nrh5zC8RoTPfF+zbE0JToU31a6ZVe4nnrNKWYRzlghAbL0A==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.4.tgz", + "integrity": "sha512-4DWhvQerDq5X4GaqhEUoZiBhuNdKDGr0geW0iJwarbDljAmGaGOErKQG+z2PBr0vgN05z7tsGSY51mdWr8E4xg==", "dev": true, "requires": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -3085,8 +3085,8 @@ "jest-each": "^27.4.2", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "pretty-format": "^27.4.2", "slash": "^3.0.0", @@ -3095,28 +3095,28 @@ } }, "jest-config": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.3.tgz", - "integrity": "sha512-DQ10HTSqYtC2pO7s9j2jw+li4xUnm2wLYWH2o7K1ftB8NyvToHsXoLlXxtsGh3AW9gUQR6KY/4B7G+T/NswJBw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.4.tgz", + "integrity": "sha512-6lxg0ugO6KS2zKEbpdDwBzu1IT0Xg4/VhxXMuBu+z/5FvBjLCEMTaWQm3bCaGCZUR9j9FK4DzUIxyhIgn6kVEg==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.4.2", + "@jest/test-sequencer": "^27.4.4", "@jest/types": "^27.4.2", - "babel-jest": "^27.4.2", + "babel-jest": "^27.4.4", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.2", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", + "jest-circus": "^27.4.4", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.2", + "jest-jasmine2": "^27.4.4", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-runner": "^27.4.3", + "jest-resolve": "^27.4.4", + "jest-runner": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "micromatch": "^4.0.4", @@ -3159,12 +3159,12 @@ } }, "jest-environment-jsdom": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.3.tgz", - "integrity": "sha512-x1AUVz3G14LpEJs7KIFUaTINT2n0unOUmvdAby3s/sldUpJJetOJifHo1O/EUQC5fNBowggwJbVulko18y6OWw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.4.tgz", + "integrity": "sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA==", "dev": true, "requires": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/fake-timers": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -3174,12 +3174,12 @@ } }, "jest-environment-node": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.2.tgz", - "integrity": "sha512-nzTZ5nJ+FabuZPH2YVci7SZIHpvtNRHPt8+vipLkCnAgXGjVzHm7XJWdnNqXbAkExIgiKeVEkVMNZOZE/LeiIg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.4.tgz", + "integrity": "sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA==", "dev": true, "requires": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/fake-timers": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -3194,9 +3194,9 @@ "dev": true }, "jest-haste-map": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.2.tgz", - "integrity": "sha512-foiyAEePORUN2eeJnOtcM1y8qW0ShEd9kTjWVL4sVaMcuCJM6gtHegvYPBRT0mpI/bs4ueThM90+Eoj2ncoNsA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.4.tgz", + "integrity": "sha512-kvspmHmgPIZoDaqUsvsJFTaspuxhATvdO6wsFNGNSi8kfdiOCEEvECNbht8xG+eE5Ol88JyJmp2D7RF4dYo85Q==", "dev": true, "requires": { "@jest/types": "^27.4.2", @@ -3209,19 +3209,19 @@ "jest-regex-util": "^27.4.0", "jest-serializer": "^27.4.0", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "micromatch": "^4.0.4", "walker": "^1.0.7" } }, "jest-jasmine2": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.2.tgz", - "integrity": "sha512-VO/fyAJSH9u0THjbteFiL8qc93ufU+yW+bdieDc8tzTCWwlWzO53UHS5nFK1qmE8izb5Smkn+XHlVt6/l06MKQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.4.tgz", + "integrity": "sha512-ygk2tUgtLeN3ouj4KEYw9p81GLI1EKrnvourPULN5gdgB482PH5op9gqaRG0IenbJhBbbRwiSvh5NoBoQZSqdA==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/source-map": "^27.4.0", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", @@ -3233,8 +3233,8 @@ "jest-each": "^27.4.2", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "pretty-format": "^27.4.2", "throat": "^6.0.1" @@ -3302,15 +3302,15 @@ "dev": true }, "jest-resolve": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.2.tgz", - "integrity": "sha512-d/zqPjxCzMqHlOdRTg8cTpO9jY+1/T74KazT8Ws/LwmwxV5sRMWOkiLjmzUCDj/5IqA5XHNK4Hkmlq9Kdpb9Sg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.4.tgz", + "integrity": "sha512-Yh5jK3PBmDbm01Rc8pT0XqpBlTPEGwWp7cN61ijJuwony/tR2Taof3TLy6yfNiuRS8ucUOPO7NBYm3ei38kkcg==", "dev": true, "requires": { "@jest/types": "^27.4.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-pnp-resolver": "^1.2.2", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", @@ -3320,26 +3320,26 @@ } }, "jest-resolve-dependencies": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.2.tgz", - "integrity": "sha512-hb++cTpqvOWfU49MCP/JQkxmnrhKoAVqXWFjgYXswRSVGk8Q6bDTSvhbCeYXDtXaymY0y7WrrSIlKogClcKJuw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.4.tgz", + "integrity": "sha512-iAnpCXh81sd9nbyqySvm5/aV9X6JZKE0dQyFXTC8tptXcdrgS0vjPFy+mEgzPHxXw+tq4TQupuTa0n8OXwRIxw==", "dev": true, "requires": { "@jest/types": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.2" + "jest-snapshot": "^27.4.4" } }, "jest-runner": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.3.tgz", - "integrity": "sha512-JgR6Om/j22Fd6ZUUIGTWNcCtuZVYbNrecb4k89W4UyFJoRtHpo2zMKWkmFFFJoqwWGrfrcPLnVBIgkJiTV3cyA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.4.tgz", + "integrity": "sha512-AXv/8Q0Xf1puWnDf52m7oLrK7sXcv6re0V/kItwTSVHJbX7Oebm07oGFQqGmq0R0mhO1zpmB3OpqRuaCN2elPA==", "dev": true, "requires": { "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -3347,31 +3347,31 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", - "jest-haste-map": "^27.4.2", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", + "jest-haste-map": "^27.4.4", "jest-leak-detector": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-runtime": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-runtime": "^27.4.4", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "source-map-support": "^0.5.6", "throat": "^6.0.1" } }, "jest-runtime": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.2.tgz", - "integrity": "sha512-eqPgcBaUNaw6j8T5M+dnfAEh6MIrh2YmtskCr9sl50QYpD22Sg+QqHw3J3nmaLzVMbBtOMHFFxLF0Qx8MsZVFQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.4.tgz", + "integrity": "sha512-tZGay6P6vXJq8t4jVFAUzYHx+lzIHXjz+rj1XBk6mAR1Lwtf5kz0Uun7qNuU+oqpZu4+hhuxpUfXb6j30bEPqA==", "dev": true, "requires": { "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", - "@jest/globals": "^27.4.2", + "@jest/environment": "^27.4.4", + "@jest/globals": "^27.4.4", "@jest/source-map": "^27.4.0", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/yargs": "^16.0.0", "chalk": "^4.0.0", @@ -3381,12 +3381,12 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-message-util": "^27.4.2", "jest-mock": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "slash": "^3.0.0", @@ -3413,9 +3413,9 @@ } }, "jest-snapshot": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.2.tgz", - "integrity": "sha512-DI7lJlNIu6WSQ+esqhnJzEzU70+dV+cNjoF1c+j5FagWEd3KtOyZvVliAH0RWNQ6KSnAAnKSU0qxJ8UXOOhuUQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.4.tgz", + "integrity": "sha512-yy+rpCvYMOjTl7IMuaMI9OP9WT229zi8BhdNHm6e6mttAOIzvIiCxFoZ6yRxaV3HDPPgMryi+ReX2b8+IQJdPA==", "dev": true, "requires": { "@babel/core": "^7.7.2", @@ -3424,7 +3424,7 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", @@ -3434,10 +3434,10 @@ "graceful-fs": "^4.2.4", "jest-diff": "^27.4.2", "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", + "jest-resolve": "^27.4.4", "jest-util": "^27.4.2", "natural-compare": "^1.4.0", "pretty-format": "^27.4.2", @@ -3496,9 +3496,9 @@ } }, "jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.4.tgz", + "integrity": "sha512-jfwxYJvfua1b1XkyuyPh01ATmgg4e5fPM/muLmhy9Qc6dmiwacQB0MLHaU6IjEsv/+nAixHGxTn8WllA27Pn0w==", "dev": true, "requires": { "@types/node": "*", @@ -4658,9 +4658,9 @@ "dev": true }, "typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.3.tgz", + "integrity": "sha512-eVYaEHALSt+s9LbvgEv4Ef+Tdq7hBiIZgii12xXJnukryt3pMgJf6aKhoCZ3FWQsu6sydEnkg11fYXLzhLBjeQ==", "dev": true }, "unbox-primitive": { diff --git a/package.json b/package.json index 0ded37ea..9b0f5996 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "confluence.js", - "version": "1.3.0", + "version": "1.3.1", "description": "confluence.js is a powerful Node.JS/Browser module that allows you to interact with the Confluence API very easily", "author": "Vladislav Tupikin ", "license": "MIT", @@ -45,14 +45,14 @@ "eslint-config-airbnb-typescript": "^16.1.0", "eslint-import-resolver-typescript": "^2.5.0", "eslint-plugin-import": "^2.25.3", - "jest": "^27.4.3", + "jest": "^27.4.4", "prettier": "^2.5.1", "prettier-plugin-jsdoc": "^0.3.30", "sinon": "^12.0.1", "ts-jest": "^27.1.1", "typedoc": "^0.22.10", "typedoc-plugin-extras": "^2.2.1", - "typescript": "^4.5.2" + "typescript": "^4.5.3" }, "dependencies": { "atlassian-jwt": "^2.0.2", diff --git a/src/api/audit.ts b/src/api/audit.ts index fbb3639b..0fef0a0a 100644 --- a/src/api/audit.ts +++ b/src/api/audit.ts @@ -45,7 +45,7 @@ export class Audit { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getAuditRecords' }); + return this.client.sendRequest(config, callback); } /** @@ -87,7 +87,7 @@ export class Audit { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createAuditRecord' }); + return this.client.sendRequest(config, callback); } /** @@ -120,7 +120,7 @@ export class Audit { }, }; - return this.client.sendRequest(config, callback, { methodName: 'exportAuditRecords' }); + return this.client.sendRequest(config, callback); } /** @@ -143,7 +143,7 @@ export class Audit { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getRetentionPeriod' }); + return this.client.sendRequest(config, callback); } /** @@ -177,7 +177,7 @@ export class Audit { }, }; - return this.client.sendRequest(config, callback, { methodName: 'setRetentionPeriod' }); + return this.client.sendRequest(config, callback); } /** @@ -224,6 +224,6 @@ export class Audit { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getAuditRecordsForTimePeriod' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/content.ts b/src/api/content.ts index 11e79f5d..9b5d331c 100644 --- a/src/api/content.ts +++ b/src/api/content.ts @@ -49,7 +49,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContent' }); + return this.client.sendRequest(config, callback); } /** @@ -99,7 +99,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createContent' }); + return this.client.sendRequest(config, callback); } /** @@ -138,7 +138,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'archivePages' }); + return this.client.sendRequest(config, callback); } /** @@ -185,7 +185,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'publishLegacyDraft' }); + return this.client.sendRequest(config, callback); } /** @@ -230,7 +230,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'publishSharedDraft' }); + return this.client.sendRequest(config, callback); } /** @@ -286,7 +286,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'searchContentByCQL' }); + return this.client.sendRequest(config, callback); } /** @@ -323,7 +323,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentById' }); + return this.client.sendRequest(config, callback); } /** @@ -365,7 +365,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateContent' }); + return this.client.sendRequest(config, callback); } /** @@ -401,7 +401,7 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'deleteContent' }); + return this.client.sendRequest(config, callback); } /** @@ -434,6 +434,6 @@ export class Content { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getHistoryForContent' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentAttachments.ts b/src/api/contentAttachments.ts index 5d2021a5..2fe02785 100644 --- a/src/api/contentAttachments.ts +++ b/src/api/contentAttachments.ts @@ -44,7 +44,7 @@ export class ContentAttachments { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getAttachments' }); + return this.client.sendRequest(config, callback); } /** @@ -136,7 +136,7 @@ export class ContentAttachments { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createAttachments' }); + return this.client.sendRequest(config, callback); } /** @@ -230,7 +230,7 @@ export class ContentAttachments { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createOrUpdateAttachments' }); + return this.client.sendRequest(config, callback); } /** @@ -263,7 +263,7 @@ export class ContentAttachments { data: parameters.body, }; - return this.client.sendRequest(config, callback, { methodName: 'updateAttachmentProperties' }); + return this.client.sendRequest(config, callback); } /** @@ -358,7 +358,7 @@ export class ContentAttachments { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateAttachmentData' }); + return this.client.sendRequest(config, callback); } /** Redirects the client to a URL that serves an attachment's binary data. */ @@ -381,6 +381,6 @@ export class ContentAttachments { }, }; - return this.client.sendRequest(config, callback, { methodName: 'downloadAttachment' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentBody.ts b/src/api/contentBody.ts index 4a278cfc..3d1f6d2c 100644 --- a/src/api/contentBody.ts +++ b/src/api/contentBody.ts @@ -61,6 +61,6 @@ export class ContentBody { }, }; - return this.client.sendRequest(config, callback, { methodName: 'convertContentBody' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentChildrenAndDescendants.ts b/src/api/contentChildrenAndDescendants.ts index a8c7196a..52850405 100644 --- a/src/api/contentChildrenAndDescendants.ts +++ b/src/api/contentChildrenAndDescendants.ts @@ -64,7 +64,7 @@ export class ContentChildrenAndDescendants { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentChildren' }); + return this.client.sendRequest(config, callback); } /** @@ -97,7 +97,7 @@ export class ContentChildrenAndDescendants { method: 'PUT', }; - return this.client.sendRequest(config, callback, { methodName: 'movePage' }); + return this.client.sendRequest(config, callback); } /** @@ -156,7 +156,7 @@ export class ContentChildrenAndDescendants { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentChildrenByType' }); + return this.client.sendRequest(config, callback); } /** @@ -215,7 +215,7 @@ export class ContentChildrenAndDescendants { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentDescendants' }); + return this.client.sendRequest(config, callback); } /** @deprecated This API will be removed in the next major version. Use `getDescendantsOfType` method instead. */ @@ -292,7 +292,7 @@ export class ContentChildrenAndDescendants { }, }; - return this.client.sendRequest(config, callback, { methodName: 'descendantsOfType' }); + return this.client.sendRequest(config, callback); } /** @@ -329,7 +329,7 @@ export class ContentChildrenAndDescendants { }, }; - return this.client.sendRequest(config, callback, { methodName: 'copyPageHierarchy' }); + return this.client.sendRequest(config, callback); } /** @@ -372,6 +372,6 @@ export class ContentChildrenAndDescendants { data: parameters.bodyParameters, }; - return this.client.sendRequest(config, callback, { methodName: 'copyPage' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentComments.ts b/src/api/contentComments.ts index ddb28f7b..6bdd9b65 100644 --- a/src/api/contentComments.ts +++ b/src/api/contentComments.ts @@ -43,6 +43,6 @@ export class ContentComments { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentComments' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentLabels.ts b/src/api/contentLabels.ts index 68ffdf1a..193d5a19 100644 --- a/src/api/contentLabels.ts +++ b/src/api/contentLabels.ts @@ -41,7 +41,7 @@ export class ContentLabels { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getLabelsForContent' }); + return this.client.sendRequest(config, callback); } /** @@ -87,7 +87,7 @@ export class ContentLabels { data: parameters.body, }; - return this.client.sendRequest(config, callback, { methodName: 'addLabelsToContent' }); + return this.client.sendRequest(config, callback); } /** @@ -128,7 +128,7 @@ export class ContentLabels { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeLabelFromContentUsingQueryParameter' }); + return this.client.sendRequest(config, callback); } /** @@ -165,6 +165,6 @@ export class ContentLabels { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'removeLabelFromContent' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentMacroBody.ts b/src/api/contentMacroBody.ts index 4d639c61..a342f6e4 100644 --- a/src/api/contentMacroBody.ts +++ b/src/api/contentMacroBody.ts @@ -54,6 +54,6 @@ export class ContentMacroBody { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getMacroBodyByMacroId' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentPermissions.ts b/src/api/contentPermissions.ts index 7e7bfbf0..9ad3b976 100644 --- a/src/api/contentPermissions.ts +++ b/src/api/contentPermissions.ts @@ -73,6 +73,6 @@ export class ContentPermissions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'checkContentPermission' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentProperties.ts b/src/api/contentProperties.ts index 360b9b0c..da781d10 100644 --- a/src/api/contentProperties.ts +++ b/src/api/contentProperties.ts @@ -44,7 +44,7 @@ export class ContentProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentProperties' }); + return this.client.sendRequest(config, callback); } /** @@ -92,7 +92,7 @@ export class ContentProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createContentProperty' }); + return this.client.sendRequest(config, callback); } /** @@ -130,7 +130,7 @@ export class ContentProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentProperty' }); + return this.client.sendRequest(config, callback); } /** @@ -177,7 +177,7 @@ export class ContentProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createContentPropertyForKey' }); + return this.client.sendRequest(config, callback); } /** @@ -215,7 +215,7 @@ export class ContentProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateContentProperty' }); + return this.client.sendRequest(config, callback); } /** @@ -244,6 +244,6 @@ export class ContentProperties { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'deleteContentProperty' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentRestrictions.ts b/src/api/contentRestrictions.ts index 1361572e..aeec2f3e 100644 --- a/src/api/contentRestrictions.ts +++ b/src/api/contentRestrictions.ts @@ -39,7 +39,7 @@ export class ContentRestrictions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getRestrictions' }); + return this.client.sendRequest(config, callback); } /** @@ -73,7 +73,7 @@ export class ContentRestrictions { data: parameters.body, }; - return this.client.sendRequest(config, callback, { methodName: 'addRestrictions' }); + return this.client.sendRequest(config, callback); } /** @@ -109,7 +109,7 @@ export class ContentRestrictions { data: parameters.body, }; - return this.client.sendRequest(config, callback, { methodName: 'updateRestrictions' }); + return this.client.sendRequest(config, callback); } /** @@ -142,7 +142,7 @@ export class ContentRestrictions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'deleteRestrictions' }); + return this.client.sendRequest(config, callback); } /** @@ -179,7 +179,7 @@ export class ContentRestrictions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getRestrictionsByOperation' }); + return this.client.sendRequest(config, callback); } /** @@ -214,7 +214,7 @@ export class ContentRestrictions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getRestrictionsForOperation' }); + return this.client.sendRequest(config, callback); } /** @@ -258,7 +258,7 @@ export class ContentRestrictions { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getContentRestrictionStatusForGroup' }); + return this.client.sendRequest(config, callback); } /** @@ -288,7 +288,7 @@ export class ContentRestrictions { method: 'PUT', }; - return this.client.sendRequest(config, callback, { methodName: 'addGroupToContentRestriction' }); + return this.client.sendRequest(config, callback); } /** @@ -312,7 +312,7 @@ export class ContentRestrictions { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'removeGroupByName' }); + return this.client.sendRequest(config, callback); } /** @@ -356,7 +356,7 @@ export class ContentRestrictions { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getIndividualGroupRestrictionStatusByGroupId' }); + return this.client.sendRequest(config, callback); } /** @@ -388,7 +388,7 @@ export class ContentRestrictions { method: 'PUT', }; - return this.client.sendRequest(config, callback, { methodName: 'addGroupToContentRestrictionByGroupId' }); + return this.client.sendRequest(config, callback); } /** @@ -412,7 +412,7 @@ export class ContentRestrictions { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'removeGroupById' }); + return this.client.sendRequest(config, callback); } /** @@ -463,7 +463,7 @@ export class ContentRestrictions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentRestrictionStatusForUser' }); + return this.client.sendRequest(config, callback); } /** @@ -498,7 +498,7 @@ export class ContentRestrictions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'addUserToContentRestriction' }); + return this.client.sendRequest(config, callback); } /** @@ -533,6 +533,6 @@ export class ContentRestrictions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeUserFromContentRestriction' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentVersions.ts b/src/api/contentVersions.ts index 364b0102..659863d1 100644 --- a/src/api/contentVersions.ts +++ b/src/api/contentVersions.ts @@ -41,7 +41,7 @@ export class ContentVersions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentVersions' }); + return this.client.sendRequest(config, callback); } /** @@ -80,7 +80,7 @@ export class ContentVersions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'restoreContentVersion' }); + return this.client.sendRequest(config, callback); } /** @@ -112,7 +112,7 @@ export class ContentVersions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentVersion' }); + return this.client.sendRequest(config, callback); } /** @@ -141,6 +141,6 @@ export class ContentVersions { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'deleteContentVersion' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/contentWatches.ts b/src/api/contentWatches.ts index 55dd8144..f2047687 100644 --- a/src/api/contentWatches.ts +++ b/src/api/contentWatches.ts @@ -52,7 +52,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getWatchesForPage' }); + return this.client.sendRequest(config, callback); } /** @@ -102,7 +102,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getWatchesForSpace' }); + return this.client.sendRequest(config, callback); } /** Returns a list of watchers of a space */ @@ -128,7 +128,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getWatchersForSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -171,7 +171,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentWatchStatus' }); + return this.client.sendRequest(config, callback); } /** @@ -212,7 +212,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'addContentWatcher' }); + return this.client.sendRequest(config, callback); } /** @@ -255,7 +255,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeContentWatcher' }); + return this.client.sendRequest(config, callback); } /** @@ -295,7 +295,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'isWatchingLabel' }); + return this.client.sendRequest(config, callback); } /** @@ -336,7 +336,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'addLabelWatcher' }); + return this.client.sendRequest(config, callback); } /** @@ -373,7 +373,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeLabelWatcher' }); + return this.client.sendRequest(config, callback); } /** @@ -413,7 +413,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'isWatchingSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -454,7 +454,7 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'addSpaceWatcher' }); + return this.client.sendRequest(config, callback); } /** @@ -488,6 +488,6 @@ export class ContentWatches { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeSpaceWatch' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/dynamicModules.ts b/src/api/dynamicModules.ts index 62eb4d7c..d4c68f7b 100644 --- a/src/api/dynamicModules.ts +++ b/src/api/dynamicModules.ts @@ -24,7 +24,7 @@ export class DynamicModules { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getModules' }); + return this.client.sendRequest(config, callback); } /** @@ -53,7 +53,7 @@ export class DynamicModules { method: 'POST', }; - return this.client.sendRequest(config, callback, { methodName: 'registerModules' }); + return this.client.sendRequest(config, callback); } /** @@ -77,6 +77,6 @@ export class DynamicModules { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeModules' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/experimental.ts b/src/api/experimental.ts index 8f307c94..66bff51f 100644 --- a/src/api/experimental.ts +++ b/src/api/experimental.ts @@ -37,7 +37,7 @@ export class Experimental { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getLabelsForSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -76,7 +76,7 @@ export class Experimental { method: 'POST', }; - return this.client.sendRequest(config, callback, { methodName: 'addLabelsToSpace' }); + return this.client.sendRequest(config, callback); } async deleteLabelFromSpace( @@ -97,7 +97,7 @@ export class Experimental { }, }; - return this.client.sendRequest(config, callback, { methodName: 'deleteLabelFromSpace' }); + return this.client.sendRequest(config, callback); } /** Get the total number of views a piece of content has. */ @@ -113,7 +113,7 @@ export class Experimental { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getViews' }); + return this.client.sendRequest(config, callback); } /** Get the total number of distinct viewers a piece of content has. */ @@ -132,6 +132,6 @@ export class Experimental { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getViewers' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/group.ts b/src/api/group.ts index 1bedb539..9a7340a1 100644 --- a/src/api/group.ts +++ b/src/api/group.ts @@ -38,7 +38,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getGroups' }); + return this.client.sendRequest(config, callback); } /** @@ -65,7 +65,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createGroup' }); + return this.client.sendRequest(config, callback); } /** @@ -89,7 +89,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeGroup' }); + return this.client.sendRequest(config, callback); } /** @@ -124,7 +124,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getGroupByQueryParam' }); + return this.client.sendRequest(config, callback); } /** @@ -156,7 +156,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getGroupByGroupId' }); + return this.client.sendRequest(config, callback); } /** @@ -180,7 +180,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeGroupById' }); + return this.client.sendRequest(config, callback); } /** @deprecated Will be removed in the next major version. Use `getGroupByName` instead. */ @@ -190,6 +190,7 @@ export class Group { async getGroup(parameters: Parameters.GetGroup, callback?: Callback): Promise { return this.getGroupByName(parameters, callback!); } + /** * Returns a user group for a given group name. * @@ -217,7 +218,7 @@ export class Group { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getGroupByName' }); + return this.client.sendRequest(config, callback); } /** @@ -254,7 +255,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getMembersByQueryParam' }); + return this.client.sendRequest(config, callback); } /** @@ -291,7 +292,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getGroupMembers' }); + return this.client.sendRequest(config, callback); } /** @deprecated Will be removed in the next major version. Use `searchGroups` instead. */ @@ -332,7 +333,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'searchGroups' }); + return this.client.sendRequest(config, callback); } /** @@ -368,7 +369,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'addUserToGroupByGroupId' }); + return this.client.sendRequest(config, callback); } /** @@ -402,7 +403,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeMemberFromGroupByGroupId' }); + return this.client.sendRequest(config, callback); } /** @@ -442,7 +443,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getGroupMembersByGroupId' }); + return this.client.sendRequest(config, callback); } /** @@ -469,7 +470,7 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'addUserToGroup' }); + return this.client.sendRequest(config, callback); } /** @@ -500,6 +501,6 @@ export class Group { }, }; - return this.client.sendRequest(config, callback, { methodName: 'removeMemberFromGroup' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/inlineTasks.ts b/src/api/inlineTasks.ts index 3675b0af..5b7e2a83 100644 --- a/src/api/inlineTasks.ts +++ b/src/api/inlineTasks.ts @@ -49,7 +49,7 @@ export class InlineTasks { }, }; - return this.client.sendRequest(config, callback, { methodName: 'searchTasks' }); + return this.client.sendRequest(config, callback); } /** @@ -72,7 +72,7 @@ export class InlineTasks { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getTaskById' }); + return this.client.sendRequest(config, callback); } /** @@ -101,6 +101,6 @@ export class InlineTasks { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateTaskById' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/labelInfo.ts b/src/api/labelInfo.ts index b689cabe..758b7ff8 100644 --- a/src/api/labelInfo.ts +++ b/src/api/labelInfo.ts @@ -42,6 +42,6 @@ export class LabelInfo { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getAllLabelContent' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/longRunningTask.ts b/src/api/longRunningTask.ts index 60b3055c..615f50c6 100644 --- a/src/api/longRunningTask.ts +++ b/src/api/longRunningTask.ts @@ -39,7 +39,7 @@ export class LongRunningTask { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getTasks' }); + return this.client.sendRequest(config, callback); } /** @@ -70,6 +70,6 @@ export class LongRunningTask { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getTask' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/relation.ts b/src/api/relation.ts index 20551352..d6866a02 100644 --- a/src/api/relation.ts +++ b/src/api/relation.ts @@ -53,7 +53,7 @@ export class Relation { }, }; - return this.client.sendRequest(config, callback, { methodName: 'findTargetFromSource' }); + return this.client.sendRequest(config, callback); } /** @deprecated Will be removed in the next major version. Use `getRelationship` instead. */ @@ -113,7 +113,7 @@ export class Relation { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getRelationship' }); + return this.client.sendRequest(config, callback); } /** @@ -159,7 +159,7 @@ export class Relation { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createRelationship' }); + return this.client.sendRequest(config, callback); } /** @deprecated Will be removed in the next major version. Use `deleteRelationship` instead. */ @@ -201,7 +201,7 @@ export class Relation { }, }; - return this.client.sendRequest(config, callback, { methodName: 'deleteRelationship' }); + return this.client.sendRequest(config, callback); } /** @@ -252,6 +252,6 @@ export class Relation { }, }; - return this.client.sendRequest(config, callback, { methodName: 'findSourcesForTarget' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/search.ts b/src/api/search.ts index d2d11caa..27765e2f 100644 --- a/src/api/search.ts +++ b/src/api/search.ts @@ -74,7 +74,7 @@ export class Search { }, }; - return this.client.sendRequest(config, callback, { methodName: 'searchByCQL' }); + return this.client.sendRequest(config, callback); } /** @deprecated Will be removed in the next major version. Use `searchUser` instead. */ @@ -93,12 +93,13 @@ export class Search { ): Promise { return this.searchUser(parameters, callback!); } + /** * 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. + * profilePicture, displayName, and timeZone. */ async searchUser( parameters: Parameters.SearchUser, @@ -109,7 +110,7 @@ export class Search { * (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. + * profilePicture, displayName, and timeZone. */ async searchUser( parameters: Parameters.SearchUser, @@ -126,9 +127,10 @@ export class Search { cql: parameters.cql, start: parameters.start, limit: parameters.limit, + expand: parameters.expand, }, }; - return this.client.sendRequest(config, callback, { methodName: 'searchUser' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/settings.ts b/src/api/settings.ts index e4e445a7..09b3a44f 100644 --- a/src/api/settings.ts +++ b/src/api/settings.ts @@ -43,7 +43,7 @@ export class Settings { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getLookAndFeelSettings' }); + return this.client.sendRequest(config, callback); } /** @@ -81,7 +81,7 @@ export class Settings { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateLookAndFeel' }); + return this.client.sendRequest(config, callback); } /** @@ -133,7 +133,7 @@ export class Settings { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateLookAndFeelSettings' }); + return this.client.sendRequest(config, callback); } /** @@ -170,7 +170,7 @@ export class Settings { }, }; - return this.client.sendRequest(config, callback, { methodName: 'resetLookAndFeelSettings' }); + return this.client.sendRequest(config, callback); } /** @@ -205,7 +205,7 @@ export class Settings { }, }; - return this.client.sendRequest(config, callback, { methodName: 'setLookAndFeelSettings' }); + return this.client.sendRequest(config, callback); } /** @@ -228,6 +228,6 @@ export class Settings { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getSystemInfo' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/space.ts b/src/api/space.ts index ba732bf8..ca474a2b 100644 --- a/src/api/space.ts +++ b/src/api/space.ts @@ -31,7 +31,7 @@ export class Space { url: '/api/space', method: 'GET', params: { - spaceKey: parameters?.spaceKey?.map((key, index) => index ? `&spaceKey=${key}` : key), + spaceKey: parameters?.spaceKey, spaceId: parameters?.spaceId, type: parameters?.type, status: parameters?.status, @@ -43,7 +43,7 @@ export class Space { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getSpaces' }); + return this.client.sendRequest(config, callback); } /** @@ -73,7 +73,7 @@ export class Space { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -110,7 +110,7 @@ export class Space { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createPrivateSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -131,7 +131,7 @@ export class Space { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -165,7 +165,7 @@ export class Space { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -193,7 +193,7 @@ export class Space { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'deleteSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -232,7 +232,7 @@ export class Space { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentForSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -269,6 +269,6 @@ export class Space { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentByTypeForSpace' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/spacePermissions.ts b/src/api/spacePermissions.ts index fead3d32..4e1ad2fd 100644 --- a/src/api/spacePermissions.ts +++ b/src/api/spacePermissions.ts @@ -61,7 +61,7 @@ export class SpacePermissions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'addPermissionToSpace' }); + return this.client.sendRequest(config, callback); } /** @@ -103,7 +103,7 @@ export class SpacePermissions { }, }; - return this.client.sendRequest(config, callback, { methodName: 'addCustomContentPermissions' }); + return this.client.sendRequest(config, callback); } /** @@ -130,6 +130,6 @@ export class SpacePermissions { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'removePermission' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/spaceProperties.ts b/src/api/spaceProperties.ts index 2757b267..f1a594aa 100644 --- a/src/api/spaceProperties.ts +++ b/src/api/spaceProperties.ts @@ -39,7 +39,7 @@ export class SpaceProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getSpaceProperties' }); + return this.client.sendRequest(config, callback); } /** @@ -74,7 +74,7 @@ export class SpaceProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createSpaceProperty' }); + return this.client.sendRequest(config, callback); } /** @@ -107,7 +107,7 @@ export class SpaceProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getSpaceProperty' }); + return this.client.sendRequest(config, callback); } /** @@ -142,7 +142,7 @@ export class SpaceProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createSpacePropertyForKey' }); + return this.client.sendRequest(config, callback); } /** @@ -176,7 +176,7 @@ export class SpaceProperties { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateSpaceProperty' }); + return this.client.sendRequest(config, callback); } /** @@ -200,6 +200,6 @@ export class SpaceProperties { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'deleteSpaceProperty' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/spaceSettings.ts b/src/api/spaceSettings.ts index 405b5f14..f18b2683 100644 --- a/src/api/spaceSettings.ts +++ b/src/api/spaceSettings.ts @@ -34,7 +34,7 @@ export class SpaceSettings { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getSpaceSettings' }); + return this.client.sendRequest(config, callback); } /** @@ -67,6 +67,6 @@ export class SpaceSettings { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateSpaceSettings' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/template.ts b/src/api/template.ts index 7d182134..526960df 100644 --- a/src/api/template.ts +++ b/src/api/template.ts @@ -44,7 +44,7 @@ export class Template { }, }; - return this.client.sendRequest(config, callback, { methodName: 'createContentTemplate' }); + return this.client.sendRequest(config, callback); } /** @@ -85,7 +85,7 @@ export class Template { }, }; - return this.client.sendRequest(config, callback, { methodName: 'updateContentTemplate' }); + return this.client.sendRequest(config, callback); } /** @@ -133,7 +133,7 @@ export class Template { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getBlueprintTemplates' }); + return this.client.sendRequest(config, callback); } /** @@ -171,7 +171,7 @@ export class Template { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getContentTemplates' }); + return this.client.sendRequest(config, callback); } /** @@ -205,7 +205,7 @@ export class Template { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getContentTemplate' }); + return this.client.sendRequest(config, callback); } /** @@ -242,6 +242,6 @@ export class Template { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'removeTemplate' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/themes.ts b/src/api/themes.ts index a713e144..4c506d09 100644 --- a/src/api/themes.ts +++ b/src/api/themes.ts @@ -32,7 +32,7 @@ export class Themes { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getThemes' }); + return this.client.sendRequest(config, callback); } /** @@ -53,7 +53,7 @@ export class Themes { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getGlobalTheme' }); + return this.client.sendRequest(config, callback); } /** @@ -74,7 +74,7 @@ export class Themes { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getTheme' }); + return this.client.sendRequest(config, callback); } /** @@ -100,7 +100,7 @@ export class Themes { method: 'GET', }; - return this.client.sendRequest(config, callback, { methodName: 'getSpaceTheme' }); + return this.client.sendRequest(config, callback); } /** @@ -129,7 +129,7 @@ export class Themes { }, }; - return this.client.sendRequest(config, callback, { methodName: 'setSpaceTheme' }); + return this.client.sendRequest(config, callback); } /** @@ -150,6 +150,6 @@ export class Themes { method: 'DELETE', }; - return this.client.sendRequest(config, callback, { methodName: 'resetSpaceTheme' }); + return this.client.sendRequest(config, callback); } } diff --git a/src/api/users.ts b/src/api/users.ts index e3fceece..0c867ac8 100644 --- a/src/api/users.ts +++ b/src/api/users.ts @@ -41,7 +41,7 @@ export class Users { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getUser' }); + return this.client.sendRequest(config, callback); } /** @@ -76,7 +76,7 @@ export class Users { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getAnonymousUser' }); + return this.client.sendRequest(config, callback); } /** @@ -110,7 +110,7 @@ export class Users { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getCurrentUser' }); + return this.client.sendRequest(config, callback); } /** @@ -149,7 +149,7 @@ export class Users { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getGroupMembershipsForUser' }); + return this.client.sendRequest(config, callback); } /** @@ -186,7 +186,7 @@ export class Users { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getBulkUserLookup' }); + return this.client.sendRequest(config, callback); } /** @@ -223,7 +223,7 @@ export class Users { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getPrivacyUnsafeUserEmail' }); + return this.client.sendRequest(config, callback); } /** @@ -266,7 +266,7 @@ export class Users { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getPrivacyUnsafeUserEmailBulk' }); + return this.client.sendRequest(config, callback); } /** @@ -306,6 +306,6 @@ export class Users { }, }; - return this.client.sendRequest(config, callback, { methodName: 'getBulkUserMigration' }); + return this.client.sendRequest(config, callback); } } From f5c67f95bc566b355456d25437d47d3625dc23ae Mon Sep 17 00:00:00 2001 From: Vladislav Tupikin Date: Fri, 10 Dec 2021 16:24:35 +0300 Subject: [PATCH 2/2] #14 bugfix --- src/api/space.ts | 2 +- src/clients/baseClient.ts | 8 ++++++-- tests/unit/api/space.test.ts | 14 +++++++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/api/space.ts b/src/api/space.ts index ca474a2b..39504551 100644 --- a/src/api/space.ts +++ b/src/api/space.ts @@ -31,7 +31,7 @@ export class Space { url: '/api/space', method: 'GET', params: { - spaceKey: parameters?.spaceKey, + spaceKey: () => parameters?.spaceKey?.map((key) => `spaceKey=${key}`).join('&'), spaceId: parameters?.spaceId, type: parameters?.type, status: parameters?.status, diff --git a/src/clients/baseClient.ts b/src/clients/baseClient.ts index d1878590..20cb8d80 100644 --- a/src/clients/baseClient.ts +++ b/src/clients/baseClient.ts @@ -20,7 +20,7 @@ export class BaseClient implements Client { Object.entries(parameters).forEach(([key, value]) => { if (value === null || typeof value === 'undefined') { - return undefined; + return; } if (Array.isArray(value)) { @@ -34,11 +34,15 @@ export class BaseClient implements Client { } else if (value !== null && typeof value === 'object') { // eslint-disable-next-line no-param-reassign value = JSON.stringify(value); + } else if (value instanceof Function) { + const part = value(); + + return part && parts.push(part); } parts.push(`${this.encode(key)}=${this.encode(value)}`); - return undefined; + return; }); return parts.join('&'); diff --git a/tests/unit/api/space.test.ts b/tests/unit/api/space.test.ts index db9a6e99..9d4a0de0 100644 --- a/tests/unit/api/space.test.ts +++ b/tests/unit/api/space.test.ts @@ -12,12 +12,20 @@ describe('Space', () => { }); describe('getSpaces should generate correct URL', () => { + it('when spaceKey is not provided', () => { + space.getSpaces({}); + + const callArgument = sendRequestStub.lastCall.args[0]; + + expect(callArgument.params.spaceKey()).toBe(undefined); + }); + it('when spaceKey is empty array', () => { space.getSpaces({ spaceKey: [] }); const callArgument = sendRequestStub.lastCall.args[0]; - expect(callArgument.params.spaceKey).toEqual([]); + expect(callArgument.params.spaceKey()).toBe(''); }); it('when spaceKey has one key', () => { @@ -25,7 +33,7 @@ describe('Space', () => { const callArgument = sendRequestStub.lastCall.args[0]; - expect(callArgument.params.spaceKey).toEqual(['KEY1']); + expect(callArgument.params.spaceKey()).toBe('spaceKey=KEY1'); }); it('when spaceKey has multiple keys', () => { @@ -33,7 +41,7 @@ describe('Space', () => { const callArgument = sendRequestStub.lastCall.args[0]; - expect(callArgument.params.spaceKey).toEqual(['KEY1', '&spaceKey=KEY2']); + expect(callArgument.params.spaceKey()).toBe('spaceKey=KEY1&spaceKey=KEY2'); }); }); });