diff --git a/CHANGELOG.md b/CHANGELOG.md index ebdaff03d..7dead6677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,13 @@ ### 4.1.0 -// todo add links to code for new classes and modified methods - - **General Improvements:** Enhanced JSDoc documentation across the project for better clarity and developer experience. +- **Deprecation:** Marked the `InstanceInformation.getLicense` method as deprecated. +- **Deprecation:** Marked the `Issues.getCreateIssueMeta` method as deprecated. +- **Deprecation:** Marked the `PageBeanFieldConfigurationDetails` class as deprecated. Use `Paginated` instead. +- **Deprecation:** Marked the `WorkflowUpdateResponse` and `WorkflowCreateResponse` classes as deprecated. + - **New APIs:** Added the following classes to support additional Jira APIs: - **`AppDataPolicies`**: Manage app access rule data policies, allowing developers to set and retrieve rules controlling app access ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-app-data-policies/#api-group-app-data-policies)). - **`ClassificationLevels`**: Define and manage classification levels for sensitive information in Jira ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-classification-levels/#api-group-classification-levels)). @@ -17,10 +20,6 @@ - **`TeamsInPlan`**: Configure settings for Atlassian and custom teams within advanced roadmaps plans, including creating, updating, and deleting team configurations ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-teams-in-plan/#api-group-teams-in-plan)). - **Improvement:** Changed the return type of `ProjectKeyAndNameValidation.getValidProjectKey` and `ProjectKeyAndNameValidation.getValidProjectName` from `unknown` to `string` for improved type safety and usability. -- **Improvement:** Added the `extendAdminPermissions` parameter to the following methods in the `Dashboard` class: - - `Dashboard.createDashboard` - - `Dashboard.updateDashboard` - - `Dashboard.copyDashboard` - **Improvement:** Added the `approximateLastUsed` parameter to the `Filters.createFilter` method. - **Improvement:** Added the `isSubstringMatch` parameter to the `Filters.getFiltersPaginated` method. - **Improvement:** Updated the `IssueComments.updateComment` method to allow passing a plain string for the comment instead of requiring a specific object format. @@ -38,6 +37,10 @@ - **Improvement:** Added the optional `componentSource` parameter to the `ProjectComponents.getProjectComponents` method. - **Improvement:** Added the `approvers` and `driver` parameters to the `ProjectVersions.createVersion` and `ProjectVersions.updateVersion` methods. - **Improvement:** Replaced the `maxResults` property with `maxResult` in the `UserSearch.findUserKeysByQuery` method. +- **Improvement:** Added the `extendAdminPermissions` parameter to the following methods in the `Dashboard` class: + - `Dashboard.createDashboard` + - `Dashboard.updateDashboard` + - `Dashboard.copyDashboard` - **New Method:** Added the `getCustomFieldsConfigurations` method to the `IssueCustomFieldConfigurationApps` class. - **New Method:** Added the `replaceCustomFieldOption` method to the `IssueCustomFieldOptions` class. @@ -77,6 +80,12 @@ - `updateRelatedWork`: Update related work for a version. - `createRelatedWork`: Create related work for a version. - `getRelatedWork`: Retrieve related work for a version. +- **New Method:** Added the `getProjectUsagesForWorkflowScheme` method to the `WorkflowSchemes` class. +- **New Method:** Added the `getWorkflowProjectIssueTypeUsages` method to the `Workflows` class. +- **New Methods:** Added the following methods to the `Status` class: + - `getProjectIssueTypeUsagesForStatus` + - `getProjectUsagesForStatus` + - `getWorkflowUsagesForStatus` - **Fix:** Updated the following methods in `Version2Client` and `Version3Client` to make the `parameters` argument mandatory (as it should have been initially): - `IssueFieldConfigurations.createFieldConfiguration` @@ -92,6 +101,8 @@ - `IssueSearch.matchIssues` - `IssueSearch.searchForIssuesUsingJql` - `JiraExpressions.evaluateJiraExpression` + - `Users.setUserColumns` + - `Users.getUser` - **Fix:** Improved the `Avatars.storeAvatar` method: - Added the `mimeType` parameter to specify the type of the uploaded avatar. - Updated the type of the `avatar` parameter from `any` to `Buffer | ArrayBuffer | Uint8Array | any` for better type safety. @@ -106,11 +117,6 @@ - Set the default value of the `size` parameter to `0`. - **Change:** Removed the `filter` parameter from the `JqlFunctionsApps.getPrecomputations` method (experimental method, not a breaking change). - -- **Deprecation:** Marked the `InstanceInformation.getLicense` method as deprecated. -- **Deprecation:** Marked the `Issues.getCreateIssueMeta` method as deprecated. -- **Deprecation:** Marked the `PageBeanFieldConfigurationDetails` class as deprecated. Use `Paginated` instead. - - **Change:** Renamed `JiraExpressionEvaluateContextBean` to `JiraExpressionEvaluateContext`. - **Improvement:** Added type `string` for properties `projectId` in parameters and models: diff --git a/README.md b/README.md index e77e22647..7df62e90d 100644 --- a/README.md +++ b/README.md @@ -294,9 +294,12 @@ Available groups: - [myself](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-myself/#api-group-myself) - [permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-permissions/#api-group-permissions) - [permissionSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-permission-schemes/#api-group-permission-schemes) + - [plans](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-plans/#api-group-plans) + - [prioritySchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-priority-schemes/#api-group-priority-schemes) - [projects](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-projects/#api-group-projects) - [projectAvatars](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-avatars/#api-group-project-avatars) - [projectCategories](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-categories/#api-group-project-categories) + - [projectClassificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-classification-levels/#api-group-project-classification-levels) - [projectComponents](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-components/#api-group-project-components) - [projectEmail](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-email/#api-group-project-email) - [projectFeatures](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-features/#api-group-project-features) @@ -312,8 +315,10 @@ Available groups: - [screenTabFields](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-tab-fields/#api-group-screen-tab-fields) - [screenSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-schemes/#api-group-screen-schemes) - [serverInfo](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-server-info/#api-group-server-info) + - [serviceRegistry](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-service-registry/#api-group-service-registry) - [status](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-status/#api-group-status) - [tasks](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-group-tasks) + - [teamsInPlan](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-teams-in-plan/#api-group-teams-in-plan) - [timeTracking](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-time-tracking/#api-group-time-tracking) - [uiModificationsApps](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-ui-modifications--apps-/#api-group-ui-modifications--apps-) - [users](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-group-users) diff --git a/package-lock.json b/package-lock.json index 5d62783fa..acf7d6764 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,34 +9,34 @@ "version": "4.1.0", "license": "MIT", "dependencies": { - "axios": "^1.7.9", + "axios": "^1.8.1", "formdata-node": "^6.0.3", "mime": "^4.0.6", "tslib": "^2.8.1" }, "devDependencies": { - "@types/node": "^18.19.75", - "@types/sinon": "^17.0.3", - "@typescript-eslint/eslint-plugin": "^8.23.0", - "@typescript-eslint/parser": "^8.23.0", + "@types/node": "^18.19.77", + "@types/sinon": "^17.0.4", + "@typescript-eslint/eslint-plugin": "^8.25.0", + "@typescript-eslint/parser": "^8.25.0", "dotenv": "^16.4.7", "eslint": "^8.57.1", "eslint-config-airbnb-base": "^15.0.0", - "eslint-import-resolver-typescript": "^3.7.0", + "eslint-import-resolver-typescript": "^3.8.3", "eslint-plugin-import": "^2.31.0", - "prettier": "^3.5.0", + "prettier": "^3.5.2", "prettier-plugin-jsdoc": "^1.3.2", "sinon": "^18.0.1", - "typedoc": "^0.27.7", + "typedoc": "^0.27.9", "typescript": "^5.7.3", "vite-tsconfig-paths": "^5.1.4", - "vitest": "^3.0.5" + "vitest": "^3.0.7" } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", "cpu": [ "ppc64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", "cpu": [ "arm" ], @@ -68,9 +68,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", "cpu": [ "arm64" ], @@ -85,9 +85,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", "cpu": [ "x64" ], @@ -102,9 +102,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", "cpu": [ "arm64" ], @@ -119,9 +119,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", "cpu": [ "x64" ], @@ -136,9 +136,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", "cpu": [ "arm64" ], @@ -153,9 +153,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", "cpu": [ "x64" ], @@ -170,9 +170,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", "cpu": [ "arm" ], @@ -187,9 +187,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", "cpu": [ "arm64" ], @@ -204,9 +204,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", "cpu": [ "ia32" ], @@ -221,9 +221,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", "cpu": [ "loong64" ], @@ -238,9 +238,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", "cpu": [ "mips64el" ], @@ -255,9 +255,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", "cpu": [ "ppc64" ], @@ -272,9 +272,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", "cpu": [ "riscv64" ], @@ -289,9 +289,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", "cpu": [ "s390x" ], @@ -306,9 +306,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", "cpu": [ "x64" ], @@ -323,9 +323,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", - "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", + "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", "cpu": [ "arm64" ], @@ -340,9 +340,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", "cpu": [ "x64" ], @@ -357,9 +357,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", - "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", + "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", "cpu": [ "arm64" ], @@ -374,9 +374,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", "cpu": [ "x64" ], @@ -391,9 +391,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", "cpu": [ "x64" ], @@ -408,9 +408,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", "cpu": [ "arm64" ], @@ -425,9 +425,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", "cpu": [ "ia32" ], @@ -442,9 +442,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", "cpu": [ "x64" ], @@ -675,9 +675,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.6.tgz", - "integrity": "sha512-+GcCXtOQoWuC7hhX1P00LqjjIiS/iOouHXhMdiDSnq/1DGTox4SpUvO52Xm+div6+106r+TcvOeo/cxvyEyTgg==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.8.tgz", + "integrity": "sha512-q217OSE8DTp8AFHuNHXo0Y86e1wtlfVrXiAlwkIvGRQv9zbc6mE3sjIVfwI8sYUyNxwOg0j/Vm1RKM04JcWLJw==", "cpu": [ "arm" ], @@ -689,9 +689,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.6.tgz", - "integrity": "sha512-E8+2qCIjciYUnCa1AiVF1BkRgqIGW9KzJeesQqVfyRITGQN+dFuoivO0hnro1DjT74wXLRZ7QF8MIbz+luGaJA==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.8.tgz", + "integrity": "sha512-Gigjz7mNWaOL9wCggvoK3jEIUUbGul656opstjaUSGC3eT0BM7PofdAJaBfPFWWkXNVAXbaQtC99OCg4sJv70Q==", "cpu": [ "arm64" ], @@ -703,9 +703,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.6.tgz", - "integrity": "sha512-z9Ib+OzqN3DZEjX7PDQMHEhtF+t6Mi2z/ueChQPLS/qUMKY7Ybn5A2ggFoKRNRh1q1T03YTQfBTQCJZiepESAg==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.8.tgz", + "integrity": "sha512-02rVdZ5tgdUNRxIUrFdcMBZQoaPMrxtwSb+/hOfBdqkatYHR3lZ2A2EGyHq2sGOd0Owk80oV3snlDASC24He3Q==", "cpu": [ "arm64" ], @@ -717,9 +717,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.6.tgz", - "integrity": "sha512-PShKVY4u0FDAR7jskyFIYVyHEPCPnIQY8s5OcXkdU8mz3Y7eXDJPdyM/ZWjkYdR2m0izD9HHWA8sGcXn+Qrsyg==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.8.tgz", + "integrity": "sha512-qIP/elwR/tq/dYRx3lgwK31jkZvMiD6qUtOycLhTzCvrjbZ3LjQnEM9rNhSGpbLXVJYQ3rq39A6Re0h9tU2ynw==", "cpu": [ "x64" ], @@ -731,9 +731,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.6.tgz", - "integrity": "sha512-YSwyOqlDAdKqs0iKuqvRHLN4SrD2TiswfoLfvYXseKbL47ht1grQpq46MSiQAx6rQEN8o8URtpXARCpqabqxGQ==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.8.tgz", + "integrity": "sha512-IQNVXL9iY6NniYbTaOKdrlVP3XIqazBgJOVkddzJlqnCpRi/yAeSOa8PLcECFSQochzqApIOE1GHNu3pCz+BDA==", "cpu": [ "arm64" ], @@ -745,9 +745,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.6.tgz", - "integrity": "sha512-HEP4CgPAY1RxXwwL5sPFv6BBM3tVeLnshF03HMhJYCNc6kvSqBgTMmsEjb72RkZBAWIqiPUyF1JpEBv5XT9wKQ==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.8.tgz", + "integrity": "sha512-TYXcHghgnCqYFiE3FT5QwXtOZqDj5GmaFNTNt3jNC+vh22dc/ukG2cG+pi75QO4kACohZzidsq7yKTKwq/Jq7Q==", "cpu": [ "x64" ], @@ -759,9 +759,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.6.tgz", - "integrity": "sha512-88fSzjC5xeH9S2Vg3rPgXJULkHcLYMkh8faix8DX4h4TIAL65ekwuQMA/g2CXq8W+NJC43V6fUpYZNjaX3+IIg==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.8.tgz", + "integrity": "sha512-A4iphFGNkWRd+5m3VIGuqHnG3MVnqKe7Al57u9mwgbyZ2/xF9Jio72MaY7xxh+Y87VAHmGQr73qoKL9HPbXj1g==", "cpu": [ "arm" ], @@ -773,9 +773,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.6.tgz", - "integrity": "sha512-wM4ztnutBqYFyvNeR7Av+reWI/enK9tDOTKNF+6Kk2Q96k9bwhDDOlnCUNRPvromlVXo04riSliMBs/Z7RteEg==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.8.tgz", + "integrity": "sha512-S0lqKLfTm5u+QTxlFiAnb2J/2dgQqRy/XvziPtDd1rKZFXHTyYLoVL58M/XFwDI01AQCDIevGLbQrMAtdyanpA==", "cpu": [ "arm" ], @@ -787,9 +787,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.6.tgz", - "integrity": "sha512-9RyprECbRa9zEjXLtvvshhw4CMrRa3K+0wcp3KME0zmBe1ILmvcVHnypZ/aIDXpRyfhSYSuN4EPdCCj5Du8FIA==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.8.tgz", + "integrity": "sha512-jpz9YOuPiSkL4G4pqKrus0pn9aYwpImGkosRKwNi+sJSkz+WU3anZe6hi73StLOQdfXYXC7hUfsQlTnjMd3s1A==", "cpu": [ "arm64" ], @@ -801,9 +801,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.6.tgz", - "integrity": "sha512-qTmklhCTyaJSB05S+iSovfo++EwnIEZxHkzv5dep4qoszUMX5Ca4WM4zAVUMbfdviLgCSQOu5oU8YoGk1s6M9Q==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.8.tgz", + "integrity": "sha512-KdSfaROOUJXgTVxJNAZ3KwkRc5nggDk+06P6lgi1HLv1hskgvxHUKZ4xtwHkVYJ1Rep4GNo+uEfycCRRxht7+Q==", "cpu": [ "arm64" ], @@ -815,9 +815,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.6.tgz", - "integrity": "sha512-4Qmkaps9yqmpjY5pvpkfOerYgKNUGzQpFxV6rnS7c/JfYbDSU0y6WpbbredB5cCpLFGJEqYX40WUmxMkwhWCjw==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.8.tgz", + "integrity": "sha512-NyF4gcxwkMFRjgXBM6g2lkT58OWztZvw5KkV2K0qqSnUEqCVcqdh2jN4gQrTn/YUpAcNKyFHfoOZEer9nwo6uQ==", "cpu": [ "loong64" ], @@ -829,9 +829,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.6.tgz", - "integrity": "sha512-Zsrtux3PuaxuBTX/zHdLaFmcofWGzaWW1scwLU3ZbW/X+hSsFbz9wDIp6XvnT7pzYRl9MezWqEqKy7ssmDEnuQ==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.8.tgz", + "integrity": "sha512-LMJc999GkhGvktHU85zNTDImZVUCJ1z/MbAJTnviiWmmjyckP5aQsHtcujMjpNdMZPT2rQEDBlJfubhs3jsMfw==", "cpu": [ "ppc64" ], @@ -843,9 +843,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.6.tgz", - "integrity": "sha512-aK+Zp+CRM55iPrlyKiU3/zyhgzWBxLVrw2mwiQSYJRobCURb781+XstzvA8Gkjg/hbdQFuDw44aUOxVQFycrAg==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.8.tgz", + "integrity": "sha512-xAQCAHPj8nJq1PI3z8CIZzXuXCstquz7cIOL73HHdXiRcKk8Ywwqtx2wrIy23EcTn4aZ2fLJNBB8d0tQENPCmw==", "cpu": [ "riscv64" ], @@ -857,9 +857,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.6.tgz", - "integrity": "sha512-WoKLVrY9ogmaYPXwTH326+ErlCIgMmsoRSx6bO+l68YgJnlOXhygDYSZe/qbUJCSiCiZAQ+tKm88NcWuUXqOzw==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.8.tgz", + "integrity": "sha512-DdePVk1NDEuc3fOe3dPPTb+rjMtuFw89gw6gVWxQFAuEqqSdDKnrwzZHrUYdac7A7dXl9Q2Vflxpme15gUWQFA==", "cpu": [ "s390x" ], @@ -871,9 +871,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.6.tgz", - "integrity": "sha512-Sht4aFvmA4ToHd2vFzwMFaQCiYm2lDFho5rPcvPBT5pCdC+GwHG6CMch4GQfmWTQ1SwRKS0dhDYb54khSrjDWw==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.8.tgz", + "integrity": "sha512-8y7ED8gjxITUltTUEJLQdgpbPh1sUQ0kMTmufRF/Ns5tI9TNMNlhWtmPKKHCU0SilX+3MJkZ0zERYYGIVBYHIA==", "cpu": [ "x64" ], @@ -885,9 +885,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.6.tgz", - "integrity": "sha512-zmmpOQh8vXc2QITsnCiODCDGXFC8LMi64+/oPpPx5qz3pqv0s6x46ps4xoycfUiVZps5PFn1gksZzo4RGTKT+A==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.8.tgz", + "integrity": "sha512-SCXcP0ZpGFIe7Ge+McxY5zKxiEI5ra+GT3QRxL0pMMtxPfpyLAKleZODi1zdRHkz5/BhueUrYtYVgubqe9JBNQ==", "cpu": [ "x64" ], @@ -899,9 +899,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.6.tgz", - "integrity": "sha512-3/q1qUsO/tLqGBaD4uXsB6coVGB3usxw3qyeVb59aArCgedSF66MPdgRStUd7vbZOsko/CgVaY5fo2vkvPLWiA==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.8.tgz", + "integrity": "sha512-YHYsgzZgFJzTRbth4h7Or0m5O74Yda+hLin0irAIobkLQFRQd1qWmnoVfwmKm9TXIZVAD0nZ+GEb2ICicLyCnQ==", "cpu": [ "arm64" ], @@ -913,9 +913,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.6.tgz", - "integrity": "sha512-oLHxuyywc6efdKVTxvc0135zPrRdtYVjtVD5GUm55I3ODxhU/PwkQFD97z16Xzxa1Fz0AEe4W/2hzRtd+IfpOA==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.8.tgz", + "integrity": "sha512-r3NRQrXkHr4uWy5TOjTpTYojR9XmF0j/RYgKCef+Ag46FWUTltm5ziticv8LdNsDMehjJ543x/+TJAek/xBA2w==", "cpu": [ "ia32" ], @@ -927,9 +927,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.6.tgz", - "integrity": "sha512-0PVwmgzZ8+TZ9oGBmdZoQVXflbvuwzN/HRclujpl4N/q3i+y0lqLw8n1bXA8ru3sApDjlmONaNAuYr38y1Kr9w==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.8.tgz", + "integrity": "sha512-U0FaE5O1BCpZSeE6gBl3c5ObhePQSfk9vDRToMmTkbhCOgW4jqvtS5LGyQ76L1fH8sM0keRp4uDTsbjiUyjk0g==", "cpu": [ "x64" ], @@ -970,9 +970,9 @@ } }, "node_modules/@shikijs/vscode-textmate": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.1.tgz", - "integrity": "sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", "dev": true, "license": "MIT" }, @@ -1077,9 +1077,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.19.75", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.75.tgz", - "integrity": "sha512-UIksWtThob6ZVSyxcOqCLOUNg/dyO1Qvx4McgeuhrEtHTLFTf7BBhEazaE4K806FGTPtzd/2sE90qn4fVr7cyw==", + "version": "18.19.77", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.77.tgz", + "integrity": "sha512-D94SwXkCv6X58yYiJziuwmvyqCfH99TfPVSS4IUGdXB8lCOehCz37JqpvMhqiY9GuI1npAo7ZUTG3EJZ01M8bg==", "dev": true, "license": "MIT", "dependencies": { @@ -1087,9 +1087,9 @@ } }, "node_modules/@types/sinon": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", - "integrity": "sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw==", + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", + "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==", "dev": true, "license": "MIT", "dependencies": { @@ -1111,17 +1111,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.23.0.tgz", - "integrity": "sha512-vBz65tJgRrA1Q5gWlRfvoH+w943dq9K1p1yDBY2pc+a1nbBLZp7fB9+Hk8DaALUbzjqlMfgaqlVPT1REJdkt/w==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.25.0.tgz", + "integrity": "sha512-VM7bpzAe7JO/BFf40pIT1lJqS/z1F8OaSsUB3rpFJucQA4cOSuH2RVVVkFULN+En0Djgr29/jb4EQnedUo95KA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/type-utils": "8.23.0", - "@typescript-eslint/utils": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/type-utils": "8.25.0", + "@typescript-eslint/utils": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1141,16 +1141,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.23.0.tgz", - "integrity": "sha512-h2lUByouOXFAlMec2mILeELUbME5SZRN/7R9Cw2RD2lRQQY08MWMM+PmVVKKJNK1aIwqTo9t/0CvOxwPbRIE2Q==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.25.0.tgz", + "integrity": "sha512-4gbs64bnbSzu4FpgMiQ1A+D+urxkoJk/kqlDJ2W//5SygaEiAP2B4GoS7TEdxgwol2el03gckFV9lJ4QOMiiHg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/typescript-estree": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/typescript-estree": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "debug": "^4.3.4" }, "engines": { @@ -1166,14 +1166,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.23.0.tgz", - "integrity": "sha512-OGqo7+dXHqI7Hfm+WqkZjKjsiRtFUQHPdGMXzk5mYXhJUedO7e/Y7i8AK3MyLMgZR93TX4bIzYrfyVjLC+0VSw==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.25.0.tgz", + "integrity": "sha512-6PPeiKIGbgStEyt4NNXa2ru5pMzQ8OYKO1hX1z53HMomrmiSB+R5FmChgQAP1ro8jMtNawz+TRQo/cSXrauTpg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0" + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1184,14 +1184,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.23.0.tgz", - "integrity": "sha512-iIuLdYpQWZKbiH+RkCGc6iu+VwscP5rCtQ1lyQ7TYuKLrcZoeJVpcLiG8DliXVkUxirW/PWlmS+d6yD51L9jvA==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.25.0.tgz", + "integrity": "sha512-d77dHgHWnxmXOPJuDWO4FDWADmGQkN5+tt6SFRZz/RtCWl4pHgFl3+WdYCn16+3teG09DY6XtEpf3gGD0a186g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.23.0", - "@typescript-eslint/utils": "8.23.0", + "@typescript-eslint/typescript-estree": "8.25.0", + "@typescript-eslint/utils": "8.25.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -1208,9 +1208,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.23.0.tgz", - "integrity": "sha512-1sK4ILJbCmZOTt9k4vkoulT6/y5CHJ1qUYxqpF1K/DBAd8+ZUL4LlSCxOssuH5m4rUaaN0uS0HlVPvd45zjduQ==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.25.0.tgz", + "integrity": "sha512-+vUe0Zb4tkNgznQwicsvLUJgZIRs6ITeWSCclX1q85pR1iOiaj+4uZJIUp//Z27QWu5Cseiw3O3AR8hVpax7Aw==", "dev": true, "license": "MIT", "engines": { @@ -1222,14 +1222,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.23.0.tgz", - "integrity": "sha512-LcqzfipsB8RTvH8FX24W4UUFk1bl+0yTOf9ZA08XngFwMg4Kj8A+9hwz8Cr/ZS4KwHrmo9PJiLZkOt49vPnuvQ==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.25.0.tgz", + "integrity": "sha512-ZPaiAKEZ6Blt/TPAx5Ot0EIB/yGtLI2EsGoY6F7XKklfMxYQyvtL+gT/UCqkMzO0BVFHLDlzvFqQzurYahxv9Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1249,16 +1249,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.23.0.tgz", - "integrity": "sha512-uB/+PSo6Exu02b5ZEiVtmY6RVYO7YU5xqgzTIVZwTHvvK3HsL8tZZHFaTLFtRG3CsV4A5mhOv+NZx5BlhXPyIA==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.25.0.tgz", + "integrity": "sha512-syqRbrEv0J1wywiLsK60XzHnQe/kRViI3zwFALrNEgnntn1l24Ra2KvOAWwWbWZ1lBZxZljPDGOq967dsl6fkA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/typescript-estree": "8.23.0" + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/typescript-estree": "8.25.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1273,13 +1273,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.23.0.tgz", - "integrity": "sha512-oWWhcWDLwDfu++BGTZcmXWqpwtkwb5o7fxUIGksMQQDSdPW9prsSnfIOZMlsj4vBOSrcnjIUZMiIjODgGosFhQ==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.25.0.tgz", + "integrity": "sha512-kCYXKAum9CecGVHGij7muybDfTS2sD3t0L4bJsEZLkyrXUImiCTq1M3LG2SRtOhiHFwMR9wAFplpT6XHYjTkwQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.23.0", + "@typescript-eslint/types": "8.25.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1311,15 +1311,15 @@ "license": "ISC" }, "node_modules/@vitest/expect": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.0.5.tgz", - "integrity": "sha512-nNIOqupgZ4v5jWuQx2DSlHLEs7Q4Oh/7AYwNyE+k0UQzG7tSmjPXShUikn1mpNGzYEN2jJbTvLejwShMitovBA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.0.7.tgz", + "integrity": "sha512-QP25f+YJhzPfHrHfYHtvRn+uvkCFCqFtW9CktfBxmB+25QqWsx7VB2As6f4GmwllHLDhXNHvqedwhvMmSnNmjw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.0.5", - "@vitest/utils": "3.0.5", - "chai": "^5.1.2", + "@vitest/spy": "3.0.7", + "@vitest/utils": "3.0.7", + "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, "funding": { @@ -1327,13 +1327,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.0.5.tgz", - "integrity": "sha512-CLPNBFBIE7x6aEGbIjaQAX03ZZlBMaWwAjBdMkIf/cAn6xzLTiM3zYqO/WAbieEjsAZir6tO71mzeHZoodThvw==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.0.7.tgz", + "integrity": "sha512-qui+3BLz9Eonx4EAuR/i+QlCX6AUZ35taDQgwGkK/Tw6/WgwodSrjN1X2xf69IA/643ZX5zNKIn2svvtZDrs4w==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.0.5", + "@vitest/spy": "3.0.7", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -1354,9 +1354,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.0.5.tgz", - "integrity": "sha512-CjUtdmpOcm4RVtB+up8r2vVDLR16Mgm/bYdkGFe3Yj/scRfCpbSi2W/BDSDcFK7ohw8UXvjMbOp9H4fByd/cOA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.0.7.tgz", + "integrity": "sha512-CiRY0BViD/V8uwuEzz9Yapyao+M9M008/9oMOSQydwbwb+CMokEq3XVaF3XK/VWaOK0Jm9z7ENhybg70Gtxsmg==", "dev": true, "license": "MIT", "dependencies": { @@ -1367,38 +1367,38 @@ } }, "node_modules/@vitest/runner": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.0.5.tgz", - "integrity": "sha512-BAiZFityFexZQi2yN4OX3OkJC6scwRo8EhRB0Z5HIGGgd2q+Nq29LgHU/+ovCtd0fOfXj5ZI6pwdlUmC5bpi8A==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.0.7.tgz", + "integrity": "sha512-WeEl38Z0S2ZcuRTeyYqaZtm4e26tq6ZFqh5y8YD9YxfWuu0OFiGFUbnxNynwLjNRHPsXyee2M9tV7YxOTPZl2g==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.0.5", - "pathe": "^2.0.2" + "@vitest/utils": "3.0.7", + "pathe": "^2.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.0.5.tgz", - "integrity": "sha512-GJPZYcd7v8QNUJ7vRvLDmRwl+a1fGg4T/54lZXe+UOGy47F9yUfE18hRCtXL5aHN/AONu29NGzIXSVFh9K0feA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.0.7.tgz", + "integrity": "sha512-eqTUryJWQN0Rtf5yqCGTQWsCFOQe4eNz5Twsu21xYEcnFJtMU5XvmG0vgebhdLlrHQTSq5p8vWHJIeJQV8ovsA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.0.5", + "@vitest/pretty-format": "3.0.7", "magic-string": "^0.30.17", - "pathe": "^2.0.2" + "pathe": "^2.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/spy": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.0.5.tgz", - "integrity": "sha512-5fOzHj0WbUNqPK6blI/8VzZdkBlQLnT25knX0r4dbZI9qoZDf3qAdjoMmDcLG5A83W6oUUFJgUd0EYBc2P5xqg==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.0.7.tgz", + "integrity": "sha512-4T4WcsibB0B6hrKdAZTM37ekuyFZt2cGbEGd2+L0P8ov15J1/HUsUaqkXEQPNAWr4BtPPe1gI+FYfMHhEKfR8w==", "dev": true, "license": "MIT", "dependencies": { @@ -1409,14 +1409,14 @@ } }, "node_modules/@vitest/utils": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.0.5.tgz", - "integrity": "sha512-N9AX0NUoUtVwKwy21JtwzaqR5L5R5A99GAbrHfCCXK1lp593i/3AZAXhSP43wRQuxYsflrdzEfXZFo1reR1Nkg==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.0.7.tgz", + "integrity": "sha512-xePVpCRfooFX3rANQjwoditoXgWb1MaFbzmGuPP59MK6i13mrnDw/yEIyJudLeW6/38mCNcwCiJIGmpDPibAIg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.0.5", - "loupe": "^3.1.2", + "@vitest/pretty-format": "3.0.7", + "loupe": "^3.1.3", "tinyrainbow": "^2.0.0" }, "funding": { @@ -1658,9 +1658,9 @@ } }, "node_modules/axios": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", - "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.1.tgz", + "integrity": "sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -1735,10 +1735,9 @@ } }, "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -1776,9 +1775,9 @@ } }, "node_modules/chai": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", - "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", + "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", "dev": true, "license": "MIT", "dependencies": { @@ -2113,7 +2112,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", @@ -2221,7 +2219,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2231,7 +2228,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2248,7 +2244,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -2261,7 +2256,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -2274,13 +2268,16 @@ } }, "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-to-primitive": { @@ -2302,9 +2299,9 @@ } }, "node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -2315,31 +2312,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" } }, "node_modules/escape-string-regexp": { @@ -2465,20 +2462,19 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.7.0.tgz", - "integrity": "sha512-Vrwyi8HHxY97K5ebydMtffsWAn1SCR9eol49eCd5fJS4O1WV7PaAjbcjmbfJJSMz/t4Mal212Uz/fQZrOB8mow==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.8.3.tgz", + "integrity": "sha512-A0bu4Ks2QqDWNpeEgTQMPTngaMhuDu4yv6xpftBMAf+1ziXnpx+eSR1WRfoPTe2BAiAjHFZ7kSNx1fvr5g5pmQ==", "dev": true, "license": "ISC", "dependencies": { "@nolyfill/is-core-module": "1.0.39", "debug": "^4.3.7", "enhanced-resolve": "^5.15.0", - "fast-glob": "^3.3.2", - "get-tsconfig": "^4.7.5", + "get-tsconfig": "^4.10.0", "is-bun-module": "^1.0.2", - "is-glob": "^4.0.3", - "stable-hash": "^0.0.4" + "stable-hash": "^0.0.4", + "tinyglobby": "^0.2.12" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -2748,9 +2744,9 @@ } }, "node_modules/expect-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", - "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.0.tgz", + "integrity": "sha512-80F22aiJ3GLyVnS/B3HzgR6RelZVumzj9jkL0Rhz4h0xYbNW9PjlQz5h3J/SShErbXBc295vseR4/MIbVmUbeA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2809,9 +2805,9 @@ "license": "MIT" }, "node_modules/fastq": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", - "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, "license": "ISC", "dependencies": { @@ -2877,9 +2873,9 @@ } }, "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true, "license": "ISC" }, @@ -2904,9 +2900,9 @@ } }, "node_modules/for-each": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.4.tgz", - "integrity": "sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", "dev": true, "license": "MIT", "dependencies": { @@ -2920,13 +2916,14 @@ } }, "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" }, "engines": { @@ -2968,7 +2965,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3006,18 +3002,17 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", - "dev": true, + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", + "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "get-proto": "^1.0.0", + "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", @@ -3034,7 +3029,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", @@ -3178,7 +3172,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3257,7 +3250,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3270,7 +3262,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -3286,7 +3277,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -3943,7 +3933,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -4006,9 +3995,9 @@ } }, "node_modules/micromark": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.1.tgz", - "integrity": "sha512-eBPdkcoCNvYcxQOAKAlceo5SNdzZWfF+FcSupREAzdAh9rRmE239CEQAiTwIgblwnoM8zzj35sZ5ZwvSEOF6Kw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", + "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", "dev": true, "funding": [ { @@ -4042,9 +4031,9 @@ } }, "node_modules/micromark-core-commonmark": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.2.tgz", - "integrity": "sha512-FKjQKbxd1cibWMM1P9N+H8TwlgGgSkWZMmfuVucLCHaYqeSvJ0hFeHsIa65pA2nYbes0f8LDHPMrd9X7Ujxg9w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", + "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", "dev": true, "funding": [ { @@ -4412,9 +4401,9 @@ } }, "node_modules/micromark-util-subtokenize": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.0.4.tgz", - "integrity": "sha512-N6hXjrin2GTJDe3MVjf5FuXpm12PGm80BrUAeub9XFXca8JZbP+oIwY4LJSVwFUCL1IPm/WwSVUN7goFHmSGGQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", + "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", "dev": true, "funding": [ { @@ -4452,9 +4441,9 @@ "license": "MIT" }, "node_modules/micromark-util-types": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.1.tgz", - "integrity": "sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", "dev": true, "funding": [ { @@ -4852,9 +4841,9 @@ } }, "node_modules/pathe": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.2.tgz", - "integrity": "sha512-15Ztpk+nov8DR524R4BF7uEuzESgzUEAV4Ah7CUMNGXdE5ELuvxElxGXndBl32vMSsWa1jpNf22Z+Er3sKwq+w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, "license": "MIT" }, @@ -4899,9 +4888,9 @@ } }, "node_modules/postcss": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", - "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "dev": true, "funding": [ { @@ -4938,9 +4927,9 @@ } }, "node_modules/prettier": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.0.tgz", - "integrity": "sha512-quyMrVt6svPS7CjQ9gKb3GLEX/rl3BCL2oa/QkNcXv4YNVBC9olt3s+H7ukto06q7B1Qz46PbrKLO34PR6vXcA==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.2.tgz", + "integrity": "sha512-lc6npv5PH7hVqozBR7lkBNOGXV9vMwROAPlumdBkX0wTbbzPu/U1hk5yL8p2pt4Xoc+2mkT8t/sow2YrV/M5qg==", "dev": true, "license": "MIT", "bin": { @@ -5104,9 +5093,9 @@ } }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "engines": { @@ -5132,9 +5121,9 @@ } }, "node_modules/rollup": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz", - "integrity": "sha512-wc2cBWqJgkU3Iz5oztRkQbfVkbxoz5EhnCGOrnJvnLnQ7O0WhQUYyv18qQI79O8L7DdHrrlJNeCHd4VGpnaXKQ==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.8.tgz", + "integrity": "sha512-489gTVMzAYdiZHFVA/ig/iYFllCcWFHMvUHI1rpFmkoUtRlQxqh6/yiNqnYibjMZ2b/+FUQwldG+aLsEt6bglQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5148,25 +5137,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.34.6", - "@rollup/rollup-android-arm64": "4.34.6", - "@rollup/rollup-darwin-arm64": "4.34.6", - "@rollup/rollup-darwin-x64": "4.34.6", - "@rollup/rollup-freebsd-arm64": "4.34.6", - "@rollup/rollup-freebsd-x64": "4.34.6", - "@rollup/rollup-linux-arm-gnueabihf": "4.34.6", - "@rollup/rollup-linux-arm-musleabihf": "4.34.6", - "@rollup/rollup-linux-arm64-gnu": "4.34.6", - "@rollup/rollup-linux-arm64-musl": "4.34.6", - "@rollup/rollup-linux-loongarch64-gnu": "4.34.6", - "@rollup/rollup-linux-powerpc64le-gnu": "4.34.6", - "@rollup/rollup-linux-riscv64-gnu": "4.34.6", - "@rollup/rollup-linux-s390x-gnu": "4.34.6", - "@rollup/rollup-linux-x64-gnu": "4.34.6", - "@rollup/rollup-linux-x64-musl": "4.34.6", - "@rollup/rollup-win32-arm64-msvc": "4.34.6", - "@rollup/rollup-win32-ia32-msvc": "4.34.6", - "@rollup/rollup-win32-x64-msvc": "4.34.6", + "@rollup/rollup-android-arm-eabi": "4.34.8", + "@rollup/rollup-android-arm64": "4.34.8", + "@rollup/rollup-darwin-arm64": "4.34.8", + "@rollup/rollup-darwin-x64": "4.34.8", + "@rollup/rollup-freebsd-arm64": "4.34.8", + "@rollup/rollup-freebsd-x64": "4.34.8", + "@rollup/rollup-linux-arm-gnueabihf": "4.34.8", + "@rollup/rollup-linux-arm-musleabihf": "4.34.8", + "@rollup/rollup-linux-arm64-gnu": "4.34.8", + "@rollup/rollup-linux-arm64-musl": "4.34.8", + "@rollup/rollup-linux-loongarch64-gnu": "4.34.8", + "@rollup/rollup-linux-powerpc64le-gnu": "4.34.8", + "@rollup/rollup-linux-riscv64-gnu": "4.34.8", + "@rollup/rollup-linux-s390x-gnu": "4.34.8", + "@rollup/rollup-linux-x64-gnu": "4.34.8", + "@rollup/rollup-linux-x64-musl": "4.34.8", + "@rollup/rollup-win32-arm64-msvc": "4.34.8", + "@rollup/rollup-win32-ia32-msvc": "4.34.8", + "@rollup/rollup-win32-x64-msvc": "4.34.8", "fsevents": "~2.3.2" } }, @@ -5619,6 +5608,51 @@ "dev": true, "license": "MIT" }, + "node_modules/tinyglobby": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tinypool": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", @@ -5830,9 +5864,9 @@ } }, "node_modules/typedoc": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.27.7.tgz", - "integrity": "sha512-K/JaUPX18+61W3VXek1cWC5gwmuLvYTOXJzBvD9W7jFvbPnefRnCHQCEPw7MSNrP/Hj7JJrhZtDDLKdcYm6ucg==", + "version": "0.27.9", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.27.9.tgz", + "integrity": "sha512-/z585740YHURLl9DN2jCWe6OW7zKYm6VoQ93H0sxZ1cwHQEQrUn5BJrEnkWhfzUdyO+BLGjnKUZ9iz9hKloFDw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -5849,7 +5883,7 @@ "node": ">= 18" }, "peerDependencies": { - "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x" + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x" } }, "node_modules/typescript": { @@ -5924,14 +5958,14 @@ } }, "node_modules/vite": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.1.0.tgz", - "integrity": "sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.0.tgz", + "integrity": "sha512-7dPxoo+WsT/64rDcwoOjk76XHj+TqNTIvHKcuMQ1k4/SeHDaQt5GFAeLYzrimZrMpn/O6DtdI03WUjdxuPM0oQ==", "dev": true, "license": "MIT", "dependencies": { - "esbuild": "^0.24.2", - "postcss": "^8.5.1", + "esbuild": "^0.25.0", + "postcss": "^8.5.3", "rollup": "^4.30.1" }, "bin": { @@ -5996,16 +6030,16 @@ } }, "node_modules/vite-node": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.0.5.tgz", - "integrity": "sha512-02JEJl7SbtwSDJdYS537nU6l+ktdvcREfLksk/NDAqtdKWGqHl+joXzEubHROmS3E6pip+Xgu2tFezMu75jH7A==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.0.7.tgz", + "integrity": "sha512-2fX0QwX4GkkkpULXdT1Pf4q0tC1i1lFOyseKoonavXUNlQ77KpW2XqBGGNIm/J4Ows4KxgGJzDguYVPKwG/n5A==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.4.0", "es-module-lexer": "^1.6.0", - "pathe": "^2.0.2", + "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0" }, "bin": { @@ -6039,31 +6073,31 @@ } }, "node_modules/vitest": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.0.5.tgz", - "integrity": "sha512-4dof+HvqONw9bvsYxtkfUp2uHsTN9bV2CZIi1pWgoFpL1Lld8LA1ka9q/ONSsoScAKG7NVGf2stJTI7XRkXb2Q==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.0.7.tgz", + "integrity": "sha512-IP7gPK3LS3Fvn44x30X1dM9vtawm0aesAa2yBIZ9vQf+qB69NXC5776+Qmcr7ohUXIQuLhk7xQR0aSUIDPqavg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "3.0.5", - "@vitest/mocker": "3.0.5", - "@vitest/pretty-format": "^3.0.5", - "@vitest/runner": "3.0.5", - "@vitest/snapshot": "3.0.5", - "@vitest/spy": "3.0.5", - "@vitest/utils": "3.0.5", - "chai": "^5.1.2", + "@vitest/expect": "3.0.7", + "@vitest/mocker": "3.0.7", + "@vitest/pretty-format": "^3.0.7", + "@vitest/runner": "3.0.7", + "@vitest/snapshot": "3.0.7", + "@vitest/spy": "3.0.7", + "@vitest/utils": "3.0.7", + "chai": "^5.2.0", "debug": "^4.4.0", "expect-type": "^1.1.0", "magic-string": "^0.30.17", - "pathe": "^2.0.2", + "pathe": "^2.0.3", "std-env": "^3.8.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", "tinypool": "^1.0.2", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.0.5", + "vite-node": "3.0.7", "why-is-node-running": "^2.3.0" }, "bin": { @@ -6079,8 +6113,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.0.5", - "@vitest/ui": "3.0.5", + "@vitest/browser": "3.0.7", + "@vitest/ui": "3.0.7", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index 9a6192600..1033b93ce 100644 --- a/package.json +++ b/package.json @@ -57,25 +57,25 @@ "code:formatting": "npm run replace:all && npm run prettier && npm run lint:fix" }, "devDependencies": { - "@types/node": "^18.19.75", - "@types/sinon": "^17.0.3", - "@typescript-eslint/eslint-plugin": "^8.23.0", - "@typescript-eslint/parser": "^8.23.0", + "@types/node": "^18.19.77", + "@types/sinon": "^17.0.4", + "@typescript-eslint/eslint-plugin": "^8.25.0", + "@typescript-eslint/parser": "^8.25.0", "dotenv": "^16.4.7", "eslint": "^8.57.1", "eslint-config-airbnb-base": "^15.0.0", - "eslint-import-resolver-typescript": "^3.7.0", + "eslint-import-resolver-typescript": "^3.8.3", "eslint-plugin-import": "^2.31.0", - "prettier": "^3.5.0", + "prettier": "^3.5.2", "prettier-plugin-jsdoc": "^1.3.2", "sinon": "^18.0.1", - "typedoc": "^0.27.7", + "typedoc": "^0.27.9", "typescript": "^5.7.3", "vite-tsconfig-paths": "^5.1.4", - "vitest": "^3.0.5" + "vitest": "^3.0.7" }, "dependencies": { - "axios": "^1.7.9", + "axios": "^1.8.1", "formdata-node": "^6.0.3", "mime": "^4.0.6", "tslib": "^2.8.1" diff --git a/src/version2/appDataPolicies.ts b/src/version2/appDataPolicies.ts new file mode 100644 index 000000000..4fe49eb9c --- /dev/null +++ b/src/version2/appDataPolicies.ts @@ -0,0 +1,42 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class AppDataPolicies { + constructor(private client: Client) {} + /** Returns data policy for the workspace. */ + async getPolicy(callback: Callback): Promise; + /** Returns data policy for the workspace. */ + async getPolicy(callback?: never): Promise; + async getPolicy(callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/data-policy', + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + /** Returns data policies for the projects specified in the request. */ + async getPolicies( + parameters: Parameters.GetPolicies | undefined, + callback: Callback, + ): Promise; + /** Returns data policies for the projects specified in the request. */ + async getPolicies(parameters?: Parameters.GetPolicies, callback?: never): Promise; + async getPolicies( + parameters?: Parameters.GetPolicies, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/data-policy/project', + method: 'GET', + params: { + ids: parameters?.ids, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/appMigration.ts b/src/version2/appMigration.ts index 78cf12293..4d894ad02 100644 --- a/src/version2/appMigration.ts +++ b/src/version2/appMigration.ts @@ -12,7 +12,7 @@ export class AppMigration { * fields can be updated. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * Connect apps can make this request. + * Connect apps can make this request */ async updateIssueFields(parameters: Parameters.UpdateIssueFields, callback: Callback): Promise; /** @@ -20,7 +20,7 @@ export class AppMigration { * fields can be updated. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * Connect apps can make this request. + * Connect apps can make this request */ async updateIssueFields(parameters: Parameters.UpdateIssueFields, callback?: never): Promise; async updateIssueFields( diff --git a/src/version2/appProperties.ts b/src/version2/appProperties.ts index cb897fb88..5f1b26e07 100644 --- a/src/version2/appProperties.ts +++ b/src/version2/appProperties.ts @@ -11,9 +11,8 @@ export class AppProperties { * Gets all the properties of an app. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperties( parameters: Parameters.GetAddonProperties | string, @@ -23,9 +22,8 @@ export class AppProperties { * Gets all the properties of an app. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperties( parameters: Parameters.GetAddonProperties | string, @@ -49,9 +47,8 @@ export class AppProperties { * Returns the key and value of an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperty( parameters: Parameters.GetAddonProperty, @@ -61,9 +58,8 @@ export class AppProperties { * Returns the key and value of an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperty( parameters: Parameters.GetAddonProperty, @@ -88,7 +84,8 @@ export class AppProperties { * maximum length is 32768 characters. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async putAddonProperty( parameters: Parameters.PutAddonProperty, @@ -101,7 +98,8 @@ export class AppProperties { * maximum length is 32768 characters. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async putAddonProperty( parameters: Parameters.PutAddonProperty, @@ -124,14 +122,16 @@ export class AppProperties { * Deletes an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async deleteAddonProperty(parameters: Parameters.DeleteAddonProperty, callback: Callback): Promise; /** * Deletes an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async deleteAddonProperty(parameters: Parameters.DeleteAddonProperty, callback?: never): Promise; async deleteAddonProperty( @@ -149,7 +149,9 @@ export class AppProperties { /** * Sets the value of a Forge app's property. These values can be retrieved in [Jira * expressions](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) through the `app` [context - * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables). + * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables). They are also + * available in [entity property display + * conditions](/platform/forge/manifest-reference/display-conditions/entity-property-conditions/). * * For other use cases, use the [Storage * API](https://developer.atlassian.com/platform/forge/runtime-reference/storage-api/). @@ -159,6 +161,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async putAppProperty( parameters: Parameters.PutAppProperty, @@ -167,7 +172,9 @@ export class AppProperties { /** * Sets the value of a Forge app's property. These values can be retrieved in [Jira * expressions](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) through the `app` [context - * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables). + * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables). They are also + * available in [entity property display + * conditions](/platform/forge/manifest-reference/display-conditions/entity-property-conditions/). * * For other use cases, use the [Storage * API](https://developer.atlassian.com/platform/forge/runtime-reference/storage-api/). @@ -177,6 +184,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async putAppProperty( parameters: Parameters.PutAppProperty, @@ -186,7 +196,6 @@ export class AppProperties { parameters: Parameters.PutAppProperty, callback?: Callback, ): Promise { - // todo const config: RequestConfig = { url: `/rest/forge/1/app/properties/${parameters.propertyKey}`, method: 'PUT', @@ -201,6 +210,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteAppProperty(parameters: Parameters.DeleteAppProperty, callback: Callback): Promise; /** @@ -208,6 +220,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteAppProperty(parameters: Parameters.DeleteAppProperty, callback?: never): Promise; async deleteAppProperty( diff --git a/src/version2/avatars.ts b/src/version2/avatars.ts index 9e9f16b3c..d2d6b4201 100644 --- a/src/version2/avatars.ts +++ b/src/version2/avatars.ts @@ -8,7 +8,8 @@ export class Avatars { constructor(private client: Client) {} /** - * Returns a list of system avatar details by owner type, where the owner types are issue type, project, or user. + * Returns a list of system avatar details by owner type, where the owner types are issue type, project, user or + * priority. * * This operation can be accessed anonymously. * @@ -19,7 +20,8 @@ export class Avatars { callback: Callback, ): Promise; /** - * Returns a list of system avatar details by owner type, where the owner types are issue type, project, or user. + * Returns a list of system avatar details by owner type, where the owner types are issue type, project, user or + * priority. * * This operation can be accessed anonymously. * @@ -42,9 +44,8 @@ export class Avatars { return this.client.sendRequest(config, callback); } - /** - * Returns the system and custom avatars for a project or issue type. + * Returns the system and custom avatars for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -55,10 +56,11 @@ export class Avatars { * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. * - For system avatars, none. + * - For priority avatars, none. */ async getAvatars(parameters: Parameters.GetAvatars, callback: Callback): Promise; /** - * Returns the system and custom avatars for a project or issue type. + * Returns the system and custom avatars for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -69,6 +71,7 @@ export class Avatars { * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. * - For system avatars, none. + * - For priority avatars, none. */ async getAvatars(parameters: Parameters.GetAvatars, callback?: never): Promise; async getAvatars(parameters: Parameters.GetAvatars, callback?: Callback): Promise { @@ -81,7 +84,7 @@ export class Avatars { } /** - * Loads a custom avatar for a project or issue type. + * Loads a custom avatar for a project, issue type or priority. * * The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of * the image. The length of the square's sides is set to the smaller of the height or width of the image. @@ -93,13 +96,14 @@ export class Avatars { * - [Update issue type](#api-rest-api-2-issuetype-id-put) to set it as the issue type's displayed avatar. * - [Set project avatar](#api-rest-api-2-project-projectIdOrKey-avatar-put) to set it as the project's displayed * avatar. + * - [Update priority](#api-rest-api-2-priority-id-put) to set it as the priority's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async storeAvatar(parameters: Parameters.StoreAvatar, callback: Callback): Promise; /** - * Loads a custom avatar for a project or issue type. + * Loads a custom avatar for a project, issue type or priority. * * The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of * the image. The length of the square's sides is set to the smaller of the height or width of the image. @@ -111,6 +115,7 @@ export class Avatars { * - [Update issue type](#api-rest-api-2-issuetype-id-put) to set it as the issue type's displayed avatar. * - [Set project avatar](#api-rest-api-2-project-projectIdOrKey-avatar-put) to set it as the project's displayed * avatar. + * - [Update priority](#api-rest-api-2-priority-id-put) to set it as the priority's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -136,14 +141,14 @@ export class Avatars { } /** - * Deletes an avatar from a project or issue type. + * Deletes an avatar from a project, issue type or priority. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async deleteAvatar(parameters: Parameters.DeleteAvatar, callback: Callback): Promise; /** - * Deletes an avatar from a project or issue type. + * Deletes an avatar from a project, issue type or priority. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -159,7 +164,7 @@ export class Avatars { } /** - * Returns the default project or issue type avatar image. + * Returns the default project, issue type or priority avatar image. * * This operation can be accessed anonymously. * @@ -170,7 +175,7 @@ export class Avatars { callback: Callback, ): Promise; /** - * Returns the default project or issue type avatar image. + * Returns the default project, issue type or priority avatar image. * * This operation can be accessed anonymously. * @@ -191,8 +196,8 @@ export class Avatars { method: 'GET', responseType: 'arraybuffer', params: { - size: typeof parameters !== 'string' && parameters.size, - format: typeof parameters !== 'string' && parameters.format, + size: typeof parameters !== 'string' ? parameters.size : undefined, + format: typeof parameters !== 'string' ? parameters.format : undefined, }, }; @@ -207,7 +212,7 @@ export class Avatars { } /** - * Returns a project or issue type avatar image by ID. + * Returns a project, issue type or priority avatar image by ID. * * This operation can be accessed anonymously. * @@ -218,13 +223,14 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByID( parameters: Parameters.GetAvatarImageByID, callback: Callback, ): Promise; /** - * Returns a project or issue type avatar image by ID. + * Returns a project, issue type or priority avatar image by ID. * * This operation can be accessed anonymously. * @@ -235,6 +241,7 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByID( parameters: Parameters.GetAvatarImageByID, @@ -265,7 +272,7 @@ export class Avatars { } /** - * Returns the avatar image for a project or issue type. + * Returns the avatar image for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -276,13 +283,14 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByOwner( parameters: Parameters.GetAvatarImageByOwner, callback: Callback, ): Promise; /** - * Returns the avatar image for a project or issue type. + * Returns the avatar image for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -293,6 +301,7 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByOwner( parameters: Parameters.GetAvatarImageByOwner, diff --git a/src/version2/classificationLevels.ts b/src/version2/classificationLevels.ts new file mode 100644 index 000000000..7e53a9344 --- /dev/null +++ b/src/version2/classificationLevels.ts @@ -0,0 +1,43 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ClassificationLevels { + constructor(private client: Client) {} + + /** + * Returns all classification levels. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + */ + async getAllUserDataClassificationLevels( + parameters: Parameters.GetAllUserDataClassificationLevels | undefined, + callback: Callback, + ): Promise; + /** + * Returns all classification levels. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + */ + async getAllUserDataClassificationLevels( + parameters?: Parameters.GetAllUserDataClassificationLevels, + callback?: never, + ): Promise; + async getAllUserDataClassificationLevels( + parameters?: Parameters.GetAllUserDataClassificationLevels, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/classification-levels', + method: 'GET', + params: { + status: parameters?.status, + orderBy: parameters?.orderBy, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/client/version2Client.ts b/src/version2/client/version2Client.ts index a7413e694..0934c399c 100644 --- a/src/version2/client/version2Client.ts +++ b/src/version2/client/version2Client.ts @@ -1,10 +1,12 @@ import { BaseClient } from '../../clients/baseClient'; import { AnnouncementBanner } from '../announcementBanner'; +import { AppDataPolicies } from '../appDataPolicies'; import { ApplicationRoles } from '../applicationRoles'; import { AppMigration } from '../appMigration'; import { AppProperties } from '../appProperties'; import { AuditRecords } from '../auditRecords'; import { Avatars } from '../avatars'; +import { ClassificationLevels } from '../classificationLevels'; import { Dashboards } from '../dashboards'; import { DynamicModules } from '../dynamicModules'; import { Filters } from '../filters'; @@ -50,8 +52,11 @@ import { LicenseMetrics } from '../licenseMetrics'; import { Myself } from '../myself'; import { Permissions } from '../permissions'; import { PermissionSchemes } from '../permissionSchemes'; +import { Plans } from '../plans'; +import { PrioritySchemes } from '../prioritySchemes'; import { ProjectAvatars } from '../projectAvatars'; import { ProjectCategories } from '../projectCategories'; +import { ProjectClassificationLevels } from '../projectClassificationLevels'; import { ProjectComponents } from '../projectComponents'; import { ProjectEmail } from '../projectEmail'; import { ProjectFeatures } from '../projectFeatures'; @@ -68,8 +73,10 @@ import { ScreenSchemes } from '../screenSchemes'; import { ScreenTabFields } from '../screenTabFields'; import { ScreenTabs } from '../screenTabs'; import { ServerInfo } from '../serverInfo'; +import { ServiceRegistry } from '../serviceRegistry'; import { Status } from '../status'; import { Tasks } from '../tasks'; +import { TeamsInPlan } from '../teamsInPlan'; import { TimeTracking } from '../timeTracking'; import { UIModificationsApps } from '../uIModificationsApps'; import { UserProperties } from '../userProperties'; @@ -87,11 +94,13 @@ import { WorkflowTransitionRules } from '../workflowTransitionRules'; export class Version2Client extends BaseClient { announcementBanner = new AnnouncementBanner(this); + appDataPolicies = new AppDataPolicies(this); applicationRoles = new ApplicationRoles(this); appMigration = new AppMigration(this); appProperties = new AppProperties(this); auditRecords = new AuditRecords(this); avatars = new Avatars(this); + classificationLevels = new ClassificationLevels(this); dashboards = new Dashboards(this); dynamicModules = new DynamicModules(this); filters = new Filters(this); @@ -137,8 +146,11 @@ export class Version2Client extends BaseClient { myself = new Myself(this); permissions = new Permissions(this); permissionSchemes = new PermissionSchemes(this); + plans = new Plans(this); + prioritySchemes = new PrioritySchemes(this); projectAvatars = new ProjectAvatars(this); projectCategories = new ProjectCategories(this); + projectClassificationLevels = new ProjectClassificationLevels(this); projectComponents = new ProjectComponents(this); projectEmail = new ProjectEmail(this); projectFeatures = new ProjectFeatures(this); @@ -155,8 +167,10 @@ export class Version2Client extends BaseClient { screenTabFields = new ScreenTabFields(this); screenTabs = new ScreenTabs(this); serverInfo = new ServerInfo(this); + serviceRegistry = new ServiceRegistry(this); status = new Status(this); tasks = new Tasks(this); + teamsInPlan = new TeamsInPlan(this); timeTracking = new TimeTracking(this); uiModificationsApps = new UIModificationsApps(this); userProperties = new UserProperties(this); diff --git a/src/version2/dashboards.ts b/src/version2/dashboards.ts index 8714d7cfb..2aa8a8959 100644 --- a/src/version2/dashboards.ts +++ b/src/version2/dashboards.ts @@ -2,8 +2,8 @@ import * as Models from './models'; import * as Parameters from './parameters'; import { Client } from '../clients'; import { Callback } from '../callback'; -import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; +import { paramSerializer } from '../paramSerializer'; export class Dashboards { constructor(private client: Client) {} @@ -71,6 +71,9 @@ export class Dashboards { const config: RequestConfig = { url: '/rest/api/2/dashboard', method: 'POST', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, @@ -229,7 +232,7 @@ export class Dashboards { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getAllGadgets( - parameters: Parameters.GetAllGadgets, + parameters: Parameters.GetAllGadgets | string, callback: Callback, ): Promise; /** @@ -247,20 +250,22 @@ export class Dashboards { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getAllGadgets( - parameters: Parameters.GetAllGadgets, + parameters: Parameters.GetAllGadgets | string, callback?: never, ): Promise; async getAllGadgets( - parameters: Parameters.GetAllGadgets, + parameters: Parameters.GetAllGadgets | string, callback?: Callback, ): Promise { + const dashboardId = typeof parameters === 'string' ? parameters : parameters.dashboardId; + const config: RequestConfig = { - url: `/rest/api/2/dashboard/${parameters.dashboardId}/gadget`, + url: `/rest/api/2/dashboard/${dashboardId}/gadget`, method: 'GET', params: { - moduleKey: paramSerializer('moduleKey', parameters.moduleKey), - uri: parameters.uri, - gadgetId: paramSerializer('gadgetId', parameters.gadgetId), + moduleKey: typeof parameters !== 'string' && paramSerializer('moduleKey', parameters.moduleKey), + uri: typeof parameters !== 'string' && parameters.uri, + gadgetId: typeof parameters !== 'string' && paramSerializer('gadgetId', parameters.gadgetId), }, }; @@ -647,6 +652,9 @@ export class Dashboards { const config: RequestConfig = { url: `/rest/api/2/dashboard/${parameters.id}`, method: 'PUT', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, @@ -714,6 +722,9 @@ export class Dashboards { const config: RequestConfig = { url: `/rest/api/2/dashboard/${parameters.id}/copy`, method: 'POST', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, diff --git a/src/version2/filters.ts b/src/version2/filters.ts index e8db77902..755996ef5 100644 --- a/src/version2/filters.ts +++ b/src/version2/filters.ts @@ -35,6 +35,7 @@ export class Filters { overrideSharePermissions: parameters.overrideSharePermissions, }, data: { + approximateLastUsed: parameters.approximateLastUsed, description: parameters.description, editPermissions: parameters.editPermissions, favourite: parameters.favourite, @@ -236,6 +237,7 @@ export class Filters { maxResults: parameters?.maxResults, expand: parameters?.expand, overrideSharePermissions: parameters?.overrideSharePermissions, + isSubstringMatch: parameters?.isSubstringMatch, }, }; @@ -475,7 +477,7 @@ export class Filters { * - Filters shared with a public project. * - Filters shared with the public. */ - async resetColumns(parameters: Parameters.ResetColumns, callback: Callback): Promise; + async resetColumns(parameters: Parameters.ResetColumns | string, callback: Callback): Promise; /** * Reset the user's column configuration for the filter to the default. * @@ -489,10 +491,15 @@ export class Filters { * - Filters shared with a public project. * - Filters shared with the public. */ - async resetColumns(parameters: Parameters.ResetColumns, callback?: never): Promise; - async resetColumns(parameters: Parameters.ResetColumns, callback?: Callback): Promise { + async resetColumns(parameters: Parameters.ResetColumns | string, callback?: never): Promise; + async resetColumns( + parameters: Parameters.ResetColumns | string, + callback?: Callback, + ): Promise { + const id = typeof parameters === 'string' ? parameters : parameters.id; + const config: RequestConfig = { - url: `/rest/api/2/filter/${parameters.id}/columns`, + url: `/rest/api/2/filter/${id}/columns`, method: 'DELETE', }; diff --git a/src/version2/groups.ts b/src/version2/groups.ts index 1555da63d..ceaea29eb 100644 --- a/src/version2/groups.ts +++ b/src/version2/groups.ts @@ -106,8 +106,11 @@ export class Groups { * Note that users are ordered by username, however the username is not returned in the results due to privacy * reasons. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** either + * of: + * + * - _Browse users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getUsersFromGroup( parameters: Parameters.GetUsersFromGroup, @@ -120,8 +123,11 @@ export class Groups { * Note that users are ordered by username, however the username is not returned in the results due to privacy * reasons. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** either + * of: + * + * - _Browse users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getUsersFromGroup( parameters: Parameters.GetUsersFromGroup, @@ -172,8 +178,8 @@ export class Groups { groupId: parameters.groupId, }, data: { - name: parameters.name, accountId: parameters.accountId, + name: parameters.name, }, }; diff --git a/src/version2/index.ts b/src/version2/index.ts index f44c40620..d177fc664 100644 --- a/src/version2/index.ts +++ b/src/version2/index.ts @@ -1,13 +1,15 @@ export * from './announcementBanner'; -export * from './applicationRoles'; +export * from './appDataPolicies'; export * from './appMigration'; export * from './appProperties'; +export * from './applicationRoles'; export * from './auditRecords'; export * from './avatars'; +export * from './classificationLevels'; export * from './dashboards'; export * from './dynamicModules'; -export * from './filters'; export * from './filterSharing'; +export * from './filters'; export * from './groupAndUserPicker'; export * from './groups'; export * from './issueAttachments'; @@ -20,26 +22,26 @@ export * from './issueCustomFieldOptionsApps'; export * from './issueCustomFieldValuesApps'; export * from './issueFieldConfigurations'; export * from './issueFields'; -export * from './issueLinks'; export * from './issueLinkTypes'; +export * from './issueLinks'; export * from './issueNavigatorSettings'; export * from './issueNotificationSchemes'; export * from './issuePriorities'; export * from './issueProperties'; export * from './issueRemoteLinks'; export * from './issueResolutions'; -export * from './issues'; export * from './issueSearch'; export * from './issueSecurityLevel'; export * from './issueSecuritySchemes'; export * from './issueTypeProperties'; -export * from './issueTypes'; export * from './issueTypeSchemes'; export * from './issueTypeScreenSchemes'; +export * from './issueTypes'; export * from './issueVotes'; export * from './issueWatchers'; export * from './issueWorklogProperties'; export * from './issueWorklogs'; +export * from './issues'; export * from './jiraExpressions'; export * from './jiraSettings'; export * from './jQL'; @@ -47,10 +49,13 @@ export * from './jqlFunctionsApps'; export * from './labels'; export * from './licenseMetrics'; export * from './myself'; -export * from './permissions'; export * from './permissionSchemes'; +export * from './permissions'; +export * from './plans'; +export * from './prioritySchemes'; export * from './projectAvatars'; export * from './projectCategories'; +export * from './projectClassificationLevels'; export * from './projectComponents'; export * from './projectEmail'; export * from './projectFeatures'; @@ -59,23 +64,24 @@ export * from './projectPermissionSchemes'; export * from './projectProperties'; export * from './projectRoleActors'; export * from './projectRoles'; -export * from './projects'; export * from './projectTypes'; export * from './projectVersions'; -export * from './screens'; +export * from './projects'; export * from './screenSchemes'; export * from './screenTabFields'; export * from './screenTabs'; +export * from './screens'; export * from './serverInfo'; +export * from './serviceRegistry'; export * from './status'; export * from './tasks'; +export * from './teamsInPlan'; export * from './timeTracking'; export * from './uIModificationsApps'; export * from './userProperties'; -export * from './users'; export * from './userSearch'; +export * from './users'; export * from './webhooks'; -export * from './workflows'; export * from './workflowSchemeDrafts'; export * from './workflowSchemeProjectAssociations'; export * from './workflowSchemes'; @@ -83,7 +89,8 @@ export * from './workflowStatusCategories'; export * from './workflowStatuses'; export * from './workflowTransitionProperties'; export * from './workflowTransitionRules'; +export * from './workflows'; +export * from './client'; export * as Version2Models from './models'; export * as Version2Parameters from './parameters'; -export * from './client'; diff --git a/src/version2/issueComments.ts b/src/version2/issueComments.ts index 031a7d4d7..f2d69e36c 100644 --- a/src/version2/issueComments.ts +++ b/src/version2/issueComments.ts @@ -302,6 +302,9 @@ export class IssueComments { const config: RequestConfig = { url: `/rest/api/2/issue/${parameters.issueIdOrKey}/comment/${parameters.id}`, method: 'DELETE', + params: { + parentId: parameters.parentId, + }, }; return this.client.sendRequest(config, callback); diff --git a/src/version2/issueCustomFieldConfigurationApps.ts b/src/version2/issueCustomFieldConfigurationApps.ts index 366656a37..3fa8cf844 100644 --- a/src/version2/issueCustomFieldConfigurationApps.ts +++ b/src/version2/issueCustomFieldConfigurationApps.ts @@ -9,7 +9,79 @@ export class IssueCustomFieldConfigurationApps { /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of - * configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). + * configurations for list of custom fields of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). + * + * The result can be filtered by one of these criteria: + * + * - `id`. + * - `fieldContextId`. + * - `issueId`. + * - `projectKeyOrId` and `issueTypeId`. + * + * Otherwise, all configurations for the provided list of custom fields are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required + * for the Forge app that provided the custom field type. + */ + async getCustomFieldsConfigurations( + parameters: Parameters.GetCustomFieldsConfigurations | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * configurations for list of custom fields of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). + * + * The result can be filtered by one of these criteria: + * + * - `id`. + * - `fieldContextId`. + * - `issueId`. + * - `projectKeyOrId` and `issueTypeId`. + * + * Otherwise, all configurations for the provided list of custom fields are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required + * for the Forge app that provided the custom field type. + */ + async getCustomFieldsConfigurations( + parameters?: Parameters.GetCustomFieldsConfigurations, + callback?: never, + ): Promise; + async getCustomFieldsConfigurations( + parameters?: Parameters.GetCustomFieldsConfigurations, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/app/field/context/configuration/list', + method: 'POST', + params: { + id: parameters?.id, + fieldContextId: parameters?.fieldContextId, + issueId: parameters?.issueId, + projectKeyOrId: parameters?.projectKeyOrId, + issueTypeId: parameters?.issueTypeId, + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + }, + data: { + fieldIdsOrKeys: parameters?.fieldIdsOrKeys, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * configurations for a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * The result can be filtered by one of these criteria: * @@ -22,7 +94,7 @@ export class IssueCustomFieldConfigurationApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required - * for the Forge app that created the custom field. + * for the Forge app that provided the custom field type. */ async getCustomFieldConfiguration( parameters: Parameters.GetCustomFieldConfiguration, @@ -30,7 +102,9 @@ export class IssueCustomFieldConfigurationApps { ): Promise; /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of - * configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). + * configurations for a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * The result can be filtered by one of these criteria: * @@ -43,7 +117,7 @@ export class IssueCustomFieldConfigurationApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required - * for the Forge app that created the custom field. + * for the Forge app that provided the custom field type. */ async getCustomFieldConfiguration( parameters: Parameters.GetCustomFieldConfiguration, @@ -71,24 +145,26 @@ export class IssueCustomFieldConfigurationApps { } /** - * Update the configuration for contexts of a custom field created by a [Forge - * app](https://developer.atlassian.com/platform/forge/). + * Update the configuration for contexts of a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required - * for the Forge app that created the custom field. + * for the Forge app that created the custom field type. */ async updateCustomFieldConfiguration( parameters: Parameters.UpdateCustomFieldConfiguration, callback: Callback, ): Promise; /** - * Update the configuration for contexts of a custom field created by a [Forge - * app](https://developer.atlassian.com/platform/forge/). + * Update the configuration for contexts of a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required - * for the Forge app that created the custom field. + * for the Forge app that created the custom field type. */ async updateCustomFieldConfiguration( parameters: Parameters.UpdateCustomFieldConfiguration, diff --git a/src/version2/issueCustomFieldOptions.ts b/src/version2/issueCustomFieldOptions.ts index 632525946..6b6c38b60 100644 --- a/src/version2/issueCustomFieldOptions.ts +++ b/src/version2/issueCustomFieldOptions.ts @@ -249,8 +249,8 @@ export class IssueCustomFieldOptions { url: `/rest/api/2/field/${parameters.fieldId}/context/${parameters.contextId}/option/move`, method: 'PUT', data: { - customFieldOptionIds: parameters.customFieldOptionIds, after: parameters.after, + customFieldOptionIds: parameters.customFieldOptionIds, position: parameters.position, }, }; @@ -298,4 +298,48 @@ export class IssueCustomFieldOptions { return this.client.sendRequest(config, callback); } + + /** + * Replaces the options of a custom field. + * + * Note that this operation **only works for issue field select list options created in Jira or using operations from + * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * field select list options created by Connect or Forge apps. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback: Callback, + ): Promise; + /** + * Replaces the options of a custom field. + * + * Note that this operation **only works for issue field select list options created in Jira or using operations from + * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * field select list options created by Connect or Forge apps. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback?: never, + ): Promise; + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/field/${parameters.fieldId}/context/${parameters.contextId}/option/${parameters.optionId}/issue`, + method: 'DELETE', + params: { + replaceWith: parameters.replaceWith, + jql: parameters.jql, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/issueCustomFieldOptionsApps.ts b/src/version2/issueCustomFieldOptionsApps.ts index 5f20a2946..709a5c804 100644 --- a/src/version2/issueCustomFieldOptionsApps.ts +++ b/src/version2/issueCustomFieldOptionsApps.ts @@ -68,6 +68,8 @@ export class IssueCustomFieldOptionsApps { * used with issue field select list options created in Jira or using operations from the [Issue custom field * options](#api-group-Issue-custom-field-options) resource. * + * Each field can have a maximum of 10000 options, and each option can have a maximum of 10000 scopes. + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. @@ -83,6 +85,8 @@ export class IssueCustomFieldOptionsApps { * used with issue field select list options created in Jira or using operations from the [Issue custom field * options](#api-group-Issue-custom-field-options) resource. * + * Each field can have a maximum of 10000 options, and each option can have a maximum of 10000 scopes. + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. @@ -99,9 +103,9 @@ export class IssueCustomFieldOptionsApps { url: `/rest/api/2/field/${parameters.fieldKey}/option`, method: 'POST', data: { - value: parameters.value, - properties: parameters.properties, config: parameters.config, + properties: parameters.properties, + value: parameters.value, }, }; @@ -290,10 +294,10 @@ export class IssueCustomFieldOptionsApps { url: `/rest/api/2/field/${parameters.fieldKey}/option/${parameters.optionId}`, method: 'PUT', data: { + config: parameters.config, id: parameters.id, - value: parameters.value, properties: parameters.properties, - config: parameters.config, + value: parameters.value, }, }; @@ -359,7 +363,7 @@ export class IssueCustomFieldOptionsApps { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. */ - async replaceIssueFieldOption( + async replaceIssueFieldOption( parameters: Parameters.ReplaceIssueFieldOption, callback: Callback, ): Promise; @@ -383,11 +387,11 @@ export class IssueCustomFieldOptionsApps { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. */ - async replaceIssueFieldOption( + async replaceIssueFieldOption( parameters: Parameters.ReplaceIssueFieldOption, callback?: never, ): Promise; - async replaceIssueFieldOption( + async replaceIssueFieldOption( parameters: Parameters.ReplaceIssueFieldOption, callback?: Callback, ): Promise { diff --git a/src/version2/issueCustomFieldValuesApps.ts b/src/version2/issueCustomFieldValuesApps.ts index cbad36280..4b3d7e565 100644 --- a/src/version2/issueCustomFieldValuesApps.ts +++ b/src/version2/issueCustomFieldValuesApps.ts @@ -1,3 +1,4 @@ +import * as Models from './models'; import * as Parameters from './parameters'; import { Client } from '../clients'; import { Callback } from '../callback'; @@ -8,10 +9,18 @@ export class IssueCustomFieldValuesApps { /** * Updates the value of one or more custom fields on one or more issues. Combinations of custom field and issue should - * be unique within the request. Custom fields can only be updated by the Forge app that created them. + * be unique within the request. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateMultipleCustomFieldValues( parameters: Parameters.UpdateMultipleCustomFieldValues, @@ -19,10 +28,18 @@ export class IssueCustomFieldValuesApps { ): Promise; /** * Updates the value of one or more custom fields on one or more issues. Combinations of custom field and issue should - * be unique within the request. Custom fields can only be updated by the Forge app that created them. + * be unique within the request. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateMultipleCustomFieldValues( parameters: Parameters.UpdateMultipleCustomFieldValues, @@ -47,22 +64,36 @@ export class IssueCustomFieldValuesApps { } /** - * Updates the value of a custom field on one or more issues. Custom fields can only be updated by the Forge app that - * created them. + * Updates the value of a custom field on one or more issues. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateCustomFieldValue( parameters: Parameters.UpdateCustomFieldValue, callback: Callback, ): Promise; /** - * Updates the value of a custom field on one or more issues. Custom fields can only be updated by the Forge app that - * created them. + * Updates the value of a custom field on one or more issues. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateCustomFieldValue(parameters: Parameters.UpdateCustomFieldValue, callback?: never): Promise; async updateCustomFieldValue( diff --git a/src/version2/issueFields.ts b/src/version2/issueFields.ts index 6bd432429..679314069 100644 --- a/src/version2/issueFields.ts +++ b/src/version2/issueFields.ts @@ -76,10 +76,10 @@ export class IssueFields { url: '/rest/api/2/field', method: 'POST', data: { - name: parameters?.name, description: parameters?.description, - type: parameters?.type, + name: parameters?.name, searcherKey: parameters?.searcherKey, + type: parameters?.type, }, }; @@ -95,7 +95,7 @@ export class IssueFields { * - Fields that contain a string in the field name or description, by defining `query` * - Specific fields that contain a string in the field name or description, by defining `id` and `query` * - * Only custom fields can be queried, `type` must be set to `custom`. + * Use `type` must be set to `custom` to show custom fields only. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -113,7 +113,7 @@ export class IssueFields { * - Fields that contain a string in the field name or description, by defining `query` * - Specific fields that contain a string in the field name or description, by defining `id` and `query` * - * Only custom fields can be queried, `type` must be set to `custom`. + * Use `type` must be set to `custom` to show custom fields only. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -211,8 +211,8 @@ export class IssueFields { url: `/rest/api/2/field/${parameters.fieldId}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, searcherKey: parameters.searcherKey, }, }; diff --git a/src/version2/issueNotificationSchemes.ts b/src/version2/issueNotificationSchemes.ts index 2eff08bd8..e4384385d 100644 --- a/src/version2/issueNotificationSchemes.ts +++ b/src/version2/issueNotificationSchemes.ts @@ -215,6 +215,38 @@ export class IssueNotificationSchemes { return this.client.sendRequest(config, callback); } + /** + * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addNotifications(parameters: Parameters.AddNotifications, callback: Callback): Promise; + /** + * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addNotifications(parameters: Parameters.AddNotifications, callback?: never): Promise; + async addNotifications(parameters: Parameters.AddNotifications, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/notificationscheme/${parameters.id}/notification`, + method: 'PUT', + data: { + notificationSchemeEvents: parameters.notificationSchemeEvents, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Deletes a notification scheme. * diff --git a/src/version2/issuePriorities.ts b/src/version2/issuePriorities.ts index 61b7f7fdd..455330544 100644 --- a/src/version2/issuePriorities.ts +++ b/src/version2/issuePriorities.ts @@ -2,12 +2,10 @@ import * as Models from './models'; import * as Parameters from './parameters'; import { Client } from '../clients'; import { Callback } from '../callback'; -import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; export class IssuePriorities { constructor(private client: Client) {} - /** * Returns the list of all issue priorities. * @@ -30,24 +28,29 @@ export class IssuePriorities { return this.client.sendRequest(config, callback); } - /** * Creates an issue priority. * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createPriority( - parameters: Parameters.CreatePriority, + parameters: Parameters.CreatePriority | undefined, callback: Callback, ): Promise; /** * Creates an issue priority. * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async createPriority(parameters: Parameters.CreatePriority, callback?: never): Promise; + async createPriority(parameters?: Parameters.CreatePriority, callback?: never): Promise; async createPriority( parameters: Parameters.CreatePriority, callback?: Callback, @@ -56,6 +59,7 @@ export class IssuePriorities { url: '/rest/api/2/priority', method: 'POST', data: { + avatarId: parameters.avatarId, description: parameters.description, iconUrl: parameters.iconUrl, name: parameters.name, @@ -65,7 +69,6 @@ export class IssuePriorities { return this.client.sendRequest(config, callback); } - /** * Sets default issue priority. * @@ -97,35 +100,36 @@ export class IssuePriorities { return this.client.sendRequest(config, callback); } - /** * Changes the order of issue priorities. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async movePriorities(parameters: Parameters.MovePriorities, callback: Callback): Promise; + async movePriorities( + parameters: Parameters.MovePriorities | undefined, + callback: Callback, + ): Promise; /** * Changes the order of issue priorities. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async movePriorities(parameters: Parameters.MovePriorities, callback?: never): Promise; - async movePriorities(parameters: Parameters.MovePriorities, callback?: Callback): Promise { + async movePriorities(parameters?: Parameters.MovePriorities, callback?: never): Promise; + async movePriorities(parameters?: Parameters.MovePriorities, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/2/priority/move', method: 'PUT', data: { - ids: parameters.ids, - after: parameters.after, - position: parameters.position, + after: parameters?.after, + ids: parameters?.ids, + position: parameters?.position, }, }; return this.client.sendRequest(config, callback); } - /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of * priorities. The list can contain all priorities or a subset determined by any combination of these criteria: @@ -171,48 +175,48 @@ export class IssuePriorities { startAt: parameters?.startAt, maxResults: parameters?.maxResults, id: parameters?.id, - projectId: paramSerializer('projectId', parameters?.projectId), + projectId: parameters?.projectId, + priorityName: parameters?.priorityName, onlyDefault: parameters?.onlyDefault, + expand: parameters?.expand, }, }; return this.client.sendRequest(config, callback); } - /** * Returns an issue priority. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ - async getPriority( - parameters: Parameters.GetPriority | string, - callback: Callback, - ): Promise; + async getPriority(parameters: Parameters.GetPriority, callback: Callback): Promise; /** * Returns an issue priority. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * Permission to access Jira. */ - async getPriority(parameters: Parameters.GetPriority | string, callback?: never): Promise; + async getPriority(parameters: Parameters.GetPriority, callback?: never): Promise; async getPriority( - parameters: Parameters.GetPriority | string, + parameters: Parameters.GetPriority, callback?: Callback, ): Promise { - const id = typeof parameters === 'string' ? parameters : parameters.id; - const config: RequestConfig = { - url: `/rest/api/2/priority/${id}`, + url: `/rest/api/2/priority/${parameters.id}`, method: 'GET', }; return this.client.sendRequest(config, callback); } - /** * Updates an issue priority. * + * At least one request body parameter must be defined. + * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -220,6 +224,11 @@ export class IssuePriorities { /** * Updates an issue priority. * + * At least one request body parameter must be defined. + * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -229,6 +238,7 @@ export class IssuePriorities { url: `/rest/api/2/priority/${parameters.id}`, method: 'PUT', data: { + avatarId: parameters.avatarId, description: parameters.description, iconUrl: parameters.iconUrl, name: parameters.name, @@ -236,6 +246,38 @@ export class IssuePriorities { }, }; + return this.client.sendRequest(config, callback); + } + /** + * Deletes an issue priority. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-2-task-taskId-get) to obtain subsequent updates. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriority(parameters: Parameters.DeletePriority, callback: Callback): Promise; + /** + * Deletes an issue priority. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-2-task-taskId-get) to obtain subsequent updates. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriority(parameters: Parameters.DeletePriority, callback?: never): Promise; + async deletePriority(parameters: Parameters.DeletePriority, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priority/${parameters.id}`, + method: 'DELETE', + }; + return this.client.sendRequest(config, callback); } } diff --git a/src/version2/issueResolutions.ts b/src/version2/issueResolutions.ts index 041fcce7d..0214aa02c 100644 --- a/src/version2/issueResolutions.ts +++ b/src/version2/issueResolutions.ts @@ -7,6 +7,29 @@ import { RequestConfig } from '../requestConfig'; export class IssueResolutions { constructor(private client: Client) {} + /** + * Returns a list of all issue resolution values. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolutions(callback: Callback): Promise; + /** + * Returns a list of all issue resolution values. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolutions(callback?: never): Promise; + async getResolutions(callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/resolution', + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + /** * Creates an issue resolution. * @@ -34,7 +57,10 @@ export class IssueResolutions { const config: RequestConfig = { url: '/rest/api/2/resolution', method: 'POST', - data: parameters, + data: { + description: parameters.description, + name: parameters.name, + }, }; return this.client.sendRequest(config, callback); @@ -91,8 +117,8 @@ export class IssueResolutions { url: '/rest/api/2/resolution/move', method: 'PUT', data: { - ids: parameters.ids, after: parameters.after, + ids: parameters.ids, position: parameters.position, }, }; @@ -148,6 +174,35 @@ export class IssueResolutions { return this.client.sendRequest(config, callback); } + /** + * Returns an issue resolution value. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolution( + parameters: Parameters.GetResolution, + callback: Callback, + ): Promise; + /** + * Returns an issue resolution value. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolution(parameters: Parameters.GetResolution, callback?: never): Promise; + async getResolution( + parameters: Parameters.GetResolution, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/resolution/${parameters.id}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + /** * Updates an issue resolution. * @@ -167,10 +222,8 @@ export class IssueResolutions { url: `/rest/api/2/resolution/${parameters.id}`, method: 'PUT', data: { - ...parameters, - name: parameters.name, description: parameters.description, - id: undefined, + name: parameters.name, }, }; @@ -188,10 +241,7 @@ export class IssueResolutions { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async deleteResolution( - parameters: Parameters.DeleteResolution, - callback: Callback, - ): Promise; + async deleteResolution(parameters: Parameters.DeleteResolution, callback: Callback): Promise; /** * Deletes an issue resolution. * @@ -203,11 +253,8 @@ export class IssueResolutions { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async deleteResolution( - parameters: Parameters.DeleteResolution, - callback?: never, - ): Promise; - async deleteResolution( + async deleteResolution(parameters: Parameters.DeleteResolution, callback?: never): Promise; + async deleteResolution( parameters: Parameters.DeleteResolution, callback?: Callback, ): Promise { diff --git a/src/version2/issueSearch.ts b/src/version2/issueSearch.ts index 2ee45270b..3a84e9cce 100644 --- a/src/version2/issueSearch.ts +++ b/src/version2/issueSearch.ts @@ -76,10 +76,7 @@ export class IssueSearch { * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. */ - async matchIssues( - parameters: Parameters.MatchIssues | undefined, - callback: Callback, - ): Promise; + async matchIssues(parameters: Parameters.MatchIssues, callback: Callback): Promise; /** * Checks whether one or more issues would be returned by one or more JQL queries. * @@ -91,17 +88,17 @@ export class IssueSearch { * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. */ - async matchIssues(parameters?: Parameters.MatchIssues, callback?: never): Promise; + async matchIssues(parameters: Parameters.MatchIssues, callback?: never): Promise; async matchIssues( - parameters?: Parameters.MatchIssues, + parameters: Parameters.MatchIssues, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/jql/match', method: 'POST', data: { - jqls: parameters?.jqls, - issueIds: parameters?.issueIds, + issueIds: parameters.issueIds, + jqls: parameters.jqls, }, }; @@ -125,7 +122,7 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJql( - parameters: Parameters.SearchForIssuesUsingJql | undefined, + parameters: Parameters.SearchForIssuesUsingJql, callback: Callback, ): Promise; /** @@ -145,25 +142,26 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJql( - parameters?: Parameters.SearchForIssuesUsingJql, + parameters: Parameters.SearchForIssuesUsingJql, callback?: never, ): Promise; async searchForIssuesUsingJql( - parameters?: Parameters.SearchForIssuesUsingJql, + parameters: Parameters.SearchForIssuesUsingJql, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/search', method: 'GET', params: { - jql: parameters?.jql, - startAt: parameters?.startAt, - maxResults: parameters?.maxResults, - validateQuery: parameters?.validateQuery, - fields: parameters?.fields, - expand: parameters?.expand, - properties: parameters?.properties, - fieldsByKeys: parameters?.fieldsByKeys, + jql: parameters.jql, + startAt: parameters.startAt, + maxResults: parameters.maxResults, + validateQuery: parameters.validateQuery, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, }, }; @@ -218,14 +216,14 @@ export class IssueSearch { url: '/rest/api/2/search', method: 'POST', data: { + expand: parameters?.expand, + fields: parameters?.fields, + fieldsByKeys: parameters?.fieldsByKeys, jql: parameters?.jql, - startAt: parameters?.startAt, maxResults: parameters?.maxResults, - fields: parameters?.fields, - validateQuery: parameters?.validateQuery, - expand: parameters?.expand, properties: parameters?.properties, - fieldsByKeys: parameters?.fieldsByKeys, + startAt: parameters?.startAt, + validateQuery: parameters?.validateQuery, }, }; @@ -233,14 +231,23 @@ export class IssueSearch { } /** - * Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately - * visible in the returned search results. + * Provide an estimated count of the issues that match the [JQL](https://confluence.atlassian.com/x/egORLQ). Recent + * updates might not be immediately visible in the returned output. This endpoint requires JQL to be bounded. * - * If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) - * consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances. + * This operation can be accessed anonymously. * - * If the JQL query expression is too large to be encoded as a query parameter, use the - * [POST](#searchforissuesusingjqlenhancedsearchpost) version of this resource. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async countIssues(parameters: Parameters.CountIssues, callback: Callback): Promise; + /** + * Provide an estimated count of the issues that match the [JQL](https://confluence.atlassian.com/x/egORLQ). Recent + * updates might not be immediately visible in the returned output. This endpoint requires JQL to be bounded. * * This operation can be accessed anonymously. * @@ -252,21 +259,114 @@ export class IssueSearch { * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. */ - async searchForIssuesUsingJqlEnhancedSearch( - parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch | undefined, + async countIssues(parameters: Parameters.CountIssues, callback?: never): Promise; + async countIssues( + parameters: Parameters.CountIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/search/approximate-count', + method: 'POST', + data: { + jql: parameters.jql, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Searches for IDs of issues using [JQL](https://confluence.atlassian.com/x/egORLQ). + * + * Use the [Search](#api-rest-api-2-search-post) endpoint if you need to fetch more than just issue IDs. The Search + * endpoint returns more information, but may take much longer to respond to requests. This is because it uses a + * different mechanism for ordering results than this endpoint and doesn't provide the total number of results for + * your query. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, callback: Callback, ): Promise; /** - * Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately - * visible in the returned search results. + * Searches for IDs of issues using [JQL](https://confluence.atlassian.com/x/egORLQ). + * + * Use the [Search](#api-rest-api-2-search-post) endpoint if you need to fetch more than just issue IDs. The Search + * endpoint returns more information, but may take much longer to respond to requests. This is because it uses a + * different mechanism for ordering results than this endpoint and doesn't provide the total number of results for + * your query. + * + * This operation can be accessed anonymously. * - * If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) - * consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, + callback?: never, + ): Promise; + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/search/id', + method: 'POST', + data: { + jql: parameters.jql, + maxResults: parameters.maxResults, + nextPageToken: parameters.nextPageToken, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately + * visible in the returned search results. If you need + * [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency, you can + * utilize the `reconcileIssues` parameter to ensure stronger consistency assurances. This operation can be accessed + * anonymously. * * If the JQL query expression is too large to be encoded as a query parameter, use the - * [POST](#searchforissuesusingjqlenhancedsearchpost) version of this resource. + * [POST](#api-rest-api-2-search-post) version of this resource. * - * This operation can be accessed anonymously. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearch( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + callback: Callback, + ): Promise; + /** + * Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately + * visible in the returned search results. If you need + * [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency, you can + * utilize the `reconcileIssues` parameter to ensure stronger consistency assurances. This operation can be accessed + * anonymously. + * + * If the JQL query expression is too large to be encoded as a query parameter, use the + * [POST](#api-rest-api-2-search-post) version of this resource. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues * are included in the response where the user has: @@ -277,26 +377,26 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJqlEnhancedSearch( - parameters?: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, callback?: never, ): Promise; async searchForIssuesUsingJqlEnhancedSearch( - parameters?: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/search/jql', method: 'GET', params: { - jql: parameters?.jql, - nextPageToken: parameters?.nextPageToken, - maxResults: parameters?.maxResults, - fields: parameters?.fields, - expand: parameters?.expand, - properties: parameters?.properties, - fieldsByKeys: parameters?.fieldsByKeys, - failFast: parameters?.failFast, - reconcileIssues: parameters?.reconcileIssues, + jql: parameters.jql, + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, + reconcileIssues: parameters.reconcileIssues, }, }; @@ -304,15 +404,11 @@ export class IssueSearch { } /** - * Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). - * - * If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) - * consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances. - * - * There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL - * query expressions. - * - * This operation can be accessed anonymously. + * Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately + * visible in the returned search results. If you need + * [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency, you can + * utilize the `reconcileIssues` parameter to ensure stronger consistency assurances. This operation can be accessed + * anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues * are included in the response where the user has: @@ -323,19 +419,15 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJqlEnhancedSearchPost( - parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost | undefined, + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, callback: Callback, ): Promise; /** - * Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). - * - * If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) - * consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances. - * - * There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL - * query expressions. - * - * This operation can be accessed anonymously. + * Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately + * visible in the returned search results. If you need + * [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency, you can + * utilize the `reconcileIssues` parameter to ensure stronger consistency assurances. This operation can be accessed + * anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues * are included in the response where the user has: @@ -346,26 +438,26 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJqlEnhancedSearchPost( - parameters?: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, callback?: never, ): Promise; async searchForIssuesUsingJqlEnhancedSearchPost( - parameters?: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, callback?: Callback, ): Promise { const config: RequestConfig = { - url: '/rest/api/2/search', + url: '/rest/api/2/search/jql', method: 'POST', data: { - jql: parameters?.jql, - nextPageToken: parameters?.nextPageToken, - maxResults: parameters?.maxResults, - fields: parameters?.fields, - expand: parameters?.expand, - properties: parameters?.properties, - fieldsByKeys: parameters?.fieldsByKeys, - failFast: parameters?.failFast, - reconcileIssues: parameters?.reconcileIssues, + jql: parameters.jql, + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, + reconcileIssues: parameters.reconcileIssues, }, }; diff --git a/src/version2/issueTypes.ts b/src/version2/issueTypes.ts index 2de2fb306..8ec2cb6f2 100644 --- a/src/version2/issueTypes.ts +++ b/src/version2/issueTypes.ts @@ -72,9 +72,9 @@ export class IssueTypes { url: '/rest/api/2/issuetype', method: 'POST', data: { - name: parameters.name, description: parameters.description, hierarchyLevel: parameters.hierarchyLevel, + name: parameters.name, }, }; @@ -191,9 +191,9 @@ export class IssueTypes { url: `/rest/api/2/issuetype/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, - description: parameters.description, avatarId: parameters.avatarId, + description: parameters.description, + name: parameters.name, }, }; @@ -231,7 +231,7 @@ export class IssueTypes { url: `/rest/api/2/issuetype/${id}`, method: 'DELETE', params: { - alternativeIssueTypeId: typeof parameters !== 'string' && parameters.alternativeIssueTypeId, + alternativeIssueTypeId: typeof parameters !== 'string' ? parameters.alternativeIssueTypeId : undefined, }, }; @@ -279,16 +279,6 @@ export class IssueTypes { /** * Loads an avatar for the issue type. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * - * For example: `curl --request POST \ --user email@example.com: \ --header 'X-Atlassian-Token: no-check'\ - * --header 'Content-Type: image/< image_type>' \ --data-binary "<@/path/to/file/with/your/avatar>" \ --url - * 'https://your-domain.atlassian.net/rest/api/2/issuetype/{issueTypeId}'This` - * * The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of * the image. The length of the square's sides is set to the smaller of the height or width of the image. * @@ -307,16 +297,6 @@ export class IssueTypes { /** * Loads an avatar for the issue type. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * - * For example: `curl --request POST \ --user email@example.com: \ --header 'X-Atlassian-Token: no-check'\ - * --header 'Content-Type: image/< image_type>' \ --data-binary "<@/path/to/file/with/your/avatar>" \ --url - * 'https://your-domain.atlassian.net/rest/api/2/issuetype/{issueTypeId}'This` - * * The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of * the image. The length of the square's sides is set to the smaller of the height or width of the image. * diff --git a/src/version2/issueWorklogs.ts b/src/version2/issueWorklogs.ts index a55422eab..b709eefd9 100644 --- a/src/version2/issueWorklogs.ts +++ b/src/version2/issueWorklogs.ts @@ -8,8 +8,8 @@ export class IssueWorklogs { constructor(private client: Client) {} /** - * Returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and - * time. + * Returns worklogs for an issue (ordered by created time), starting from the oldest worklog or from the worklog + * started on or after a date and time. * * Time tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see * [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). @@ -30,8 +30,8 @@ export class IssueWorklogs { callback: Callback, ): Promise; /** - * Returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and - * time. + * Returns worklogs for an issue (ordered by created time), starting from the oldest worklog or from the worklog + * started on or after a date and time. * * Time tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see * [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). @@ -61,11 +61,11 @@ export class IssueWorklogs { url: `/rest/api/2/issue/${issueIdOrKey}/worklog`, method: 'GET', params: { - startAt: typeof parameters !== 'string' && parameters.startAt, - maxResults: typeof parameters !== 'string' && parameters.maxResults, - startedAfter: typeof parameters !== 'string' && parameters.startedAfter, - startedBefore: typeof parameters !== 'string' && parameters.startedBefore, - expand: typeof parameters !== 'string' && parameters.expand, + startAt: typeof parameters !== 'string' ? parameters.startAt : undefined, + maxResults: typeof parameters !== 'string' ? parameters.maxResults : undefined, + startedAfter: typeof parameters !== 'string' ? parameters.startedAfter : undefined, + startedBefore: typeof parameters !== 'string' ? parameters.startedBefore : undefined, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -117,20 +117,139 @@ export class IssueWorklogs { overrideEditableFlag: parameters.overrideEditableFlag, }, data: { - self: parameters.self, author: parameters.author, - updateAuthor: parameters.updateAuthor, comment: parameters.comment, created: parameters.created, - updated: parameters.updated, - visibility: parameters.visibility, - started: parameters.started, - timeSpent: parameters.timeSpent, - timeSpentSeconds: parameters.timeSpentSeconds, id: parameters.id, issueId: parameters.issueId, properties: parameters.properties, + self: parameters.self, + started: parameters.started, + timeSpent: parameters.timeSpent, + timeSpentSeconds: parameters.timeSpentSeconds, + updateAuthor: parameters.updateAuthor, + updated: parameters.updated, + visibility: parameters.visibility, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a list of worklogs from an issue. This is an experimental API with limitations: + * + * - You can't delete more than 5000 worklogs at once. + * - No notifications will be sent for deleted worklogs. + * + * Time tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see + * [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any worklog. + * - If any worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkDeleteWorklogs(parameters: Parameters.BulkDeleteWorklogs, callback: Callback): Promise; + /** + * Deletes a list of worklogs from an issue. This is an experimental API with limitations: + * + * - You can't delete more than 5000 worklogs at once. + * - No notifications will be sent for deleted worklogs. + * + * Time tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see + * [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any worklog. + * - If any worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkDeleteWorklogs(parameters: Parameters.BulkDeleteWorklogs, callback?: never): Promise; + async bulkDeleteWorklogs( + parameters: Parameters.BulkDeleteWorklogs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/issue/${parameters.issueIdOrKey}/worklog`, + method: 'DELETE', + params: { + adjustEstimate: parameters.adjustEstimate, + overrideEditableFlag: parameters.overrideEditableFlag, + }, + data: { + ids: parameters.ids, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Moves a list of worklogs from one issue to another. This is an experimental API with several limitations: + * + * - You can't move more than 5000 worklogs at once. + * - You can't move worklogs containing an attachment. + * - You can't move worklogs restricted by project roles. + * - No notifications will be sent for moved worklogs. + * - No webhooks or events will be sent for moved worklogs. + * - No issue history will be recorded for moved worklogs. + * + * Time tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see + * [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects containing the + * source and destination issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ and _Edit all worklogs_](https://confluence.atlassian.com/x/yodKLg)[project + * permission](https://confluence.atlassian.com/x/yodKLg) + * - If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback: Callback): Promise; + /** + * Moves a list of worklogs from one issue to another. This is an experimental API with several limitations: + * + * - You can't move more than 5000 worklogs at once. + * - You can't move worklogs containing an attachment. + * - You can't move worklogs restricted by project roles. + * - No notifications will be sent for moved worklogs. + * - No webhooks or events will be sent for moved worklogs. + * - No issue history will be recorded for moved worklogs. + * + * Time tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see + * [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects containing the + * source and destination issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ and _Edit all worklogs_](https://confluence.atlassian.com/x/yodKLg)[project + * permission](https://confluence.atlassian.com/x/yodKLg) + * - If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback?: never): Promise; + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/issue/${parameters.issueIdOrKey}/worklog/move`, + method: 'POST', + params: { + adjustEstimate: parameters.adjustEstimate, + overrideEditableFlag: parameters.overrideEditableFlag, }, + data: parameters.worklogs, }; return this.client.sendRequest(config, callback); diff --git a/src/version2/issues.ts b/src/version2/issues.ts index fb6c07071..d06fb2655 100644 --- a/src/version2/issues.ts +++ b/src/version2/issues.ts @@ -7,6 +7,64 @@ import { RequestConfig } from '../requestConfig'; export class Issues { constructor(private client: Client) {} + /** + * Bulk fetch changelogs for multiple issues and filter by fields + * + * Returns a paginated list of all changelogs for given issues sorted by changelog date and issue IDs, starting from + * the oldest changelog and smallest issue ID. + * + * Issues are identified by their ID or key, and optionally changelogs can be filtered by their field IDs. You can + * request the changelogs of up to 1000 issues and can filter them by up to 10 field IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects that the issues + * are in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issues. + */ + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback: Callback, + ): Promise; + /** + * Bulk fetch changelogs for multiple issues and filter by fields + * + * Returns a paginated list of all changelogs for given issues sorted by changelog date and issue IDs, starting from + * the oldest changelog and smallest issue ID. + * + * Issues are identified by their ID or key, and optionally changelogs can be filtered by their field IDs. You can + * request the changelogs of up to 1000 issues and can filter them by up to 10 field IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects that the issues + * are in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issues. + */ + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback?: never, + ): Promise; + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/changelog/bulkfetch', + method: 'POST', + data: { + fieldIds: parameters.fieldIds, + issueIdsOrKeys: parameters.issueIdsOrKeys, + maxResults: parameters.maxResults, + nextPageToken: parameters.nextPageToken, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns all issue events. * @@ -97,9 +155,9 @@ export class Issues { * of the submitted request. * * You can use the [get - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get) + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-rest-api-2-task-taskid-get) * and [cancel - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-cancel-post) + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-rest-api-2-task-taskid-cancel-post) * APIs to manage the request. * * **Note that:** @@ -114,20 +172,17 @@ export class Issues { * * **Signed-in users only:** This API can't be accessed anonymously. * - * **Rate limiting:** Only a single request per user can be active at any given time. + * **Rate limiting:** Only a single request per jira instance can be active at any given time. */ - async archiveIssuesAsync( - parameters: Parameters.ArchiveIssuesAsync, - callback: Callback, - ): Promise; + async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback: Callback): Promise; /** * Enables admins to archive up to 100,000 issues in a single request using JQL, returning the URL to check the status * of the submitted request. * * You can use the [get - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get) + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-rest-api-2-task-taskid-get) * and [cancel - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-cancel-post) + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-rest-api-2-task-taskid-cancel-post) * APIs to manage the request. * * **Note that:** @@ -142,10 +197,10 @@ export class Issues { * * **Signed-in users only:** This API can't be accessed anonymously. * - * **Rate limiting:** Only a single request per user can be active at any given time. + * **Rate limiting:** Only a single request per jira instance can be active at any given time. */ - async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback?: never): Promise; - async archiveIssuesAsync( + async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback?: never): Promise; + async archiveIssuesAsync( parameters: Parameters.ArchiveIssuesAsync, callback?: Callback, ): Promise { @@ -271,36 +326,106 @@ export class Issues { } /** - * Returns details of projects, issue types within projects, and, when requested, the create screen fields for each - * issue type for the user. Use the information to populate the requests in [ Create - * issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * Returns the details for a set of requested issues. You can request up to 100 issues. * - * The request can be restricted to specific projects or issue types using the query parameters. The response will - * contain information for the valid projects, issue types, or project and issue type combinations requested. Note - * that invalid project, issue type, or project and issue type combinations do not generate errors. + * Each issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive + * search and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or + * other redirect is **not** returned. + * + * Issues will be returned in ascending `id` order. If there are errors, Jira will return a list of issues which + * couldn't be fetched along with error messages. * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create - * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is + * in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async bulkFetchIssues( + parameters: Parameters.BulkFetchIssues, + callback: Callback, + ): Promise; + /** + * Returns the details for a set of requested issues. You can request up to 100 issues. + * + * Each issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive + * search and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or + * other redirect is **not** returned. + * + * Issues will be returned in ascending `id` order. If there are errors, Jira will return a list of issues which + * couldn't be fetched along with error messages. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is + * in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async bulkFetchIssues(parameters: Parameters.BulkFetchIssues, callback?: never): Promise; + async bulkFetchIssues( + parameters: Parameters.BulkFetchIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issue/bulkfetch', + method: 'POST', + data: { + expand: parameters.expand, + fields: parameters.fields, + fieldsByKeys: parameters.fieldsByKeys, + issueIdsOrKeys: parameters.issueIdsOrKeys, + properties: parameters.properties, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * @deprecated Returns details of projects, issue types within projects, and, when requested, the create screen fields + * for each issue type for the user. Use the information to populate the requests in [ Create + * issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * Deprecated, see [Create Issue Meta Endpoint Deprecation + * Notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304). + * + * The request can be restricted to specific projects or issue types using the query parameters. The response will + * contain information for the valid projects, issue types, or project and issue type combinations requested. Note + * that invalid project, issue type, or project and issue type combinations do not generate errors. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. */ async getCreateIssueMeta( parameters: Parameters.GetCreateIssueMeta | undefined, callback: Callback, ): Promise; /** - * Returns details of projects, issue types within projects, and, when requested, the create screen fields for each - * issue type for the user. Use the information to populate the requests in [ Create - * issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * @deprecated Returns details of projects, issue types within projects, and, when requested, the create screen fields + * for each issue type for the user. Use the information to populate the requests in [ Create + * issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). * - * The request can be restricted to specific projects or issue types using the query parameters. The response will - * contain information for the valid projects, issue types, or project and issue type combinations requested. Note - * that invalid project, issue type, or project and issue type combinations do not generate errors. + * Deprecated, see [Create Issue Meta Endpoint Deprecation + * Notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304). * - * This operation can be accessed anonymously. + * The request can be restricted to specific projects or issue types using the query parameters. The response will + * contain information for the valid projects, issue types, or project and issue type combinations requested. Note + * that invalid project, issue type, or project and issue type combinations do not generate errors. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create - * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. */ async getCreateIssueMeta( parameters?: Parameters.GetCreateIssueMeta, @@ -325,6 +450,134 @@ export class Issues { return this.client.sendRequest(config, callback); } + /** + * Returns a page of issue type metadata for a specified project. Use the information to populate the requests in [ + * Create issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback: Callback, + ): Promise; + /** + * Returns a page of issue type metadata for a specified project. Use the information to populate the requests in [ + * Create issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback?: never, + ): Promise; + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/issue/createmeta/${parameters.projectIdOrKey}/issuetypes`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a page of field metadata for a specified project and issuetype id. Use the information to populate the + * requests in [ Create issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback: Callback, + ): Promise; + /** + * Returns a page of field metadata for a specified project and issuetype id. Use the information to populate the + * requests in [ Create issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback?: never, + ): Promise; + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/issue/createmeta/${parameters.projectIdOrKey}/issuetypes/${parameters.issueTypeId}`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns all issues breaching and approaching per-issue limits. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) is required for the project the + * issues are in. Results may be incomplete otherwise + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getIssueLimitReport( + parameters: Parameters.GetIssueLimitReport | undefined, + callback: Callback, + ): Promise; + /** + * Returns all issues breaching and approaching per-issue limits. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) is required for the project the + * issues are in. Results may be incomplete otherwise + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getIssueLimitReport( + parameters?: Parameters.GetIssueLimitReport, + callback?: never, + ): Promise; + async getIssueLimitReport( + parameters?: Parameters.GetIssueLimitReport, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/issue/limit/report', + method: 'GET', + params: { + isReturningKeys: parameters?.isReturningKeys, + }, + data: { + issuesApproachingLimitParams: parameters?.issuesApproachingLimitParams, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Enables admins to unarchive up to 1000 issues in a single request using issue ID/key, returning details of the * issue(s) unarchived in the process and the errors encountered, if any. @@ -424,11 +677,11 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}`, method: 'GET', params: { - fields: typeof parameters !== 'string' && parameters.fields, - fieldsByKeys: typeof parameters !== 'string' && parameters.fieldsByKeys, - expand: typeof parameters !== 'string' && parameters.expand, - properties: typeof parameters !== 'string' && parameters.properties, - updateHistory: typeof parameters !== 'string' && parameters.updateHistory, + fields: typeof parameters !== 'string' ? parameters.fields : undefined, + fieldsByKeys: typeof parameters !== 'string' ? parameters.fieldsByKeys : undefined, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, + properties: typeof parameters !== 'string' ? parameters.properties : undefined, + updateHistory: typeof parameters !== 'string' ? parameters.updateHistory : undefined, }, }; @@ -436,7 +689,9 @@ export class Issues { } /** - * Edits an issue. A transition may be applied and issue properties updated as part of the edit. + * Edits an issue. Issue properties may be updated as part of the edit. Please note that issue transition is not + * supported and is ignored here. To transition an issue, please use [Transition + * issue](#api-rest-api-2-issue-issueIdOrKey-transitions-post). * * The edits to the issue's fields are defined using `update` and `fields`. The fields that can be edited are * determined using [ Get edit issue metadata](#api-rest-api-2-issue-issueIdOrKey-editmeta-get). @@ -460,7 +715,9 @@ export class Issues { */ async editIssue(parameters: Parameters.EditIssue, callback: Callback): Promise; /** - * Edits an issue. A transition may be applied and issue properties updated as part of the edit. + * Edits an issue. Issue properties may be updated as part of the edit. Please note that issue transition is not + * supported and is ignored here. To transition an issue, please use [Transition + * issue](#api-rest-api-2-issue-issueIdOrKey-transitions-post). * * The edits to the issue's fields are defined using `update` and `fields`. The fields that can be edited are * determined using [ Get edit issue metadata](#api-rest-api-2-issue-issueIdOrKey-editmeta-get). @@ -545,7 +802,7 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}`, method: 'DELETE', params: { - deleteSubtasks: typeof parameters !== 'string' && parameters.deleteSubtasks, + deleteSubtasks: typeof parameters !== 'string' ? parameters.deleteSubtasks : undefined, }, }; @@ -659,8 +916,8 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}/changelog`, method: 'GET', params: { - startAt: typeof parameters !== 'string' && parameters.startAt, - maxResults: typeof parameters !== 'string' && parameters.maxResults, + startAt: typeof parameters !== 'string' ? parameters.startAt : undefined, + maxResults: typeof parameters !== 'string' ? parameters.maxResults : undefined, }, }; @@ -836,8 +1093,8 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}/editmeta`, method: 'GET', params: { - overrideScreenSecurity: typeof parameters !== 'string' && parameters.overrideScreenSecurity, - overrideEditableFlag: typeof parameters !== 'string' && parameters.overrideEditableFlag, + overrideScreenSecurity: typeof parameters !== 'string' ? parameters.overrideScreenSecurity : undefined, + overrideEditableFlag: typeof parameters !== 'string' ? parameters.overrideEditableFlag : undefined, }, }; @@ -940,11 +1197,12 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}/transitions`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, - transitionId: typeof parameters !== 'string' && parameters.transitionId, - skipRemoteOnlyCondition: typeof parameters !== 'string' && parameters.skipRemoteOnlyCondition, - includeUnavailableTransitions: typeof parameters !== 'string' && parameters.includeUnavailableTransitions, - sortByOpsBarAndStatus: typeof parameters !== 'string' && parameters.sortByOpsBarAndStatus, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, + transitionId: typeof parameters !== 'string' ? parameters.transitionId : undefined, + skipRemoteOnlyCondition: typeof parameters !== 'string' ? parameters.skipRemoteOnlyCondition : undefined, + includeUnavailableTransitions: + typeof parameters !== 'string' ? parameters.includeUnavailableTransitions : undefined, + sortByOpsBarAndStatus: typeof parameters !== 'string' ? parameters.sortByOpsBarAndStatus : undefined, }, }; diff --git a/src/version2/jQL.ts b/src/version2/jQL.ts index 4b0ce522c..54f434391 100644 --- a/src/version2/jQL.ts +++ b/src/version2/jQL.ts @@ -261,7 +261,7 @@ export class JQL { * Note that sanitization doesn't make the queries GDPR-compliant, because it doesn't remove user identifiers * (username or user key). If you need to make queries GDPR-compliant, use [Convert user identifiers to account IDs in * JQL - * queries](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/#api-rest-api-3-jql-sanitize-post). + * queries](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-rest-api-2-jql-sanitize-post). * * Before sanitization each JQL query is parsed. The queries are returned in the same order that they were passed. * @@ -284,7 +284,7 @@ export class JQL { * Note that sanitization doesn't make the queries GDPR-compliant, because it doesn't remove user identifiers * (username or user key). If you need to make queries GDPR-compliant, use [Convert user identifiers to account IDs in * JQL - * queries](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/#api-rest-api-3-jql-sanitize-post). + * queries](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-rest-api-2-jql-sanitize-post). * * Before sanitization each JQL query is parsed. The queries are returned in the same order that they were passed. * diff --git a/src/version2/jiraExpressions.ts b/src/version2/jiraExpressions.ts index c14a691f3..e34c2b88c 100644 --- a/src/version2/jiraExpressions.ts +++ b/src/version2/jiraExpressions.ts @@ -46,8 +46,8 @@ export class JiraExpressions { check: parameters?.check, }, data: { - expressions: parameters?.expressions, contextVariables: parameters?.contextVariables, + expressions: parameters?.expressions, }, }; @@ -106,11 +106,12 @@ export class JiraExpressions { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required**: None. * However, an expression may return different results for different users depending on their permissions. For - * example, different users may see different comments on the same issue. Permission to access Jira Software is - * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). */ async evaluateJiraExpression( - parameters: Parameters.EvaluateJiraExpression | undefined, + parameters: Parameters.EvaluateJiraExpression, callback: Callback, ): Promise; /** @@ -165,26 +166,27 @@ export class JiraExpressions { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required**: None. * However, an expression may return different results for different users depending on their permissions. For - * example, different users may see different comments on the same issue. Permission to access Jira Software is - * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). */ async evaluateJiraExpression( - parameters?: Parameters.EvaluateJiraExpression, + parameters: Parameters.EvaluateJiraExpression, callback?: never, ): Promise; async evaluateJiraExpression( - parameters?: Parameters.EvaluateJiraExpression, + parameters: Parameters.EvaluateJiraExpression, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/expression/eval', method: 'POST', params: { - expand: parameters?.expand, + expand: parameters.expand, }, data: { - expression: parameters?.expression, - context: parameters?.context, + context: parameters.context, + expression: parameters.expression, }, }; @@ -212,7 +214,7 @@ export class JiraExpressions { * current user. Always available and equal to `null` if the request is anonymous. * - `app` ([App](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#app)): The * [Connect app](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) that made the request. - * Available only for authenticated requests made by Connect Apps (read more here: [Authentication for Connect + * Available only for authenticated requests made by Connect apps (read more here: [Authentication for Connect * apps](https://developer.atlassian.com/cloud/jira/platform/security-for-connect-apps/)). * - `issue` ([Issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): The * current issue. Available only when the issue is provided in the request context object. @@ -247,11 +249,12 @@ export class JiraExpressions { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required**: None. * However, an expression may return different results for different users depending on their permissions. For - * example, different users may see different comments on the same issue. Permission to access Jira Software is - * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). */ - async evaluateJiraExpressionUsingEnhancedSearch( - parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch | undefined, + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, callback: Callback, ): Promise; /** @@ -275,7 +278,7 @@ export class JiraExpressions { * current user. Always available and equal to `null` if the request is anonymous. * - `app` ([App](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#app)): The * [Connect app](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) that made the request. - * Available only for authenticated requests made by Connect Apps (read more here: [Authentication for Connect + * Available only for authenticated requests made by Connect apps (read more here: [Authentication for Connect * apps](https://developer.atlassian.com/cloud/jira/platform/security-for-connect-apps/)). * - `issue` ([Issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): The * current issue. Available only when the issue is provided in the request context object. @@ -310,26 +313,27 @@ export class JiraExpressions { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required**: None. * However, an expression may return different results for different users depending on their permissions. For - * example, different users may see different comments on the same issue. Permission to access Jira Software is - * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). */ - async evaluateJiraExpressionUsingEnhancedSearch( - parameters?: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, callback?: never, ): Promise; - async evaluateJiraExpressionUsingEnhancedSearch( - parameters?: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/expression/evaluate', method: 'POST', params: { - expand: parameters?.expand, + expand: parameters.expand, }, data: { - expression: parameters?.expression, - context: parameters?.context, + expression: parameters.expression, + context: parameters.context, }, }; diff --git a/src/version2/jiraSettings.ts b/src/version2/jiraSettings.ts index 6bf6c5f52..03a13fef0 100644 --- a/src/version2/jiraSettings.ts +++ b/src/version2/jiraSettings.ts @@ -88,18 +88,17 @@ export class JiraSettings { * * The advanced settings below are also accessible in [Jira](https://confluence.atlassian.com/x/vYXKM). * - * | Key | Description | Default value | - * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | - * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | - * | `jira.date.picker.java.format` | The date format for the Java (server-side) generated dates. This must be the same as the `jira.date.picker.javascript.format` format setting. | `d/MMM/yy` | - * | `jira.date.picker.javascript.format` | The date format for the JavaScript (client-side) generated dates. This must be the same as the `jira.date.picker.java.format` format setting. | `%e/%b/%y` | - * | `jira.date.time.picker.java.format` | The date format for the Java (server-side) generated date times. This must be the same as the `jira.date.time.picker.javascript.format` format setting. | `dd/MMM/yy h:mm a` | - * | `jira.date.time.picker.javascript.format` | The date format for the JavaScript (client-side) generated date times. This must be the same as the `jira.date.time.picker.java.format` format setting. | `%e/%b/%y %I:%M %p` | - * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | - * | `jira.table.cols.subtasks` | The columns to show while viewing subtask issues in a table. For example, a list of subtasks on an issue. | `issuetype, status, assignee, progress` | - * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | - * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | - * | `jira.newsletter.tip.delay.days` | The number of days before a prompt to sign up to the Jira Insiders newsletter is shown. A value of `-1` disables this feature. | `7` | + * | Key | Description | Default value | + * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | + * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | + * | `jira.date.picker.java.format` | The date format for the Java (server-side) generated dates. This must be the same as the `jira.date.picker.javascript.format` format setting. | `d/MMM/yy` | + * | `jira.date.picker.javascript.format` | The date format for the JavaScript (client-side) generated dates. This must be the same as the `jira.date.picker.java.format` format setting. | `%e/%b/%y` | + * | `jira.date.time.picker.java.format` | The date format for the Java (server-side) generated date times. This must be the same as the `jira.date.time.picker.javascript.format` format setting. | `dd/MMM/yy h:mm a` | + * | `jira.date.time.picker.javascript.format` | The date format for the JavaScript (client-side) generated date times. This must be the same as the `jira.date.time.picker.java.format` format setting. | `%e/%b/%y %I:%M %p` | + * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | + * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | + * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | + * | `jira.newsletter.tip.delay.days` | The number of days before a prompt to sign up to the Jira Insiders newsletter is shown. A value of `-1` disables this feature. | `7` | * * #### Look and feel * @@ -148,18 +147,17 @@ export class JiraSettings { * * The advanced settings below are also accessible in [Jira](https://confluence.atlassian.com/x/vYXKM). * - * | Key | Description | Default value | - * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | - * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | - * | `jira.date.picker.java.format` | The date format for the Java (server-side) generated dates. This must be the same as the `jira.date.picker.javascript.format` format setting. | `d/MMM/yy` | - * | `jira.date.picker.javascript.format` | The date format for the JavaScript (client-side) generated dates. This must be the same as the `jira.date.picker.java.format` format setting. | `%e/%b/%y` | - * | `jira.date.time.picker.java.format` | The date format for the Java (server-side) generated date times. This must be the same as the `jira.date.time.picker.javascript.format` format setting. | `dd/MMM/yy h:mm a` | - * | `jira.date.time.picker.javascript.format` | The date format for the JavaScript (client-side) generated date times. This must be the same as the `jira.date.time.picker.java.format` format setting. | `%e/%b/%y %I:%M %p` | - * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | - * | `jira.table.cols.subtasks` | The columns to show while viewing subtask issues in a table. For example, a list of subtasks on an issue. | `issuetype, status, assignee, progress` | - * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | - * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | - * | `jira.newsletter.tip.delay.days` | The number of days before a prompt to sign up to the Jira Insiders newsletter is shown. A value of `-1` disables this feature. | `7` | + * | Key | Description | Default value | + * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | + * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | + * | `jira.date.picker.java.format` | The date format for the Java (server-side) generated dates. This must be the same as the `jira.date.picker.javascript.format` format setting. | `d/MMM/yy` | + * | `jira.date.picker.javascript.format` | The date format for the JavaScript (client-side) generated dates. This must be the same as the `jira.date.picker.java.format` format setting. | `%e/%b/%y` | + * | `jira.date.time.picker.java.format` | The date format for the Java (server-side) generated date times. This must be the same as the `jira.date.time.picker.javascript.format` format setting. | `dd/MMM/yy h:mm a` | + * | `jira.date.time.picker.javascript.format` | The date format for the JavaScript (client-side) generated date times. This must be the same as the `jira.date.time.picker.java.format` format setting. | `%e/%b/%y %I:%M %p` | + * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | + * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | + * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | + * | `jira.newsletter.tip.delay.days` | The number of days before a prompt to sign up to the Jira Insiders newsletter is shown. A value of `-1` disables this feature. | `7` | * * #### Look and feel * diff --git a/src/version2/jqlFunctionsApps.ts b/src/version2/jqlFunctionsApps.ts index ca755861d..b2a7dcb30 100644 --- a/src/version2/jqlFunctionsApps.ts +++ b/src/version2/jqlFunctionsApps.ts @@ -13,6 +13,9 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** This * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getPrecomputations( parameters: Parameters.GetPrecomputations | undefined, @@ -24,6 +27,9 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** This * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getPrecomputations( parameters?: Parameters.GetPrecomputations, @@ -41,7 +47,6 @@ export class JqlFunctionsApps { startAt: parameters?.startAt, maxResults: parameters?.maxResults, orderBy: parameters?.orderBy, - filter: parameters?.filter, }, }; @@ -53,9 +58,12 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** An API * for apps to update their own precomputations. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updatePrecomputations( - parameters: Parameters.UpdatePrecomputations | undefined, + parameters: Parameters.UpdatePrecomputations, callback: Callback, ): Promise; /** @@ -63,17 +71,69 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** An API * for apps to update their own precomputations. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ - async updatePrecomputations(parameters?: Parameters.UpdatePrecomputations, callback?: never): Promise; + async updatePrecomputations(parameters: Parameters.UpdatePrecomputations, callback?: never): Promise; async updatePrecomputations( - parameters?: Parameters.UpdatePrecomputations, + parameters: Parameters.UpdatePrecomputations, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/jql/function/computation', method: 'POST', + params: { + skipNotFoundPrecomputations: parameters.skipNotFoundPrecomputations, + }, + data: { + values: parameters.values, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns function precomputations by IDs, along with information about when they were created, updated, and last + * used. Each precomputation has a `value` - the JQL fragment to replace the custom function clause with. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** This + * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. + */ + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback: Callback, + ): Promise; + /** + * Returns function precomputations by IDs, along with information about when they were created, updated, and last + * used. Each precomputation has a `value` - the JQL fragment to replace the custom function clause with. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** This + * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. + */ + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback?: never, + ): Promise; + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/jql/function/computation/search', + method: 'POST', + params: { + orderBy: parameters.orderBy, + }, data: { - values: parameters?.values, + precomputationIDs: parameters.precomputationIDs, }, }; diff --git a/src/version2/models/addAtlassianTeamRequest.ts b/src/version2/models/addAtlassianTeamRequest.ts new file mode 100644 index 000000000..61b43a601 --- /dev/null +++ b/src/version2/models/addAtlassianTeamRequest.ts @@ -0,0 +1,12 @@ +export interface AddAtlassianTeamRequest { + /** The capacity for the Atlassian team. */ + capacity?: number; + /** The Atlassian team ID. */ + id: string; + /** The ID of the issue source for the Atlassian team. */ + issueSourceId?: number; + /** The planning style for the Atlassian team. This must be "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the Atlassian team. */ + sprintLength?: number; +} diff --git a/src/version2/models/addNotificationsDetails.ts b/src/version2/models/addNotificationsDetails.ts new file mode 100644 index 000000000..388d25761 --- /dev/null +++ b/src/version2/models/addNotificationsDetails.ts @@ -0,0 +1,7 @@ +import { NotificationSchemeEventDetails } from './notificationSchemeEventDetails'; + +/** Details of notifications which should be added to the notification scheme. */ +export interface AddNotificationsDetails { + /** The list of notifications which should be added to the notification scheme. */ + notificationSchemeEvents: NotificationSchemeEventDetails[]; +} diff --git a/src/version2/models/appWorkflowTransitionRule.ts b/src/version2/models/appWorkflowTransitionRule.ts new file mode 100644 index 000000000..7ff8733ca --- /dev/null +++ b/src/version2/models/appWorkflowTransitionRule.ts @@ -0,0 +1,12 @@ +import { RuleConfiguration } from './ruleConfiguration'; +import { WorkflowTransition } from './workflowTransition'; + +/** A workflow transition rule. */ +export interface AppWorkflowTransitionRule { + configuration: RuleConfiguration; + /** The ID of the transition rule. */ + id: string; + /** The key of the rule, as defined in the Connect or the Forge app descriptor. */ + key: string; + transition?: WorkflowTransition; +} diff --git a/src/version2/models/approvalConfiguration.ts b/src/version2/models/approvalConfiguration.ts new file mode 100644 index 000000000..790f18d0a --- /dev/null +++ b/src/version2/models/approvalConfiguration.ts @@ -0,0 +1,29 @@ +/** The approval configuration of a status within a workflow. Applies only to Jira Service Management approvals. */ +export interface ApprovalConfiguration { + /** Whether the approval configuration is active. */ + active: 'true' | 'false' | string; + /** + * How the required approval count is calculated. It may be configured to require a specific number of approvals, or + * approval by a percentage of approvers. If the approvers source field is Approver groups, you can configure how many + * approvals per group are required for the request to be approved. The number will be the same across all groups. + */ + conditionType: 'number' | 'percent' | 'numberPerPrincipal' | string; + /** + * The number or percentage of approvals required for a request to be approved. If `conditionType` is `number`, the + * value must be 20 or less. If `conditionType` is `percent`, the value must be 100 or less. + */ + conditionValue: string; + /** A list of roles that should be excluded as possible approvers. */ + exclude?: 'assignee' | 'reporter' | string; + /** The custom field ID of the "Approvers" or "Approver Groups" field. */ + fieldId: string; + /** + * The custom field ID of the field used to pre-populate the Approver field. Only supports the "Affected Services" + * field. + */ + prePopulatedFieldId?: string; + /** The numeric ID of the transition to be executed if the request is approved. */ + transitionApproved: string; + /** The numeric ID of the transition to be executed if the request is declined. */ + transitionRejected: string; +} diff --git a/src/version2/models/archiveIssueAsyncRequest.ts b/src/version2/models/archiveIssueAsyncRequest.ts new file mode 100644 index 000000000..279fc9a2a --- /dev/null +++ b/src/version2/models/archiveIssueAsyncRequest.ts @@ -0,0 +1,3 @@ +export interface ArchiveIssueAsyncRequest { + jql?: string; +} diff --git a/src/version2/models/archivedIssuesFilterRequest.ts b/src/version2/models/archivedIssuesFilterRequest.ts new file mode 100644 index 000000000..587b7006b --- /dev/null +++ b/src/version2/models/archivedIssuesFilterRequest.ts @@ -0,0 +1,14 @@ +import { DateRangeFilterRequest } from './dateRangeFilterRequest'; + +/** Details of a filter for exporting archived issues. */ +export interface ArchivedIssuesFilterRequest { + /** List archived issues archived by a specified account ID. */ + archivedBy?: string[]; + archivedDateRange?: DateRangeFilterRequest; + /** List archived issues with a specified issue type ID. */ + issueTypes?: string[]; + /** List archived issues with a specified project key. */ + projects?: string[]; + /** List archived issues where the reporter is a specified account ID. */ + reporters?: string[]; +} diff --git a/src/version2/models/associateSecuritySchemeWithProjectDetails.ts b/src/version2/models/associateSecuritySchemeWithProjectDetails.ts new file mode 100644 index 000000000..099633417 --- /dev/null +++ b/src/version2/models/associateSecuritySchemeWithProjectDetails.ts @@ -0,0 +1,11 @@ +import { OldToNewSecurityLevelMappingsBean } from './oldToNewSecurityLevelMappingsBean'; + +/** Issue security scheme, project, and remapping details. */ +export interface AssociateSecuritySchemeWithProjectDetails { + /** The list of scheme levels which should be remapped to new levels of the issue security scheme. */ + oldToNewSecurityLevelMappings?: OldToNewSecurityLevelMappingsBean[]; + /** The ID of the project. */ + projectId: string; + /** The ID of the issue security scheme. Providing null will clear the association with the issue security scheme. */ + schemeId: string; +} diff --git a/src/version2/models/attachmentArchive.ts b/src/version2/models/attachmentArchive.ts new file mode 100644 index 000000000..16593d530 --- /dev/null +++ b/src/version2/models/attachmentArchive.ts @@ -0,0 +1,8 @@ +import { AttachmentArchiveEntry } from './attachmentArchiveEntry'; + +export interface AttachmentArchive { + entries?: AttachmentArchiveEntry[]; + moreAvailable?: boolean; + totalEntryCount?: number; + totalNumberOfEntriesAvailable?: number; +} diff --git a/src/version2/models/bulkChangelog.ts b/src/version2/models/bulkChangelog.ts new file mode 100644 index 000000000..55644ab00 --- /dev/null +++ b/src/version2/models/bulkChangelog.ts @@ -0,0 +1,12 @@ +import { IssueChangeLog } from './issueChangeLog'; + +/** A page of changelogs which is designed to handle multiple issues */ +export interface BulkChangelog { + /** The list of issues changelogs. */ + issueChangeLogs?: IssueChangeLog[]; + /** + * Continuation token to fetch the next page. If this result represents the last or the only page, this token will be + * null. + */ + nextPageToken?: string; +} diff --git a/src/version2/models/bulkChangelogRequest.ts b/src/version2/models/bulkChangelogRequest.ts new file mode 100644 index 000000000..b6162735a --- /dev/null +++ b/src/version2/models/bulkChangelogRequest.ts @@ -0,0 +1,11 @@ +/** Request bean for bulk changelog retrieval */ +export interface BulkChangelogRequest { + /** List of field IDs to filter changelogs */ + fieldIds?: string[]; + /** List of issue IDs/keys to fetch changelogs for */ + issueIdsOrKeys: string[]; + /** The maximum number of items to return per page */ + maxResults?: number; + /** The cursor for pagination */ + nextPageToken?: string; +} diff --git a/src/version2/models/bulkContextualConfiguration.ts b/src/version2/models/bulkContextualConfiguration.ts new file mode 100644 index 000000000..e175ae50a --- /dev/null +++ b/src/version2/models/bulkContextualConfiguration.ts @@ -0,0 +1,13 @@ +/** Details of the contextual configuration for a custom field. */ +export interface BulkContextualConfiguration { + /** The field configuration. */ + configuration?: {}; + /** The ID of the custom field. */ + customFieldId: string; + /** The ID of the field context the configuration is associated with. */ + fieldContextId: string; + /** The ID of the configuration. */ + id: string; + /** The field value schema. */ + schema?: {}; +} diff --git a/src/version2/models/bulkEditActionError.ts b/src/version2/models/bulkEditActionError.ts new file mode 100644 index 000000000..7807624ca --- /dev/null +++ b/src/version2/models/bulkEditActionError.ts @@ -0,0 +1,7 @@ +/** Errors of bulk edit action. */ +export interface BulkEditActionError { + /** The error messages. */ + errorMessages: string[]; + /** The errors. */ + errors: {}; +} diff --git a/src/version2/models/bulkEditShareableEntityRequest.ts b/src/version2/models/bulkEditShareableEntityRequest.ts new file mode 100644 index 000000000..09e8ba512 --- /dev/null +++ b/src/version2/models/bulkEditShareableEntityRequest.ts @@ -0,0 +1,14 @@ +import { BulkChangeOwnerDetails } from './bulkChangeOwnerDetails'; +import { PermissionDetails } from './permissionDetails'; + +/** Details of a request to bulk edit shareable entity. */ +export interface BulkEditShareableEntityRequest { + /** Allowed action for bulk edit shareable entity */ + action: 'changeOwner' | 'changePermission' | 'addPermission' | 'removePermission' | string; + changeOwnerDetails?: BulkChangeOwnerDetails; + /** The id list of shareable entities to be changed. */ + entityIds: number[]; + /** Whether the actions are executed by users with Administer Jira global permission. */ + extendAdminPermissions?: boolean; + permissionDetails?: PermissionDetails; +} diff --git a/src/version2/models/bulkIssue.ts b/src/version2/models/bulkIssue.ts new file mode 100644 index 000000000..8134e65eb --- /dev/null +++ b/src/version2/models/bulkIssue.ts @@ -0,0 +1,14 @@ +import { IssueError } from './issueError'; +import { Issue } from './issue'; + +/** The list of requested issues & fields. */ +export interface BulkIssue { + /** + * When Jira can't return an issue enumerated in a request due to a retriable error or payload constraint, we'll + * return the respective issue ID with a corresponding error message. This list is empty when there are no errors + * Issues which aren't found or that the user doesn't have permission to view won't be returned in this list. + */ + issueErrors?: IssueError[]; + /** The list of issues. */ + issues?: Issue[]; +} diff --git a/src/version2/models/changeFilterOwner.ts b/src/version2/models/changeFilterOwner.ts new file mode 100644 index 000000000..b068a585d --- /dev/null +++ b/src/version2/models/changeFilterOwner.ts @@ -0,0 +1,5 @@ +/** The account ID of the new owner. */ +export interface ChangeFilterOwner { + /** The account ID of the new owner. */ + accountId: string; +} diff --git a/src/version2/models/columnRequestBody.ts b/src/version2/models/columnRequestBody.ts new file mode 100644 index 000000000..3bb0b3123 --- /dev/null +++ b/src/version2/models/columnRequestBody.ts @@ -0,0 +1,3 @@ +export interface ColumnRequestBody { + columns?: string[]; +} diff --git a/src/version2/models/component.ts b/src/version2/models/component.ts new file mode 100644 index 000000000..d41a2c219 --- /dev/null +++ b/src/version2/models/component.ts @@ -0,0 +1,8 @@ +export interface Component { + ari?: string; + description?: string; + id?: string; + metadata?: {}; + name?: string; + self?: string; +} diff --git a/src/version2/models/compoundClause.ts b/src/version2/models/compoundClause.ts new file mode 100644 index 000000000..06b402f55 --- /dev/null +++ b/src/version2/models/compoundClause.ts @@ -0,0 +1,14 @@ +import { JqlQueryClause } from './jqlQueryClause'; + +/** + * A JQL query clause that consists of nested clauses. For example, `(labels in (urgent, blocker) OR lastCommentedBy = + * currentUser()). Note that, where nesting is not defined, the parser nests JQL clauses based on the operator + * precedence. For example, "A OR B AND C" is parsed as "(A OR B) AND C". See Setting the precedence of operators for + * more information about precedence in JQL queries.` + */ +export interface CompoundClause { + /** The list of nested clauses. */ + clauses: JqlQueryClause[]; + /** The operator between the clauses. */ + operator: 'and' | 'or' | 'not' | string; +} diff --git a/src/version2/models/configurationsListParameters.ts b/src/version2/models/configurationsListParameters.ts new file mode 100644 index 000000000..0ded35d16 --- /dev/null +++ b/src/version2/models/configurationsListParameters.ts @@ -0,0 +1,5 @@ +/** List of custom fields identifiers which will be used to filter configurations */ +export interface ConfigurationsListParameters { + /** List of IDs or keys of the custom fields. It can be a mix of IDs and keys in the same query. */ + fieldIdsOrKeys: string[]; +} diff --git a/src/version2/models/context.ts b/src/version2/models/context.ts new file mode 100644 index 000000000..638cbfe41 --- /dev/null +++ b/src/version2/models/context.ts @@ -0,0 +1,10 @@ +import { Scope } from './scope'; + +/** A context. */ +export interface Context { + /** The ID of the context. */ + id?: number; + /** The name of the context. */ + name?: string; + scope?: Scope; +} diff --git a/src/version2/models/createCrossProjectReleaseRequest.ts b/src/version2/models/createCrossProjectReleaseRequest.ts new file mode 100644 index 000000000..ad86f7182 --- /dev/null +++ b/src/version2/models/createCrossProjectReleaseRequest.ts @@ -0,0 +1,6 @@ +export interface CreateCrossProjectReleaseRequest { + /** The cross-project release name. */ + name: string; + /** The IDs of the releases to include in the cross-project release. */ + releaseIds?: number[]; +} diff --git a/src/version2/models/createCustomFieldRequest.ts b/src/version2/models/createCustomFieldRequest.ts new file mode 100644 index 000000000..08f438709 --- /dev/null +++ b/src/version2/models/createCustomFieldRequest.ts @@ -0,0 +1,6 @@ +export interface CreateCustomFieldRequest { + /** The custom field ID. */ + customFieldId: number; + /** Allows filtering issues based on their values for the custom field. */ + filter?: boolean; +} diff --git a/src/version2/models/createDateFieldRequest.ts b/src/version2/models/createDateFieldRequest.ts new file mode 100644 index 000000000..8c70d94eb --- /dev/null +++ b/src/version2/models/createDateFieldRequest.ts @@ -0,0 +1,6 @@ +export interface CreateDateFieldRequest { + /** A date custom field ID. This is required if the type is "DateCustomField". */ + dateCustomFieldId?: number; + /** The date field type. This must be "DueDate", "TargetStartDate", "TargetEndDate" or "DateCustomField". */ + type: 'DueDate' | 'TargetStartDate' | 'TargetEndDate' | 'DateCustomField' | string; +} diff --git a/src/version2/models/createExclusionRulesRequest.ts b/src/version2/models/createExclusionRulesRequest.ts new file mode 100644 index 000000000..88a7aca6e --- /dev/null +++ b/src/version2/models/createExclusionRulesRequest.ts @@ -0,0 +1,14 @@ +export interface CreateExclusionRulesRequest { + /** The IDs of the issues to exclude from the plan. */ + issueIds?: number[]; + /** The IDs of the issue types to exclude from the plan. */ + issueTypeIds?: number[]; + /** Issues completed this number of days ago will be excluded from the plan. */ + numberOfDaysToShowCompletedIssues?: number; + /** The IDs of the releases to exclude from the plan. */ + releaseIds?: number[]; + /** The IDs of the work status categories to exclude from the plan. */ + workStatusCategoryIds?: number[]; + /** The IDs of the work statuses to exclude from the plan. */ + workStatusIds?: number[]; +} diff --git a/src/version2/models/createIssueSourceRequest.ts b/src/version2/models/createIssueSourceRequest.ts new file mode 100644 index 000000000..87f7d3c1f --- /dev/null +++ b/src/version2/models/createIssueSourceRequest.ts @@ -0,0 +1,9 @@ +export interface CreateIssueSourceRequest { + /** The issue source type. This must be "Board", "Project" or "Filter". */ + type: 'Board' | 'Project' | 'Filter' | string; + /** + * The issue source value. This must be a board ID if the type is "Board", a project ID if the type is "Project" or a + * filter ID if the type is "Filter". + */ + value: number; +} diff --git a/src/version2/models/createPermissionHolderRequest.ts b/src/version2/models/createPermissionHolderRequest.ts new file mode 100644 index 000000000..1e0ab09af --- /dev/null +++ b/src/version2/models/createPermissionHolderRequest.ts @@ -0,0 +1,9 @@ +export interface CreatePermissionHolderRequest { + /** The permission holder type. This must be "Group" or "AccountId". */ + type: 'Group' | 'AccountId' | string; + /** + * The permission holder value. This must be a group name if the type is "Group" or an account ID if the type is + * "AccountId". + */ + value: string; +} diff --git a/src/version2/models/createPermissionRequest.ts b/src/version2/models/createPermissionRequest.ts new file mode 100644 index 000000000..0ce59481d --- /dev/null +++ b/src/version2/models/createPermissionRequest.ts @@ -0,0 +1,7 @@ +import { CreatePermissionHolderRequest } from './createPermissionHolderRequest'; + +export interface CreatePermissionRequest { + holder?: CreatePermissionHolderRequest; + /** The permission type. This must be "View" or "Edit". */ + type: 'View' | 'Edit' | string; +} diff --git a/src/version2/models/createPlanOnlyTeamRequest.ts b/src/version2/models/createPlanOnlyTeamRequest.ts new file mode 100644 index 000000000..f53a44b78 --- /dev/null +++ b/src/version2/models/createPlanOnlyTeamRequest.ts @@ -0,0 +1,14 @@ +export interface CreatePlanOnlyTeamRequest { + /** The capacity for the plan-only team. */ + capacity?: number; + /** The ID of the issue source for the plan-only team. */ + issueSourceId?: number; + /** The account IDs of the plan-only team members. */ + memberAccountIds?: string[]; + /** The plan-only team name. */ + name: string; + /** The planning style for the plan-only team. This must be "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the plan-only team. */ + sprintLength?: number; +} diff --git a/src/version2/models/createPlanRequest.ts b/src/version2/models/createPlanRequest.ts new file mode 100644 index 000000000..c567101c9 --- /dev/null +++ b/src/version2/models/createPlanRequest.ts @@ -0,0 +1,23 @@ +import { CreateCrossProjectReleaseRequest } from './createCrossProjectReleaseRequest'; +import { CreateCustomFieldRequest } from './createCustomFieldRequest'; +import { CreateExclusionRulesRequest } from './createExclusionRulesRequest'; +import { CreateIssueSourceRequest } from './createIssueSourceRequest'; +import { CreatePermissionRequest } from './createPermissionRequest'; +import { CreateSchedulingRequest } from './createSchedulingRequest'; + +export interface CreatePlanRequest { + /** The cross-project releases to include in the plan. */ + crossProjectReleases?: CreateCrossProjectReleaseRequest[]; + /** The custom fields for the plan. */ + customFields?: CreateCustomFieldRequest[]; + exclusionRules?: CreateExclusionRulesRequest; + /** The issue sources to include in the plan. */ + issueSources: CreateIssueSourceRequest[]; + /** The account ID of the plan lead. */ + leadAccountId?: string; + /** The plan name. */ + name: string; + /** The permissions for the plan. */ + permissions?: CreatePermissionRequest[]; + scheduling?: CreateSchedulingRequest; +} diff --git a/src/version2/models/createPriorityDetails.ts b/src/version2/models/createPriorityDetails.ts index 363c7a275..934f9993b 100644 --- a/src/version2/models/createPriorityDetails.ts +++ b/src/version2/models/createPriorityDetails.ts @@ -1,9 +1,40 @@ /** Details of an issue priority. */ export interface CreatePriorityDetails { + /** + * The ID for the avatar for the priority. Either the iconUrl or avatarId must be defined, but not both. This + * parameter is nullable and will become mandatory once the iconUrl parameter is deprecated. + */ + avatarId?: number; /** The description of the priority. */ description?: string; - /** The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. */ - iconUrl?: string; + /** + * The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. Either + * the iconUrl or avatarId must be defined, but not both. + * + * @deprecated This property is deprecated and will be removed in a future version. Use `avatarId` instead. + */ + iconUrl?: + | '/images/icons/priorities/blocker.png' + | '/images/icons/priorities/critical.png' + | '/images/icons/priorities/high.png' + | '/images/icons/priorities/highest.png' + | '/images/icons/priorities/low.png' + | '/images/icons/priorities/lowest.png' + | '/images/icons/priorities/major.png' + | '/images/icons/priorities/medium.png' + | '/images/icons/priorities/minor.png' + | '/images/icons/priorities/trivial.png' + | '/images/icons/priorities/blocker_new.png' + | '/images/icons/priorities/critical_new.png' + | '/images/icons/priorities/high_new.png' + | '/images/icons/priorities/highest_new.png' + | '/images/icons/priorities/low_new.png' + | '/images/icons/priorities/lowest_new.png' + | '/images/icons/priorities/major_new.png' + | '/images/icons/priorities/medium_new.png' + | '/images/icons/priorities/minor_new.png' + | '/images/icons/priorities/trivial_new.png' + | string; /** The name of the priority. Must be unique. */ name: string; /** The status color of the priority in 3-digit or 6-digit hexadecimal format. */ diff --git a/src/version2/models/createPrioritySchemeDetails.ts b/src/version2/models/createPrioritySchemeDetails.ts new file mode 100644 index 000000000..48059e0c6 --- /dev/null +++ b/src/version2/models/createPrioritySchemeDetails.ts @@ -0,0 +1,16 @@ +import { PriorityMapping } from './priorityMapping'; + +/** Details of a new priority scheme */ +export interface CreatePrioritySchemeDetails { + /** The ID of the default priority for the priority scheme. */ + defaultPriorityId: number; + /** The description of the priority scheme. */ + description?: string; + mappings?: PriorityMapping; + /** The name of the priority scheme. Must be unique. */ + name: string; + /** The IDs of priorities in the scheme. */ + priorityIds: number[]; + /** The IDs of projects that will use the priority scheme. */ + projectIds?: number[]; +} diff --git a/src/version2/models/createSchedulingRequest.ts b/src/version2/models/createSchedulingRequest.ts new file mode 100644 index 000000000..400b3c9e1 --- /dev/null +++ b/src/version2/models/createSchedulingRequest.ts @@ -0,0 +1,12 @@ +import { CreateDateFieldRequest } from './createDateFieldRequest'; + +export interface CreateSchedulingRequest { + /** The dependencies for the plan. This must be "Sequential" or "Concurrent". */ + dependencies?: 'Sequential' | 'Concurrent' | string; + endDate?: CreateDateFieldRequest; + /** The estimation unit for the plan. This must be "StoryPoints", "Days" or "Hours". */ + estimation: 'StoryPoints' | 'Days' | 'Hours' | string; + /** The inferred dates for the plan. This must be "None", "SprintDates" or "ReleaseDates". */ + inferredDates?: 'None' | 'SprintDates' | 'ReleaseDates' | string; + startDate?: CreateDateFieldRequest; +} diff --git a/src/version2/models/customFieldContextDefaultValueCascadingOption.ts b/src/version2/models/customFieldContextDefaultValueCascadingOption.ts new file mode 100644 index 000000000..d3e7b9987 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueCascadingOption.ts @@ -0,0 +1,10 @@ +/** The default value for a cascading select custom field. */ +export interface CustomFieldContextDefaultValueCascadingOption { + /** The ID of the default cascading option. */ + cascadingOptionId?: string; + /** The ID of the context. */ + contextId: string; + /** The ID of the default option. */ + optionId: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueDate.ts b/src/version2/models/customFieldContextDefaultValueDate.ts new file mode 100644 index 000000000..6f2852e76 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueDate.ts @@ -0,0 +1,8 @@ +/** The default value for a Date custom field. */ +export interface CustomFieldContextDefaultValueDate { + /** The default date in ISO format. Ignored if `useCurrent` is true. */ + date?: string; + type: string; + /** Whether to use the current date. */ + useCurrent?: boolean; +} diff --git a/src/version2/models/customFieldContextDefaultValueDateTime.ts b/src/version2/models/customFieldContextDefaultValueDateTime.ts new file mode 100644 index 000000000..f0a5a8a19 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueDateTime.ts @@ -0,0 +1,8 @@ +/** The default value for a date time custom field. */ +export interface CustomFieldContextDefaultValueDateTime { + /** The default date-time in ISO format. Ignored if `useCurrent` is true. */ + dateTime?: string; + type: string; + /** Whether to use the current date. */ + useCurrent?: boolean; +} diff --git a/src/version2/models/customFieldContextDefaultValueFloat.ts b/src/version2/models/customFieldContextDefaultValueFloat.ts new file mode 100644 index 000000000..f44a487fd --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueFloat.ts @@ -0,0 +1,6 @@ +/** Default value for a float (number) custom field. */ +export interface CustomFieldContextDefaultValueFloat { + /** The default floating-point number. */ + number: number; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeDateTimeField.ts b/src/version2/models/customFieldContextDefaultValueForgeDateTimeField.ts new file mode 100644 index 000000000..f64ffda2f --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeDateTimeField.ts @@ -0,0 +1,10 @@ +/** The default value for a Forge date time custom field. */ +export interface CustomFieldContextDefaultValueForgeDateTimeField { + /** The ID of the context. */ + contextId: string; + /** The default date-time in ISO format. Ignored if `useCurrent` is true. */ + dateTime?: string; + type: string; + /** Whether to use the current date. */ + useCurrent?: boolean; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeGroupField.ts b/src/version2/models/customFieldContextDefaultValueForgeGroupField.ts new file mode 100644 index 000000000..a39d619e2 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeGroupField.ts @@ -0,0 +1,8 @@ +/** The default value for a Forge group custom field. */ +export interface CustomFieldContextDefaultValueForgeGroupField { + /** The ID of the context. */ + contextId: string; + /** The ID of the the default group. */ + groupId: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeMultiGroupField.ts b/src/version2/models/customFieldContextDefaultValueForgeMultiGroupField.ts new file mode 100644 index 000000000..56fcdd1a5 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeMultiGroupField.ts @@ -0,0 +1,8 @@ +/** The default value for a Forge collection of groups custom field. */ +export interface CustomFieldContextDefaultValueForgeMultiGroupField { + /** The ID of the context. */ + contextId: string; + /** The IDs of the default groups. */ + groupIds: string[]; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeMultiStringField.ts b/src/version2/models/customFieldContextDefaultValueForgeMultiStringField.ts new file mode 100644 index 000000000..be184841e --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeMultiStringField.ts @@ -0,0 +1,6 @@ +/** The default text for a Forge collection of strings custom field. */ +export interface CustomFieldContextDefaultValueForgeMultiStringField { + type: string; + /** List of string values. The maximum length for a value is 254 characters. */ + values?: string[]; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeMultiUserField.ts b/src/version2/models/customFieldContextDefaultValueForgeMultiUserField.ts new file mode 100644 index 000000000..fba166cce --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeMultiUserField.ts @@ -0,0 +1,8 @@ +/** Defaults for a Forge collection of users custom field. */ +export interface CustomFieldContextDefaultValueForgeMultiUserField { + /** The IDs of the default users. */ + accountIds: string[]; + /** The ID of the context. */ + contextId: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeNumberField.ts b/src/version2/models/customFieldContextDefaultValueForgeNumberField.ts new file mode 100644 index 000000000..817d0ac8c --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeNumberField.ts @@ -0,0 +1,8 @@ +/** Default value for a Forge number custom field. */ +export interface CustomFieldContextDefaultValueForgeNumberField { + /** The ID of the context. */ + contextId: string; + /** The default floating-point number. */ + number: number; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeObjectField.ts b/src/version2/models/customFieldContextDefaultValueForgeObjectField.ts new file mode 100644 index 000000000..1374a24fe --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeObjectField.ts @@ -0,0 +1,6 @@ +/** The default value for a Forge object custom field. */ +export interface CustomFieldContextDefaultValueForgeObjectField { + /** The default JSON object. */ + object?: {}; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeStringField.ts b/src/version2/models/customFieldContextDefaultValueForgeStringField.ts new file mode 100644 index 000000000..23bf54106 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeStringField.ts @@ -0,0 +1,8 @@ +/** The default text for a Forge string custom field. */ +export interface CustomFieldContextDefaultValueForgeStringField { + /** The ID of the context. */ + contextId: string; + /** The default text. The maximum length is 254 characters. */ + text?: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueForgeUserField.ts b/src/version2/models/customFieldContextDefaultValueForgeUserField.ts new file mode 100644 index 000000000..780bda329 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueForgeUserField.ts @@ -0,0 +1,11 @@ +import { UserFilter } from './userFilter'; + +/** Defaults for a Forge user custom field. */ +export interface CustomFieldContextDefaultValueForgeUserField { + /** The ID of the default user. */ + accountId: string; + /** The ID of the context. */ + contextId: string; + type: string; + userFilter: UserFilter; +} diff --git a/src/version2/models/customFieldContextDefaultValueLabels.ts b/src/version2/models/customFieldContextDefaultValueLabels.ts new file mode 100644 index 000000000..2d5e8bc0a --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueLabels.ts @@ -0,0 +1,6 @@ +/** Default value for a labels custom field. */ +export interface CustomFieldContextDefaultValueLabels { + /** The default labels value. */ + labels: string[]; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueMultiUserPicker.ts b/src/version2/models/customFieldContextDefaultValueMultiUserPicker.ts new file mode 100644 index 000000000..ac6ed1085 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueMultiUserPicker.ts @@ -0,0 +1,8 @@ +/** The default value for a User Picker (multiple) custom field. */ +export interface CustomFieldContextDefaultValueMultiUserPicker { + /** The IDs of the default users. */ + accountIds: string[]; + /** The ID of the context. */ + contextId: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueMultipleGroupPicker.ts b/src/version2/models/customFieldContextDefaultValueMultipleGroupPicker.ts new file mode 100644 index 000000000..481e6bf2d --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueMultipleGroupPicker.ts @@ -0,0 +1,8 @@ +/** The default value for a multiple group picker custom field. */ +export interface CustomFieldContextDefaultValueMultipleGroupPicker { + /** The ID of the context. */ + contextId: string; + /** The IDs of the default groups. */ + groupIds: string[]; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueMultipleOption.ts b/src/version2/models/customFieldContextDefaultValueMultipleOption.ts new file mode 100644 index 000000000..7bbaeb638 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueMultipleOption.ts @@ -0,0 +1,8 @@ +/** The default value for a multi-select custom field. */ +export interface CustomFieldContextDefaultValueMultipleOption { + /** The ID of the context. */ + contextId: string; + /** The list of IDs of the default options. */ + optionIds: string[]; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueMultipleVersionPicker.ts b/src/version2/models/customFieldContextDefaultValueMultipleVersionPicker.ts new file mode 100644 index 000000000..e7f0ed58c --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueMultipleVersionPicker.ts @@ -0,0 +1,11 @@ +/** The default value for a multiple version picker custom field. */ +export interface CustomFieldContextDefaultValueMultipleVersionPicker { + type: string; + /** The IDs of the default versions. */ + versionIds: string[]; + /** + * The order the pickable versions are displayed in. If not provided, the released-first order is used. Available + * version orders are `"releasedFirst"` and `"unreleasedFirst"`. + */ + versionOrder?: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueProject.ts b/src/version2/models/customFieldContextDefaultValueProject.ts new file mode 100644 index 000000000..f7593301a --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueProject.ts @@ -0,0 +1,8 @@ +/** The default value for a project custom field. */ +export interface CustomFieldContextDefaultValueProject { + /** The ID of the context. */ + contextId: string; + /** The ID of the default project. */ + projectId: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueReadOnly.ts b/src/version2/models/customFieldContextDefaultValueReadOnly.ts new file mode 100644 index 000000000..27b0c151c --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueReadOnly.ts @@ -0,0 +1,6 @@ +/** The default text for a read only custom field. */ +export interface CustomFieldContextDefaultValueReadOnly { + /** The default text. The maximum length is 255 characters. */ + text?: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueSingleGroupPicker.ts b/src/version2/models/customFieldContextDefaultValueSingleGroupPicker.ts new file mode 100644 index 000000000..35fc9554e --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueSingleGroupPicker.ts @@ -0,0 +1,8 @@ +/** The default value for a group picker custom field. */ +export interface CustomFieldContextDefaultValueSingleGroupPicker { + /** The ID of the context. */ + contextId: string; + /** The ID of the the default group. */ + groupId: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueSingleOption.ts b/src/version2/models/customFieldContextDefaultValueSingleOption.ts new file mode 100644 index 000000000..63d25b6e7 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueSingleOption.ts @@ -0,0 +1,8 @@ +/** The default value for a single select custom field. */ +export interface CustomFieldContextDefaultValueSingleOption { + /** The ID of the context. */ + contextId: string; + /** The ID of the default option. */ + optionId: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueSingleVersionPicker.ts b/src/version2/models/customFieldContextDefaultValueSingleVersionPicker.ts new file mode 100644 index 000000000..e3b6d8376 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueSingleVersionPicker.ts @@ -0,0 +1,11 @@ +/** The default value for a version picker custom field. */ +export interface CustomFieldContextDefaultValueSingleVersionPicker { + type: string; + /** The ID of the default version. */ + versionId: string; + /** + * The order the pickable versions are displayed in. If not provided, the released-first order is used. Available + * version orders are `"releasedFirst"` and `"unreleasedFirst"`. + */ + versionOrder?: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueTextArea.ts b/src/version2/models/customFieldContextDefaultValueTextArea.ts new file mode 100644 index 000000000..10907b7b7 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueTextArea.ts @@ -0,0 +1,6 @@ +/** The default text for a text area custom field. */ +export interface CustomFieldContextDefaultValueTextArea { + /** The default text. The maximum length is 32767 characters. */ + text?: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueTextField.ts b/src/version2/models/customFieldContextDefaultValueTextField.ts new file mode 100644 index 000000000..a5c8505e4 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueTextField.ts @@ -0,0 +1,6 @@ +/** The default text for a text custom field. */ +export interface CustomFieldContextDefaultValueTextField { + /** The default text. The maximum length is 254 characters. */ + text?: string; + type: string; +} diff --git a/src/version2/models/customFieldContextDefaultValueURL.ts b/src/version2/models/customFieldContextDefaultValueURL.ts new file mode 100644 index 000000000..b6eea9127 --- /dev/null +++ b/src/version2/models/customFieldContextDefaultValueURL.ts @@ -0,0 +1,8 @@ +/** The default value for a URL custom field. */ +export interface CustomFieldContextDefaultValueURL { + /** The ID of the context. */ + contextId: string; + type: string; + /** The default URL. */ + url: string; +} diff --git a/src/version2/models/customFieldContextSingleUserPickerDefaults.ts b/src/version2/models/customFieldContextSingleUserPickerDefaults.ts new file mode 100644 index 000000000..ba2e248b6 --- /dev/null +++ b/src/version2/models/customFieldContextSingleUserPickerDefaults.ts @@ -0,0 +1,11 @@ +import { UserFilter } from './userFilter'; + +/** Defaults for a User Picker (single) custom field. */ +export interface CustomFieldContextSingleUserPickerDefaults { + /** The ID of the default user. */ + accountId: string; + /** The ID of the context. */ + contextId: string; + type: string; + userFilter: UserFilter; +} diff --git a/src/version2/models/dataClassificationLevels.ts b/src/version2/models/dataClassificationLevels.ts new file mode 100644 index 000000000..8358ceb24 --- /dev/null +++ b/src/version2/models/dataClassificationLevels.ts @@ -0,0 +1,7 @@ +import { DataClassificationTag } from './dataClassificationTag'; + +/** The data classification. */ +export interface DataClassificationLevels { + /** The data classifications. */ + classifications?: DataClassificationTag[]; +} diff --git a/src/version2/models/dataClassificationTag.ts b/src/version2/models/dataClassificationTag.ts new file mode 100644 index 000000000..672de56a1 --- /dev/null +++ b/src/version2/models/dataClassificationTag.ts @@ -0,0 +1,17 @@ +/** The data classification. */ +export interface DataClassificationTag { + /** The color of the data classification object. */ + color?: string; + /** The description of the data classification object. */ + description?: string; + /** The guideline of the data classification object. */ + guideline?: string; + /** The ID of the data classification object. */ + id: string; + /** The name of the data classification object. */ + name?: string; + /** The rank of the data classification object. */ + rank?: number; + /** The status of the data classification object. */ + status: string; +} diff --git a/src/version2/models/dateRangeFilterRequest.ts b/src/version2/models/dateRangeFilterRequest.ts new file mode 100644 index 000000000..dd99ddba6 --- /dev/null +++ b/src/version2/models/dateRangeFilterRequest.ts @@ -0,0 +1,7 @@ +/** List issues archived within a specified date range. */ +export interface DateRangeFilterRequest { + /** List issues archived after a specified date, passed in the YYYY-MM-DD format. */ + dateAfter: string; + /** List issues archived before a specified date provided in the YYYY-MM-DD format. */ + dateBefore: string; +} diff --git a/src/version2/models/deleteAndReplaceVersion.ts b/src/version2/models/deleteAndReplaceVersion.ts new file mode 100644 index 000000000..12f3dbc47 --- /dev/null +++ b/src/version2/models/deleteAndReplaceVersion.ts @@ -0,0 +1,13 @@ +import { CustomFieldReplacement } from './customFieldReplacement'; + +export interface DeleteAndReplaceVersion { + /** + * An array of custom field IDs (`customFieldId`) and version IDs (`moveTo`) to update when the fields contain the + * deleted version. + */ + customFieldReplacementList?: CustomFieldReplacement[]; + /** The ID of the version to update `affectedVersion` to when the field contains the deleted version. */ + moveAffectedIssuesTo?: number; + /** The ID of the version to update `fixVersion` to when the field contains the deleted version. */ + moveFixIssuesTo?: number; +} diff --git a/src/version2/models/deprecatedWorkflow.ts b/src/version2/models/deprecatedWorkflow.ts new file mode 100644 index 000000000..21f2dcd55 --- /dev/null +++ b/src/version2/models/deprecatedWorkflow.ts @@ -0,0 +1,23 @@ +import { Scope } from './scope'; + +/** Details about a workflow. */ +export interface DeprecatedWorkflow { + default?: boolean; + /** The description of the workflow. */ + description?: string; + /** The datetime the workflow was last modified. */ + lastModifiedDate?: string; + /** + * This property is no longer available and will be removed from the documentation soon. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) + * for details. + */ + lastModifiedUser?: string; + /** The account ID of the user that last modified the workflow. */ + lastModifiedUserAccountId?: string; + /** The name of the workflow. */ + name?: string; + scope?: Scope; + /** The number of steps included in the workflow. */ + steps?: number; +} diff --git a/src/version2/models/detailedErrorCollection.ts b/src/version2/models/detailedErrorCollection.ts new file mode 100644 index 000000000..5e30038b4 --- /dev/null +++ b/src/version2/models/detailedErrorCollection.ts @@ -0,0 +1,11 @@ +export interface DetailedErrorCollection { + /** Map of objects representing additional details for an error */ + details?: {}; + /** The list of error messages produced by this operation. For example, "input parameter 'key' must be provided" */ + errorMessages?: string[]; + /** + * The list of errors by parameter returned by the operation. For example,"projectKey": "Project keys must start with + * an uppercase letter, followed by one or more uppercase alphanumeric characters." + */ + errors?: {}; +} diff --git a/src/version2/models/duplicatePlanRequest.ts b/src/version2/models/duplicatePlanRequest.ts new file mode 100644 index 000000000..3d5c98bea --- /dev/null +++ b/src/version2/models/duplicatePlanRequest.ts @@ -0,0 +1,4 @@ +export interface DuplicatePlanRequest { + /** The plan name. */ + name: string; +} diff --git a/src/version2/models/errorCollections.ts b/src/version2/models/errorCollections.ts new file mode 100644 index 000000000..4a60d4d40 --- /dev/null +++ b/src/version2/models/errorCollections.ts @@ -0,0 +1 @@ +export interface ErrorCollections {} diff --git a/src/version2/models/errorMessage.ts b/src/version2/models/errorMessage.ts new file mode 100644 index 000000000..45c1efb99 --- /dev/null +++ b/src/version2/models/errorMessage.ts @@ -0,0 +1,4 @@ +export interface ErrorMessage { + /** The error message. */ + message: string; +} diff --git a/src/version2/models/evaluateMetaData.ts b/src/version2/models/evaluateMetaData.ts new file mode 100644 index 000000000..827c47dad --- /dev/null +++ b/src/version2/models/evaluateMetaData.ts @@ -0,0 +1,11 @@ +import { JiraExpressionsComplexity } from './jiraExpressionsComplexity'; +import { JExpEvaluateIssuesMeta } from './jExpEvaluateIssuesMeta'; + +/** + * Contains information about the expression evaluation. This bean will be replacing + * `JiraExpressionEvaluationMetaDataBean` bean as part of new `evaluate` endpoint + */ +export interface EvaluateMetaData { + complexity?: JiraExpressionsComplexity; + issues?: JExpEvaluateIssuesMeta; +} diff --git a/src/version2/models/evaluatedJiraExpression.ts b/src/version2/models/evaluatedJiraExpression.ts new file mode 100644 index 000000000..c4eeb513c --- /dev/null +++ b/src/version2/models/evaluatedJiraExpression.ts @@ -0,0 +1,16 @@ +import { JExpEvaluateMetaData } from './jExpEvaluateMetaData'; + +/** + * The result of evaluating a Jira expression.This bean will be replacing `JiraExpressionResultBean` bean as part of new + * evaluate endpoint + */ +export interface EvaluatedJiraExpression { + meta?: JExpEvaluateMetaData; + /** + * The value of the evaluated expression. It may be a primitive JSON value or a Jira REST API object. (Some + * expressions do not produce any meaningful results—for example, an expression that returns a lambda function—if + * that's the case a simple string representation is returned. These string representations should not be relied upon + * and may change without notice.) + */ + value: {}; +} diff --git a/src/version2/models/expandPrioritySchemeBean.ts b/src/version2/models/expandPrioritySchemeBean.ts new file mode 100644 index 000000000..68732ded0 --- /dev/null +++ b/src/version2/models/expandPrioritySchemeBean.ts @@ -0,0 +1,9 @@ +/** A priority scheme with less fields to be used in for an API expand response. */ +export interface ExpandPrioritySchemeBean { + /** The ID of the priority scheme. */ + id?: string; + /** The name of the priority scheme. */ + name?: string; + /** The URL of the priority scheme. */ + self?: string; +} diff --git a/src/version2/models/expandPrioritySchemePage.ts b/src/version2/models/expandPrioritySchemePage.ts new file mode 100644 index 000000000..eecfa3eb8 --- /dev/null +++ b/src/version2/models/expandPrioritySchemePage.ts @@ -0,0 +1,5 @@ +export interface ExpandPrioritySchemePage { + maxResults?: number; + startAt?: number; + total?: number; +} diff --git a/src/version2/models/fieldChangedClause.ts b/src/version2/models/fieldChangedClause.ts new file mode 100644 index 000000000..8f4c282ea --- /dev/null +++ b/src/version2/models/fieldChangedClause.ts @@ -0,0 +1,15 @@ +import { JqlQueryField } from './jqlQueryField'; +import { JqlQueryClauseTimePredicate } from './jqlQueryClauseTimePredicate'; + +/** + * A clause that asserts whether a field was changed. For example, `status CHANGED AFTER startOfMonth(-1M)`.See + * [CHANGED](https://confluence.atlassian.com/x/dgiiLQ#Advancedsearching-operatorsreference-CHANGEDCHANGED) for more + * information about the CHANGED operator. + */ +export interface FieldChangedClause { + field: JqlQueryField; + /** The operator applied to the field. */ + operator: 'changed' | string; + /** The list of time predicates. */ + predicates: JqlQueryClauseTimePredicate[]; +} diff --git a/src/version2/models/fieldCreateMetadata.ts b/src/version2/models/fieldCreateMetadata.ts new file mode 100644 index 000000000..462e2c172 --- /dev/null +++ b/src/version2/models/fieldCreateMetadata.ts @@ -0,0 +1,26 @@ +import { JsonType } from './jsonType'; + +/** The metadata describing an issue field for createmeta. */ +export interface FieldCreateMetadata { + /** The list of values allowed in the field. */ + allowedValues?: {}[]; + /** The URL that can be used to automatically complete the field. */ + autoCompleteUrl?: string; + /** The configuration properties. */ + configuration?: {}; + /** The default value of the field. */ + defaultValue?: {}; + /** The field id. */ + fieldId: string; + /** Whether the field has a default value. */ + hasDefaultValue?: boolean; + /** The key of the field. */ + key: string; + /** The name of the field. */ + name: string; + /** The list of operations that can be performed on the field. */ + operations: string[]; + /** Whether the field is required. */ + required: boolean; + schema?: JsonType; +} diff --git a/src/version2/models/fieldUpdateOperation.ts b/src/version2/models/fieldUpdateOperation.ts new file mode 100644 index 000000000..53fccfcb6 --- /dev/null +++ b/src/version2/models/fieldUpdateOperation.ts @@ -0,0 +1,13 @@ +/** Details of an operation to perform on a field. */ +export interface FieldUpdateOperation { + /** The value to add to the field. */ + add?: {}; + /** The field value to copy from another issue. */ + copy?: {}; + /** The value to edit in the field. */ + edit?: {}; + /** The value to removed from the field. */ + remove?: {}; + /** The value to set in the field. */ + set?: {}; +} diff --git a/src/version2/models/fieldValueClause.ts b/src/version2/models/fieldValueClause.ts new file mode 100644 index 000000000..257141b29 --- /dev/null +++ b/src/version2/models/fieldValueClause.ts @@ -0,0 +1,10 @@ +import { JqlQueryField } from './jqlQueryField'; +import { JqlQueryClauseOperand } from './jqlQueryClauseOperand'; + +/** A clause that asserts the current value of a field. For example, `summary ~ test`. */ +export interface FieldValueClause { + field: JqlQueryField; + operand: JqlQueryClauseOperand; + /** The operator between the field and operand. */ + operator: '=' | '!=' | '>' | '<' | '>=' | '<=' | 'in' | 'not in' | '~' | '~=' | 'is' | 'is not' | string; +} diff --git a/src/version2/models/fieldWasClause.ts b/src/version2/models/fieldWasClause.ts new file mode 100644 index 000000000..f58a2e3b9 --- /dev/null +++ b/src/version2/models/fieldWasClause.ts @@ -0,0 +1,17 @@ +import { JqlQueryField } from './jqlQueryField'; +import { JqlQueryClauseOperand } from './jqlQueryClauseOperand'; +import { JqlQueryClauseTimePredicate } from './jqlQueryClauseTimePredicate'; + +/** + * A clause that asserts a previous value of a field. For example, `status WAS "Resolved" BY currentUser() BEFORE + * "2019/02/02"`. See [WAS](https://confluence.atlassian.com/x/dgiiLQ#Advancedsearching-operatorsreference-WASWAS) for + * more information about the WAS operator. + */ +export interface FieldWasClause { + field: JqlQueryField; + operand: JqlQueryClauseOperand; + /** The operator between the field and operand. */ + operator: 'was' | 'was in' | 'was not in' | 'was not' | string; + /** The list of time predicates. */ + predicates: JqlQueryClauseTimePredicate[]; +} diff --git a/src/version2/models/filter.ts b/src/version2/models/filter.ts index ac37b1db2..84c57805b 100644 --- a/src/version2/models/filter.ts +++ b/src/version2/models/filter.ts @@ -5,6 +5,12 @@ import { UserList } from './userList'; /** Details about a filter. */ export interface Filter { + /** + * @experimental [Experimental] Approximate last used time. Returns the date and time when the filter was last used. Returns `null` + * if the filter hasn't been used after tracking was enabled. For performance reasons, timestamps aren't updated in + * real time and therefore may not be exactly accurate. + */ + approximateLastUsed?: string; /** A description of the filter. */ description?: string; /** The groups and projects that can edit the filter. */ diff --git a/src/version2/models/filterDetails.ts b/src/version2/models/filterDetails.ts index d4b8b3d62..a44d9ea59 100644 --- a/src/version2/models/filterDetails.ts +++ b/src/version2/models/filterDetails.ts @@ -4,6 +4,12 @@ import { User } from './user'; /** Details of a filter. */ export interface FilterDetails { + /** + * @experimental [Experimental] Approximate last used time. Returns the date and time when the filter was last used. Returns `null` + * if the filter hasn't been used after tracking was enabled. For performance reasons, timestamps aren't updated in + * real time and therefore may not be exactly accurate. + */ + approximateLastUsed?: string; /** The description of the filter. */ description?: string; /** diff --git a/src/version2/models/functionOperand.ts b/src/version2/models/functionOperand.ts new file mode 100644 index 000000000..9110746b7 --- /dev/null +++ b/src/version2/models/functionOperand.ts @@ -0,0 +1,12 @@ +/** + * An operand that is a function. See [Advanced searching - functions + * reference](https://confluence.atlassian.com/x/dwiiLQ) for more information about JQL functions. + */ +export interface FunctionOperand { + /** The list of function arguments. */ + arguments: string[]; + /** Encoded operand, which can be used directly in a JQL query. */ + encodedOperand?: string; + /** The name of the function. */ + function: string; +} diff --git a/src/version2/models/getAtlassianTeamResponse.ts b/src/version2/models/getAtlassianTeamResponse.ts new file mode 100644 index 000000000..ad60480d5 --- /dev/null +++ b/src/version2/models/getAtlassianTeamResponse.ts @@ -0,0 +1,12 @@ +export interface GetAtlassianTeamResponse { + /** The capacity for the Atlassian team. */ + capacity?: number; + /** The Atlassian team ID. */ + id: string; + /** The ID of the issue source for the Atlassian team. */ + issueSourceId?: number; + /** The planning style for the Atlassian team. This is "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the Atlassian team. */ + sprintLength?: number; +} diff --git a/src/version2/models/getCrossProjectReleaseResponse.ts b/src/version2/models/getCrossProjectReleaseResponse.ts new file mode 100644 index 000000000..4e41368cc --- /dev/null +++ b/src/version2/models/getCrossProjectReleaseResponse.ts @@ -0,0 +1,6 @@ +export interface GetCrossProjectReleaseResponse { + /** The cross-project release name. */ + name?: string; + /** The IDs of the releases included in the cross-project release. */ + releaseIds?: number[]; +} diff --git a/src/version2/models/getCustomFieldResponse.ts b/src/version2/models/getCustomFieldResponse.ts new file mode 100644 index 000000000..8ac304ff9 --- /dev/null +++ b/src/version2/models/getCustomFieldResponse.ts @@ -0,0 +1,6 @@ +export interface GetCustomFieldResponse { + /** The custom field ID. */ + customFieldId: number; + /** Allows filtering issues based on their values for the custom field. */ + filter?: boolean; +} diff --git a/src/version2/models/getDateFieldResponse.ts b/src/version2/models/getDateFieldResponse.ts new file mode 100644 index 000000000..d2293240a --- /dev/null +++ b/src/version2/models/getDateFieldResponse.ts @@ -0,0 +1,6 @@ +export interface GetDateFieldResponse { + /** A date custom field ID. This is returned if the type is "DateCustomField". */ + dateCustomFieldId?: number; + /** The date field type. This is "DueDate", "TargetStartDate", "TargetEndDate" or "DateCustomField". */ + type: 'DueDate' | 'TargetStartDate' | 'TargetEndDate' | 'DateCustomField' | string; +} diff --git a/src/version2/models/getExclusionRulesResponse.ts b/src/version2/models/getExclusionRulesResponse.ts new file mode 100644 index 000000000..c2852ef73 --- /dev/null +++ b/src/version2/models/getExclusionRulesResponse.ts @@ -0,0 +1,14 @@ +export interface GetExclusionRulesResponse { + /** The IDs of the issues excluded from the plan. */ + issueIds?: number[]; + /** The IDs of the issue types excluded from the plan. */ + issueTypeIds?: number[]; + /** Issues completed this number of days ago are excluded from the plan. */ + numberOfDaysToShowCompletedIssues: number; + /** The IDs of the releases excluded from the plan. */ + releaseIds?: number[]; + /** The IDs of the work status categories excluded from the plan. */ + workStatusCategoryIds?: number[]; + /** The IDs of the work statuses excluded from the plan. */ + workStatusIds?: number[]; +} diff --git a/src/version2/models/getIssueSourceResponse.ts b/src/version2/models/getIssueSourceResponse.ts new file mode 100644 index 000000000..fd864bf6a --- /dev/null +++ b/src/version2/models/getIssueSourceResponse.ts @@ -0,0 +1,9 @@ +export interface GetIssueSourceResponse { + /** The issue source type. This is "Board", "Project" or "Filter". */ + type: 'Board' | 'Project' | 'Filter' | 'Custom' | string; + /** + * The issue source value. This is a board ID if the type is "Board", a project ID if the type is "Project" or a + * filter ID if the type is "Filter". + */ + value: number; +} diff --git a/src/version2/models/getPermissionHolderResponse.ts b/src/version2/models/getPermissionHolderResponse.ts new file mode 100644 index 000000000..4d44c9cb8 --- /dev/null +++ b/src/version2/models/getPermissionHolderResponse.ts @@ -0,0 +1,9 @@ +export interface GetPermissionHolderResponse { + /** The permission holder type. This is "Group" or "AccountId". */ + type: 'Group' | 'AccountId' | string; + /** + * The permission holder value. This is a group name if the type is "Group" or an account ID if the type is + * "AccountId". + */ + value: string; +} diff --git a/src/version2/models/getPermissionResponse.ts b/src/version2/models/getPermissionResponse.ts new file mode 100644 index 000000000..c778b582b --- /dev/null +++ b/src/version2/models/getPermissionResponse.ts @@ -0,0 +1,7 @@ +import { GetPermissionHolderResponse } from './getPermissionHolderResponse'; + +export interface GetPermissionResponse { + holder?: GetPermissionHolderResponse; + /** The permission type. This is "View" or "Edit". */ + type: 'View' | 'Edit' | string; +} diff --git a/src/version2/models/getPlanOnlyTeamResponse.ts b/src/version2/models/getPlanOnlyTeamResponse.ts new file mode 100644 index 000000000..5dd4cf00e --- /dev/null +++ b/src/version2/models/getPlanOnlyTeamResponse.ts @@ -0,0 +1,16 @@ +export interface GetPlanOnlyTeamResponse { + /** The capacity for the plan-only team. */ + capacity?: number; + /** The plan-only team ID. */ + id: number; + /** The ID of the issue source for the plan-only team. */ + issueSourceId?: number; + /** The account IDs of the plan-only team members. */ + memberAccountIds?: string[]; + /** The plan-only team name. */ + name: string; + /** The planning style for the plan-only team. This is "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the plan-only team. */ + sprintLength?: number; +} diff --git a/src/version2/models/getPlanResponseForPage.ts b/src/version2/models/getPlanResponseForPage.ts new file mode 100644 index 000000000..63a774a14 --- /dev/null +++ b/src/version2/models/getPlanResponseForPage.ts @@ -0,0 +1,12 @@ +import { GetIssueSourceResponse } from './getIssueSourceResponse'; + +export interface GetPlanResponseForPage { + /** The plan ID. */ + id: string; + /** The issue sources included in the plan. */ + issueSources?: GetIssueSourceResponse[]; + /** The plan name. */ + name: string; + /** The plan status. This is "Active", "Trashed" or "Archived". */ + status: 'Active' | 'Trashed' | 'Archived' | string; +} diff --git a/src/version2/models/getSchedulingResponse.ts b/src/version2/models/getSchedulingResponse.ts new file mode 100644 index 000000000..8a284167f --- /dev/null +++ b/src/version2/models/getSchedulingResponse.ts @@ -0,0 +1,12 @@ +import { GetDateFieldResponse } from './getDateFieldResponse'; + +export interface GetSchedulingResponse { + /** The dependencies for the plan. This is "Sequential" or "Concurrent". */ + dependencies: 'Sequential' | 'Concurrent' | string; + endDate?: GetDateFieldResponse; + /** The estimation unit for the plan. This is "StoryPoints", "Days" or "Hours". */ + estimation: 'StoryPoints' | 'Days' | 'Hours' | string; + /** The inferred dates for the plan. This is "None", "SprintDates" or "ReleaseDates". */ + inferredDates: 'None' | 'SprintDates' | 'ReleaseDates' | string; + startDate?: GetDateFieldResponse; +} diff --git a/src/version2/models/getTeamResponseForPage.ts b/src/version2/models/getTeamResponseForPage.ts new file mode 100644 index 000000000..6d49ebff0 --- /dev/null +++ b/src/version2/models/getTeamResponseForPage.ts @@ -0,0 +1,8 @@ +export interface GetTeamResponseForPage { + /** The team ID. */ + id: string; + /** The team name. This is returned if the type is "PlanOnly". */ + name?: string; + /** The team type. This is "PlanOnly" or "Atlassian". */ + type: 'PlanOnly' | 'Atlassian' | string; +} diff --git a/src/version2/models/healthCheckResult.ts b/src/version2/models/healthCheckResult.ts new file mode 100644 index 000000000..2e0eaecec --- /dev/null +++ b/src/version2/models/healthCheckResult.ts @@ -0,0 +1,9 @@ +/** Jira instance health check results. Deprecated and no longer returned. */ +export interface HealthCheckResult { + /** The description of the Jira health check item. */ + description?: string; + /** The name of the Jira health check item. */ + name?: string; + /** Whether the Jira health check item passed or failed. */ + passed?: boolean; +} diff --git a/src/version2/models/iconBean.ts b/src/version2/models/iconBean.ts new file mode 100644 index 000000000..9d78ec9db --- /dev/null +++ b/src/version2/models/iconBean.ts @@ -0,0 +1,9 @@ +/** An icon. */ +export interface IconBean { + /** The URL of the tooltip, used only for a status icon. */ + link?: string; + /** The title of the icon, for use as a tooltip on the icon. */ + title?: string; + /** The URL of a 16x16 pixel icon. */ + url16x16?: string; +} diff --git a/src/version2/models/idSearchRequest.ts b/src/version2/models/idSearchRequest.ts new file mode 100644 index 000000000..4f15da014 --- /dev/null +++ b/src/version2/models/idSearchRequest.ts @@ -0,0 +1,8 @@ +export interface IdSearchRequest { + /** A [JQL](https://confluence.atlassian.com/x/egORLQ) expression. Order by clauses are not allowed. */ + jql?: string; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The continuation token to fetch the next page. This token is provided by the response of this endpoint. */ + nextPageToken?: string; +} diff --git a/src/version2/models/idSearchResults.ts b/src/version2/models/idSearchResults.ts new file mode 100644 index 000000000..596045fb5 --- /dev/null +++ b/src/version2/models/idSearchResults.ts @@ -0,0 +1,10 @@ +/** Result of your JQL search. Returns a list of issue IDs and a token to fetch the next page if one exists. */ +export interface IdSearchResults { + /** The list of issue IDs found by the search. */ + issueIds?: number[]; + /** + * Continuation token to fetch the next page. If this result represents the last or the only page this token will be + * null. + */ + nextPageToken?: string; +} diff --git a/src/version2/models/index.ts b/src/version2/models/index.ts index e4f98681c..6d7271645 100644 --- a/src/version2/models/index.ts +++ b/src/version2/models/index.ts @@ -1,13 +1,16 @@ export * from './actorInput'; export * from './actorsMap'; +export * from './addAtlassianTeamRequest'; export * from './addField'; export * from './addGroup'; +export * from './addNotificationsDetails'; export * from './addSecuritySchemeLevelsRequest'; export * from './announcementBannerConfiguration'; export * from './announcementBannerConfigurationUpdate'; export * from './application'; export * from './applicationProperty'; export * from './applicationRole'; +export * from './archiveIssueAsyncRequest'; export * from './associatedItem'; export * from './associateFieldConfigurationsWithIssueTypesRequest'; export * from './attachment'; @@ -32,10 +35,13 @@ export * from './avatar'; export * from './avatars'; export * from './avatarUrls'; export * from './avatarWithDetails'; +export * from './bulkChangelog'; +export * from './bulkChangelogRequest'; export * from './bulkChangeOwnerDetails'; export * from './bulkCustomFieldOptionCreateRequest'; export * from './bulkCustomFieldOptionUpdateRequest'; export * from './bulkEditShareableEntity'; +export * from './bulkIssue'; export * from './bulkIssueIsWatching'; export * from './bulkIssuePropertyUpdateRequest'; export * from './bulkOperationErrorResult'; @@ -50,11 +56,13 @@ export * from './changedWorklogs'; export * from './changelog'; export * from './columnItem'; export * from './comment'; +export * from './component'; export * from './componentIssuesCount'; export * from './componentWithIssueCount'; export * from './conditionGroupConfiguration'; export * from './conditionGroupUpdate'; export * from './configuration'; +export * from './configurationsListParameters'; export * from './connectCustomFieldValue'; export * from './connectCustomFieldValues'; export * from './connectModule'; @@ -67,14 +75,23 @@ export * from './containerOfWorkflowSchemeAssociations'; export * from './contextForProjectAndIssueType'; export * from './contextualConfiguration'; export * from './convertedJQLQueries'; +export * from './createCrossProjectReleaseRequest'; export * from './createCustomFieldContext'; +export * from './createCustomFieldRequest'; export * from './createdIssue'; export * from './createdIssues'; +export * from './createExclusionRulesRequest'; export * from './createIssueSecuritySchemeDetails'; +export * from './createIssueSourceRequest'; export * from './createNotificationSchemeDetails'; +export * from './createPermissionRequest'; +export * from './createPlanOnlyTeamRequest'; +export * from './createPlanRequest'; export * from './createPriorityDetails'; +export * from './createPrioritySchemeDetails'; export * from './createProjectDetails'; export * from './createResolutionDetails'; +export * from './createSchedulingRequest'; export * from './createUiModificationDetails'; export * from './createUpdateRoleRequest'; export * from './createWorkflowCondition'; @@ -109,19 +126,24 @@ export * from './dashboardGadgetResponse'; export * from './dashboardGadgetSettings'; export * from './dashboardGadgetUpdateRequest'; export * from './dashboardUser'; +export * from './dataClassificationLevels'; export * from './dateRangeFilter'; export * from './defaultLevelValue'; export * from './defaultShareScope'; export * from './defaultWorkflow'; +export * from './deleteAndReplaceVersion'; export * from './documentVersion'; +export * from './duplicatePlanRequest'; export * from './enhancedSearchRequest'; export * from './entityProperty'; export * from './entityPropertyDetails'; export * from './error'; export * from './errorCollection'; export * from './errors'; +export * from './evaluatedJiraExpression'; export * from './eventNotification'; export * from './exportArchivedIssuesTaskProgress'; +export * from './exportArchivedIssuesTaskProgress'; export * from './failedWebhook'; export * from './failedWebhooks'; export * from './field'; @@ -149,6 +171,8 @@ export * from './foundGroups'; export * from './foundUsers'; export * from './foundUsersAndGroups'; export * from './functionReferenceData'; +export * from './getAtlassianTeamResponse'; +export * from './getPlanOnlyTeamResponse'; export * from './globalScope'; export * from './group'; export * from './groupDetails'; @@ -161,9 +185,12 @@ export * from './historyMetadataParticipant'; export * from './icon'; export * from './id'; export * from './idOrKey'; +export * from './idSearchRequest'; +export * from './idSearchResults'; export * from './includedFields'; export * from './issue'; export * from './issueArchivalSync'; +export * from './issueArchivalSyncRequest'; export * from './issueChangelogIds'; export * from './issueCommentListRequest'; export * from './issueContextVariable'; @@ -177,6 +204,8 @@ export * from './issueFieldOptionCreate'; export * from './issueFieldOptionScope'; export * from './issueFilterForBulkPropertyDelete'; export * from './issueFilterForBulkPropertySet'; +export * from './issueLimitReport'; +export * from './issueLimitReportRequest'; export * from './issueLink'; export * from './issueLinkType'; export * from './issueLinkTypes'; @@ -227,13 +256,14 @@ export * from './jExpEvaluateIssuesJqlMetaData'; export * from './jExpEvaluateIssuesMeta'; export * from './jExpEvaluateJiraExpressionResult'; export * from './jExpEvaluateMetaData'; -export * from './jiraExpressionEvaluateContext'; export * from './jexpIssues'; export * from './jexpJqlIssues'; export * from './jiraExpressionAnalysis'; export * from './jiraExpressionComplexity'; export * from './jiraExpressionEvalContext'; export * from './jiraExpressionEvalRequest'; +export * from './jiraExpressionEvaluateContext'; +export * from './jiraExpressionEvaluateRequest'; export * from './jiraExpressionEvaluationMetaData'; export * from './jiraExpressionEvalUsingEnhancedSearchRequest'; export * from './jiraExpressionForAnalysis'; @@ -243,9 +273,11 @@ export * from './jiraExpressionsComplexity'; export * from './jiraExpressionsComplexityValue'; export * from './jiraExpressionValidationError'; export * from './jiraStatus'; -export * from './jiraWorkflow'; -export * from './jiraWorkflowStatus'; +export * from './jQLCount'; +export * from './jQLCountRequest'; export * from './jqlFunctionPrecomputation'; +export * from './jqlFunctionPrecomputationGetByIdRequest'; +export * from './jqlFunctionPrecomputationGetByIdResponse'; export * from './jqlFunctionPrecomputationUpdate'; export * from './jqlFunctionPrecomputationUpdateRequest'; export * from './jQLPersonalDataMigrationRequest'; @@ -271,6 +303,8 @@ export * from './linkIssueRequestJson'; export * from './listWrapperCallbackApplicationRole'; export * from './listWrapperCallbackGroupName'; export * from './locale'; +export * from './mappingsByIssueTypeOverride'; +export * from './mappingsByWorkflow'; export * from './moveField'; export * from './multiIssueEntityProperties'; export * from './multipleCustomFieldValuesUpdate'; @@ -294,9 +328,14 @@ export * from './operationMessage'; export * from './operations'; export * from './orderOfCustomFieldOptions'; export * from './orderOfIssueTypes'; +export * from './pageBeanFieldConfigurationDetails'; +export * from './pageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects'; +export * from './pageBeanPriorityWithSequence'; +export * from './pageBulkContextualConfiguration'; export * from './pageChangelog'; export * from './pageComment'; export * from './pageComponentWithIssueCount'; +export * from './pageContext'; export * from './pageContextForProjectAndIssueType'; export * from './pageContextualConfiguration'; export * from './pageCustomFieldContext'; @@ -327,6 +366,8 @@ export * from './pageJqlFunctionPrecomputation'; export * from './pageNotificationScheme'; export * from './pageOfChangelogs'; export * from './pageOfComments'; +export * from './pageOfCreateMetaIssueTypes'; +export * from './pageOfCreateMetaIssueTypeWithField'; export * from './pageOfDashboards'; export * from './pageOfStatuses'; export * from './pageOfWorklogs'; @@ -347,6 +388,8 @@ export * from './pageUserDetails'; export * from './pageUserKey'; export * from './pageVersion'; export * from './pageWebhook'; +export * from './pageWithCursorGetPlanResponseForPage'; +export * from './pageWithCursorGetTeamResponseForPage'; export * from './pageWorkflow'; export * from './pageWorkflowScheme'; export * from './pageWorkflowTransitionRules'; @@ -361,13 +404,19 @@ export * from './permissionScheme'; export * from './permissionSchemes'; export * from './permissionsKeys'; export * from './permittedProjects'; +export * from './plan'; export * from './priority'; export * from './priorityId'; +export * from './priorityMapping'; +export * from './prioritySchemeId'; +export * from './prioritySchemeWithPaginatedPrioritiesAndProjects'; +export * from './priorityWithSequence'; export * from './project'; export * from './projectAndIssueTypePair'; export * from './projectAvatars'; export * from './projectCategory'; export * from './projectComponent'; +export * from './projectDataPolicies'; export * from './projectDetails'; export * from './projectEmailAddress'; export * from './projectFeature'; @@ -401,6 +450,7 @@ export * from './remoteIssueLink'; export * from './remoteIssueLinkIdentifies'; export * from './remoteIssueLinkRequest'; export * from './remoteObject'; +export * from './removeOptionFromIssuesResult'; export * from './reorderIssuePriorities'; export * from './reorderIssueResolutionsRequest'; export * from './resolution'; @@ -421,8 +471,10 @@ export * from './screenSchemeDetails'; export * from './screenSchemeId'; export * from './screenTypes'; export * from './screenWithTab'; +export * from './searchAndReconcileRequest'; export * from './searchAndReconcileResults'; export * from './searchAutoComplete'; +export * from './searchAutoCompleteFilter'; export * from './searchRequest'; export * from './searchResults'; export * from './securityLevel'; @@ -435,12 +487,14 @@ export * from './securitySchemeMembersRequest'; export * from './securitySchemes'; export * from './securitySchemeWithProjects'; export * from './serverInformation'; +export * from './serviceRegistry'; export * from './setDefaultLevelsRequest'; export * from './setDefaultPriorityRequest'; export * from './setDefaultResolutionRequest'; export * from './sharePermission'; export * from './sharePermissionInput'; export * from './simpleApplicationProperty'; +export * from './simpleErrorCollection'; export * from './simpleLink'; export * from './simpleListWrapperApplicationRole'; export * from './simpleListWrapperGroupName'; @@ -453,14 +507,20 @@ export * from './statusLayoutUpdate'; export * from './statusMapping'; export * from './statusMappingDTO'; export * from './statusMigration'; +export * from './statusProjectIssueTypeUsageDTO'; +export * from './statusProjectUsageDTO'; export * from './statusReferenceAndPort'; export * from './statusScope'; export * from './statusUpdate'; export * from './statusUpdateRequest'; +export * from './statusWorkflowUsageDTO'; +export * from './streamingResponseBody'; export * from './suggestedIssue'; +export * from './suggestedMappingsRequest'; export * from './systemAvatars'; export * from './tabMetadata'; export * from './taskProgressObject'; +export * from './taskProgressRemoveOptionFromIssuesResult'; export * from './timeTrackingConfiguration'; export * from './timeTrackingDetails'; export * from './timeTrackingProvider'; @@ -473,12 +533,15 @@ export * from './uiModificationDetails'; export * from './uiModificationIdentifiers'; export * from './unrestrictedUserEmail'; export * from './updateCustomFieldDetails'; +export * from './updateDefaultProjectClassification'; export * from './updatedProjectCategory'; export * from './updateFieldConfigurationSchemeDetails'; export * from './updateIssueSecurityLevelDetails'; export * from './updateIssueSecuritySchemeRequest'; export * from './updateNotificationSchemeDetails'; export * from './updatePriorityDetails'; +export * from './updatePrioritySchemeRequest'; +export * from './updatePrioritySchemeResponse'; export * from './updateProjectDetails'; export * from './updateResolutionDetails'; export * from './updateScreenDetails'; @@ -500,6 +563,7 @@ export * from './version'; export * from './versionIssueCounts'; export * from './versionIssuesStatus'; export * from './versionMove'; +export * from './versionRelatedWork'; export * from './versionUnresolvedIssuesCount'; export * from './versionUsageInCustomField'; export * from './visibility'; @@ -520,6 +584,8 @@ export * from './workflowElementReference'; export * from './workflowId'; export * from './workflowLayout'; export * from './workflowOperations'; +export * from './workflowProjectIssueTypeUsageDTO'; +export * from './workflowProjectUsageDTO'; export * from './workflowRead'; export * from './workflowReferenceStatus'; export * from './workflowRuleConfiguration'; @@ -527,10 +593,19 @@ export * from './workflowRules'; export * from './workflowRulesSearch'; export * from './workflowRulesSearchDetails'; export * from './workflowScheme'; +export * from './workflowSchemeAssociation'; export * from './workflowSchemeAssociations'; export * from './workflowSchemeIdName'; export * from './workflowSchemeProjectAssociation'; +export * from './workflowSchemeProjectUsage'; +export * from './workflowSchemeReadRequest'; +export * from './workflowSchemeReadResponse'; +export * from './workflowSchemeUpdateRequest'; +export * from './workflowSchemeUpdateRequiredMappingsRequest'; +export * from './workflowSchemeUpdateRequiredMappingsResponse'; +export * from './workflowSchemeUsageDTO'; export * from './workflowScope'; +export * from './workflowSearchResponse'; export * from './workflowStatus'; export * from './workflowStatusAndPort'; export * from './workflowStatusLayout'; @@ -550,7 +625,10 @@ export * from './workflowTrigger'; export * from './workflowUpdate'; export * from './workflowUpdateRequest'; export * from './workflowUpdateResponse'; +export * from './workflowUpdateValidateRequest'; export * from './workflowValidationError'; export * from './workflowValidationErrorList'; export * from './worklog'; export * from './worklogIdsRequest'; +export * from './worklogsMoveRequest'; +export * from './workspaceDataPolicy'; diff --git a/src/version2/models/inputStreamSource.ts b/src/version2/models/inputStreamSource.ts new file mode 100644 index 000000000..544620ac1 --- /dev/null +++ b/src/version2/models/inputStreamSource.ts @@ -0,0 +1,3 @@ +export interface InputStreamSource { + inputStream?: {}; +} diff --git a/src/version2/models/issueArchivalSyncRequest.ts b/src/version2/models/issueArchivalSyncRequest.ts new file mode 100644 index 000000000..937b58710 --- /dev/null +++ b/src/version2/models/issueArchivalSyncRequest.ts @@ -0,0 +1,4 @@ +/** List of Issue Ids Or Keys that are to be archived or unarchived */ +export interface IssueArchivalSyncRequest { + issueIdsOrKeys?: string[]; +} diff --git a/src/version2/models/issueChangeLog.ts b/src/version2/models/issueChangeLog.ts new file mode 100644 index 000000000..cab78f577 --- /dev/null +++ b/src/version2/models/issueChangeLog.ts @@ -0,0 +1,9 @@ +import { Changelog } from './changelog'; + +/** List of changelogs that belong to single issue */ +export interface IssueChangeLog { + /** List of changelogs that belongs to given issueId. */ + changeHistories?: Changelog[]; + /** The ID of the issue. */ + issueId?: string; +} diff --git a/src/version2/models/issueError.ts b/src/version2/models/issueError.ts new file mode 100644 index 000000000..e48a85799 --- /dev/null +++ b/src/version2/models/issueError.ts @@ -0,0 +1,7 @@ +/** Describes the error that occurred when retrieving data for a particular issue. */ +export interface IssueError { + /** The error that occurred when fetching this issue. */ + errorMessage?: string; + /** The ID of the issue. */ + id?: string; +} diff --git a/src/version2/models/issueLimitReport.ts b/src/version2/models/issueLimitReport.ts new file mode 100644 index 000000000..df5798701 --- /dev/null +++ b/src/version2/models/issueLimitReport.ts @@ -0,0 +1,8 @@ +export interface IssueLimitReport { + /** A list of ids of issues approaching the limit and their field count */ + issuesApproachingLimit?: {}; + /** A list of ids of issues breaching the limit and their field count */ + issuesBreachingLimit?: {}; + /** The fields and their defined limits */ + limits?: {}; +} diff --git a/src/version2/models/issueLimitReportRequest.ts b/src/version2/models/issueLimitReportRequest.ts new file mode 100644 index 000000000..c99f57bc0 --- /dev/null +++ b/src/version2/models/issueLimitReportRequest.ts @@ -0,0 +1,9 @@ +export interface IssueLimitReportRequest { + /** + * A list of fields and their respective approaching limit threshold. Required for querying issues approaching limits. + * Optional for querying issues breaching limits. Accepted fields are: `comment`, `worklog`, `attachment`, + * `remoteIssueLinks`, and `issuelinks`. Example: `{"issuesApproachingLimitParams": {"comment": 4500, "attachment": + * 1800}}` + */ + issuesApproachingLimitParams?: {}; +} diff --git a/src/version2/models/jQLCount.ts b/src/version2/models/jQLCount.ts new file mode 100644 index 000000000..a3270ef92 --- /dev/null +++ b/src/version2/models/jQLCount.ts @@ -0,0 +1,4 @@ +export interface JQLCount { + /** Number of issues matching JQL query. */ + count?: number; +} diff --git a/src/version2/models/jQLCountRequest.ts b/src/version2/models/jQLCountRequest.ts new file mode 100644 index 000000000..3eb6cce3b --- /dev/null +++ b/src/version2/models/jQLCountRequest.ts @@ -0,0 +1,7 @@ +export interface JQLCountRequest { + /** + * A [JQL](https://confluence.atlassian.com/x/egORLQ) expression. For performance reasons, this parameter requires a + * bounded query. A bounded query is a query with a search restriction. + */ + jql?: string; +} diff --git a/src/version2/models/jiraExpressionEvaluateRequest.ts b/src/version2/models/jiraExpressionEvaluateRequest.ts new file mode 100644 index 000000000..d4a546566 --- /dev/null +++ b/src/version2/models/jiraExpressionEvaluateRequest.ts @@ -0,0 +1,11 @@ +import { JiraExpressionEvaluateContext } from './jiraExpressionEvaluateContext'; + +/** + * The request to evaluate a Jira expression. This bean will be replacing `JiraExpressionEvaluateRequest` as part of new + * `evaluate` endpoint + */ +export interface JiraExpressionEvaluateRequest { + context?: JiraExpressionEvaluateContext; + /** The Jira expression to evaluate. */ + expression: string; +} diff --git a/src/version2/models/jiraTimeTrackingField.ts b/src/version2/models/jiraTimeTrackingField.ts new file mode 100644 index 000000000..1f4a46620 --- /dev/null +++ b/src/version2/models/jiraTimeTrackingField.ts @@ -0,0 +1,3 @@ +export interface JiraTimeTrackingField { + timeRemaining: string; +} diff --git a/src/version2/models/jqlFunctionPrecomputationGetByIdRequest.ts b/src/version2/models/jqlFunctionPrecomputationGetByIdRequest.ts new file mode 100644 index 000000000..f9afb489d --- /dev/null +++ b/src/version2/models/jqlFunctionPrecomputationGetByIdRequest.ts @@ -0,0 +1,4 @@ +/** Request to fetch precomputations by ID. */ +export interface JqlFunctionPrecomputationGetByIdRequest { + precomputationIDs?: string[]; +} diff --git a/src/version2/models/jqlFunctionPrecomputationGetByIdResponse.ts b/src/version2/models/jqlFunctionPrecomputationGetByIdResponse.ts new file mode 100644 index 000000000..391c1f866 --- /dev/null +++ b/src/version2/models/jqlFunctionPrecomputationGetByIdResponse.ts @@ -0,0 +1,9 @@ +import { JqlFunctionPrecomputation } from './jqlFunctionPrecomputation'; + +/** Get precomputations by ID response. */ +export interface JqlFunctionPrecomputationGetByIdResponse { + /** List of precomputations that were not found. */ + notFoundPrecomputationIDs?: string[]; + /** The list of precomputations. */ + precomputations?: JqlFunctionPrecomputation[]; +} diff --git a/src/version2/models/jqlFunctionPrecomputationUpdateBean.ts b/src/version2/models/jqlFunctionPrecomputationUpdateBean.ts new file mode 100644 index 000000000..85abbb752 --- /dev/null +++ b/src/version2/models/jqlFunctionPrecomputationUpdateBean.ts @@ -0,0 +1,12 @@ +/** Precomputation id and its new value. */ +export interface JqlFunctionPrecomputationUpdateBean { + /** + * The error message to be displayed to the user if the given function clause is no longer valid during recalculation + * of the precomputation. + */ + error?: string; + /** The id of the precomputation to update. */ + id: string; + /** The new value of the precomputation. */ + value?: string; +} diff --git a/src/version2/models/jqlFunctionPrecomputationUpdateErrorResponse.ts b/src/version2/models/jqlFunctionPrecomputationUpdateErrorResponse.ts new file mode 100644 index 000000000..2a01b7fae --- /dev/null +++ b/src/version2/models/jqlFunctionPrecomputationUpdateErrorResponse.ts @@ -0,0 +1,7 @@ +/** Error response returned updating JQL Function precomputations fails. */ +export interface JqlFunctionPrecomputationUpdateErrorResponse { + /** The list of error messages produced by this operation. */ + errorMessages?: string[]; + /** List of precomputations that were not found. */ + notFoundPrecomputationIDs?: string[]; +} diff --git a/src/version2/models/jqlFunctionPrecomputationUpdateResponse.ts b/src/version2/models/jqlFunctionPrecomputationUpdateResponse.ts new file mode 100644 index 000000000..8e1167ec5 --- /dev/null +++ b/src/version2/models/jqlFunctionPrecomputationUpdateResponse.ts @@ -0,0 +1,8 @@ +/** Result of updating JQL Function precomputations. */ +export interface JqlFunctionPrecomputationUpdateResponse { + /** + * List of precomputations that were not found and skipped. Only returned if the request passed + * skipNotFoundPrecomputations=true. + */ + notFoundPrecomputationIDs?: string[]; +} diff --git a/src/version2/models/jqlQueryClauseOperand.ts b/src/version2/models/jqlQueryClauseOperand.ts new file mode 100644 index 000000000..a36b3d371 --- /dev/null +++ b/src/version2/models/jqlQueryClauseOperand.ts @@ -0,0 +1,2 @@ +/** Details of an operand in a JQL clause. */ +export interface JqlQueryClauseOperand {} diff --git a/src/version2/models/jqlQueryClauseTimePredicate.ts b/src/version2/models/jqlQueryClauseTimePredicate.ts new file mode 100644 index 000000000..8c96a238c --- /dev/null +++ b/src/version2/models/jqlQueryClauseTimePredicate.ts @@ -0,0 +1,8 @@ +import { JqlQueryClauseOperand } from './jqlQueryClauseOperand'; + +/** A time predicate for a temporal JQL clause. */ +export interface JqlQueryClauseTimePredicate { + operand: JqlQueryClauseOperand; + /** The operator between the field and the operand. */ + operator: 'before' | 'after' | 'from' | 'to' | 'on' | 'during' | 'by' | string; +} diff --git a/src/version2/models/jqlQueryUnitaryOperand.ts b/src/version2/models/jqlQueryUnitaryOperand.ts new file mode 100644 index 000000000..181269377 --- /dev/null +++ b/src/version2/models/jqlQueryUnitaryOperand.ts @@ -0,0 +1,2 @@ +/** An operand that can be part of a list operand. */ +export interface JqlQueryUnitaryOperand {} diff --git a/src/version2/models/jsonNode.ts b/src/version2/models/jsonNode.ts new file mode 100644 index 000000000..402169b82 --- /dev/null +++ b/src/version2/models/jsonNode.ts @@ -0,0 +1,38 @@ +export interface JsonNode { + array?: boolean; + bigDecimal?: boolean; + bigInteger?: boolean; + bigIntegerValue?: number; + binary?: boolean; + binaryValue?: string[]; + boolean?: boolean; + booleanValue?: boolean; + containerNode?: boolean; + decimalValue?: number; + double?: boolean; + doubleValue?: number; + elements?: {}; + fieldNames?: {}; + fields?: {}; + floatingPointNumber?: boolean; + int?: boolean; + intValue?: number; + integralNumber?: boolean; + long?: boolean; + longValue?: number; + missingNode?: boolean; + null?: boolean; + number?: boolean; + numberType?: 'INT' | 'LONG' | 'BIG_INTEGER' | 'FLOAT' | 'DOUBLE' | 'BIG_DECIMAL' | string; + numberValue?: number; + object?: boolean; + pojo?: boolean; + textValue?: string; + textual?: boolean; + valueAsBoolean?: boolean; + valueAsDouble?: number; + valueAsInt?: number; + valueAsLong?: number; + valueAsText?: string; + valueNode?: boolean; +} diff --git a/src/version2/models/keywordOperand.ts b/src/version2/models/keywordOperand.ts new file mode 100644 index 000000000..f844cf12d --- /dev/null +++ b/src/version2/models/keywordOperand.ts @@ -0,0 +1,9 @@ +/** + * An operand that is a JQL keyword. See [Advanced searching - keywords + * reference](https://confluence.atlassian.com/jiracorecloud/advanced-searching-keywords-reference-765593717.html#Advancedsearching-keywordsreference-EMPTYEMPTY) + * for more information about operand keywords. + */ +export interface KeywordOperand { + /** The keyword that is the operand value. */ + keyword: 'empty' | string; +} diff --git a/src/version2/models/legacyJackson1ListAttachment.ts b/src/version2/models/legacyJackson1ListAttachment.ts new file mode 100644 index 000000000..aef6d4e25 --- /dev/null +++ b/src/version2/models/legacyJackson1ListAttachment.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListAttachment {} diff --git a/src/version2/models/legacyJackson1ListColumnItem.ts b/src/version2/models/legacyJackson1ListColumnItem.ts new file mode 100644 index 000000000..4489873dc --- /dev/null +++ b/src/version2/models/legacyJackson1ListColumnItem.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListColumnItem {} diff --git a/src/version2/models/legacyJackson1ListIssueEvent.ts b/src/version2/models/legacyJackson1ListIssueEvent.ts new file mode 100644 index 000000000..239cd18c9 --- /dev/null +++ b/src/version2/models/legacyJackson1ListIssueEvent.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListIssueEvent {} diff --git a/src/version2/models/legacyJackson1ListIssueTypeWithStatus.ts b/src/version2/models/legacyJackson1ListIssueTypeWithStatus.ts new file mode 100644 index 000000000..5129b62c6 --- /dev/null +++ b/src/version2/models/legacyJackson1ListIssueTypeWithStatus.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListIssueTypeWithStatus {} diff --git a/src/version2/models/legacyJackson1ListProject.ts b/src/version2/models/legacyJackson1ListProject.ts new file mode 100644 index 000000000..273240c3b --- /dev/null +++ b/src/version2/models/legacyJackson1ListProject.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListProject {} diff --git a/src/version2/models/legacyJackson1ListProjectComponent.ts b/src/version2/models/legacyJackson1ListProjectComponent.ts new file mode 100644 index 000000000..2cf6f56ab --- /dev/null +++ b/src/version2/models/legacyJackson1ListProjectComponent.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListProjectComponent {} diff --git a/src/version2/models/legacyJackson1ListProjectRoleDetails.ts b/src/version2/models/legacyJackson1ListProjectRoleDetails.ts new file mode 100644 index 000000000..de21f62f6 --- /dev/null +++ b/src/version2/models/legacyJackson1ListProjectRoleDetails.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListProjectRoleDetails {} diff --git a/src/version2/models/legacyJackson1ListProjectType.ts b/src/version2/models/legacyJackson1ListProjectType.ts new file mode 100644 index 000000000..b5bb55c23 --- /dev/null +++ b/src/version2/models/legacyJackson1ListProjectType.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListProjectType {} diff --git a/src/version2/models/legacyJackson1ListUserMigrationBean.ts b/src/version2/models/legacyJackson1ListUserMigrationBean.ts new file mode 100644 index 000000000..2af6f3894 --- /dev/null +++ b/src/version2/models/legacyJackson1ListUserMigrationBean.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListUserMigrationBean {} diff --git a/src/version2/models/legacyJackson1ListVersion.ts b/src/version2/models/legacyJackson1ListVersion.ts new file mode 100644 index 000000000..6c157ff0a --- /dev/null +++ b/src/version2/models/legacyJackson1ListVersion.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListVersion {} diff --git a/src/version2/models/legacyJackson1ListWorklog.ts b/src/version2/models/legacyJackson1ListWorklog.ts new file mode 100644 index 000000000..8adb45b1f --- /dev/null +++ b/src/version2/models/legacyJackson1ListWorklog.ts @@ -0,0 +1 @@ +export interface LegacyJackson1ListWorklog {} diff --git a/src/version2/models/listOperand.ts b/src/version2/models/listOperand.ts new file mode 100644 index 000000000..5006ebb59 --- /dev/null +++ b/src/version2/models/listOperand.ts @@ -0,0 +1,9 @@ +import { JqlQueryUnitaryOperand } from './jqlQueryUnitaryOperand'; + +/** An operand that is a list of values. */ +export interface ListOperand { + /** Encoded operand, which can be used directly in a JQL query. */ + encodedOperand?: string; + /** The list of operand values. */ + values: JqlQueryUnitaryOperand[]; +} diff --git a/src/version2/models/mappingsByIssueTypeOverride.ts b/src/version2/models/mappingsByIssueTypeOverride.ts new file mode 100644 index 000000000..570d8dfde --- /dev/null +++ b/src/version2/models/mappingsByIssueTypeOverride.ts @@ -0,0 +1,13 @@ +import { WorkflowAssociationStatusMapping } from './workflowAssociationStatusMapping'; + +/** + * Overrides, for the selected issue types, any status mappings provided in `statusMappingsByWorkflows`. Status mappings + * are required when the new workflow for an issue type doesn't contain all statuses that the old workflow has. Status + * mappings can be provided by a combination of `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ +export interface MappingsByIssueTypeOverride { + /** The ID of the issue type for this mapping. */ + issueTypeId: string; + /** The list of status mappings. */ + statusMappings: WorkflowAssociationStatusMapping[]; +} diff --git a/src/version2/models/mappingsByWorkflow.ts b/src/version2/models/mappingsByWorkflow.ts new file mode 100644 index 000000000..484dcec96 --- /dev/null +++ b/src/version2/models/mappingsByWorkflow.ts @@ -0,0 +1,15 @@ +import { WorkflowAssociationStatusMapping } from './workflowAssociationStatusMapping'; + +/** + * The status mappings by workflows. Status mappings are required when the new workflow for an issue type doesn't + * contain all statuses that the old workflow has. Status mappings can be provided by a combination of + * `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ +export interface MappingsByWorkflow { + /** The ID of the new workflow. */ + newWorkflowId: string; + /** The ID of the old workflow. */ + oldWorkflowId: string; + /** The list of status mappings. */ + statusMappings: WorkflowAssociationStatusMapping[]; +} diff --git a/src/version2/models/multipartFile.ts b/src/version2/models/multipartFile.ts new file mode 100644 index 000000000..08378b133 --- /dev/null +++ b/src/version2/models/multipartFile.ts @@ -0,0 +1,12 @@ +import { Resource } from './resource'; + +export interface MultipartFile { + bytes?: string[]; + contentType?: string; + empty?: boolean; + inputStream?: {}; + name?: string; + originalFilename?: string; + resource?: Resource; + size?: number; +} diff --git a/src/version2/models/notificationSchemeAndProjectMappingJsonBean.ts b/src/version2/models/notificationSchemeAndProjectMappingJsonBean.ts new file mode 100644 index 000000000..823402184 --- /dev/null +++ b/src/version2/models/notificationSchemeAndProjectMappingJsonBean.ts @@ -0,0 +1,4 @@ +export interface NotificationSchemeAndProjectMappingJsonBean { + notificationSchemeId?: string; + projectId?: string; +} diff --git a/src/version2/models/oldToNewSecurityLevelMappingsBean.ts b/src/version2/models/oldToNewSecurityLevelMappingsBean.ts new file mode 100644 index 000000000..d056a80e8 --- /dev/null +++ b/src/version2/models/oldToNewSecurityLevelMappingsBean.ts @@ -0,0 +1,6 @@ +export interface OldToNewSecurityLevelMappingsBean { + /** The new issue security level ID. Providing null will clear the assigned old level from issues. */ + newLevelId: string; + /** The old issue security level ID. Providing null will remap all issues without any assigned levels. */ + oldLevelId: string; +} diff --git a/src/version2/models/pageBeanFieldConfigurationDetails.ts b/src/version2/models/pageBeanFieldConfigurationDetails.ts new file mode 100644 index 000000000..5917529a6 --- /dev/null +++ b/src/version2/models/pageBeanFieldConfigurationDetails.ts @@ -0,0 +1,25 @@ +import { FieldConfigurationDetails } from './fieldConfigurationDetails'; + +/** + * Represents a page of items, typically used for paginated responses. + * + * @deprecated This interface is deprecated and will be removed in a future version. Use + * `Paginated` instead, which is the preferred way to handle paginated responses for field + * configuration details. + */ +export interface PageBeanFieldConfigurationDetails { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** The number of items returned. */ + total?: number; + /** The list of items. */ + values?: FieldConfigurationDetails[]; +} diff --git a/src/version2/models/pageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects.ts b/src/version2/models/pageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects.ts new file mode 100644 index 000000000..48c7df0b4 --- /dev/null +++ b/src/version2/models/pageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects.ts @@ -0,0 +1,19 @@ +import { PrioritySchemeWithPaginatedPrioritiesAndProjects } from './prioritySchemeWithPaginatedPrioritiesAndProjects'; + +/** A page of items. */ +export interface PageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** The number of items returned. */ + total?: number; + /** The list of items. */ + values?: PrioritySchemeWithPaginatedPrioritiesAndProjects[]; +} diff --git a/src/version2/models/pageBeanPriorityWithSequence.ts b/src/version2/models/pageBeanPriorityWithSequence.ts new file mode 100644 index 000000000..8a98202c1 --- /dev/null +++ b/src/version2/models/pageBeanPriorityWithSequence.ts @@ -0,0 +1,19 @@ +import { PriorityWithSequence } from './priorityWithSequence'; + +/** A page of items. */ +export interface PageBeanPriorityWithSequence { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** The number of items returned. */ + total?: number; + /** The list of items. */ + values?: PriorityWithSequence[]; +} diff --git a/src/version2/models/pageBeanUiModificationDetails.ts b/src/version2/models/pageBeanUiModificationDetails.ts new file mode 100644 index 000000000..71f2248a2 --- /dev/null +++ b/src/version2/models/pageBeanUiModificationDetails.ts @@ -0,0 +1,19 @@ +import { UiModificationDetails } from './uiModificationDetails'; + +/** A page of items. */ +export interface PageBeanUiModificationDetails { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** The number of items returned. */ + total?: number; + /** The list of items. */ + values?: UiModificationDetails[]; +} diff --git a/src/version2/models/pageBulkContextualConfiguration.ts b/src/version2/models/pageBulkContextualConfiguration.ts new file mode 100644 index 000000000..3c931a143 --- /dev/null +++ b/src/version2/models/pageBulkContextualConfiguration.ts @@ -0,0 +1,19 @@ +import { BulkContextualConfiguration } from './bulkContextualConfiguration'; + +/** A page of items. */ +export interface PageBulkContextualConfiguration { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** The number of items returned. */ + total?: number; + /** The list of items. */ + values?: BulkContextualConfiguration[]; +} diff --git a/src/version2/models/pageContext.ts b/src/version2/models/pageContext.ts new file mode 100644 index 000000000..c310224a7 --- /dev/null +++ b/src/version2/models/pageContext.ts @@ -0,0 +1,19 @@ +import { Context } from './context'; + +/** A page of items. */ +export interface PageContext { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** The number of items returned. */ + total?: number; + /** The list of items. */ + values?: Context[]; +} diff --git a/src/version2/models/pageOfCreateMetaIssueTypeWithField.ts b/src/version2/models/pageOfCreateMetaIssueTypeWithField.ts new file mode 100644 index 000000000..3e5ce43d5 --- /dev/null +++ b/src/version2/models/pageOfCreateMetaIssueTypeWithField.ts @@ -0,0 +1,14 @@ +import { FieldCreateMetadata } from './fieldCreateMetadata'; + +/** A page of CreateMetaIssueType with Field. */ +export interface PageOfCreateMetaIssueTypeWithField { + /** The collection of FieldCreateMetaBeans. */ + fields?: FieldCreateMetadata[]; + /** The maximum number of items to return per page. */ + maxResults?: number; + results?: FieldCreateMetadata[]; + /** The index of the first item returned. */ + startAt?: number; + /** The total number of items in all pages. */ + total?: number; +} diff --git a/src/version2/models/pageOfCreateMetaIssueTypes.ts b/src/version2/models/pageOfCreateMetaIssueTypes.ts new file mode 100644 index 000000000..42b514a7e --- /dev/null +++ b/src/version2/models/pageOfCreateMetaIssueTypes.ts @@ -0,0 +1,14 @@ +import { IssueTypeIssueCreateMetadata } from './issueTypeIssueCreateMetadata'; + +/** A page of CreateMetaIssueTypes. */ +export interface PageOfCreateMetaIssueTypes { + createMetaIssueType?: IssueTypeIssueCreateMetadata[]; + /** The list of CreateMetaIssueType. */ + issueTypes?: IssueTypeIssueCreateMetadata[]; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The index of the first item returned. */ + startAt?: number; + /** The total number of items in all pages. */ + total?: number; +} diff --git a/src/version2/models/pageWithCursorGetPlanResponseForPage.ts b/src/version2/models/pageWithCursorGetPlanResponseForPage.ts new file mode 100644 index 000000000..7b6c103de --- /dev/null +++ b/src/version2/models/pageWithCursorGetPlanResponseForPage.ts @@ -0,0 +1,10 @@ +import { GetPlanResponseForPage } from './getPlanResponseForPage'; + +export interface PageWithCursorGetPlanResponseForPage { + cursor?: string; + last?: boolean; + nextPageCursor?: string; + size?: number; + total?: number; + values?: GetPlanResponseForPage[]; +} diff --git a/src/version2/models/pageWithCursorGetTeamResponseForPage.ts b/src/version2/models/pageWithCursorGetTeamResponseForPage.ts new file mode 100644 index 000000000..015c2316b --- /dev/null +++ b/src/version2/models/pageWithCursorGetTeamResponseForPage.ts @@ -0,0 +1,10 @@ +import { GetTeamResponseForPage } from './getTeamResponseForPage'; + +export interface PageWithCursorGetTeamResponseForPage { + cursor?: string; + last?: boolean; + nextPageCursor?: string; + size?: number; + total?: number; + values?: GetTeamResponseForPage[]; +} diff --git a/src/version2/models/paginatedResponseComment.ts b/src/version2/models/paginatedResponseComment.ts new file mode 100644 index 000000000..f8aba6db0 --- /dev/null +++ b/src/version2/models/paginatedResponseComment.ts @@ -0,0 +1,8 @@ +import { Comment } from './comment'; + +export interface PaginatedResponseComment { + maxResults?: number; + results?: Comment[]; + startAt?: number; + total?: number; +} diff --git a/src/version2/models/paginatedResponseFieldCreateMetadata.ts b/src/version2/models/paginatedResponseFieldCreateMetadata.ts new file mode 100644 index 000000000..a6c84ef7e --- /dev/null +++ b/src/version2/models/paginatedResponseFieldCreateMetadata.ts @@ -0,0 +1,8 @@ +import { FieldCreateMetadata } from './fieldCreateMetadata'; + +export interface PaginatedResponseFieldCreateMetadata { + maxResults?: number; + results?: FieldCreateMetadata[]; + startAt?: number; + total?: number; +} diff --git a/src/version2/models/paginatedResponseIssueTypeIssueCreateMetadata.ts b/src/version2/models/paginatedResponseIssueTypeIssueCreateMetadata.ts new file mode 100644 index 000000000..6f6c6fff3 --- /dev/null +++ b/src/version2/models/paginatedResponseIssueTypeIssueCreateMetadata.ts @@ -0,0 +1,8 @@ +import { IssueTypeIssueCreateMetadata } from './issueTypeIssueCreateMetadata'; + +export interface PaginatedResponseIssueTypeIssueCreateMetadata { + maxResults?: number; + results?: IssueTypeIssueCreateMetadata[]; + startAt?: number; + total?: number; +} diff --git a/src/version2/models/plan.ts b/src/version2/models/plan.ts new file mode 100644 index 000000000..2b42c63d0 --- /dev/null +++ b/src/version2/models/plan.ts @@ -0,0 +1,29 @@ +import { GetCrossProjectReleaseResponse } from './getCrossProjectReleaseResponse'; +import { GetCustomFieldResponse } from './getCustomFieldResponse'; +import { GetExclusionRulesResponse } from './getExclusionRulesResponse'; +import { GetIssueSourceResponse } from './getIssueSourceResponse'; +import { GetPermissionResponse } from './getPermissionResponse'; +import { GetSchedulingResponse } from './getSchedulingResponse'; + +export interface Plan { + /** The cross-project releases included in the plan. */ + crossProjectReleases?: GetCrossProjectReleaseResponse[]; + /** The custom fields for the plan. */ + customFields?: GetCustomFieldResponse[]; + exclusionRules?: GetExclusionRulesResponse; + /** The plan ID. */ + id: number; + /** The issue sources included in the plan. */ + issueSources?: GetIssueSourceResponse[]; + /** The date when the plan was last saved in UTC. */ + lastSaved?: string; + /** The account ID of the plan lead. */ + leadAccountId?: string; + /** The plan name. */ + name?: string; + /** The permissions for the plan. */ + permissions?: GetPermissionResponse[]; + scheduling?: GetSchedulingResponse; + /** The plan status. This is "Active", "Trashed" or "Archived". */ + status: 'Active' | 'Trashed' | 'Archived' | string; +} diff --git a/src/version2/models/priorityMapping.ts b/src/version2/models/priorityMapping.ts new file mode 100644 index 000000000..5141c9dd6 --- /dev/null +++ b/src/version2/models/priorityMapping.ts @@ -0,0 +1,18 @@ +/** Mapping of issue priorities for changes in priority schemes. */ +export interface PriorityMapping { + /** + * The mapping of priorities for issues being migrated **into** this priority scheme. Key is the old priority ID, + * value is the new priority ID (must exist in this priority scheme). + * + * E.g. The current priority scheme has priority ID `10001`. Issues with priority ID `10000` are being migrated into this priority scheme will need mapping to new priorities. The `in` mapping would be `{"10000": 10001}`. + */ + in?: {}; + /** + * The mapping of priorities for issues being migrated **out of** this priority scheme. Key is the old priority ID + * (must exist in this priority scheme), value is the new priority ID (must exist in the default priority scheme). + * Required for updating an existing priority scheme. Not used when creating a new priority scheme. + * + * E.g. The current priority scheme has priority ID `10001`. Issues with priority ID `10001` are being migrated out of this priority scheme will need mapping to new priorities. The `out` mapping would be `{"10001": 10000}`. + */ + out?: {}; +} diff --git a/src/version2/models/prioritySchemeChangesWithoutMappings.ts b/src/version2/models/prioritySchemeChangesWithoutMappings.ts new file mode 100644 index 000000000..51c1ea7e0 --- /dev/null +++ b/src/version2/models/prioritySchemeChangesWithoutMappings.ts @@ -0,0 +1,4 @@ +export interface PrioritySchemeChangesWithoutMappings { + /** Affected entity ids. */ + ids: number[]; +} diff --git a/src/version2/models/prioritySchemeId.ts b/src/version2/models/prioritySchemeId.ts new file mode 100644 index 000000000..7e349f2e2 --- /dev/null +++ b/src/version2/models/prioritySchemeId.ts @@ -0,0 +1,8 @@ +import { TaskProgressNode } from './taskProgressNode'; + +/** The ID of a priority scheme. */ +export interface PrioritySchemeId { + /** The ID of the priority scheme. */ + id?: string; + task?: TaskProgressNode; +} diff --git a/src/version2/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts b/src/version2/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts new file mode 100644 index 000000000..9dc5ed1bc --- /dev/null +++ b/src/version2/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts @@ -0,0 +1,21 @@ +import { Paginated } from '../../paginated'; +import { ProjectDetails } from './projectDetails'; +import { PriorityWithSequence } from './priorityWithSequence'; + +/** A priority scheme with paginated priorities and projects. */ +export interface PrioritySchemeWithPaginatedPrioritiesAndProjects { + default?: boolean; + /** The ID of the default issue priority. */ + defaultPriorityId?: string; + /** The description of the priority scheme */ + description?: string; + /** The ID of the priority scheme. */ + id: string; + isDefault?: boolean; + /** The name of the priority scheme */ + name: string; + priorities?: Paginated; + projects?: Paginated; + /** The URL of the priority scheme. */ + self?: string; +} diff --git a/src/version2/models/priorityWithSequence.ts b/src/version2/models/priorityWithSequence.ts new file mode 100644 index 000000000..8012f612a --- /dev/null +++ b/src/version2/models/priorityWithSequence.ts @@ -0,0 +1,19 @@ +/** An issue priority with sequence information. */ +export interface PriorityWithSequence { + /** The description of the issue priority. */ + description?: string; + /** The URL of the icon for the issue priority. */ + iconUrl?: string; + /** The ID of the issue priority. */ + id?: string; + /** Whether this priority is the default. */ + isDefault?: boolean; + /** The name of the issue priority. */ + name?: string; + /** The URL of the issue priority. */ + self?: string; + /** The sequence of the issue priority. */ + sequence?: string; + /** The color used to indicate the issue priority. */ + statusColor?: string; +} diff --git a/src/version2/models/projectComponent.ts b/src/version2/models/projectComponent.ts index 6703ca07d..2ab158527 100644 --- a/src/version2/models/projectComponent.ts +++ b/src/version2/models/projectComponent.ts @@ -2,6 +2,8 @@ import { User } from './user'; /** Details about a project component. */ export interface ProjectComponent { + /** Compass component's ID. Can't be updated. Not required for creating a Project Component. */ + ari?: string; assignee?: User; /** * The nominal user type used to determine the assignee for issues created with this component. See `realAssigneeType` @@ -39,6 +41,8 @@ export interface ProjectComponent { * for details. */ leadUserName?: string; + /** Compass component's metadata. Can't be updated. Not required for creating a Project Component. */ + metadata?: {}; /** * The unique name for the component in the project. Required when creating a component. Optional when updating a * component. The maximum length is 255 characters. diff --git a/src/version2/models/projectDataPolicies.ts b/src/version2/models/projectDataPolicies.ts new file mode 100644 index 000000000..22bbb2d14 --- /dev/null +++ b/src/version2/models/projectDataPolicies.ts @@ -0,0 +1,7 @@ +import { ProjectWithDataPolicy } from './projectWithDataPolicy'; + +/** Details about data policies for a list of projects. */ +export interface ProjectDataPolicies { + /** List of projects with data policies. */ + projectDataPolicies?: ProjectWithDataPolicy[]; +} diff --git a/src/version2/models/projectDataPolicy.ts b/src/version2/models/projectDataPolicy.ts new file mode 100644 index 000000000..4a8b013ea --- /dev/null +++ b/src/version2/models/projectDataPolicy.ts @@ -0,0 +1,5 @@ +/** Details about data policy. */ +export interface ProjectDataPolicy { + /** Whether the project contains any content inaccessible to the requesting application. */ + anyContentBlocked?: boolean; +} diff --git a/src/version2/models/projectFeatureState.ts b/src/version2/models/projectFeatureState.ts new file mode 100644 index 000000000..fdc702b10 --- /dev/null +++ b/src/version2/models/projectFeatureState.ts @@ -0,0 +1,5 @@ +/** Details of the feature state. */ +export interface ProjectFeatureState { + /** The feature state. */ + state?: 'ENABLED' | 'DISABLED' | 'COMING_SOON' | string; +} diff --git a/src/version2/models/projectUsage.ts b/src/version2/models/projectUsage.ts new file mode 100644 index 000000000..2cc468d44 --- /dev/null +++ b/src/version2/models/projectUsage.ts @@ -0,0 +1,5 @@ +/** The project. */ +export interface ProjectUsage { + /** The project ID. */ + id?: string; +} diff --git a/src/version2/models/projectUsagePage.ts b/src/version2/models/projectUsagePage.ts new file mode 100644 index 000000000..f018c8e7b --- /dev/null +++ b/src/version2/models/projectUsagePage.ts @@ -0,0 +1,9 @@ +import { ProjectUsage } from './projectUsage'; + +/** A page of projects. */ +export interface ProjectUsagePage { + /** Page token for the next page of project usages. */ + nextPageToken?: string; + /** The list of projects. */ + values?: ProjectUsage[]; +} diff --git a/src/version2/models/projectWithDataPolicy.ts b/src/version2/models/projectWithDataPolicy.ts new file mode 100644 index 000000000..99830d572 --- /dev/null +++ b/src/version2/models/projectWithDataPolicy.ts @@ -0,0 +1,8 @@ +import { ProjectDataPolicy } from './projectDataPolicy'; + +/** Details about data policies for a project. */ +export interface ProjectWithDataPolicy { + dataPolicy?: ProjectDataPolicy; + /** The project ID. */ + id?: number; +} diff --git a/src/version2/models/publishDraftWorkflowScheme.ts b/src/version2/models/publishDraftWorkflowScheme.ts new file mode 100644 index 000000000..13a785c31 --- /dev/null +++ b/src/version2/models/publishDraftWorkflowScheme.ts @@ -0,0 +1,7 @@ +import { StatusMapping } from './statusMapping'; + +/** Details about the status mappings for publishing a draft workflow scheme. */ +export interface PublishDraftWorkflowScheme { + /** Mappings of statuses to new statuses for issue types. */ + statusMappings?: StatusMapping[]; +} diff --git a/src/version2/models/removeOptionFromIssuesResult.ts b/src/version2/models/removeOptionFromIssuesResult.ts new file mode 100644 index 000000000..cf18ad7c2 --- /dev/null +++ b/src/version2/models/removeOptionFromIssuesResult.ts @@ -0,0 +1,9 @@ +import { SimpleErrorCollection } from './simpleErrorCollection'; + +export interface RemoveOptionFromIssuesResult { + errors?: SimpleErrorCollection; + /** The IDs of the modified issues. */ + modifiedIssues?: number[]; + /** The IDs of the unchanged issues, those issues where errors prevent modification. */ + unmodifiedIssues?: number[]; +} diff --git a/src/version2/models/requiredMappingByIssueType.ts b/src/version2/models/requiredMappingByIssueType.ts new file mode 100644 index 000000000..3d85f836c --- /dev/null +++ b/src/version2/models/requiredMappingByIssueType.ts @@ -0,0 +1,7 @@ +/** The list of required status mappings by issue type. */ +export interface RequiredMappingByIssueType { + /** The ID of the issue type. */ + issueTypeId?: string; + /** The status IDs requiring mapping. */ + statusIds?: string[]; +} diff --git a/src/version2/models/requiredMappingByWorkflows.ts b/src/version2/models/requiredMappingByWorkflows.ts new file mode 100644 index 000000000..b30e14666 --- /dev/null +++ b/src/version2/models/requiredMappingByWorkflows.ts @@ -0,0 +1,9 @@ +/** The list of required status mappings by workflow. */ +export interface RequiredMappingByWorkflows { + /** The ID of the source workflow. */ + sourceWorkflowId?: string; + /** The status IDs requiring mapping. */ + statusIds?: string[]; + /** The ID of the target workflow. */ + targetWorkflowId?: string; +} diff --git a/src/version2/models/resolutionJsonBean.ts b/src/version2/models/resolutionJsonBean.ts new file mode 100644 index 000000000..de2b4ae16 --- /dev/null +++ b/src/version2/models/resolutionJsonBean.ts @@ -0,0 +1,8 @@ +export interface ResolutionJsonBean { + default?: boolean; + description?: string; + iconUrl?: string; + id?: string; + name?: string; + self?: string; +} diff --git a/src/version2/models/resource.ts b/src/version2/models/resource.ts new file mode 100644 index 000000000..d9fdf765b --- /dev/null +++ b/src/version2/models/resource.ts @@ -0,0 +1,10 @@ +export interface Resource { + description?: string; + file?: string; + filename?: string; + inputStream?: {}; + open?: boolean; + readable?: boolean; + uri?: string; + url?: string; +} diff --git a/src/version2/models/ruleConfiguration.ts b/src/version2/models/ruleConfiguration.ts index bcd3aefc4..4acde2729 100644 --- a/src/version2/models/ruleConfiguration.ts +++ b/src/version2/models/ruleConfiguration.ts @@ -4,7 +4,7 @@ export interface RuleConfiguration { disabled?: boolean; /** * EXPERIMENTAL: A tag used to filter rules in [Get workflow transition rule - * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-rest-api-3-workflow-rule-config-get). + * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-transition-rules/#api-rest-api-2-workflow-rule-config-get). */ tag?: string; /** Configuration of the rule, as it is stored by the Connect or the Forge app on the rule configuration page. */ diff --git a/src/version2/models/searchAndReconcileRequest.ts b/src/version2/models/searchAndReconcileRequest.ts new file mode 100644 index 000000000..e89b158ce --- /dev/null +++ b/src/version2/models/searchAndReconcileRequest.ts @@ -0,0 +1,64 @@ +export interface SearchAndReconcileRequest { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, + * `expand` is defined as a comma-delimited string of values. The expand options are: + * + * `renderedFields` Returns field values rendered in HTML format. `names` Returns the display name of each field. + * `schema` Returns the schema describing a field type. `transitions` Returns all possible transitions for the issue. + * `operations` Returns all possible operations for the issue. `editmeta` Returns information about how each field can + * be edited. `changelog` Returns a list of recent updates to an issue, sorted by date, starting from the most recent. + * `versionedRepresentations` Instead of `fields`, returns `versionedRepresentations` a JSON array containing each + * version of a field's value, with the highest numbered item representing the most recent version. + * + * Examples: `"names,changelog"` Returns the display name of each field as well as a list of recent updates to an issue. + */ + expand?: string; + /** + * A list of fields to return for each issue. Use it to retrieve a subset of fields. This parameter accepts a + * comma-separated list. Expand options include: + * + * `*all` Returns all fields. `*navigable` Returns navigable fields. `id` Returns only issue IDs. Any issue field, + * prefixed with a dash to exclude. + * + * The default is `id`. + * + * Examples: + * + * `summary,comment` Returns the summary and comments fields only. `*all,-comment` Returns all fields except comments. + * + * Multiple `fields` parameters can be included in a request. + * + * Note: By default, this resource returns IDs only. This differs from [GET issue](#api-rest-api-2-issue-issueIdOrKey-get) where the default is all fields. + */ + fields?: string[]; + /** Reference fields by their key (rather than ID). The default is `false`. */ + fieldsByKeys?: boolean; + /** + * A [JQL](https://confluence.atlassian.com/x/egORLQ) expression. For performance reasons, this parameter requires a + * bounded query. A bounded query is a query with a search restriction. + * + * Example of an unbounded query: `order by key desc`. Example of a bounded query: `assignee = currentUser() order by + * key`. + * + * Additionally, `orderBy` clause can contain a maximum of 7 fields. + */ + jql?: string; + /** + * The maximum number of items to return per page. To manage page size, API may return fewer items per page where a + * large number of fields are requested. The greatest number of items returned per page is achieved when requesting + * `id` or `key` only. It returns max 5000 issues. + */ + maxResults?: number; + /** + * The token for a page to fetch that is not the first page. The first page has a `nextPageToken` of `null`. Use the + * `nextPageToken` to fetch the next page of issues. + */ + nextPageToken?: string; + /** A list of up to 5 issue properties to include in the results. This parameter accepts a comma-separated list. */ + properties?: string[]; + /** Strong consistency issue ids to be reconciled with search results. Accepts max 50 ids. All issues must exist. */ + reconcileIssues?: number[]; + /** Fail this request early if we can't retrieve all field data. The default is `false`. */ + failFast?: boolean; +} diff --git a/src/version2/models/searchAutoCompleteFilter.ts b/src/version2/models/searchAutoCompleteFilter.ts new file mode 100644 index 000000000..05f16e5b6 --- /dev/null +++ b/src/version2/models/searchAutoCompleteFilter.ts @@ -0,0 +1,7 @@ +/** Details of how to filter and list search auto complete information. */ +export interface SearchAutoCompleteFilter { + /** Include collapsed fields for fields that have non-unique names. */ + includeCollapsedFields?: boolean; + /** List of project IDs used to filter the visible field details returned. */ + projectIds?: number[]; +} diff --git a/src/version2/models/securitySchemeLevelBean.ts b/src/version2/models/securitySchemeLevelBean.ts new file mode 100644 index 000000000..8ad66a6b5 --- /dev/null +++ b/src/version2/models/securitySchemeLevelBean.ts @@ -0,0 +1,12 @@ +import { SecuritySchemeLevelMemberBean } from './securitySchemeLevelMemberBean'; + +export interface SecuritySchemeLevelBean { + /** The description of the issue security scheme level. */ + description?: string; + /** Specifies whether the level is the default level. False by default. */ + isDefault?: boolean; + /** The list of level members which should be added to the issue security scheme level. */ + members?: SecuritySchemeLevelMemberBean[]; + /** The name of the issue security scheme level. Must be unique. */ + name: string; +} diff --git a/src/version2/models/securitySchemeLevelMemberBean.ts b/src/version2/models/securitySchemeLevelMemberBean.ts new file mode 100644 index 000000000..d3b213e4f --- /dev/null +++ b/src/version2/models/securitySchemeLevelMemberBean.ts @@ -0,0 +1,6 @@ +export interface SecuritySchemeLevelMemberBean { + /** The value corresponding to the specified member type. */ + parameter?: string; + /** The issue security level member type, e.g `reporter`, `group`, `user`, `projectrole`, `applicationRole`. */ + type: string; +} diff --git a/src/version2/models/serviceManagementNavigationInfo.ts b/src/version2/models/serviceManagementNavigationInfo.ts new file mode 100644 index 000000000..0a39a90dc --- /dev/null +++ b/src/version2/models/serviceManagementNavigationInfo.ts @@ -0,0 +1,5 @@ +export interface ServiceManagementNavigationInfo { + queueCategory?: string; + queueId?: number; + queueName?: string; +} diff --git a/src/version2/models/serviceRegistry.ts b/src/version2/models/serviceRegistry.ts new file mode 100644 index 000000000..d46bfa2b8 --- /dev/null +++ b/src/version2/models/serviceRegistry.ts @@ -0,0 +1,15 @@ +import { ServiceRegistryTier } from './serviceRegistryTier'; + +export interface ServiceRegistry { + /** Service description */ + description?: string; + /** Service ID */ + id?: string; + /** Service name */ + name?: string; + /** Organization ID */ + organizationId?: string; + /** Service revision */ + revision?: string; + serviceTier?: ServiceRegistryTier; +} diff --git a/src/version2/models/serviceRegistryTier.ts b/src/version2/models/serviceRegistryTier.ts new file mode 100644 index 000000000..b9f2ff9ca --- /dev/null +++ b/src/version2/models/serviceRegistryTier.ts @@ -0,0 +1,12 @@ +export interface ServiceRegistryTier { + /** Tier description */ + description?: string; + /** Tier ID */ + id?: string; + /** Tier level */ + level?: number; + /** Tier name */ + name?: string; + /** Name key of the tier */ + nameKey?: string; +} diff --git a/src/version2/models/simpleErrorCollection.ts b/src/version2/models/simpleErrorCollection.ts new file mode 100644 index 000000000..d3920e159 --- /dev/null +++ b/src/version2/models/simpleErrorCollection.ts @@ -0,0 +1,10 @@ +export interface SimpleErrorCollection { + /** The list of error messages produced by this operation. For example, "input parameter 'key' must be provided" */ + errorMessages?: string[]; + /** + * The list of errors by parameter returned by the operation. For example,"projectKey": "Project keys must start with + * an uppercase letter, followed by one or more uppercase alphanumeric characters." + */ + errors?: {}; + httpStatusCode?: number; +} diff --git a/src/version2/models/simpleUsage.ts b/src/version2/models/simpleUsage.ts new file mode 100644 index 000000000..b1ddd9523 --- /dev/null +++ b/src/version2/models/simpleUsage.ts @@ -0,0 +1,7 @@ +/** Represents a usage of an entity by a project ID and related issue type IDs. */ +export interface SimpleUsage { + /** The issue type IDs for the usage. */ + issueTypeIds: string[]; + /** The project ID for the usage. */ + projectId: string; +} diff --git a/src/version2/models/simplifiedHierarchyLevel.ts b/src/version2/models/simplifiedHierarchyLevel.ts new file mode 100644 index 000000000..441c96dbd --- /dev/null +++ b/src/version2/models/simplifiedHierarchyLevel.ts @@ -0,0 +1,39 @@ +export interface SimplifiedHierarchyLevel { + /** + * The ID of the level above this one in the hierarchy. This property is deprecated, see [Change notice: Removing + * hierarchy level IDs from next-gen + * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). + */ + aboveLevelId?: number; + /** + * The ID of the level below this one in the hierarchy. This property is deprecated, see [Change notice: Removing + * hierarchy level IDs from next-gen + * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). + */ + belowLevelId?: number; + /** + * The external UUID of the hierarchy level. This property is deprecated, see [Change notice: Removing hierarchy level + * IDs from next-gen + * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). + */ + externalUuid?: string; + hierarchyLevelNumber?: number; + /** + * The ID of the hierarchy level. This property is deprecated, see [Change notice: Removing hierarchy level IDs from + * next-gen + * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). + */ + id?: number; + /** The issue types available in this hierarchy level. */ + issueTypeIds?: number[]; + /** The level of this item in the hierarchy. */ + level?: number; + /** The name of this hierarchy level. */ + name?: string; + /** + * The ID of the project configuration. This property is deprecated, see [Change oticen: Removing hierarchy level IDs + * from next-gen + * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). + */ + projectConfigurationId?: number; +} diff --git a/src/version2/models/softwareNavigationInfo.ts b/src/version2/models/softwareNavigationInfo.ts new file mode 100644 index 000000000..1af996801 --- /dev/null +++ b/src/version2/models/softwareNavigationInfo.ts @@ -0,0 +1,6 @@ +export interface SoftwareNavigationInfo { + boardId?: number; + boardName?: string; + simpleBoard?: boolean; + totalBoardsInProject?: number; +} diff --git a/src/version2/models/statusMetadata.ts b/src/version2/models/statusMetadata.ts new file mode 100644 index 000000000..f6eaa22aa --- /dev/null +++ b/src/version2/models/statusMetadata.ts @@ -0,0 +1,9 @@ +/** The details of the statuses in the associated workflows. */ +export interface StatusMetadata { + /** The category of the status. */ + category?: 'TODO' | 'IN_PROGRESS' | 'DONE' | string; + /** The ID of the status. */ + id?: string; + /** The name of the status. */ + name?: string; +} diff --git a/src/version2/models/statusProjectIssueTypeUsage.ts b/src/version2/models/statusProjectIssueTypeUsage.ts new file mode 100644 index 000000000..3141919ee --- /dev/null +++ b/src/version2/models/statusProjectIssueTypeUsage.ts @@ -0,0 +1,5 @@ +/** The list of issue types. */ +export interface StatusProjectIssueTypeUsage { + /** The issue type ID. */ + id?: string; +} diff --git a/src/version2/models/statusProjectIssueTypeUsageDTO.ts b/src/version2/models/statusProjectIssueTypeUsageDTO.ts new file mode 100644 index 000000000..73397025c --- /dev/null +++ b/src/version2/models/statusProjectIssueTypeUsageDTO.ts @@ -0,0 +1,10 @@ +import { StatusProjectIssueTypeUsagePage } from './statusProjectIssueTypeUsagePage'; + +/** The issue types using this status in a project. */ +export interface StatusProjectIssueTypeUsageDTO { + issueTypes?: StatusProjectIssueTypeUsagePage; + /** The project ID. */ + projectId?: string; + /** The status ID. */ + statusId?: string; +} diff --git a/src/version2/models/statusProjectIssueTypeUsagePage.ts b/src/version2/models/statusProjectIssueTypeUsagePage.ts new file mode 100644 index 000000000..b273c4e6c --- /dev/null +++ b/src/version2/models/statusProjectIssueTypeUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusProjectIssueTypeUsage } from './statusProjectIssueTypeUsage'; + +/** A page of issue types. */ +export interface StatusProjectIssueTypeUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of issue types. */ + values?: StatusProjectIssueTypeUsage[]; +} diff --git a/src/version2/models/statusProjectUsage.ts b/src/version2/models/statusProjectUsage.ts new file mode 100644 index 000000000..10f8b5361 --- /dev/null +++ b/src/version2/models/statusProjectUsage.ts @@ -0,0 +1,5 @@ +/** The project. */ +export interface StatusProjectUsage { + /** The project ID. */ + id?: string; +} diff --git a/src/version2/models/statusProjectUsageDTO.ts b/src/version2/models/statusProjectUsageDTO.ts new file mode 100644 index 000000000..315a9377e --- /dev/null +++ b/src/version2/models/statusProjectUsageDTO.ts @@ -0,0 +1,8 @@ +import { StatusProjectUsagePage } from './statusProjectUsagePage'; + +/** The projects using this status. */ +export interface StatusProjectUsageDTO { + projects?: StatusProjectUsagePage; + /** The status ID. */ + statusId?: string; +} diff --git a/src/version2/models/statusProjectUsagePage.ts b/src/version2/models/statusProjectUsagePage.ts new file mode 100644 index 000000000..5a9583f81 --- /dev/null +++ b/src/version2/models/statusProjectUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusProjectUsage } from './statusProjectUsage'; + +/** A page of projects. */ +export interface StatusProjectUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of projects. */ + values?: StatusProjectUsage[]; +} diff --git a/src/version2/models/statusWorkflowUsageDTO.ts b/src/version2/models/statusWorkflowUsageDTO.ts new file mode 100644 index 000000000..bad0f5011 --- /dev/null +++ b/src/version2/models/statusWorkflowUsageDTO.ts @@ -0,0 +1,8 @@ +import { StatusWorkflowUsagePage } from './statusWorkflowUsagePage'; + +/** Workflows using the status. */ +export interface StatusWorkflowUsageDTO { + /** The status ID. */ + statusId?: string; + workflows?: StatusWorkflowUsagePage; +} diff --git a/src/version2/models/statusWorkflowUsagePage.ts b/src/version2/models/statusWorkflowUsagePage.ts new file mode 100644 index 000000000..6d358d851 --- /dev/null +++ b/src/version2/models/statusWorkflowUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusWorkflowUsageWorkflow } from './statusWorkflowUsageWorkflow'; + +/** A page of workflows. */ +export interface StatusWorkflowUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of statuses. */ + values?: StatusWorkflowUsageWorkflow[]; +} diff --git a/src/version2/models/statusWorkflowUsageWorkflow.ts b/src/version2/models/statusWorkflowUsageWorkflow.ts new file mode 100644 index 000000000..3e860725b --- /dev/null +++ b/src/version2/models/statusWorkflowUsageWorkflow.ts @@ -0,0 +1,5 @@ +/** The worflow. */ +export interface StatusWorkflowUsageWorkflow { + /** The workflow ID. */ + id?: string; +} diff --git a/src/version2/models/statusesPerWorkflow.ts b/src/version2/models/statusesPerWorkflow.ts new file mode 100644 index 000000000..d4b31c1b7 --- /dev/null +++ b/src/version2/models/statusesPerWorkflow.ts @@ -0,0 +1,9 @@ +/** The statuses associated with each workflow. */ +export interface StatusesPerWorkflow { + /** The ID of the initial status for the workflow. */ + initialStatusId?: string; + /** The status IDs associated with the workflow. */ + statuses?: string[]; + /** The ID of the workflow. */ + workflowId?: string; +} diff --git a/src/version2/models/streamingResponseBody.ts b/src/version2/models/streamingResponseBody.ts new file mode 100644 index 000000000..82da8e10c --- /dev/null +++ b/src/version2/models/streamingResponseBody.ts @@ -0,0 +1 @@ +export interface StreamingResponseBody {} diff --git a/src/version2/models/stringList.ts b/src/version2/models/stringList.ts new file mode 100644 index 000000000..1a49a7f9a --- /dev/null +++ b/src/version2/models/stringList.ts @@ -0,0 +1 @@ +export interface StringList {} diff --git a/src/version2/models/suggestedMappingsForPrioritiesRequestBean.ts b/src/version2/models/suggestedMappingsForPrioritiesRequestBean.ts new file mode 100644 index 000000000..9102196ab --- /dev/null +++ b/src/version2/models/suggestedMappingsForPrioritiesRequestBean.ts @@ -0,0 +1,7 @@ +/** Details of changes to a priority scheme's priorities that require suggested priority mappings. */ +export interface SuggestedMappingsForPrioritiesRequestBean { + /** The ids of priorities being removed from the scheme. */ + add?: number[]; + /** The ids of priorities being removed from the scheme. */ + remove?: number[]; +} diff --git a/src/version2/models/suggestedMappingsForProjectsRequestBean.ts b/src/version2/models/suggestedMappingsForProjectsRequestBean.ts new file mode 100644 index 000000000..50b3d45b9 --- /dev/null +++ b/src/version2/models/suggestedMappingsForProjectsRequestBean.ts @@ -0,0 +1,5 @@ +/** Details of changes to a priority scheme's projects that require suggested priority mappings. */ +export interface SuggestedMappingsForProjectsRequestBean { + /** The ids of projects being added to the scheme. */ + add?: number[]; +} diff --git a/src/version2/models/suggestedMappingsRequest.ts b/src/version2/models/suggestedMappingsRequest.ts new file mode 100644 index 000000000..4606cbcdd --- /dev/null +++ b/src/version2/models/suggestedMappingsRequest.ts @@ -0,0 +1,14 @@ +import { SuggestedMappingsForPrioritiesRequestBean } from './suggestedMappingsForPrioritiesRequestBean'; +import { SuggestedMappingsForProjectsRequestBean } from './suggestedMappingsForProjectsRequestBean'; + +/** Details of changes to a priority scheme that require suggested priority mappings. */ +export interface SuggestedMappingsRequest { + /** The maximum number of results that could be on the page. */ + maxResults?: number; + priorities?: SuggestedMappingsForPrioritiesRequestBean; + projects?: SuggestedMappingsForProjectsRequestBean; + /** The id of the priority scheme. */ + schemeId?: number; + /** The index of the first item returned on the page. */ + startAt?: number; +} diff --git a/src/version2/models/taskProgressNode.ts b/src/version2/models/taskProgressNode.ts new file mode 100644 index 000000000..d49fa8144 --- /dev/null +++ b/src/version2/models/taskProgressNode.ts @@ -0,0 +1,30 @@ +import { JsonNode } from './jsonNode'; + +/** Details about a task. */ +export interface TaskProgressNode { + /** The description of the task. */ + description?: string; + /** The execution time of the task, in milliseconds. */ + elapsedRuntime: number; + /** A timestamp recording when the task was finished. */ + finished?: number; + /** The ID of the task. */ + id: string; + /** A timestamp recording when the task progress was last updated. */ + lastUpdate: number; + /** Information about the progress of the task. */ + message?: string; + /** The progress of the task, as a percentage complete. */ + progress: number; + result?: JsonNode; + /** The URL of the task. */ + self: string; + /** A timestamp recording when the task was started. */ + started?: number; + /** The status of the task. */ + status: 'ENQUEUED' | 'RUNNING' | 'COMPLETE' | 'FAILED' | 'CANCEL_REQUESTED' | 'CANCELLED' | 'DEAD' | string; + /** A timestamp recording when the task was submitted. */ + submitted: number; + /** The ID of the user who submitted the task. */ + submittedBy: number; +} diff --git a/src/version2/models/taskProgressRemoveOptionFromIssuesResult.ts b/src/version2/models/taskProgressRemoveOptionFromIssuesResult.ts new file mode 100644 index 000000000..4d8a7b38b --- /dev/null +++ b/src/version2/models/taskProgressRemoveOptionFromIssuesResult.ts @@ -0,0 +1,30 @@ +import { RemoveOptionFromIssuesResult } from './removeOptionFromIssuesResult'; + +/** Details about a task. */ +export interface TaskProgressRemoveOptionFromIssuesResult { + /** The description of the task. */ + description?: string; + /** The execution time of the task, in milliseconds. */ + elapsedRuntime: number; + /** A timestamp recording when the task was finished. */ + finished?: number; + /** The ID of the task. */ + id: string; + /** A timestamp recording when the task progress was last updated. */ + lastUpdate: number; + /** Information about the progress of the task. */ + message?: string; + /** The progress of the task, as a percentage complete. */ + progress: number; + result?: RemoveOptionFromIssuesResult; + /** The URL of the task. */ + self: string; + /** A timestamp recording when the task was started. */ + started?: number; + /** The status of the task. */ + status: 'ENQUEUED' | 'RUNNING' | 'COMPLETE' | 'FAILED' | 'CANCEL_REQUESTED' | 'CANCELLED' | 'DEAD' | string; + /** A timestamp recording when the task was submitted. */ + submitted: number; + /** The ID of the user who submitted the task. */ + submittedBy: number; +} diff --git a/src/version2/models/updateDefaultProjectClassification.ts b/src/version2/models/updateDefaultProjectClassification.ts new file mode 100644 index 000000000..70ce9a418 --- /dev/null +++ b/src/version2/models/updateDefaultProjectClassification.ts @@ -0,0 +1,5 @@ +/** The request for updating the default project classification level. */ +export interface UpdateDefaultProjectClassification { + /** The ID of the project classification. */ + id: string; +} diff --git a/src/version2/models/updateDefaultScreenScheme.ts b/src/version2/models/updateDefaultScreenScheme.ts new file mode 100644 index 000000000..fb40becb7 --- /dev/null +++ b/src/version2/models/updateDefaultScreenScheme.ts @@ -0,0 +1,5 @@ +/** The ID of a screen scheme. */ +export interface UpdateDefaultScreenScheme { + /** The ID of the screen scheme. */ + screenSchemeId: string; +} diff --git a/src/version2/models/updateIssueSecuritySchemeRequestBean.ts b/src/version2/models/updateIssueSecuritySchemeRequestBean.ts new file mode 100644 index 000000000..2166c011d --- /dev/null +++ b/src/version2/models/updateIssueSecuritySchemeRequestBean.ts @@ -0,0 +1,6 @@ +export interface UpdateIssueSecuritySchemeRequestBean { + /** The description of the security scheme scheme. */ + description?: string; + /** The name of the security scheme scheme. Must be unique. */ + name?: string; +} diff --git a/src/version2/models/updatePrioritiesInSchemeRequest.ts b/src/version2/models/updatePrioritiesInSchemeRequest.ts new file mode 100644 index 000000000..43fcd0e55 --- /dev/null +++ b/src/version2/models/updatePrioritiesInSchemeRequest.ts @@ -0,0 +1,7 @@ +import { PrioritySchemeChangesWithoutMappings } from './prioritySchemeChangesWithoutMappings'; + +/** Update priorities in a scheme */ +export interface UpdatePrioritiesInSchemeRequest { + add?: PrioritySchemeChangesWithoutMappings; + remove?: PrioritySchemeChangesWithoutMappings; +} diff --git a/src/version2/models/updatePriorityDetails.ts b/src/version2/models/updatePriorityDetails.ts index ab3ed530a..5d61df8da 100644 --- a/src/version2/models/updatePriorityDetails.ts +++ b/src/version2/models/updatePriorityDetails.ts @@ -1,9 +1,37 @@ /** Details of an issue priority. */ export interface UpdatePriorityDetails { + /** The ID for the avatar for the priority. This parameter is nullable and both iconUrl and avatarId cannot be defined. */ + avatarId?: number; /** The description of the priority. */ description?: string; - /** The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. */ - iconUrl?: string; + /** + * The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. Both + * iconUrl and avatarId cannot be defined. + * + * @deprecated This property is deprecated and will be removed in a future version. Use `avatarId` instead. + */ + iconUrl?: + | '/images/icons/priorities/blocker.png' + | '/images/icons/priorities/critical.png' + | '/images/icons/priorities/high.png' + | '/images/icons/priorities/highest.png' + | '/images/icons/priorities/low.png' + | '/images/icons/priorities/lowest.png' + | '/images/icons/priorities/major.png' + | '/images/icons/priorities/medium.png' + | '/images/icons/priorities/minor.png' + | '/images/icons/priorities/trivial.png' + | '/images/icons/priorities/blocker_new.png' + | '/images/icons/priorities/critical_new.png' + | '/images/icons/priorities/high_new.png' + | '/images/icons/priorities/highest_new.png' + | '/images/icons/priorities/low_new.png' + | '/images/icons/priorities/lowest_new.png' + | '/images/icons/priorities/major_new.png' + | '/images/icons/priorities/medium_new.png' + | '/images/icons/priorities/minor_new.png' + | '/images/icons/priorities/trivial_new.png' + | string; /** The name of the priority. Must be unique. */ name?: string; /** The status color of the priority in 3-digit or 6-digit hexadecimal format. */ diff --git a/src/version2/models/updatePrioritySchemeRequest.ts b/src/version2/models/updatePrioritySchemeRequest.ts new file mode 100644 index 000000000..95ecc0e93 --- /dev/null +++ b/src/version2/models/updatePrioritySchemeRequest.ts @@ -0,0 +1,16 @@ +import { PriorityMapping } from './priorityMapping'; +import { UpdatePrioritiesInSchemeRequest } from './updatePrioritiesInSchemeRequest'; +import { UpdateProjectsInSchemeRequest } from './updateProjectsInSchemeRequest'; + +/** Details of a priority scheme. */ +export interface UpdatePrioritySchemeRequest { + /** The default priority of the scheme. */ + defaultPriorityId?: number; + /** The description of the priority scheme. */ + description?: string; + mappings?: PriorityMapping; + /** The name of the priority scheme. Must be unique. */ + name?: string; + priorities?: UpdatePrioritiesInSchemeRequest; + projects?: UpdateProjectsInSchemeRequest; +} diff --git a/src/version2/models/updatePrioritySchemeResponse.ts b/src/version2/models/updatePrioritySchemeResponse.ts new file mode 100644 index 000000000..236481e5b --- /dev/null +++ b/src/version2/models/updatePrioritySchemeResponse.ts @@ -0,0 +1,8 @@ +import { PrioritySchemeWithPaginatedPrioritiesAndProjects } from './prioritySchemeWithPaginatedPrioritiesAndProjects'; +import { TaskProgressNode } from './taskProgressNode'; + +/** Details of the updated priority scheme. */ +export interface UpdatePrioritySchemeResponse { + priorityScheme?: PrioritySchemeWithPaginatedPrioritiesAndProjects; + task?: TaskProgressNode; +} diff --git a/src/version2/models/updateProjectDetails.ts b/src/version2/models/updateProjectDetails.ts index c042c8d57..6fc4a5130 100644 --- a/src/version2/models/updateProjectDetails.ts +++ b/src/version2/models/updateProjectDetails.ts @@ -1,17 +1,22 @@ /** Details about the project. */ export interface UpdateProjectDetails { - /** The default assignee when creating issues for this project. */ - assigneeType?: string; - /** An integer value for the project's avatar. */ - avatarId?: number; /** - * The ID of the project's category. A complete list of category IDs is found using the [Get all project - * categories](#api-rest-api-2-projectCategory-get) operation. To remove the project category from the project, set - * the value to `-1.` + * Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric + * characters. The maximum length is 10 characters. */ - categoryId?: number; + key?: string; + /** The name of the project. */ + name?: string; /** A brief description of the project. */ description?: string; + /** The account ID of the project lead. Cannot be provided with `lead`. */ + leadAccountId: string; + /** A link to information about this project, such as project documentation */ + url?: string; + /** The default assignee when creating issues for this project. */ + assigneeType?: string; + /** An integer value for the project's avatar. */ + avatarId?: number; /** * The ID of the issue security scheme for the project, which enables you to control who can and cannot view issues. * Use the [Get issue security schemes](#api-rest-api-2-issuesecurityschemes-get) resource to get all issue security @@ -19,24 +24,24 @@ export interface UpdateProjectDetails { */ issueSecurityScheme?: number; /** - * Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric - * characters. The maximum length is 10 characters. + * The ID of the permission scheme for the project. Use the [Get all permission + * schemes](#api-rest-api-2-permissionscheme-get) resource to see a list of all permission scheme IDs. */ - key?: string; - /** The account ID of the project lead. Cannot be provided with `lead`. */ - leadAccountId: string; - /** The name of the project. */ - name?: string; + permissionScheme?: number; /** * The ID of the notification scheme for the project. Use the [Get notification * schemes](#api-rest-api-2-notificationscheme-get) resource to get a list of notification scheme IDs. */ notificationScheme?: number; /** - * The ID of the permission scheme for the project. Use the [Get all permission - * schemes](#api-rest-api-2-permissionscheme-get) resource to see a list of all permission scheme IDs. + * The ID of the project's category. A complete list of category IDs is found using the [Get all project + * categories](#api-rest-api-2-projectCategory-get) operation. To remove the project category from the project, set + * the value to `-1.` */ - permissionScheme?: number; - /** A link to information about this project, such as project documentation */ - url?: string; + categoryId?: number; + /** + * Previous project keys to be released from the current project. Released keys must belong to the current project and + * not contain the current project key + */ + releasedProjectKeys?: string[]; } diff --git a/src/version2/models/updateProjectsInSchemeRequest.ts b/src/version2/models/updateProjectsInSchemeRequest.ts new file mode 100644 index 000000000..2269174ee --- /dev/null +++ b/src/version2/models/updateProjectsInSchemeRequest.ts @@ -0,0 +1,7 @@ +import { PrioritySchemeChangesWithoutMappings } from './prioritySchemeChangesWithoutMappings'; + +/** Update projects in a scheme */ +export interface UpdateProjectsInSchemeRequest { + add?: PrioritySchemeChangesWithoutMappings; + remove?: PrioritySchemeChangesWithoutMappings; +} diff --git a/src/version2/models/userColumnRequestBody.ts b/src/version2/models/userColumnRequestBody.ts new file mode 100644 index 000000000..bd4b83b29 --- /dev/null +++ b/src/version2/models/userColumnRequestBody.ts @@ -0,0 +1,3 @@ +export interface UserColumnRequestBody { + columns?: string[]; +} diff --git a/src/version2/models/userFilter.ts b/src/version2/models/userFilter.ts new file mode 100644 index 000000000..c03f5f833 --- /dev/null +++ b/src/version2/models/userFilter.ts @@ -0,0 +1,15 @@ +/** Filter for a User Picker (single) custom field. */ +export interface UserFilter { + /** Whether the filter is enabled. */ + enabled: boolean; + /** + * User groups autocomplete suggestion users must belong to. If not provided, the default values are used. A maximum + * of 10 groups can be provided. + */ + groups?: string[]; + /** + * Roles that autocomplete suggestion users must belong to. If not provided, the default values are used. A maximum of + * 10 roles can be provided. + */ + roleIds?: number[]; +} diff --git a/src/version2/models/userPermission.ts b/src/version2/models/userPermission.ts new file mode 100644 index 000000000..216d02c84 --- /dev/null +++ b/src/version2/models/userPermission.ts @@ -0,0 +1,26 @@ +/** Details of a permission and its availability to a user. */ +export interface UserPermission { + /** + * Indicate whether the permission key is deprecated. Note that deprecated keys cannot be used in the `permissions + * parameter of Get my permissions. Deprecated keys are not returned by Get all permissions.` + */ + deprecatedKey?: boolean; + /** The description of the permission. */ + description?: string; + /** Whether the permission is available to the user in the queried context. */ + havePermission?: boolean; + /** + * The ID of the permission. Either `id` or `key` must be specified. Use [Get all + * permissions](#api-rest-api-2-permissions-get) to get the list of permissions. + */ + id?: string; + /** + * The key of the permission. Either `id` or `key` must be specified. Use [Get all + * permissions](#api-rest-api-2-permissions-get) to get the list of permissions. + */ + key?: string; + /** The name of the permission. */ + name?: string; + /** The type of the permission. */ + type?: 'GLOBAL' | 'PROJECT' | string; +} diff --git a/src/version2/models/valueOperand.ts b/src/version2/models/valueOperand.ts new file mode 100644 index 000000000..185898105 --- /dev/null +++ b/src/version2/models/valueOperand.ts @@ -0,0 +1,7 @@ +/** An operand that is a user-provided value. */ +export interface ValueOperand { + /** Encoded value, which can be used directly in a JQL query. */ + encodedValue?: string; + /** The operand value. */ + value: string; +} diff --git a/src/version2/models/version.ts b/src/version2/models/version.ts index 77e58a9f6..9be11f4e2 100644 --- a/src/version2/models/version.ts +++ b/src/version2/models/version.ts @@ -1,8 +1,17 @@ -import { SimpleLink } from './simpleLink'; +import { VersionApprover } from './versionApprover'; import { VersionIssuesStatus } from './versionIssuesStatus'; +import { SimpleLink } from './simpleLink'; /** Details about a project version. */ export interface Version { + /** If the expand option `approvers` is used, returns a list containing the approvers for this version. */ + approvers?: VersionApprover[]; + /** Indicates that the version is archived. Optional when creating or updating a version. */ + archived?: boolean; + /** The description of the version. Optional when creating or updating a version. The maximum size is 16,384 bytes. */ + description?: string; + /** If the expand option `driver` is used, returns the Atlassian account ID of the driver. */ + driver?: string; /** * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional * information about version in the response. This parameter accepts a comma-separated list. Expand options include: @@ -19,15 +28,11 @@ export interface Version { self?: string; /** The ID of the version. */ id?: string; - /** The description of the version. Optional when creating or updating a version. */ - description?: string; /** * The unique name of the version. Required when creating a version. Optional when updating a version. The maximum * length is 255 characters. */ name?: string; - /** Indicates that the version is archived. Optional when creating or updating a version. */ - archived?: boolean; /** * Indicates that the version is released. If the version is released a request to release again is ignored. Not * applicable when creating a version. Optional when updating a version. diff --git a/src/version2/models/versionApprover.ts b/src/version2/models/versionApprover.ts new file mode 100644 index 000000000..2a4b447c5 --- /dev/null +++ b/src/version2/models/versionApprover.ts @@ -0,0 +1,11 @@ +/** Contains details about a version approver. */ +export interface VersionApprover { + /** The Atlassian account ID of the approver. */ + accountId?: string; + /** A description of why the user is declining the approval. */ + declineReason?: string; + /** A description of what the user is approving within the specified version. */ + description?: string; + /** The status of the approval, which can be _PENDING_, _APPROVED_, or _DECLINED_ */ + status?: string; +} diff --git a/src/version2/models/versionRelatedWork.ts b/src/version2/models/versionRelatedWork.ts new file mode 100644 index 000000000..d8e8e88a0 --- /dev/null +++ b/src/version2/models/versionRelatedWork.ts @@ -0,0 +1,16 @@ +/** Associated related work to a version */ +export interface VersionRelatedWork { + /** The category of the related work */ + category: string; + /** The ID of the issue associated with the related work (if there is one). Cannot be updated via the Rest API. */ + issueId?: number; + /** + * The id of the related work. For the native release note related work item, this will be null, and Rest API does not + * support updating it. + */ + relatedWorkId?: string; + /** The title of the related work */ + title?: string; + /** The URL of the related work. Will be null for the native release note related work item, but is otherwise required. */ + url?: string; +} diff --git a/src/version2/models/webhook.ts b/src/version2/models/webhook.ts index 7886ad727..e9e804f18 100644 --- a/src/version2/models/webhook.ts +++ b/src/version2/models/webhook.ts @@ -4,7 +4,7 @@ export interface Webhook { events: string[]; /** * The date after which the webhook is no longer sent. Use [Extend webhook - * life](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-webhooks/#api-rest-api-3-webhook-refresh-put) + * life](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-webhooks/#api-rest-api-2-webhook-refresh-put) * to extend the date. */ expirationDate?: number; diff --git a/src/version2/models/workManagementNavigationInfo.ts b/src/version2/models/workManagementNavigationInfo.ts new file mode 100644 index 000000000..e041f077c --- /dev/null +++ b/src/version2/models/workManagementNavigationInfo.ts @@ -0,0 +1,3 @@ +export interface WorkManagementNavigationInfo { + boardName?: string; +} diff --git a/src/version2/models/workflowAssociationStatusMapping.ts b/src/version2/models/workflowAssociationStatusMapping.ts new file mode 100644 index 000000000..17d5e22fe --- /dev/null +++ b/src/version2/models/workflowAssociationStatusMapping.ts @@ -0,0 +1,7 @@ +/** The list of status mappings. */ +export interface WorkflowAssociationStatusMapping { + /** The ID of the status in the new workflow. */ + newStatusId: string; + /** The ID of the status in the old workflow that isn't present in the new workflow. */ + oldStatusId: string; +} diff --git a/src/version2/models/workflowCompoundCondition.ts b/src/version2/models/workflowCompoundCondition.ts new file mode 100644 index 000000000..63d203194 --- /dev/null +++ b/src/version2/models/workflowCompoundCondition.ts @@ -0,0 +1,10 @@ +import { WorkflowCondition } from './workflowCondition'; + +/** A compound workflow transition rule condition. This object returns `nodeType` as `compound`. */ +export interface WorkflowCompoundCondition { + /** The list of workflow conditions. */ + conditions: WorkflowCondition[]; + nodeType: string; + /** The compound condition operator. */ + operator: 'AND' | 'OR' | string; +} diff --git a/src/version2/models/workflowCreateResponse.ts b/src/version2/models/workflowCreateResponse.ts index 1600d3ce8..5cfbe3e79 100644 --- a/src/version2/models/workflowCreateResponse.ts +++ b/src/version2/models/workflowCreateResponse.ts @@ -1,7 +1,12 @@ import { JiraWorkflow } from './jiraWorkflow'; import { JiraWorkflowStatus } from './jiraWorkflowStatus'; -/** Details of the created workflows and statuses. */ +/** + * Represents the response after creating workflows and statuses. + * + * @deprecated This interface is deprecated and will be removed in a future version. Use {@link WorkflowCreate} instead + * for handling workflow creation responses. + */ export interface WorkflowCreateResponse { /** List of created statuses. */ statuses?: JiraWorkflowStatus[]; diff --git a/src/version2/models/workflowCreateValidateRequest.ts b/src/version2/models/workflowCreateValidateRequest.ts new file mode 100644 index 000000000..b695dffb9 --- /dev/null +++ b/src/version2/models/workflowCreateValidateRequest.ts @@ -0,0 +1,7 @@ +import { WorkflowCreateRequest } from './workflowCreateRequest'; +import { ValidationOptionsForCreate } from './validationOptionsForCreate'; + +export interface WorkflowCreateValidateRequest { + payload: WorkflowCreateRequest; + validationOptions?: ValidationOptionsForCreate; +} diff --git a/src/version2/models/workflowIDs.ts b/src/version2/models/workflowIDs.ts new file mode 100644 index 000000000..113fc5afe --- /dev/null +++ b/src/version2/models/workflowIDs.ts @@ -0,0 +1,7 @@ +/** The classic workflow identifiers. */ +export interface WorkflowIDs { + /** The entity ID of the workflow. */ + entityId?: string; + /** The name of the workflow. */ + name: string; +} diff --git a/src/version2/models/workflowMetadataAndIssueTypeRestModel.ts b/src/version2/models/workflowMetadataAndIssueTypeRestModel.ts new file mode 100644 index 000000000..b418fdf19 --- /dev/null +++ b/src/version2/models/workflowMetadataAndIssueTypeRestModel.ts @@ -0,0 +1,8 @@ +import { WorkflowMetadataRestModel } from './workflowMetadataRestModel'; + +/** The workflow metadata and issue type IDs which use this workflow. */ +export interface WorkflowMetadataAndIssueTypeRestModel { + /** The list of issue type IDs for the mapping. */ + issueTypeIds: string[]; + workflow: WorkflowMetadataRestModel; +} diff --git a/src/version2/models/workflowMetadataRestModel.ts b/src/version2/models/workflowMetadataRestModel.ts new file mode 100644 index 000000000..480f13505 --- /dev/null +++ b/src/version2/models/workflowMetadataRestModel.ts @@ -0,0 +1,20 @@ +import { SimpleUsage } from './simpleUsage'; +import { DocumentVersion } from './documentVersion'; + +/** Workflow metadata and usage detail. */ +export interface WorkflowMetadataRestModel { + /** The description of the workflow. */ + description: string; + /** The ID of the workflow. */ + id: string; + /** The name of the workflow. */ + name: string; + /** + * Deprecated. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * Use the optional `workflows.usages` expand to get additional information about the projects and issue types associated with the workflows in the workflow scheme. + */ + usage: SimpleUsage[]; + version: DocumentVersion; +} diff --git a/src/version2/models/workflowProjectIssueTypeUsage.ts b/src/version2/models/workflowProjectIssueTypeUsage.ts new file mode 100644 index 000000000..9e5e7f3ec --- /dev/null +++ b/src/version2/models/workflowProjectIssueTypeUsage.ts @@ -0,0 +1,5 @@ +/** The issue type. */ +export interface WorkflowProjectIssueTypeUsage { + /** The ID of the issue type. */ + id?: string; +} diff --git a/src/version2/models/workflowProjectIssueTypeUsageDTO.ts b/src/version2/models/workflowProjectIssueTypeUsageDTO.ts new file mode 100644 index 000000000..fa23a7595 --- /dev/null +++ b/src/version2/models/workflowProjectIssueTypeUsageDTO.ts @@ -0,0 +1,10 @@ +import { WorkflowProjectIssueTypeUsagePage } from './workflowProjectIssueTypeUsagePage'; + +/** Issue types associated with the workflow for a project. */ +export interface WorkflowProjectIssueTypeUsageDTO { + issueTypes?: WorkflowProjectIssueTypeUsagePage; + /** The ID of the project. */ + projectId?: string; + /** The ID of the workflow. */ + workflowId?: string; +} diff --git a/src/version2/models/workflowProjectIssueTypeUsagePage.ts b/src/version2/models/workflowProjectIssueTypeUsagePage.ts new file mode 100644 index 000000000..33efc451d --- /dev/null +++ b/src/version2/models/workflowProjectIssueTypeUsagePage.ts @@ -0,0 +1,9 @@ +import { WorkflowProjectIssueTypeUsage } from './workflowProjectIssueTypeUsage'; + +/** A page of issue types. */ +export interface WorkflowProjectIssueTypeUsagePage { + /** Token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of issue types. */ + values?: WorkflowProjectIssueTypeUsage[]; +} diff --git a/src/version2/models/workflowProjectUsageDTO.ts b/src/version2/models/workflowProjectUsageDTO.ts new file mode 100644 index 000000000..1d3d2b1d1 --- /dev/null +++ b/src/version2/models/workflowProjectUsageDTO.ts @@ -0,0 +1,8 @@ +import { ProjectUsagePage } from './projectUsagePage'; + +/** Projects using the workflow. */ +export interface WorkflowProjectUsageDTO { + projects?: ProjectUsagePage; + /** The workflow ID. */ + workflowId?: string; +} diff --git a/src/version2/models/workflowReadRequest.ts b/src/version2/models/workflowReadRequest.ts new file mode 100644 index 000000000..2740a5abd --- /dev/null +++ b/src/version2/models/workflowReadRequest.ts @@ -0,0 +1,10 @@ +import { ProjectAndIssueTypePair } from './projectAndIssueTypePair'; + +export interface WorkflowReadRequest { + /** The list of projects and issue types to query. */ + projectAndIssueTypes?: ProjectAndIssueTypePair[]; + /** The list of workflow IDs to query. */ + workflowIds?: string[]; + /** The list of workflow names to query. */ + workflowNames?: string[]; +} diff --git a/src/version2/models/workflowSchemeAssociation.ts b/src/version2/models/workflowSchemeAssociation.ts new file mode 100644 index 000000000..9e119c9ed --- /dev/null +++ b/src/version2/models/workflowSchemeAssociation.ts @@ -0,0 +1,7 @@ +/** The explicit association between issue types and a workflow in a workflow scheme. */ +export interface WorkflowSchemeAssociation { + /** The issue types assigned to the workflow. */ + issueTypeIds: string[]; + /** The ID of the workflow. */ + workflowId: string; +} diff --git a/src/version2/models/workflowSchemeProjectUsage.ts b/src/version2/models/workflowSchemeProjectUsage.ts new file mode 100644 index 000000000..525818ea3 --- /dev/null +++ b/src/version2/models/workflowSchemeProjectUsage.ts @@ -0,0 +1,8 @@ +import { ProjectUsagePage } from './projectUsagePage'; + +/** Projects using the workflow scheme. */ +export interface WorkflowSchemeProjectUsage { + projects?: ProjectUsagePage; + /** The workflow scheme ID. */ + workflowSchemeId?: string; +} diff --git a/src/version2/models/workflowSchemeReadRequest.ts b/src/version2/models/workflowSchemeReadRequest.ts new file mode 100644 index 000000000..448fe7361 --- /dev/null +++ b/src/version2/models/workflowSchemeReadRequest.ts @@ -0,0 +1,7 @@ +/** The workflow scheme read request body. */ +export interface WorkflowSchemeReadRequest { + /** The list of project IDs to query. */ + projectIds?: string[]; + /** The list of workflow scheme IDs to query. */ + workflowSchemeIds?: string[]; +} diff --git a/src/version2/models/workflowSchemeReadResponse.ts b/src/version2/models/workflowSchemeReadResponse.ts new file mode 100644 index 000000000..55fef6968 --- /dev/null +++ b/src/version2/models/workflowSchemeReadResponse.ts @@ -0,0 +1,27 @@ +import { WorkflowMetadataRestModel } from './workflowMetadataRestModel'; +import { WorkflowScope } from './workflowScope'; +import { DocumentVersion } from './documentVersion'; +import { WorkflowMetadataAndIssueTypeRestModel } from './workflowMetadataAndIssueTypeRestModel'; + +export interface WorkflowSchemeReadResponse { + defaultWorkflow?: WorkflowMetadataRestModel; + /** The description of the workflow scheme. */ + description?: string; + /** The ID of the workflow scheme. */ + id: string; + /** The name of the workflow scheme. */ + name: string; + /** + * Deprecated. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * The IDs of projects using the workflow scheme. + */ + projectIdsUsingScheme?: string[]; + scope: WorkflowScope; + /** Indicates if there's an [asynchronous task](#async-operations) for this workflow scheme. */ + taskId?: string; + version: DocumentVersion; + /** Mappings from workflows to issue types. */ + workflowsForIssueTypes: WorkflowMetadataAndIssueTypeRestModel[]; +} diff --git a/src/version2/models/workflowSchemeUpdateRequest.ts b/src/version2/models/workflowSchemeUpdateRequest.ts new file mode 100644 index 000000000..fc2a9816c --- /dev/null +++ b/src/version2/models/workflowSchemeUpdateRequest.ts @@ -0,0 +1,35 @@ +import { MappingsByIssueTypeOverride } from './mappingsByIssueTypeOverride'; +import { MappingsByWorkflow } from './mappingsByWorkflow'; +import { DocumentVersion } from './documentVersion'; +import { WorkflowSchemeAssociation } from './workflowSchemeAssociation'; + +/** The update workflow scheme payload. */ +export interface WorkflowSchemeUpdateRequest { + /** + * The ID of the workflow for issue types without having a mapping defined in this workflow scheme. Only used in + * global-scoped workflow schemes. If the `defaultWorkflowId` isn't specified, this is set to _Jira Workflow (jira)_. + */ + defaultWorkflowId?: string; + /** The new description for this workflow scheme. */ + description: string; + /** The ID of this workflow scheme. */ + id: string; + /** The new name for this workflow scheme. */ + name: string; + /** + * Overrides, for the selected issue types, any status mappings provided in `statusMappingsByWorkflows`. Status + * mappings are required when the new workflow for an issue type doesn't contain all statuses that the old workflow + * has. Status mappings can be provided by a combination of `statusMappingsByWorkflows` and + * `statusMappingsByIssueTypeOverride`. + */ + statusMappingsByIssueTypeOverride?: MappingsByIssueTypeOverride[]; + /** + * The status mappings by workflows. Status mappings are required when the new workflow for an issue type doesn't + * contain all statuses that the old workflow has. Status mappings can be provided by a combination of + * `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ + statusMappingsByWorkflows?: MappingsByWorkflow[]; + version: DocumentVersion; + /** Mappings from workflows to issue types. */ + workflowsForIssueTypes?: WorkflowSchemeAssociation[]; +} diff --git a/src/version2/models/workflowSchemeUpdateRequiredMappingsRequest.ts b/src/version2/models/workflowSchemeUpdateRequiredMappingsRequest.ts new file mode 100644 index 000000000..ccde824ef --- /dev/null +++ b/src/version2/models/workflowSchemeUpdateRequiredMappingsRequest.ts @@ -0,0 +1,14 @@ +import { WorkflowSchemeAssociation } from './workflowSchemeAssociation'; + +/** The request payload to get the required mappings for updating a workflow scheme. */ +export interface WorkflowSchemeUpdateRequiredMappingsRequest { + /** + * The ID of the new default workflow for this workflow scheme. Only used in global-scoped workflow schemes. If it + * isn't specified, is set to _Jira Workflow (jira)_. + */ + defaultWorkflowId?: string; + /** The ID of the workflow scheme. */ + id: string; + /** The new workflow to issue type mappings for this workflow scheme. */ + workflowsForIssueTypes: WorkflowSchemeAssociation[]; +} diff --git a/src/version2/models/workflowSchemeUpdateRequiredMappingsResponse.ts b/src/version2/models/workflowSchemeUpdateRequiredMappingsResponse.ts new file mode 100644 index 000000000..c0ca2ff56 --- /dev/null +++ b/src/version2/models/workflowSchemeUpdateRequiredMappingsResponse.ts @@ -0,0 +1,15 @@ +import { RequiredMappingByIssueType } from './requiredMappingByIssueType'; +import { RequiredMappingByWorkflows } from './requiredMappingByWorkflows'; +import { StatusMetadata } from './statusMetadata'; +import { StatusesPerWorkflow } from './statusesPerWorkflow'; + +export interface WorkflowSchemeUpdateRequiredMappingsResponse { + /** The list of required status mappings by issue type. */ + statusMappingsByIssueTypes?: RequiredMappingByIssueType[]; + /** The list of required status mappings by workflow. */ + statusMappingsByWorkflows?: RequiredMappingByWorkflows[]; + /** The details of the statuses in the associated workflows. */ + statuses?: StatusMetadata[]; + /** The statuses associated with each workflow. */ + statusesPerWorkflow?: StatusesPerWorkflow[]; +} diff --git a/src/version2/models/workflowSchemeUsage.ts b/src/version2/models/workflowSchemeUsage.ts new file mode 100644 index 000000000..a6b0fe953 --- /dev/null +++ b/src/version2/models/workflowSchemeUsage.ts @@ -0,0 +1,5 @@ +/** The worflow scheme. */ +export interface WorkflowSchemeUsage { + /** The workflow scheme ID. */ + id?: string; +} diff --git a/src/version2/models/workflowSchemeUsageDTO.ts b/src/version2/models/workflowSchemeUsageDTO.ts new file mode 100644 index 000000000..9d660e5b6 --- /dev/null +++ b/src/version2/models/workflowSchemeUsageDTO.ts @@ -0,0 +1,8 @@ +import { WorkflowSchemeUsagePage } from './workflowSchemeUsagePage'; + +/** Workflow schemes using the workflow. */ +export interface WorkflowSchemeUsageDTO { + /** The workflow ID. */ + workflowId?: string; + workflowSchemes?: WorkflowSchemeUsagePage; +} diff --git a/src/version2/models/workflowSchemeUsagePage.ts b/src/version2/models/workflowSchemeUsagePage.ts new file mode 100644 index 000000000..5b883978f --- /dev/null +++ b/src/version2/models/workflowSchemeUsagePage.ts @@ -0,0 +1,9 @@ +import { WorkflowSchemeUsage } from './workflowSchemeUsage'; + +/** A page of workflow schemes. */ +export interface WorkflowSchemeUsagePage { + /** Token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of workflow schemes. */ + values?: WorkflowSchemeUsage[]; +} diff --git a/src/version2/models/workflowSearchResponse.ts b/src/version2/models/workflowSearchResponse.ts new file mode 100644 index 000000000..966016a32 --- /dev/null +++ b/src/version2/models/workflowSearchResponse.ts @@ -0,0 +1,22 @@ +import { JiraWorkflowStatus } from './jiraWorkflowStatus'; +import { JiraWorkflow } from './jiraWorkflow'; + +/** Page of items, including workflows and related statuses. */ +export interface WorkflowSearchResponse { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** List of statuses. */ + statuses?: JiraWorkflowStatus[]; + /** The number of items returned. */ + total?: number; + /** List of workflows. */ + values?: JiraWorkflow[]; +} diff --git a/src/version2/models/workflowSimpleCondition.ts b/src/version2/models/workflowSimpleCondition.ts new file mode 100644 index 000000000..1a36a97ca --- /dev/null +++ b/src/version2/models/workflowSimpleCondition.ts @@ -0,0 +1,8 @@ +/** A workflow transition rule condition. This object returns `nodeType` as `simple`. */ +export interface WorkflowSimpleCondition { + /** EXPERIMENTAL. The configuration of the transition rule. */ + configuration?: {}; + nodeType: string; + /** The type of the transition rule. */ + type: string; +} diff --git a/src/version2/models/workflowTransitionLinks.ts b/src/version2/models/workflowTransitionLinks.ts new file mode 100644 index 000000000..a6cb549db --- /dev/null +++ b/src/version2/models/workflowTransitionLinks.ts @@ -0,0 +1,9 @@ +/** The statuses the transition can start from, and the mapping of ports between the statuses. */ +export interface WorkflowTransitionLinks { + /** The port that the transition starts from. */ + fromPort?: number; + /** The status that the transition starts from. */ + fromStatusReference?: string; + /** The port that the transition goes to. */ + toPort?: number; +} diff --git a/src/version2/models/workflowUpdateResponse.ts b/src/version2/models/workflowUpdateResponse.ts index 57e60d99d..cc83d6338 100644 --- a/src/version2/models/workflowUpdateResponse.ts +++ b/src/version2/models/workflowUpdateResponse.ts @@ -1,6 +1,12 @@ import { JiraWorkflow } from './jiraWorkflow'; import { JiraWorkflowStatus } from './jiraWorkflowStatus'; +/** + * Represents the response after updating a workflow. + * + * @deprecated This interface is deprecated and will be removed in a future version. Use {@link WorkflowUpdate} instead, + * which is the preferred way to handle workflow updates. + */ export interface WorkflowUpdateResponse { /** List of updated statuses. */ statuses?: JiraWorkflowStatus[]; diff --git a/src/version2/models/workflowUpdateValidateRequest.ts b/src/version2/models/workflowUpdateValidateRequest.ts new file mode 100644 index 000000000..8fcd81fea --- /dev/null +++ b/src/version2/models/workflowUpdateValidateRequest.ts @@ -0,0 +1,7 @@ +import { WorkflowUpdateRequest } from './workflowUpdateRequest'; +import { ValidationOptionsForUpdate } from './validationOptionsForUpdate'; + +export interface WorkflowUpdateValidateRequest { + payload: WorkflowUpdateRequest; + validationOptions?: ValidationOptionsForUpdate; +} diff --git a/src/version2/models/workflowUsages.ts b/src/version2/models/workflowUsages.ts new file mode 100644 index 000000000..1bc87e808 --- /dev/null +++ b/src/version2/models/workflowUsages.ts @@ -0,0 +1,12 @@ +/** + * Deprecated. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) + * for details.* + * + * The workflows that use this status. Only available if the `workflowUsages` expand is requested. + */ +export interface WorkflowUsages { + /** Workflow ID. */ + workflowId?: string; + /** Workflow name. */ + workflowName?: string; +} diff --git a/src/version2/models/worklogsMoveRequest.ts b/src/version2/models/worklogsMoveRequest.ts new file mode 100644 index 000000000..212d9419a --- /dev/null +++ b/src/version2/models/worklogsMoveRequest.ts @@ -0,0 +1,6 @@ +export interface WorklogsMoveRequest { + /** A list of worklog IDs. */ + ids?: number[]; + /** The issue id or key of the destination issue */ + issueIdOrKey?: string; +} diff --git a/src/version2/models/workspaceDataPolicy.ts b/src/version2/models/workspaceDataPolicy.ts new file mode 100644 index 000000000..cc0f7bceb --- /dev/null +++ b/src/version2/models/workspaceDataPolicy.ts @@ -0,0 +1,5 @@ +/** Details about data policy. */ +export interface WorkspaceDataPolicy { + /** Whether the workspace contains any content inaccessible to the requesting application. */ + anyContentBlocked?: boolean; +} diff --git a/src/version2/myself.ts b/src/version2/myself.ts index 47e97ed7d..be975fd2e 100644 --- a/src/version2/myself.ts +++ b/src/version2/myself.ts @@ -17,6 +17,14 @@ export class Myself { * - _jira.user.timezone_ The time zone of the user. By default this is not set and the user takes the timezone of the * instance. * + * These system preferences keys will be deprecated by 15/07/2024. You can still retrieve these keys, but it will not + * have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * Use [ Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) * from the user management REST API to manage timezone and locale instead. @@ -35,6 +43,14 @@ export class Myself { * - _jira.user.timezone_ The time zone of the user. By default this is not set and the user takes the timezone of the * instance. * + * These system preferences keys will be deprecated by 15/07/2024. You can still retrieve these keys, but it will not + * have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * Use [ Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) * from the user management REST API to manage timezone and locale instead. @@ -61,18 +77,26 @@ export class Myself { * following keys define system preferences that can be set or created: * * - _user.notifications.mimetype_ The mime type used in notifications sent to the user. Defaults to `html`. - * - _user.notify.own.changes_ Whether the user gets notified of their own changes. Defaults to `false`. * - _user.default.share.private_ Whether new [ filters](https://confluence.atlassian.com/x/eQiiLQ) are set to private. * Defaults to `true`. * - _user.keyboard.shortcuts.disabled_ Whether keyboard shortcuts are disabled. Defaults to `false`. * - _user.autowatch.disabled_ Whether the user automatically watches issues they create or add a comment to. By * default, not set: the user takes the instance autowatch setting. + * - _user.notifiy.own.changes_ Whether the user gets notified of their own changes. * * Note that these keys are deprecated: * * - _jira.user.locale_ The locale of the user. By default, not set. The user takes the instance locale. * - _jira.user.timezone_ The time zone of the user. By default, not set. The user takes the instance timezone. * + * These system preferences keys will be deprecated by 15/07/2024. You can still use these keys to create arbitrary + * preferences, but it will not have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * Use [ Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) * from the user management REST API to manage timezone and locale instead. @@ -87,18 +111,26 @@ export class Myself { * following keys define system preferences that can be set or created: * * - _user.notifications.mimetype_ The mime type used in notifications sent to the user. Defaults to `html`. - * - _user.notify.own.changes_ Whether the user gets notified of their own changes. Defaults to `false`. * - _user.default.share.private_ Whether new [ filters](https://confluence.atlassian.com/x/eQiiLQ) are set to private. * Defaults to `true`. * - _user.keyboard.shortcuts.disabled_ Whether keyboard shortcuts are disabled. Defaults to `false`. * - _user.autowatch.disabled_ Whether the user automatically watches issues they create or add a comment to. By * default, not set: the user takes the instance autowatch setting. + * - _user.notifiy.own.changes_ Whether the user gets notified of their own changes. * * Note that these keys are deprecated: * * - _jira.user.locale_ The locale of the user. By default, not set. The user takes the instance locale. * - _jira.user.timezone_ The time zone of the user. By default, not set. The user takes the instance timezone. * + * These system preferences keys will be deprecated by 15/07/2024. You can still use these keys to create arbitrary + * preferences, but it will not have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * Use [ Update a user * profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) * from the user management REST API to manage timezone and locale instead. diff --git a/src/version2/parameters/addAtlassianTeam.ts b/src/version2/parameters/addAtlassianTeam.ts new file mode 100644 index 000000000..6563e6255 --- /dev/null +++ b/src/version2/parameters/addAtlassianTeam.ts @@ -0,0 +1,6 @@ +import { AddAtlassianTeamRequest } from '../models'; + +export interface AddAtlassianTeam extends AddAtlassianTeamRequest { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/addNotifications.ts b/src/version2/parameters/addNotifications.ts new file mode 100644 index 000000000..2678cd06c --- /dev/null +++ b/src/version2/parameters/addNotifications.ts @@ -0,0 +1,6 @@ +import { AddNotificationsDetails } from '../models'; + +export interface AddNotifications extends AddNotificationsDetails { + /** The ID of the notification scheme. */ + id: string; +} diff --git a/src/version2/parameters/archivePlan.ts b/src/version2/parameters/archivePlan.ts new file mode 100644 index 000000000..250cc9759 --- /dev/null +++ b/src/version2/parameters/archivePlan.ts @@ -0,0 +1,4 @@ +export interface ArchivePlan { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/bulkDeleteWorklogs.ts b/src/version2/parameters/bulkDeleteWorklogs.ts new file mode 100644 index 000000000..65e9d6883 --- /dev/null +++ b/src/version2/parameters/bulkDeleteWorklogs.ts @@ -0,0 +1,19 @@ +import { WorklogIdsRequest } from '../models'; + +export interface BulkDeleteWorklogs extends WorklogIdsRequest { + /** The ID or key of the issue. */ + issueIdOrKey: string; + /** + * Defines how to update the issue's time estimate, the options are: + * + * `leave` Leaves the estimate unchanged. `auto` Reduces the estimate by the aggregate value of `timeSpent` across all + * worklogs being deleted. + */ + adjustEstimate?: 'leave' | 'auto' | string; + /** + * Whether the work log entries should be removed to the issue even if the issue is not editable, because + * jira.issue.editable set to false or missing. For example, the issue is closed. Connect and Forge app users with + * admin permission can use this flag. + */ + overrideEditableFlag?: boolean; +} diff --git a/src/version2/parameters/bulkFetchIssues.ts b/src/version2/parameters/bulkFetchIssues.ts new file mode 100644 index 000000000..776528ddf --- /dev/null +++ b/src/version2/parameters/bulkFetchIssues.ts @@ -0,0 +1,66 @@ +export interface BulkFetchIssues { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, + * `expand` is defined as a list of values. The expand options are: + * + * - `renderedFields` Returns field values rendered in HTML format. + * - `names` Returns the display name of each field. + * - `schema` Returns the schema describing a field type. + * - `transitions` Returns all possible transitions for the issue. + * - `operations` Returns all possible operations for the issue. + * - `editmeta` Returns information about how each field can be edited. + * - `changelog` Returns a list of recent updates to an issue, sorted by date, starting from the most recent. + * - `versionedRepresentations` Instead of `fields`, returns `versionedRepresentations` a JSON array containing each + * version of a field's value, with the highest numbered item representing the most recent version. + */ + expand?: + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | string + | ( + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | string + )[]; + /** + * A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a + * comma-separated list. Expand options include: + * + * `*all` Returns all fields. `*navigable` Returns navigable fields. Any issue field, prefixed with a minus to + * exclude. + * + * The default is `*navigable`. + * + * Examples: + * + * `summary,comment` Returns the summary and comments fields only. `-description` Returns all navigable (default) + * fields except description. `*all,-comment` Returns all fields except comments. + * + * Multiple `fields` parameters can be included in a request. + * + * Note: All navigable fields are returned by default. This differs from [GET issue](#api-rest-api-2-issue-issueIdOrKey-get) where the default is all fields. + */ + fields?: string[]; + /** Reference fields by their key (rather than ID). The default is `false`. */ + fieldsByKeys?: boolean; + /** An array of issue IDs or issue keys to fetch. You can mix issue IDs and keys in the same query. */ + issueIdsOrKeys: string[]; + /** + * A list of issue property keys of issue properties to be included in the results. A maximum of 5 issue property keys + * can be specified. + */ + properties?: string[]; +} diff --git a/src/version2/parameters/bulkMoveWorklogs.ts b/src/version2/parameters/bulkMoveWorklogs.ts new file mode 100644 index 000000000..6e87b7d39 --- /dev/null +++ b/src/version2/parameters/bulkMoveWorklogs.ts @@ -0,0 +1,20 @@ +import { WorklogsMoveRequest } from '../models'; + +export interface BulkMoveWorklogs { + issueIdOrKey: string; + /** + * Defines how to update the issues' time estimate, the options are: + * + * - `leave` Leaves the estimate unchanged. + * - `auto` Reduces the estimate by the aggregate value of `timeSpent` across all worklogs being moved in the source + * issue, and increases it in the destination issue. + */ + adjustEstimate?: 'leave' | 'auto' | string; + /** + * Whether the work log entry should be moved to and from the issues even if the issues are not editable, because + * jira.issue.editable set to false or missing. For example, the issue is closed. Connect and Forge app users with + * admin permission can use this flag. + */ + overrideEditableFlag?: boolean; + worklogs: WorklogsMoveRequest; +} diff --git a/src/version2/parameters/bulkSetIssuesPropertiesList.ts b/src/version2/parameters/bulkSetIssuesPropertiesList.ts new file mode 100644 index 000000000..aa5aeba72 --- /dev/null +++ b/src/version2/parameters/bulkSetIssuesPropertiesList.ts @@ -0,0 +1,3 @@ +import { IssueEntityProperties } from '../models'; + +export interface BulkSetIssuesPropertiesList extends IssueEntityProperties {} diff --git a/src/version2/parameters/copyDashboard.ts b/src/version2/parameters/copyDashboard.ts index 1e157d012..905415da2 100644 --- a/src/version2/parameters/copyDashboard.ts +++ b/src/version2/parameters/copyDashboard.ts @@ -2,4 +2,9 @@ import { DashboardDetails } from '../models'; export interface CopyDashboard extends DashboardDetails { id: string; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version2/parameters/countIssues.ts b/src/version2/parameters/countIssues.ts new file mode 100644 index 000000000..527120f2a --- /dev/null +++ b/src/version2/parameters/countIssues.ts @@ -0,0 +1,3 @@ +import { JQLCountRequest } from '../models'; + +export interface CountIssues extends JQLCountRequest {} diff --git a/src/version2/parameters/createDashboard.ts b/src/version2/parameters/createDashboard.ts index eb78135c4..372243bba 100644 --- a/src/version2/parameters/createDashboard.ts +++ b/src/version2/parameters/createDashboard.ts @@ -3,4 +3,9 @@ import { DashboardDetails, SharePermission } from '../models'; export interface CreateDashboard extends Omit { /** The edit permissions for the dashboard. */ editPermissions?: SharePermission[]; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version2/parameters/createPlan.ts b/src/version2/parameters/createPlan.ts new file mode 100644 index 000000000..bd032ad93 --- /dev/null +++ b/src/version2/parameters/createPlan.ts @@ -0,0 +1,6 @@ +import { CreatePlanRequest } from '../models'; + +export interface CreatePlan extends CreatePlanRequest { + /** Whether to accept group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; +} diff --git a/src/version2/parameters/createPlanOnlyTeam.ts b/src/version2/parameters/createPlanOnlyTeam.ts new file mode 100644 index 000000000..29915aabc --- /dev/null +++ b/src/version2/parameters/createPlanOnlyTeam.ts @@ -0,0 +1,6 @@ +import { CreatePlanOnlyTeamRequest } from '../models'; + +export interface CreatePlanOnlyTeam extends CreatePlanOnlyTeamRequest { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/createPriorityScheme.ts b/src/version2/parameters/createPriorityScheme.ts new file mode 100644 index 000000000..0b4d135d0 --- /dev/null +++ b/src/version2/parameters/createPriorityScheme.ts @@ -0,0 +1,3 @@ +import { CreatePrioritySchemeDetails } from '../models'; + +export interface CreatePriorityScheme extends CreatePrioritySchemeDetails {} diff --git a/src/version2/parameters/createRelatedWork.ts b/src/version2/parameters/createRelatedWork.ts new file mode 100644 index 000000000..e3c061674 --- /dev/null +++ b/src/version2/parameters/createRelatedWork.ts @@ -0,0 +1,5 @@ +import { VersionRelatedWork } from '../models'; + +export interface CreateRelatedWork extends VersionRelatedWork { + id: string; +} diff --git a/src/version2/parameters/deleteComment.ts b/src/version2/parameters/deleteComment.ts index a06ad01e8..5050950ed 100644 --- a/src/version2/parameters/deleteComment.ts +++ b/src/version2/parameters/deleteComment.ts @@ -3,4 +3,5 @@ export interface DeleteComment { issueIdOrKey: string; /** The ID of the comment. */ id: string; + parentId?: string; } diff --git a/src/version2/parameters/deleteForgeAppProperty.ts b/src/version2/parameters/deleteForgeAppProperty.ts new file mode 100644 index 000000000..62c8e6f4f --- /dev/null +++ b/src/version2/parameters/deleteForgeAppProperty.ts @@ -0,0 +1,4 @@ +export interface DeleteForgeAppProperty { + /** The key of the property. */ + propertyKey: string; +} diff --git a/src/version2/parameters/deletePlanOnlyTeam.ts b/src/version2/parameters/deletePlanOnlyTeam.ts new file mode 100644 index 000000000..d87ea6bd4 --- /dev/null +++ b/src/version2/parameters/deletePlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface DeletePlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version2/parameters/deletePriority.ts b/src/version2/parameters/deletePriority.ts new file mode 100644 index 000000000..224cd5fc3 --- /dev/null +++ b/src/version2/parameters/deletePriority.ts @@ -0,0 +1,4 @@ +export interface DeletePriority { + /** The ID of the issue priority. */ + id: string; +} diff --git a/src/version2/parameters/deletePriorityScheme.ts b/src/version2/parameters/deletePriorityScheme.ts new file mode 100644 index 000000000..3ac3ff970 --- /dev/null +++ b/src/version2/parameters/deletePriorityScheme.ts @@ -0,0 +1,4 @@ +export interface DeletePriorityScheme { + /** The priority scheme ID. */ + schemeId: number; +} diff --git a/src/version2/parameters/deleteRelatedWork.ts b/src/version2/parameters/deleteRelatedWork.ts new file mode 100644 index 000000000..2980e8f2e --- /dev/null +++ b/src/version2/parameters/deleteRelatedWork.ts @@ -0,0 +1,6 @@ +export interface DeleteRelatedWork { + /** The ID of the version that the target related work belongs to. */ + versionId: string; + /** The ID of the related work to delete. */ + relatedWorkId: string; +} diff --git a/src/version2/parameters/deleteVersion.ts b/src/version2/parameters/deleteVersion.ts new file mode 100644 index 000000000..823015b79 --- /dev/null +++ b/src/version2/parameters/deleteVersion.ts @@ -0,0 +1,14 @@ +export interface DeleteVersion { + /** The ID of the version. */ + id: string; + /** + * The ID of the version to update `fixVersion` to when the field contains the deleted version. The replacement + * version must be in the same project as the version being deleted and cannot be the version being deleted. + */ + moveFixIssuesTo?: string; + /** + * The ID of the version to update `affectedVersion` to when the field contains the deleted version. The replacement + * version must be in the same project as the version being deleted and cannot be the version being deleted. + */ + moveAffectedIssuesTo?: string; +} diff --git a/src/version2/parameters/duplicatePlan.ts b/src/version2/parameters/duplicatePlan.ts new file mode 100644 index 000000000..10a25d70f --- /dev/null +++ b/src/version2/parameters/duplicatePlan.ts @@ -0,0 +1,6 @@ +import { DuplicatePlanRequest } from '../models'; + +export interface DuplicatePlan extends DuplicatePlanRequest { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/editIssue.ts b/src/version2/parameters/editIssue.ts index 1be9cc59a..f5ad5596d 100644 --- a/src/version2/parameters/editIssue.ts +++ b/src/version2/parameters/editIssue.ts @@ -23,7 +23,7 @@ export interface EditIssue extends IssueUpdateDetails { overrideEditableFlag?: boolean; /** * Whether the response should contain the issue with fields edited in this request. The returned issue will have the - * same format as in the [Get issue API](#api-rest-api-3-issue-issueidorkey-get). + * same format as in the [Get issue API](#api-rest-api-2-issue-issueidorkey-get). */ returnIssue?: boolean; /** The Get issue API expand parameter to use in the response if the `returnIssue` parameter is `true`. */ diff --git a/src/version2/parameters/findAssignableUsers.ts b/src/version2/parameters/findAssignableUsers.ts index 54f9e3a09..78bb7397f 100644 --- a/src/version2/parameters/findAssignableUsers.ts +++ b/src/version2/parameters/findAssignableUsers.ts @@ -20,6 +20,8 @@ export interface FindAssignableUsers { project?: string; /** The key of the issue. Required, unless `project` is specified. */ issueKey?: string; + /** The ID of the issue. Required, unless `issueKey` or `project` is specified. */ + issueId?: string; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; /** diff --git a/src/version2/parameters/findComponentsForProjects.ts b/src/version2/parameters/findComponentsForProjects.ts new file mode 100644 index 000000000..018417db8 --- /dev/null +++ b/src/version2/parameters/findComponentsForProjects.ts @@ -0,0 +1,19 @@ +export interface FindComponentsForProjects { + /** The project IDs and/or project keys (case sensitive). */ + projectIdsOrKeys?: string[]; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * + * `description` Sorts by the component description. `name` Sorts by component name. + */ + orderBy?: 'description' | '-description' | '+description' | 'name' | '-name' | '+name' | string; + /** + * Filter the results using a literal string. Components with a matching `name` or `description` are returned (case + * insensitive). + */ + query?: string; +} diff --git a/src/version2/parameters/findUserKeysByQuery.ts b/src/version2/parameters/findUserKeysByQuery.ts index 14b12d1fd..b6c92aef8 100644 --- a/src/version2/parameters/findUserKeysByQuery.ts +++ b/src/version2/parameters/findUserKeysByQuery.ts @@ -3,6 +3,12 @@ export interface FindUserKeysByQuery { query: string; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; - /** The maximum number of items to return per page. */ + /** + * The maximum number of items to return per page. + * + * @deprecated Use `maxResult` instead. + */ maxResults?: number; + /** The maximum number of items to return per page. */ + maxResult?: number; } diff --git a/src/version2/parameters/getAllProjects.ts b/src/version2/parameters/getAllProjects.ts new file mode 100644 index 000000000..fab813e80 --- /dev/null +++ b/src/version2/parameters/getAllProjects.ts @@ -0,0 +1,18 @@ +export interface GetAllProjects { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expanded options include: + * + * `description` Returns the project description. `issueTypes` Returns all issue types associated with the project. + * `lead` Returns information about the project lead. `projectKeys` Returns all project keys associated with the + * project. + */ + expand?: string; + /** + * Returns the user's most recently accessed projects. You may specify the number of results to return up to a maximum + * of 20. If access is anonymous, then the recently accessed projects are based on the current HTTP session. + */ + recent?: number; + /** A list of project properties to return for the project. This parameter accepts a comma-separated list. */ + properties?: string[]; +} diff --git a/src/version2/parameters/getAllUserDataClassificationLevels.ts b/src/version2/parameters/getAllUserDataClassificationLevels.ts new file mode 100644 index 000000000..eb477fbdd --- /dev/null +++ b/src/version2/parameters/getAllUserDataClassificationLevels.ts @@ -0,0 +1,6 @@ +export interface GetAllUserDataClassificationLevels { + /** Optional set of statuses to filter by. */ + status?: ('PUBLISHED' | 'ARCHIVED' | 'DRAFT' | string)[]; + /** Ordering of the results by a given field. If not provided, values will not be sorted. */ + orderBy?: 'rank' | '-rank' | '+rank' | string; +} diff --git a/src/version2/parameters/getAllWorkflows.ts b/src/version2/parameters/getAllWorkflows.ts new file mode 100644 index 000000000..17dd63023 --- /dev/null +++ b/src/version2/parameters/getAllWorkflows.ts @@ -0,0 +1,4 @@ +export interface GetAllWorkflows { + /** The name of the workflow to be returned. Only one workflow can be specified. */ + workflowName?: string; +} diff --git a/src/version2/parameters/getApproximateApplicationLicenseCount.ts b/src/version2/parameters/getApproximateApplicationLicenseCount.ts new file mode 100644 index 000000000..0730b432a --- /dev/null +++ b/src/version2/parameters/getApproximateApplicationLicenseCount.ts @@ -0,0 +1,4 @@ +export interface GetApproximateApplicationLicenseCount { + /** The ID of the application, represents a specific version of Jira. */ + applicationKey: 'jira-core' | 'jira-product-discovery' | 'jira-software' | 'jira-servicedesk' | string; +} diff --git a/src/version2/parameters/getAtlassianTeam.ts b/src/version2/parameters/getAtlassianTeam.ts new file mode 100644 index 000000000..b3bc42a2b --- /dev/null +++ b/src/version2/parameters/getAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface GetAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version2/parameters/getAvailablePrioritiesByPriorityScheme.ts b/src/version2/parameters/getAvailablePrioritiesByPriorityScheme.ts new file mode 100644 index 000000000..da7ba318f --- /dev/null +++ b/src/version2/parameters/getAvailablePrioritiesByPriorityScheme.ts @@ -0,0 +1,12 @@ +export interface GetAvailablePrioritiesByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The string to query priorities on by name. */ + query?: string; + /** The priority scheme ID. */ + schemeId: string; + /** A list of priority IDs to exclude from the results. */ + exclude?: string[]; +} diff --git a/src/version2/parameters/getAvailableTransitions.ts b/src/version2/parameters/getAvailableTransitions.ts new file mode 100644 index 000000000..77684c788 --- /dev/null +++ b/src/version2/parameters/getAvailableTransitions.ts @@ -0,0 +1,8 @@ +export interface GetAvailableTransitions { + /** Ids or keys of the issues to get transitions available for them. */ + issueIdsOrKeys: (number | string)[]; + /** The end cursor for use in pagination. */ + endingBefore?: string; + /** The start cursor for use in pagination. */ + startingAfter?: string; +} diff --git a/src/version2/parameters/getBulkChangelogs.ts b/src/version2/parameters/getBulkChangelogs.ts new file mode 100644 index 000000000..fefc8eb77 --- /dev/null +++ b/src/version2/parameters/getBulkChangelogs.ts @@ -0,0 +1,3 @@ +import { BulkChangelogRequest } from '../models'; + +export interface GetBulkChangelogs extends BulkChangelogRequest {} diff --git a/src/version2/parameters/getBulkEditableFields.ts b/src/version2/parameters/getBulkEditableFields.ts new file mode 100644 index 000000000..148a44d41 --- /dev/null +++ b/src/version2/parameters/getBulkEditableFields.ts @@ -0,0 +1,10 @@ +export interface GetBulkEditableFields { + /** The IDs or keys of the issues to get editable fields from. */ + issueIdsOrKeys: number | string; + /** (Optional)The text to search for in the editable fields. */ + searchText?: string; + /** (Optional)The end cursor for use in pagination. */ + endingBefore?: string; + /** (Optional)The start cursor for use in pagination. */ + startingAfter?: string; +} diff --git a/src/version2/parameters/getBulkOperationProgress.ts b/src/version2/parameters/getBulkOperationProgress.ts new file mode 100644 index 000000000..976c68799 --- /dev/null +++ b/src/version2/parameters/getBulkOperationProgress.ts @@ -0,0 +1,4 @@ +export interface GetBulkOperationProgress { + /** The ID of the task. */ + taskId: string; +} diff --git a/src/version2/parameters/getBulkScreenTabs.ts b/src/version2/parameters/getBulkScreenTabs.ts new file mode 100644 index 000000000..6f8227f85 --- /dev/null +++ b/src/version2/parameters/getBulkScreenTabs.ts @@ -0,0 +1,16 @@ +export interface GetBulkScreenTabs { + /** + * The list of screen IDs. To include multiple screen IDs, provide an ampersand-separated list. For example, + * `screenId=10000&screenId=10001`. + */ + screenId?: number[]; + /** + * The list of tab IDs. To include multiple tab IDs, provide an ampersand-separated list. For example, + * `tabId=10000&tabId=10001`. + */ + tabId?: number[]; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. The maximum number is 100, */ + maxResult?: number; +} diff --git a/src/version2/parameters/getContextsForFieldDeprecated.ts b/src/version2/parameters/getContextsForFieldDeprecated.ts new file mode 100644 index 000000000..dd7bb2e45 --- /dev/null +++ b/src/version2/parameters/getContextsForFieldDeprecated.ts @@ -0,0 +1,8 @@ +export interface GetContextsForFieldDeprecated { + /** The ID of the field to return contexts for. */ + fieldId: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getCreateIssueMetaIssueTypeId.ts b/src/version2/parameters/getCreateIssueMetaIssueTypeId.ts new file mode 100644 index 000000000..6195fc1f4 --- /dev/null +++ b/src/version2/parameters/getCreateIssueMetaIssueTypeId.ts @@ -0,0 +1,10 @@ +export interface GetCreateIssueMetaIssueTypeId { + /** The ID or key of the project. */ + projectIdOrKey: string; + /** The issuetype ID. */ + issueTypeId: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getCreateIssueMetaIssueTypes.ts b/src/version2/parameters/getCreateIssueMetaIssueTypes.ts new file mode 100644 index 000000000..dc20e141b --- /dev/null +++ b/src/version2/parameters/getCreateIssueMetaIssueTypes.ts @@ -0,0 +1,8 @@ +export interface GetCreateIssueMetaIssueTypes { + /** The ID or key of the project. */ + projectIdOrKey: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getCustomFieldsConfigurations.ts b/src/version2/parameters/getCustomFieldsConfigurations.ts new file mode 100644 index 000000000..7039e4b8b --- /dev/null +++ b/src/version2/parameters/getCustomFieldsConfigurations.ts @@ -0,0 +1,34 @@ +import { ConfigurationsListParameters } from '../models'; + +export interface GetCustomFieldsConfigurations extends ConfigurationsListParameters { + /** + * The list of configuration IDs. To include multiple configurations, separate IDs with an ampersand: + * `id=10000&id=10001`. Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`. + */ + id?: number[]; + /** + * The list of field context IDs. To include multiple field contexts, separate IDs with an ampersand: + * `fieldContextId=10000&fieldContextId=10001`. Can't be provided with `id`, `issueId`, `projectKeyOrId`, or + * `issueTypeId`. + */ + fieldContextId?: number[]; + /** + * The ID of the issue to filter results by. If the issue doesn't exist, an empty list is returned. Can't be provided + * with `projectKeyOrId`, or `issueTypeId`. + */ + issueId?: number; + /** + * The ID or key of the project to filter results by. Must be provided with `issueTypeId`. Can't be provided with + * `issueId`. + */ + projectKeyOrId?: string; + /** + * The ID of the issue type to filter results by. Must be provided with `projectKeyOrId`. Can't be provided with + * `issueId`. + */ + issueTypeId?: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getDefaultProjectClassification.ts b/src/version2/parameters/getDefaultProjectClassification.ts new file mode 100644 index 000000000..cf8683da7 --- /dev/null +++ b/src/version2/parameters/getDefaultProjectClassification.ts @@ -0,0 +1,4 @@ +export interface GetDefaultProjectClassification { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version2/parameters/getFiltersPaginated.ts b/src/version2/parameters/getFiltersPaginated.ts index 8dbaac430..ea3bf9520 100644 --- a/src/version2/parameters/getFiltersPaginated.ts +++ b/src/version2/parameters/getFiltersPaginated.ts @@ -112,4 +112,10 @@ export interface GetFiltersPaginated { * Available to users with _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ overrideSharePermissions?: boolean; + /** + * When `true` this will perform a case-insensitive substring match for the provided `filterName`. When `false` the + * filter name will be searched using [full text search + * syntax](https://support.atlassian.com/jira-software-cloud/docs/search-for-issues-using-the-text-field/). + */ + isSubstringMatch?: boolean; } diff --git a/src/version2/parameters/getGroup.ts b/src/version2/parameters/getGroup.ts new file mode 100644 index 000000000..e34e5efad --- /dev/null +++ b/src/version2/parameters/getGroup.ts @@ -0,0 +1,11 @@ +export interface GetGroup { + /** + * As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This + * parameter cannot be used with the `groupId` parameter. + */ + groupname?: string; + /** The ID of the group. This parameter cannot be used with the `groupName` parameter. */ + groupId?: string; + /** List of fields to expand. */ + expand?: string; +} diff --git a/src/version2/parameters/getIssue.ts b/src/version2/parameters/getIssue.ts index 683b42939..5fb680239 100644 --- a/src/version2/parameters/getIssue.ts +++ b/src/version2/parameters/getIssue.ts @@ -67,4 +67,10 @@ export interface GetIssue { * field. */ updateHistory?: boolean; + /** + * Whether to fail the request quickly in case of an error while loading fields for an issue. For `failFast=true`, if + * one field fails, the entire operation fails. For `failFast=false`, the operation will continue even if a field + * fails. It will return a valid response, but without values for the failed field(s). + */ + failFast?: boolean; } diff --git a/src/version2/parameters/getIssueLimitReport.ts b/src/version2/parameters/getIssueLimitReport.ts new file mode 100644 index 000000000..288f038e9 --- /dev/null +++ b/src/version2/parameters/getIssueLimitReport.ts @@ -0,0 +1,10 @@ +import { IssueLimitReportRequest } from '../models'; + +export interface GetIssueLimitReport extends IssueLimitReportRequest { + /** + * Return issue keys instead of issue ids in the response. + * + * Usage: Add `?isReturningKeys=true` to the end of the path to request issue keys. + */ + isReturningKeys?: boolean; +} diff --git a/src/version2/parameters/getNotificationSchemeToProjectMappings.ts b/src/version2/parameters/getNotificationSchemeToProjectMappings.ts index 34cfec0e7..bfb504e6e 100644 --- a/src/version2/parameters/getNotificationSchemeToProjectMappings.ts +++ b/src/version2/parameters/getNotificationSchemeToProjectMappings.ts @@ -1,8 +1,8 @@ export interface GetNotificationSchemeToProjectMappings { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of notifications scheme IDs to be filtered out */ notificationSchemeId?: string[]; /** The list of project IDs to be filtered out */ diff --git a/src/version2/parameters/getPlan.ts b/src/version2/parameters/getPlan.ts new file mode 100644 index 000000000..9ed1b0df1 --- /dev/null +++ b/src/version2/parameters/getPlan.ts @@ -0,0 +1,6 @@ +export interface GetPlan { + /** The ID of the plan. */ + planId: number; + /** Whether to return group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; +} diff --git a/src/version2/parameters/getPlanOnlyTeam.ts b/src/version2/parameters/getPlanOnlyTeam.ts new file mode 100644 index 000000000..f48b73a42 --- /dev/null +++ b/src/version2/parameters/getPlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface GetPlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version2/parameters/getPlans.ts b/src/version2/parameters/getPlans.ts new file mode 100644 index 000000000..2633d4c9e --- /dev/null +++ b/src/version2/parameters/getPlans.ts @@ -0,0 +1,10 @@ +export interface GetPlans { + /** Whether to include trashed plans in the results. */ + includeTrashed?: boolean; + /** Whether to include archived plans in the results. */ + includeArchived?: boolean; + /** The cursor to start from. If not provided, the first page will be returned. */ + cursor?: string; + /** The maximum number of plans to return per page. The maximum value is 50. The default value is 50. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getPolicies.ts b/src/version2/parameters/getPolicies.ts new file mode 100644 index 000000000..afba75fde --- /dev/null +++ b/src/version2/parameters/getPolicies.ts @@ -0,0 +1,4 @@ +export interface GetPolicies { + /** A list of project identifiers. This parameter accepts a comma-separated list. */ + ids?: string; +} diff --git a/src/version2/parameters/getPrecomputationsByID.ts b/src/version2/parameters/getPrecomputationsByID.ts new file mode 100644 index 000000000..e0edd4b2d --- /dev/null +++ b/src/version2/parameters/getPrecomputationsByID.ts @@ -0,0 +1,11 @@ +import { JqlFunctionPrecomputationGetByIdRequest } from '../models'; + +export interface GetPrecomputationsByID extends JqlFunctionPrecomputationGetByIdRequest { + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * + * `functionKey` Sorts by the functionKey. `used` Sorts by the used timestamp. `created` Sorts by the created + * timestamp. `updated` Sorts by the updated timestamp. + */ + orderBy?: string; +} diff --git a/src/version2/parameters/getPrioritiesByPriorityScheme.ts b/src/version2/parameters/getPrioritiesByPriorityScheme.ts new file mode 100644 index 000000000..6cd7fceda --- /dev/null +++ b/src/version2/parameters/getPrioritiesByPriorityScheme.ts @@ -0,0 +1,8 @@ +export interface GetPrioritiesByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The priority scheme ID. */ + schemeId: string; +} diff --git a/src/version2/parameters/getPrioritySchemes.ts b/src/version2/parameters/getPrioritySchemes.ts new file mode 100644 index 000000000..b5917ef60 --- /dev/null +++ b/src/version2/parameters/getPrioritySchemes.ts @@ -0,0 +1,28 @@ +export interface GetPrioritySchemes { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * A set of priority IDs to filter by. To include multiple IDs, provide an ampersand-separated list. For example, + * `priorityId=10000&priorityId=10001`. + */ + priorityId?: number[]; + /** + * A set of priority scheme IDs. To include multiple IDs, provide an ampersand-separated list. For example, + * `schemeId=10000&schemeId=10001`. + */ + schemeId?: number[]; + /** The name of scheme to search for. */ + schemeName?: string; + /** Whether only the default priority is returned. */ + onlyDefault?: boolean; + /** The ordering to return the priority schemes by. */ + orderBy?: 'name' | '+name' | '-name' | string; + /** + * A comma separated list of additional information to return. "priorities" will return priorities associated with the + * priority scheme. "projects" will return projects associated with the priority scheme. + * `expand=priorities,projects`. + */ + expand?: string; +} diff --git a/src/version2/parameters/getProjectComponents.ts b/src/version2/parameters/getProjectComponents.ts index d3cb5b32f..5c47fd94d 100644 --- a/src/version2/parameters/getProjectComponents.ts +++ b/src/version2/parameters/getProjectComponents.ts @@ -1,4 +1,12 @@ export interface GetProjectComponents { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string | number; + projectIdOrKey: string; + /** + * The source of the components to return. Can be `jira` (default), `compass` or `auto`. When `auto` is specified, the + * API will return connected Compass components if the project is opted into Compass, otherwise it will return Jira + * components. Defaults to `jira`. + * + * @default jira + */ + componentSource?: 'jira' | 'compass' | 'auto' | string; } diff --git a/src/version2/parameters/getProjectComponentsPaginated.ts b/src/version2/parameters/getProjectComponentsPaginated.ts index fffb51193..f861052bd 100644 --- a/src/version2/parameters/getProjectComponentsPaginated.ts +++ b/src/version2/parameters/getProjectComponentsPaginated.ts @@ -32,4 +32,12 @@ export interface GetProjectComponentsPaginated { * insensitive). */ query?: string; + /** + * The source of the components to return. Can be `jira` (default), `compass` or `auto`. When `auto` is specified, the + * API will return connected Compass components if the project is opted into Compass, otherwise it will return Jira + * components. Defaults to `jira`. + * + * @default jira + */ + componentSource?: 'jira' | 'compass' | 'auto' | string; } diff --git a/src/version2/parameters/getProjectIssueTypeUsagesForStatus.ts b/src/version2/parameters/getProjectIssueTypeUsagesForStatus.ts new file mode 100644 index 000000000..80deab4e9 --- /dev/null +++ b/src/version2/parameters/getProjectIssueTypeUsagesForStatus.ts @@ -0,0 +1,10 @@ +export interface GetProjectIssueTypeUsagesForStatus { + /** The statusId to fetch issue type usages for */ + statusId: string; + /** The projectId to fetch issue type usages for */ + projectId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getProjectUsagesForStatus.ts b/src/version2/parameters/getProjectUsagesForStatus.ts new file mode 100644 index 000000000..0e8913c90 --- /dev/null +++ b/src/version2/parameters/getProjectUsagesForStatus.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForStatus { + /** The statusId to fetch project usages for */ + statusId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getProjectUsagesForWorkflow.ts b/src/version2/parameters/getProjectUsagesForWorkflow.ts new file mode 100644 index 000000000..e70544f1f --- /dev/null +++ b/src/version2/parameters/getProjectUsagesForWorkflow.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForWorkflow { + /** The workflow ID */ + workflowId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getProjectUsagesForWorkflowScheme.ts b/src/version2/parameters/getProjectUsagesForWorkflowScheme.ts new file mode 100644 index 000000000..026695960 --- /dev/null +++ b/src/version2/parameters/getProjectUsagesForWorkflowScheme.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForWorkflowScheme { + /** The workflow scheme ID */ + workflowSchemeId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getProjectsByPriorityScheme.ts b/src/version2/parameters/getProjectsByPriorityScheme.ts new file mode 100644 index 000000000..607505f6d --- /dev/null +++ b/src/version2/parameters/getProjectsByPriorityScheme.ts @@ -0,0 +1,12 @@ +export interface GetProjectsByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The project IDs to filter by. For example, `projectId=10000&projectId=10001`. */ + projectId?: number[]; + /** The priority scheme ID. */ + schemeId: string; + /** The string to query projects on by name. */ + query?: string; +} diff --git a/src/version2/parameters/getRelatedWork.ts b/src/version2/parameters/getRelatedWork.ts new file mode 100644 index 000000000..b6388182d --- /dev/null +++ b/src/version2/parameters/getRelatedWork.ts @@ -0,0 +1,4 @@ +export interface GetRelatedWork { + /** The ID of the version. */ + id: string; +} diff --git a/src/version2/parameters/getResolution.ts b/src/version2/parameters/getResolution.ts new file mode 100644 index 000000000..13eba2326 --- /dev/null +++ b/src/version2/parameters/getResolution.ts @@ -0,0 +1,4 @@ +export interface GetResolution { + /** The ID of the issue resolution value. */ + id: string; +} diff --git a/src/version2/parameters/getSecurityLevelMembers.ts b/src/version2/parameters/getSecurityLevelMembers.ts index 1c16a7eaa..ceb2e31ef 100644 --- a/src/version2/parameters/getSecurityLevelMembers.ts +++ b/src/version2/parameters/getSecurityLevelMembers.ts @@ -1,8 +1,8 @@ export interface GetSecurityLevelMembers { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security level member IDs. To include multiple issue security level members separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version2/parameters/getSecurityLevels.ts b/src/version2/parameters/getSecurityLevels.ts index 7b2fccad0..cd8503604 100644 --- a/src/version2/parameters/getSecurityLevels.ts +++ b/src/version2/parameters/getSecurityLevels.ts @@ -1,8 +1,8 @@ export interface GetSecurityLevels { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security scheme level IDs. To include multiple issue security levels, separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version2/parameters/getTeams.ts b/src/version2/parameters/getTeams.ts new file mode 100644 index 000000000..289f64671 --- /dev/null +++ b/src/version2/parameters/getTeams.ts @@ -0,0 +1,8 @@ +export interface GetTeams { + /** The ID of the plan. */ + planId: number; + /** The cursor to start from. If not provided, the first page will be returned. */ + cursor?: string; + /** The maximum number of plan teams to return per page. The maximum value is 50. The default value is 50. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getWorkflowProjectIssueTypeUsages.ts b/src/version2/parameters/getWorkflowProjectIssueTypeUsages.ts new file mode 100644 index 000000000..42ce81e47 --- /dev/null +++ b/src/version2/parameters/getWorkflowProjectIssueTypeUsages.ts @@ -0,0 +1,10 @@ +export interface GetWorkflowProjectIssueTypeUsages { + /** The workflow ID */ + workflowId: string; + /** The project ID */ + projectId: number; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getWorkflowSchemeUsagesForWorkflow.ts b/src/version2/parameters/getWorkflowSchemeUsagesForWorkflow.ts new file mode 100644 index 000000000..dae488d33 --- /dev/null +++ b/src/version2/parameters/getWorkflowSchemeUsagesForWorkflow.ts @@ -0,0 +1,8 @@ +export interface GetWorkflowSchemeUsagesForWorkflow { + /** The workflow ID */ + workflowId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getWorkflowUsagesForStatus.ts b/src/version2/parameters/getWorkflowUsagesForStatus.ts new file mode 100644 index 000000000..cdfb21d97 --- /dev/null +++ b/src/version2/parameters/getWorkflowUsagesForStatus.ts @@ -0,0 +1,8 @@ +export interface GetWorkflowUsagesForStatus { + /** The statusId to fetch workflow usages for */ + statusId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/index.ts b/src/version2/parameters/index.ts index cb9dbe024..e5450596e 100644 --- a/src/version2/parameters/index.ts +++ b/src/version2/parameters/index.ts @@ -1,10 +1,12 @@ export * from './addActorUsers'; +export * from './addAtlassianTeam'; export * from './addAttachment'; export * from './addComment'; export * from './addFieldToDefaultScreen'; export * from './addGadget'; export * from './addIssueTypesToContext'; export * from './addIssueTypesToIssueTypeScheme'; +export * from './addNotifications'; export * from './addProjectRoleActorsToRole'; export * from './addScreenTab'; export * from './addScreenTabField'; @@ -19,6 +21,7 @@ export * from './analyseExpression'; export * from './appendMappingsForIssueTypeScreenScheme'; export * from './archiveIssues'; export * from './archiveIssuesAsync'; +export * from './archivePlan'; export * from './archiveProject'; export * from './assignFieldConfigurationSchemeToProject'; export * from './assignIssue'; @@ -29,16 +32,20 @@ export * from './assignProjectsToCustomFieldContext'; export * from './assignSchemeToProject'; export * from './associateSchemesToProjects'; export * from './bulkDeleteIssueProperty'; +export * from './bulkDeleteWorklogs'; export * from './bulkEditDashboards'; +export * from './bulkFetchIssues'; export * from './bulkGetGroups'; export * from './bulkGetUsers'; export * from './bulkGetUsersMigration'; +export * from './bulkMoveWorklogs'; export * from './bulkSetIssuePropertiesByIssue'; export * from './bulkSetIssueProperty'; export * from './bulkSetIssuesProperties'; export * from './cancelTask'; export * from './changeFilterOwner'; export * from './copyDashboard'; +export * from './countIssues'; export * from './createComponent'; export * from './createCustomField'; export * from './createCustomFieldContext'; @@ -61,11 +68,15 @@ export * from './createNotificationScheme'; export * from './createOrUpdateRemoteIssueLink'; export * from './createPermissionGrant'; export * from './createPermissionScheme'; +export * from './createPlan'; +export * from './createPlanOnlyTeam'; export * from './createPriority'; +export * from './createPriorityScheme'; export * from './createProject'; export * from './createProjectAvatar'; export * from './createProjectCategory'; export * from './createProjectRole'; +export * from './createRelatedWork'; export * from './createResolution'; export * from './createScreen'; export * from './createScreenScheme'; @@ -111,12 +122,16 @@ export * from './deleteIssueTypeScreenScheme'; export * from './deleteNotificationScheme'; export * from './deletePermissionScheme'; export * from './deletePermissionSchemeEntity'; +export * from './deletePlanOnlyTeam'; +export * from './deletePriority'; +export * from './deletePriorityScheme'; export * from './deleteProject'; export * from './deleteProjectAsynchronously'; export * from './deleteProjectAvatar'; export * from './deleteProjectProperty'; export * from './deleteProjectRole'; export * from './deleteProjectRoleActorsFromRole'; +export * from './deleteRelatedWork'; export * from './deleteRemoteIssueLinkByGlobalId'; export * from './deleteRemoteIssueLinkById'; export * from './deleteResolution'; @@ -128,6 +143,7 @@ export * from './deleteSharePermission'; export * from './deleteStatusesById'; export * from './deleteUiModification'; export * from './deleteUserProperty'; +export * from './deleteVersion'; export * from './deleteWebhookById'; export * from './deleteWorkflowMapping'; export * from './deleteWorkflowScheme'; @@ -139,6 +155,7 @@ export * from './deleteWorkflowTransitionRuleConfigurations'; export * from './deleteWorklog'; export * from './deleteWorklogProperty'; export * from './doTransition'; +export * from './duplicatePlan'; export * from './editIssue'; export * from './evaluateJiraExpression'; export * from './evaluateJiraExpressionUsingEnhancedSearch'; @@ -147,6 +164,7 @@ export * from './expandAttachmentForMachines'; export * from './exportArchivedIssues'; export * from './findAssignableUsers'; export * from './findBulkAssignableUsers'; +export * from './findComponentsForProjects'; export * from './findGroups'; export * from './findUserKeysByQuery'; export * from './findUsers'; @@ -168,10 +186,12 @@ export * from './getAllIssueTypeSchemes'; export * from './getAllLabels'; export * from './getAllPermissionSchemes'; export * from './getAllProjectAvatars'; +export * from './getAllProjects'; export * from './getAllScreenTabFields'; export * from './getAllScreenTabs'; export * from './getAllStatuses'; export * from './getAllSystemAvatars'; +export * from './getAllUserDataClassificationLevels'; export * from './getAllUsers'; export * from './getAllUsersDefault'; export * from './getAllWorkflowSchemes'; @@ -179,17 +199,24 @@ export * from './getAlternativeIssueTypes'; export * from './getApplicationProperty'; export * from './getApplicationRole'; export * from './getAssignedPermissionScheme'; +export * from './getAtlassianTeam'; export * from './getAttachment'; export * from './getAttachmentContent'; export * from './getAttachmentThumbnail'; export * from './getAuditRecords'; export * from './getAutoCompletePost'; +export * from './getAvailablePrioritiesByPriorityScheme'; export * from './getAvailableScreenFields'; +export * from './getAvailableTransitions'; export * from './getAvatarImageByID'; export * from './getAvatarImageByOwner'; export * from './getAvatarImageByType'; export * from './getAvatars'; +export * from './getBulkChangelogs'; +export * from './getBulkEditableFields'; +export * from './getBulkOperationProgress'; export * from './getBulkPermissions'; +export * from './getBulkScreenTabs'; export * from './getChangeLogs'; export * from './getChangeLogsByIds'; export * from './getColumns'; @@ -201,15 +228,20 @@ export * from './getCommentsByIds'; export * from './getComponent'; export * from './getComponentRelatedIssues'; export * from './getContextsForField'; +export * from './getContextsForFieldDeprecated'; export * from './getCreateIssueMeta'; +export * from './getCreateIssueMetaIssueTypeId'; +export * from './getCreateIssueMetaIssueTypes'; export * from './getCurrentUser'; export * from './getCustomFieldConfiguration'; export * from './getCustomFieldContextsForProjectsAndIssueTypes'; export * from './getCustomFieldOption'; +export * from './getCustomFieldsConfigurations'; export * from './getDashboard'; export * from './getDashboardItemProperty'; export * from './getDashboardItemPropertyKeys'; export * from './getDashboardsPaginated'; +export * from './getDefaultProjectClassification'; export * from './getDefaultValues'; export * from './getDefaultWorkflow'; export * from './getDraftDefaultWorkflow'; @@ -231,6 +263,7 @@ export * from './getIdsOfWorklogsDeletedSince'; export * from './getIdsOfWorklogsModifiedSince'; export * from './getIssue'; export * from './getIssueFieldOption'; +export * from './getIssueLimitReport'; export * from './getIssueLink'; export * from './getIssueLinkType'; export * from './getIssuePickerResource'; @@ -263,9 +296,16 @@ export * from './getPermissionScheme'; export * from './getPermissionSchemeGrant'; export * from './getPermissionSchemeGrants'; export * from './getPermittedProjects'; +export * from './getPlan'; +export * from './getPlanOnlyTeam'; +export * from './getPlans'; +export * from './getPolicies'; export * from './getPrecomputations'; +export * from './getPrecomputationsByID'; export * from './getPreference'; +export * from './getPrioritiesByPriorityScheme'; export * from './getPriority'; +export * from './getPrioritySchemes'; export * from './getProject'; export * from './getProjectCategoryById'; export * from './getProjectComponents'; @@ -273,6 +313,7 @@ export * from './getProjectComponentsPaginated'; export * from './getProjectContextMapping'; export * from './getProjectEmail'; export * from './getProjectIssueSecurityScheme'; +export * from './getProjectIssueTypeUsagesForStatus'; export * from './getProjectProperty'; export * from './getProjectPropertyKeys'; export * from './getProjectRole'; @@ -280,13 +321,19 @@ export * from './getProjectRoleActorsForRole'; export * from './getProjectRoleById'; export * from './getProjectRoleDetails'; export * from './getProjectRoles'; +export * from './getProjectsByPriorityScheme'; export * from './getProjectsForIssueTypeScreenScheme'; export * from './getProjectTypeByKey'; +export * from './getProjectUsagesForStatus'; +export * from './getProjectUsagesForWorkflow'; +export * from './getProjectUsagesForWorkflowScheme'; export * from './getProjectVersions'; export * from './getProjectVersionsPaginated'; export * from './getRecent'; +export * from './getRelatedWork'; export * from './getRemoteIssueLinkById'; export * from './getRemoteIssueLinks'; +export * from './getResolution'; export * from './getScreens'; export * from './getScreenSchemes'; export * from './getScreensForField'; @@ -300,6 +347,7 @@ export * from './getStatus'; export * from './getStatusCategory'; export * from './getStatusesById'; export * from './getTask'; +export * from './getTeams'; export * from './getTransitions'; export * from './getTrashedFieldsPaginated'; export * from './getUiModifications'; @@ -319,14 +367,17 @@ export * from './getVersionUnresolvedIssues'; export * from './getVisibleIssueFieldOptions'; export * from './getVotes'; export * from './getWorkflow'; +export * from './getWorkflowProjectIssueTypeUsages'; export * from './getWorkflowScheme'; export * from './getWorkflowSchemeDraft'; export * from './getWorkflowSchemeDraftIssueType'; export * from './getWorkflowSchemeIssueType'; export * from './getWorkflowSchemeProjectAssociations'; +export * from './getWorkflowSchemeUsagesForWorkflow'; export * from './getWorkflowsPaginated'; export * from './getWorkflowTransitionProperties'; export * from './getWorkflowTransitionRuleConfigurations'; +export * from './getWorkflowUsagesForStatus'; export * from './getWorklog'; export * from './getWorklogProperty'; export * from './getWorklogPropertyKeys'; @@ -347,11 +398,14 @@ export * from './publishDraftWorkflowScheme'; export * from './putAddonProperty'; export * from './putAppProperty'; export * from './readWorkflows'; +export * from './readWorkflowSchemes'; export * from './refreshWebhooks'; export * from './registerDynamicWebhooks'; export * from './registerModules'; +export * from './removeAtlassianTeam'; export * from './removeAttachment'; export * from './removeCustomFieldContextFromProjects'; +export * from './removeDefaultProjectClassification'; export * from './removeGadget'; export * from './removeGroup'; export * from './removeIssueTypeFromIssueTypeScheme'; @@ -372,6 +426,7 @@ export * from './removeWatcher'; export * from './renameScreenTab'; export * from './reorderCustomFieldOptions'; export * from './reorderIssueTypesInIssueTypeScheme'; +export * from './replaceCustomFieldOption'; export * from './replaceIssueFieldOption'; export * from './resetColumns'; export * from './resetUserColumns'; @@ -379,6 +434,7 @@ export * from './restore'; export * from './restoreCustomField'; export * from './sanitiseJqlQueries'; export * from './search'; +export * from './searchForIssuesIds'; export * from './searchForIssuesUsingJql'; export * from './searchForIssuesUsingJqlEnhancedSearch'; export * from './searchForIssuesUsingJqlEnhancedSearchPost'; @@ -388,7 +444,9 @@ export * from './searchProjects'; export * from './searchProjectsUsingSecuritySchemes'; export * from './searchResolutions'; export * from './searchSecuritySchemes'; +export * from './searchWorkflows'; export * from './selectTimeTrackingImplementation'; +export * from './services'; export * from './setActors'; export * from './setApplicationProperty'; export * from './setBanner'; @@ -404,6 +462,7 @@ export * from './setFavouriteForFilter'; export * from './setFieldConfigurationSchemeMapping'; export * from './setIssueProperty'; export * from './setIssueTypeProperty'; +export * from './setLocale'; export * from './setPreference'; export * from './setProjectProperty'; export * from './setSharedTimeTrackingConfiguration'; @@ -413,9 +472,12 @@ export * from './setWorkflowSchemeDraftIssueType'; export * from './setWorkflowSchemeIssueType'; export * from './setWorklogProperty'; export * from './storeAvatar'; +export * from './suggestedPrioritiesForMappings'; export * from './toggleFeatureForProject'; export * from './trashCustomField'; +export * from './trashPlan'; export * from './unarchiveIssues'; +export * from './updateAtlassianTeam'; export * from './updateComment'; export * from './updateComponent'; export * from './updateCustomField'; @@ -424,6 +486,7 @@ export * from './updateCustomFieldContext'; export * from './updateCustomFieldOption'; export * from './updateCustomFieldValue'; export * from './updateDashboard'; +export * from './updateDefaultProjectClassification'; export * from './updateDefaultScreenScheme'; export * from './updateDefaultWorkflow'; export * from './updateDraftDefaultWorkflow'; @@ -444,14 +507,19 @@ export * from './updateIssueTypeScreenScheme'; export * from './updateMultipleCustomFieldValues'; export * from './updateNotificationScheme'; export * from './updatePermissionScheme'; +export * from './updatePlan'; +export * from './updatePlanOnlyTeam'; export * from './updatePrecomputations'; export * from './updatePriority'; +export * from './updatePriorityScheme'; export * from './updateProject'; export * from './updateProjectAvatar'; export * from './updateProjectCategory'; export * from './updateProjectEmail'; +export * from './updateRelatedWork'; export * from './updateRemoteIssueLink'; export * from './updateResolution'; +export * from './updateSchemes'; export * from './updateScreen'; export * from './updateScreenScheme'; export * from './updateSecurityLevel'; @@ -462,6 +530,7 @@ export * from './updateWorkflowMapping'; export * from './updateWorkflows'; export * from './updateWorkflowScheme'; export * from './updateWorkflowSchemeDraft'; +export * from './updateWorkflowSchemeMappings'; export * from './updateWorkflowTransitionProperty'; export * from './updateWorkflowTransitionRuleConfigurations'; export * from './updateWorklog'; diff --git a/src/version2/parameters/putForgeAppProperty.ts b/src/version2/parameters/putForgeAppProperty.ts new file mode 100644 index 000000000..7a584bc7e --- /dev/null +++ b/src/version2/parameters/putForgeAppProperty.ts @@ -0,0 +1,4 @@ +export interface PutForgeAppProperty { + /** The key of the property. */ + propertyKey: string; +} diff --git a/src/version2/parameters/readWorkflowSchemes.ts b/src/version2/parameters/readWorkflowSchemes.ts new file mode 100644 index 000000000..85984b43f --- /dev/null +++ b/src/version2/parameters/readWorkflowSchemes.ts @@ -0,0 +1,14 @@ +import { WorkflowSchemeReadRequest } from '../models'; + +export interface ReadWorkflowSchemes extends WorkflowSchemeReadRequest { + /** + * Deprecated. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * `workflows.usages` Returns the project and issue types that each workflow in the workflow scheme is associated + * with. + */ + expand?: string; +} diff --git a/src/version2/parameters/readWorkflows.ts b/src/version2/parameters/readWorkflows.ts index c1248108f..cc844a538 100644 --- a/src/version2/parameters/readWorkflows.ts +++ b/src/version2/parameters/readWorkflows.ts @@ -1,18 +1,20 @@ import { ProjectAndIssueTypePair } from '../models'; export interface ReadWorkflows { + /** + * Return the new fields (`toStatusReference`/`links`) instead of the deprecated fields (`to`/`from`) for workflow + * transition port mappings. + */ + useTransitionLinksFormat?: boolean; + /** + * Return the new field `approvalConfiguration` instead of the deprecated status properties for approval + * configuration. + */ + useApprovalConfiguration?: boolean; /** The list of projects and issue types to query. */ projectAndIssueTypes?: ProjectAndIssueTypePair[]; /** The list of workflow IDs to query. */ workflowIds?: string[]; /** The list of workflow names to query. */ workflowNames?: string[]; - /** - * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional - * information in the response. This parameter accepts a comma-separated list. Expand options include: - * - * `workflows.usages` Returns the project and issue types that each workflow is associated with. `statuses.usages` - * Returns the project and issue types that each status is associated with. - */ - expand?: string; } diff --git a/src/version2/parameters/removeAtlassianTeam.ts b/src/version2/parameters/removeAtlassianTeam.ts new file mode 100644 index 000000000..02650c155 --- /dev/null +++ b/src/version2/parameters/removeAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface RemoveAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version2/parameters/removeDefaultProjectClassification.ts b/src/version2/parameters/removeDefaultProjectClassification.ts new file mode 100644 index 000000000..103f00b40 --- /dev/null +++ b/src/version2/parameters/removeDefaultProjectClassification.ts @@ -0,0 +1,4 @@ +export interface RemoveDefaultProjectClassification { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version2/parameters/replaceCustomFieldOption.ts b/src/version2/parameters/replaceCustomFieldOption.ts new file mode 100644 index 000000000..aa7b88be5 --- /dev/null +++ b/src/version2/parameters/replaceCustomFieldOption.ts @@ -0,0 +1,12 @@ +export interface ReplaceCustomFieldOption { + /** The ID of the option that will replace the currently selected option. */ + replaceWith?: number; + /** A JQL query that specifies the issues to be updated. For example, _project=10000_. */ + jql?: string; + /** The ID of the custom field. */ + fieldId: string; + /** The ID of the option to be deselected. */ + optionId: number; + /** The ID of the context. */ + contextId: number; +} diff --git a/src/version2/parameters/searchForIssuesIds.ts b/src/version2/parameters/searchForIssuesIds.ts new file mode 100644 index 000000000..3c6179bc0 --- /dev/null +++ b/src/version2/parameters/searchForIssuesIds.ts @@ -0,0 +1,3 @@ +import { IdSearchRequest } from '../models'; + +export interface SearchForIssuesIds extends IdSearchRequest {} diff --git a/src/version2/parameters/searchForIssuesUsingJql.ts b/src/version2/parameters/searchForIssuesUsingJql.ts index bb85f45ae..8e1a025a0 100644 --- a/src/version2/parameters/searchForIssuesUsingJql.ts +++ b/src/version2/parameters/searchForIssuesUsingJql.ts @@ -76,4 +76,10 @@ export interface SearchForIssuesUsingJql { properties?: string[]; /** Reference fields by their key (rather than ID). */ fieldsByKeys?: boolean; + /** + * Whether to fail the request quickly in case of an error while loading fields for an issue. For `failFast=true`, if + * one field fails, the entire operation fails. For `failFast=false`, the operation will continue even if a field + * fails. It will return a valid response, but without values for the failed field(s). + */ + failFast?: boolean; } diff --git a/src/version2/parameters/searchPriorities.ts b/src/version2/parameters/searchPriorities.ts index 8e1dae180..7ad7be970 100644 --- a/src/version2/parameters/searchPriorities.ts +++ b/src/version2/parameters/searchPriorities.ts @@ -10,6 +10,13 @@ export interface SearchPriorities { * `projectId=10010&projectId=10111`. */ projectId?: string[]; + /** The name of priority to search for. */ + priorityName?: string; /** Whether only the default priority is returned. */ onlyDefault?: boolean; + /** + * Use `schemes` to return the associated priority schemes for each priority. Limited to returning first 15 priority + * schemes per priority. + */ + expand?: 'schemes' | string; } diff --git a/src/version2/parameters/searchProjectsUsingSecuritySchemes.ts b/src/version2/parameters/searchProjectsUsingSecuritySchemes.ts index 6e2ee0702..ba08b5778 100644 --- a/src/version2/parameters/searchProjectsUsingSecuritySchemes.ts +++ b/src/version2/parameters/searchProjectsUsingSecuritySchemes.ts @@ -1,8 +1,8 @@ export interface SearchProjectsUsingSecuritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of security scheme IDs to be filtered out. */ issueSecuritySchemeId?: string[]; /** The list of project IDs to be filtered out. */ diff --git a/src/version2/parameters/searchSecuritySchemes.ts b/src/version2/parameters/searchSecuritySchemes.ts index 21e4af570..150e06463 100644 --- a/src/version2/parameters/searchSecuritySchemes.ts +++ b/src/version2/parameters/searchSecuritySchemes.ts @@ -1,8 +1,8 @@ export interface SearchSecuritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security scheme IDs. To include multiple issue security scheme IDs, separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version2/parameters/searchWorkflows.ts b/src/version2/parameters/searchWorkflows.ts new file mode 100644 index 000000000..b0c6e9447 --- /dev/null +++ b/src/version2/parameters/searchWorkflows.ts @@ -0,0 +1,25 @@ +export interface SearchWorkflows { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * `values.transitions` Returns the transitions that each workflow is associated with. + */ + expand?: string; + /** String used to perform a case-insensitive partial match with workflow name. */ + queryString?: string; + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * + * `name` Sorts by workflow name. `created` Sorts by create time. `updated` Sorts by update time. + */ + orderBy?: string; + /** The scope of the workflow. Global for company-managed projects and Project for team-managed projects. */ + scope?: string; + /** Filters active and inactive workflows. */ + isActive?: boolean; +} diff --git a/src/version2/parameters/services.ts b/src/version2/parameters/services.ts new file mode 100644 index 000000000..296a9d043 --- /dev/null +++ b/src/version2/parameters/services.ts @@ -0,0 +1,4 @@ +export interface Services { + /** The ID of the services (the strings starting with "b:" need to be decoded in Base64). */ + serviceIds: string[]; +} diff --git a/src/version2/parameters/setLocale.ts b/src/version2/parameters/setLocale.ts new file mode 100644 index 000000000..b4a9b9c8b --- /dev/null +++ b/src/version2/parameters/setLocale.ts @@ -0,0 +1,3 @@ +import { Locale } from '../models'; + +export interface SetLocale extends Locale {} diff --git a/src/version2/parameters/suggestedPrioritiesForMappings.ts b/src/version2/parameters/suggestedPrioritiesForMappings.ts new file mode 100644 index 000000000..ed706bf98 --- /dev/null +++ b/src/version2/parameters/suggestedPrioritiesForMappings.ts @@ -0,0 +1,3 @@ +import { SuggestedMappingsRequest } from '../models'; + +export interface SuggestedPrioritiesForMappings extends SuggestedMappingsRequest {} diff --git a/src/version2/parameters/trashPlan.ts b/src/version2/parameters/trashPlan.ts new file mode 100644 index 000000000..e960cc100 --- /dev/null +++ b/src/version2/parameters/trashPlan.ts @@ -0,0 +1,4 @@ +export interface TrashPlan { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/updateAtlassianTeam.ts b/src/version2/parameters/updateAtlassianTeam.ts new file mode 100644 index 000000000..d5a9fb9df --- /dev/null +++ b/src/version2/parameters/updateAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface UpdateAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version2/parameters/updateDashboard.ts b/src/version2/parameters/updateDashboard.ts index 3b01c0c2d..7144648aa 100644 --- a/src/version2/parameters/updateDashboard.ts +++ b/src/version2/parameters/updateDashboard.ts @@ -3,4 +3,9 @@ import { DashboardDetails } from '../models'; export interface UpdateDashboard extends DashboardDetails { /** The ID of the dashboard to update. */ id: string; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version2/parameters/updateDefaultProjectClassification.ts b/src/version2/parameters/updateDefaultProjectClassification.ts new file mode 100644 index 000000000..01b6cb1eb --- /dev/null +++ b/src/version2/parameters/updateDefaultProjectClassification.ts @@ -0,0 +1,6 @@ +import { UpdateDefaultProjectClassification as UpdateDefaultProjectClassificationModel } from '../models'; + +export interface UpdateDefaultProjectClassification extends UpdateDefaultProjectClassificationModel { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version2/parameters/updatePlan.ts b/src/version2/parameters/updatePlan.ts new file mode 100644 index 000000000..0f21fc000 --- /dev/null +++ b/src/version2/parameters/updatePlan.ts @@ -0,0 +1,6 @@ +export interface UpdatePlan { + /** The ID of the plan. */ + planId: number; + /** Whether to accept group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; +} diff --git a/src/version2/parameters/updatePlanOnlyTeam.ts b/src/version2/parameters/updatePlanOnlyTeam.ts new file mode 100644 index 000000000..7e4b3b582 --- /dev/null +++ b/src/version2/parameters/updatePlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface UpdatePlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version2/parameters/updatePrecomputations.ts b/src/version2/parameters/updatePrecomputations.ts index ecf83b9aa..737190038 100644 --- a/src/version2/parameters/updatePrecomputations.ts +++ b/src/version2/parameters/updatePrecomputations.ts @@ -1,3 +1,5 @@ import { JqlFunctionPrecomputationUpdateRequest } from '../models'; -export interface UpdatePrecomputations extends JqlFunctionPrecomputationUpdateRequest {} +export interface UpdatePrecomputations extends JqlFunctionPrecomputationUpdateRequest { + skipNotFoundPrecomputations?: boolean; +} diff --git a/src/version2/parameters/updatePriorityScheme.ts b/src/version2/parameters/updatePriorityScheme.ts new file mode 100644 index 000000000..bbd7a2f66 --- /dev/null +++ b/src/version2/parameters/updatePriorityScheme.ts @@ -0,0 +1,6 @@ +import { UpdatePrioritySchemeRequest } from '../models'; + +export interface UpdatePriorityScheme extends UpdatePrioritySchemeRequest { + /** The ID of the priority scheme. */ + schemeId: number; +} diff --git a/src/version2/parameters/updateRelatedWork.ts b/src/version2/parameters/updateRelatedWork.ts new file mode 100644 index 000000000..4d0d5a170 --- /dev/null +++ b/src/version2/parameters/updateRelatedWork.ts @@ -0,0 +1,6 @@ +import { VersionRelatedWork } from '../models'; + +export interface UpdateRelatedWork extends VersionRelatedWork { + /** The ID of the version to update the related work on. For the related work id, pass it to the input JSON. */ + id: string; +} diff --git a/src/version2/parameters/updateSchemes.ts b/src/version2/parameters/updateSchemes.ts new file mode 100644 index 000000000..7f9610918 --- /dev/null +++ b/src/version2/parameters/updateSchemes.ts @@ -0,0 +1,3 @@ +import { WorkflowSchemeUpdateRequest } from '../models'; + +export interface UpdateSchemes extends WorkflowSchemeUpdateRequest {} diff --git a/src/version2/parameters/updateWorkflowSchemeMappings.ts b/src/version2/parameters/updateWorkflowSchemeMappings.ts new file mode 100644 index 000000000..de0323e16 --- /dev/null +++ b/src/version2/parameters/updateWorkflowSchemeMappings.ts @@ -0,0 +1,3 @@ +import { WorkflowSchemeUpdateRequiredMappingsRequest } from '../models'; + +export interface UpdateWorkflowSchemeMappings extends WorkflowSchemeUpdateRequiredMappingsRequest {} diff --git a/src/version2/permissionSchemes.ts b/src/version2/permissionSchemes.ts index ed13243b0..42ee9e52d 100644 --- a/src/version2/permissionSchemes.ts +++ b/src/version2/permissionSchemes.ts @@ -20,8 +20,9 @@ export class PermissionSchemes { * The `holder` object contains information about the user or group being granted the permission. For example, the * _Administer projects_ permission is granted to a group named _Teams in space administrators_. In this case, the * type is `"type": "group"`, and the parameter is the group name, `"parameter": "Teams in space administrators"` and - * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. The `holder` object is defined by the - * following properties: + * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. + * + * The `holder` object is defined by the following properties: * * - `type` Identifies the user or group (see the list of types below). * - `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the @@ -130,8 +131,9 @@ export class PermissionSchemes { * The `holder` object contains information about the user or group being granted the permission. For example, the * _Administer projects_ permission is granted to a group named _Teams in space administrators_. In this case, the * type is `"type": "group"`, and the parameter is the group name, `"parameter": "Teams in space administrators"` and - * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. The `holder` object is defined by the - * following properties: + * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. + * + * The `holder` object is defined by the following properties: * * - `type` Identifies the user or group (see the list of types below). * - `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the @@ -313,7 +315,7 @@ export class PermissionSchemes { url: `/rest/api/2/permissionscheme/${schemeId}`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -479,10 +481,10 @@ export class PermissionSchemes { expand: parameters.expand, }, data: { - id: parameters.id, - self: parameters.self, holder: parameters.holder, + id: parameters.id, permission: parameters.permission, + self: parameters.self, }, }; diff --git a/src/version2/permissions.ts b/src/version2/permissions.ts index e74c24156..eaecef137 100644 --- a/src/version2/permissions.ts +++ b/src/version2/permissions.ts @@ -28,6 +28,12 @@ export class Permissions { * project, because any user can be a reporter. However, if they are not the user who reported the issue queried they * would not have EDIT_ISSUES permission for that issue. * + * For [Jira Service Management project + * permissions](https://support.atlassian.com/jira-cloud-administration/docs/customize-jira-service-management-permissions/), + * this will be evaluated similarly to a user in the customer portal. For example, if the BROWSE_PROJECTS permission + * is granted to Service Project Customer - Portal Access, any users with access to the customer portal will have the + * BROWSE_PROJECTS permission. + * * Global permissions are unaffected by context. * * This operation can be accessed anonymously. @@ -59,6 +65,12 @@ export class Permissions { * project, because any user can be a reporter. However, if they are not the user who reported the issue queried they * would not have EDIT_ISSUES permission for that issue. * + * For [Jira Service Management project + * permissions](https://support.atlassian.com/jira-cloud-administration/docs/customize-jira-service-management-permissions/), + * this will be evaluated similarly to a user in the customer portal. For example, if the BROWSE_PROJECTS permission + * is granted to Service Project Customer - Portal Access, any users with access to the customer portal will have the + * BROWSE_PROJECTS permission. + * * Global permissions are unaffected by context. * * This operation can be accessed anonymously. @@ -98,8 +110,9 @@ export class Permissions { * - Project permissions. * - Global permissions added by plugins. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getAllPermissions(callback: Callback): Promise; /** @@ -109,8 +122,9 @@ export class Permissions { * - Project permissions. * - Global permissions added by plugins. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getAllPermissions(callback?: never): Promise; async getAllPermissions(callback?: Callback): Promise { @@ -139,6 +153,11 @@ export class Permissions { * `projectPermissions.issues` are ignored. * - Empty strings in `projectPermissions.permissions` are ignored. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:permission:jira` + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -168,6 +187,11 @@ export class Permissions { * `projectPermissions.issues` are ignored. * - Empty strings in `projectPermissions.permissions` are ignored. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:permission:jira` + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -188,9 +212,9 @@ export class Permissions { url: '/rest/api/2/permissions/check', method: 'POST', data: { - projectPermissions: parameters?.projectPermissions, - globalPermissions: parameters?.globalPermissions, accountId: parameters?.accountId, + globalPermissions: parameters?.globalPermissions, + projectPermissions: parameters?.projectPermissions, }, }; diff --git a/src/version2/plans.ts b/src/version2/plans.ts new file mode 100644 index 000000000..d52910d58 --- /dev/null +++ b/src/version2/plans.ts @@ -0,0 +1,299 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class Plans { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of plans. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlans( + parameters: Parameters.GetPlans | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of plans. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlans( + parameters?: Parameters.GetPlans, + callback?: never, + ): Promise; + async getPlans( + parameters?: Parameters.GetPlans, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/plans/plan', + method: 'GET', + params: { + includeTrashed: parameters?.includeTrashed, + includeArchived: parameters?.includeArchived, + cursor: parameters?.cursor, + maxResults: parameters?.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlan(parameters: Parameters.CreatePlan, callback: Callback): Promise; + /** + * Creates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlan(parameters: Parameters.CreatePlan, callback?: never): Promise; + async createPlan(parameters: Parameters.CreatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/plans/plan', + method: 'POST', + params: { + useGroupId: parameters.useGroupId, + }, + data: { + crossProjectReleases: parameters.crossProjectReleases, + customFields: parameters.customFields, + exclusionRules: parameters.exclusionRules, + issueSources: parameters.issueSources, + leadAccountId: parameters.leadAccountId, + name: parameters.name, + permissions: parameters.permissions, + scheduling: parameters.scheduling, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlan(parameters: Parameters.GetPlan, callback: Callback): Promise; + /** + * Returns a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlan(parameters: Parameters.GetPlan, callback?: never): Promise; + async getPlan(parameters: Parameters.GetPlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}`, + method: 'GET', + params: { + useGroupId: parameters.useGroupId, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following details of a plan using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - LeadAccountId + * - Scheduling + * + * - Estimation with StoryPoints, Days or Hours as possible values + * - StartDate + * + * - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values + * - DateCustomFieldId + * - EndDate + * + * - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values + * - DateCustomFieldId + * - InferredDates with None, SprintDates or ReleaseDates as possible values + * - Dependencies with Sequential or Concurrent as possible values + * - IssueSources + * + * - Type with Board, Project or Filter as possible values + * - Value + * - ExclusionRules + * + * - NumberOfDaysToShowCompletedIssues + * - IssueIds + * - WorkStatusIds + * - WorkStatusCategoryIds + * - IssueTypeIds + * - ReleaseIds + * - CrossProjectReleases + * + * - Name + * - ReleaseIds + * - CustomFields + * + * - CustomFieldId + * - Filter + * - Permissions + * + * - Type with View or Edit as possible values + * - Holder + * + * - Type with Group or AccountId as possible values + * - Value + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan" endpoint to find + * out the order of array elements._ + */ + async updatePlan(parameters: Parameters.UpdatePlan, callback: Callback): Promise; + /** + * Updates any of the following details of a plan using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - LeadAccountId + * - Scheduling + * + * - Estimation with StoryPoints, Days or Hours as possible values + * - StartDate + * + * - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values + * - DateCustomFieldId + * - EndDate + * + * - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values + * - DateCustomFieldId + * - InferredDates with None, SprintDates or ReleaseDates as possible values + * - Dependencies with Sequential or Concurrent as possible values + * - IssueSources + * + * - Type with Board, Project or Filter as possible values + * - Value + * - ExclusionRules + * + * - NumberOfDaysToShowCompletedIssues + * - IssueIds + * - WorkStatusIds + * - WorkStatusCategoryIds + * - IssueTypeIds + * - ReleaseIds + * - CrossProjectReleases + * + * - Name + * - ReleaseIds + * - CustomFields + * + * - CustomFieldId + * - Filter + * - Permissions + * + * - Type with View or Edit as possible values + * - Holder + * + * - Type with Group or AccountId as possible values + * - Value + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan" endpoint to find + * out the order of array elements._ + */ + async updatePlan(parameters: Parameters.UpdatePlan, callback?: never): Promise; + async updatePlan(parameters: Parameters.UpdatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}`, + method: 'PUT', + params: { + useGroupId: parameters.useGroupId, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Archives a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async archivePlan(parameters: Parameters.ArchivePlan, callback: Callback): Promise; + /** + * Archives a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async archivePlan(parameters: Parameters.ArchivePlan, callback?: never): Promise; + async archivePlan(parameters: Parameters.ArchivePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/archive`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Duplicates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback: Callback): Promise; + /** + * Duplicates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback?: never): Promise; + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/duplicate`, + method: 'POST', + data: { + name: parameters.name, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Moves a plan to trash. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async trashPlan(parameters: Parameters.TrashPlan, callback: Callback): Promise; + /** + * Moves a plan to trash. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async trashPlan(parameters: Parameters.TrashPlan, callback?: never): Promise; + async trashPlan(parameters: Parameters.TrashPlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/trash`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/prioritySchemes.ts b/src/version2/prioritySchemes.ts new file mode 100644 index 000000000..af30279d6 --- /dev/null +++ b/src/version2/prioritySchemes.ts @@ -0,0 +1,330 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; +import { paramSerializer } from '../paramSerializer'; +import { Paginated } from '../paginated'; + +export class PrioritySchemes { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priority schemes. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritySchemes>( + parameters: Parameters.GetPrioritySchemes | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priority schemes. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritySchemes>( + parameters?: Parameters.GetPrioritySchemes, + callback?: never, + ): Promise; + async getPrioritySchemes>( + parameters?: Parameters.GetPrioritySchemes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/priorityscheme', + method: 'GET', + params: { + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + priorityId: paramSerializer('priorityId', parameters?.priorityId), + schemeId: paramSerializer('schemeId', parameters?.schemeId), + schemeName: parameters?.schemeName, + onlyDefault: parameters?.onlyDefault, + orderBy: parameters?.orderBy, + expand: parameters?.expand, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a new priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback: Callback, + ): Promise; + /** + * Creates a new priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback?: never, + ): Promise; + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/priorityscheme', + method: 'POST', + data: { + defaultPriorityId: parameters.defaultPriorityId, + description: parameters.description, + mappings: parameters.mappings, + name: parameters.name, + priorityIds: parameters.priorityIds, + projectIds: parameters.projectIds, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities that would require mapping, given a change in priorities or projects associated with a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async suggestedPrioritiesForMappings>( + parameters: Parameters.SuggestedPrioritiesForMappings | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities that would require mapping, given a change in priorities or projects associated with a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async suggestedPrioritiesForMappings>( + parameters?: Parameters.SuggestedPrioritiesForMappings, + callback?: never, + ): Promise; + async suggestedPrioritiesForMappings>( + parameters?: Parameters.SuggestedPrioritiesForMappings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/priorityscheme/mappings', + method: 'POST', + data: { + maxResults: parameters?.maxResults, + priorities: parameters?.priorities, + projects: parameters?.projects, + schemeId: parameters?.schemeId, + startAt: parameters?.startAt, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities available for adding to a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities available for adding to a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback?: never, + ): Promise; + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/priorityscheme/priorities/available', + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + query: parameters.query, + schemeId: parameters.schemeId, + exclude: parameters.exclude, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates a priority scheme. This includes its details, the lists of priorities and projects in it + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback: Callback, + ): Promise; + /** + * Updates a priority scheme. This includes its details, the lists of priorities and projects in it + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback?: never, + ): Promise; + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priorityscheme/${parameters.schemeId}`, + method: 'PUT', + data: { + defaultPriorityId: parameters.defaultPriorityId, + description: parameters.description, + mappings: parameters.mappings, + name: parameters.name, + priorities: parameters.priorities, + projects: parameters.projects, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a priority scheme. + * + * This operation is only available for priority schemes without any associated projects. Any associated projects must + * be removed from the priority scheme before this operation can be performed. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriorityScheme( + parameters: Parameters.DeletePriorityScheme, + callback: Callback, + ): Promise; + /** + * Deletes a priority scheme. + * + * This operation is only available for priority schemes without any associated projects. Any associated projects must + * be removed from the priority scheme before this operation can be performed. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriorityScheme(parameters: Parameters.DeletePriorityScheme, callback?: never): Promise; + async deletePriorityScheme( + parameters: Parameters.DeletePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priorityscheme/${parameters.schemeId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback?: never, + ): Promise; + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priorityscheme/${parameters.schemeId}/priorities`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * projects by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * projects by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback?: never, + ): Promise; + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priorityscheme/${parameters.schemeId}/projects`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + projectId: paramSerializer('projectId', parameters.projectId), + query: parameters.query, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/projectClassificationLevels.ts b/src/version2/projectClassificationLevels.ts new file mode 100644 index 000000000..4fcb8ab93 --- /dev/null +++ b/src/version2/projectClassificationLevels.ts @@ -0,0 +1,121 @@ +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ProjectClassificationLevels { + constructor(private client: Client) {} + + /** + * Returns the default data classification for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Returns the default data classification for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback?: never, + ): Promise; + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Updates the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback?: never, + ): Promise; + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'PUT', + data: { + id: parameters.id, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Remove the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Remove the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback?: never, + ): Promise; + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/projectComponents.ts b/src/version2/projectComponents.ts index 3d54a1b08..c51564cbe 100644 --- a/src/version2/projectComponents.ts +++ b/src/version2/projectComponents.ts @@ -3,12 +3,59 @@ import * as Parameters from './parameters'; import { Client } from '../clients'; import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; +import { Paginated } from '../paginated'; export class ProjectComponents { constructor(private client: Client) {} /** - * Creates a component. Use components to provide containers for issues within a project. + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of all + * components in a project, including global (Compass) components when applicable. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + */ + async findComponentsForProjects>( + parameters: Parameters.FindComponentsForProjects | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of all + * components in a project, including global (Compass) components when applicable. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + */ + async findComponentsForProjects>( + parameters?: Parameters.FindComponentsForProjects, + callback?: never, + ): Promise; + async findComponentsForProjects>( + parameters?: Parameters.FindComponentsForProjects, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/component', + method: 'GET', + params: { + projectIdsOrKeys: parameters?.projectIdsOrKeys, + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + orderBy: parameters?.orderBy, + query: parameters?.query, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a component. Use components to provide containers for issues within a project. Use components to provide + * containers for issues within a project. * * This operation can be accessed anonymously. * @@ -21,7 +68,8 @@ export class ProjectComponents { callback: Callback, ): Promise; /** - * Creates a component. Use components to provide containers for issues within a project. + * Creates a component. Use components to provide containers for issues within a project. Use components to provide + * containers for issues within a project. * * This operation can be accessed anonymously. * @@ -41,6 +89,7 @@ export class ProjectComponents { url: '/rest/api/2/component', method: 'POST', data: { + ari: parameters.ari, assignee: parameters.assignee, assigneeType: parameters.assigneeType, description: parameters.description, @@ -49,6 +98,7 @@ export class ProjectComponents { lead: parameters.lead, leadAccountId: parameters.leadAccountId, leadUserName: parameters.leadUserName, + metadata: parameters.metadata, name: parameters.name, project: parameters.project, projectId: parameters.projectId, @@ -180,7 +230,7 @@ export class ProjectComponents { url: `/rest/api/2/component/${id}`, method: 'DELETE', params: { - moveIssuesTo: typeof parameters !== 'string' && parameters.moveIssuesTo, + moveIssuesTo: typeof parameters !== 'string' ? parameters.moveIssuesTo : undefined, }, }; @@ -192,6 +242,11 @@ export class ProjectComponents { * * This operation can be accessed anonymously. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:field:jira`, `read:project.component:jira` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getComponentRelatedIssues( @@ -203,6 +258,11 @@ export class ProjectComponents { * * This operation can be accessed anonymously. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:field:jira`, `read:project.component:jira` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getComponentRelatedIssues( @@ -228,6 +288,9 @@ export class ProjectComponents { * components in a project. See the [Get project components](#api-rest-api-2-project-projectIdOrKey-components-get) * resource if you want to get a full list of versions without pagination. * + * If your project uses Compass components, this API will return a list of Compass components that are linked to + * issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse @@ -242,6 +305,9 @@ export class ProjectComponents { * components in a project. See the [Get project components](#api-rest-api-2-project-projectIdOrKey-components-get) * resource if you want to get a full list of versions without pagination. * + * If your project uses Compass components, this API will return a list of Compass components that are linked to + * issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse @@ -262,6 +328,7 @@ export class ProjectComponents { startAt: parameters.startAt, maxResults: parameters.maxResults, orderBy: parameters.orderBy, + componentSource: parameters.componentSource, query: parameters.query, }, }; @@ -274,6 +341,9 @@ export class ProjectComponents { * paginated](#api-rest-api-2-project-projectIdOrKey-component-get) resource if you want to get a full list of * components with pagination. * + * If your project uses Compass components, this API will return a paginated list of Compass components that are + * linked to issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse @@ -288,6 +358,9 @@ export class ProjectComponents { * paginated](#api-rest-api-2-project-projectIdOrKey-component-get) resource if you want to get a full list of * components with pagination. * + * If your project uses Compass components, this API will return a paginated list of Compass components that are + * linked to issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse @@ -306,6 +379,9 @@ export class ProjectComponents { const config: RequestConfig = { url: `/rest/api/2/project/${projectIdOrKey}/components`, method: 'GET', + params: { + componentSource: typeof parameters !== 'string' ? parameters.componentSource : undefined, + }, }; return this.client.sendRequest(config, callback); diff --git a/src/version2/projectEmail.ts b/src/version2/projectEmail.ts index cd2f9cd8e..19a97e99d 100644 --- a/src/version2/projectEmail.ts +++ b/src/version2/projectEmail.ts @@ -46,8 +46,9 @@ export class ProjectEmail { * * If `emailAddress` is an empty string, the default email address is restored. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse - * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project + * permission.](https://confluence.atlassian.com/x/yodKLg) */ async updateProjectEmail(parameters: Parameters.UpdateProjectEmail, callback: Callback): Promise; /** @@ -55,8 +56,9 @@ export class ProjectEmail { * * If `emailAddress` is an empty string, the default email address is restored. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse - * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project + * permission.](https://confluence.atlassian.com/x/yodKLg) */ async updateProjectEmail(parameters: Parameters.UpdateProjectEmail, callback?: never): Promise; async updateProjectEmail( diff --git a/src/version2/projectKeyAndNameValidation.ts b/src/version2/projectKeyAndNameValidation.ts index 96a0f9134..6b08bb39b 100644 --- a/src/version2/projectKeyAndNameValidation.ts +++ b/src/version2/projectKeyAndNameValidation.ts @@ -47,7 +47,7 @@ export class ProjectKeyAndNameValidation { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getValidProjectKey( + async getValidProjectKey( parameters: Parameters.GetValidProjectKey | string | undefined, callback: Callback, ): Promise; @@ -56,11 +56,11 @@ export class ProjectKeyAndNameValidation { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getValidProjectKey( + async getValidProjectKey( parameters?: Parameters.GetValidProjectKey | string, callback?: never, ): Promise; - async getValidProjectKey( + async getValidProjectKey( parameters?: Parameters.GetValidProjectKey | string, callback?: Callback, ): Promise { diff --git a/src/version2/projectRoles.ts b/src/version2/projectRoles.ts index 7317e2333..c4df26d9a 100644 --- a/src/version2/projectRoles.ts +++ b/src/version2/projectRoles.ts @@ -8,8 +8,9 @@ export class ProjectRoles { constructor(private client: Client) {} /** - * Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and - * self URL for each role. + * Returns a list of [project + * roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) for the project + * returning the name and self URL for each role. * * Note that all project roles are shared with all projects in Jira Cloud. See [Get all project * roles](#api-rest-api-2-role-get) for more information. @@ -25,8 +26,9 @@ export class ProjectRoles { callback: Callback, ): Promise; /** - * Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and - * self URL for each role. + * Returns a list of [project + * roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) for the project + * returning the name and self URL for each role. * * Note that all project roles are shared with all projects in Jira Cloud. See [Get all project * roles](#api-rest-api-2-role-get) for more information. @@ -104,8 +106,8 @@ export class ProjectRoles { } /** - * Returns all [project roles](https://confluence.atlassian.com/x/3odKLg) and the details for each role. Note that the - * list of project roles is common to all projects. + * Returns all [project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) and + * the details for each role. Note that the list of project roles is common to all projects. * * This operation can be accessed anonymously. * @@ -118,8 +120,8 @@ export class ProjectRoles { callback: Callback, ): Promise; /** - * Returns all [project roles](https://confluence.atlassian.com/x/3odKLg) and the details for each role. Note that the - * list of project roles is common to all projects. + * Returns all [project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) and + * the details for each role. Note that the list of project roles is common to all projects. * * This operation can be accessed anonymously. * @@ -141,8 +143,8 @@ export class ProjectRoles { url: `/rest/api/2/project/${projectIdOrKey}/roledetails`, method: 'GET', params: { - currentMember: typeof parameters !== 'string' && parameters.currentMember, - excludeConnectAddons: typeof parameters !== 'string' && parameters.excludeConnectAddons, + currentMember: typeof parameters !== 'string' ? parameters.currentMember : undefined, + excludeConnectAddons: typeof parameters !== 'string' ? parameters.excludeConnectAddons : undefined, }, }; @@ -154,10 +156,10 @@ export class ProjectRoles { * * ### About project roles * - * [Project roles](https://confluence.atlassian.com/x/3odKLg) are a flexible way to to associate users and groups with - * projects. In Jira Cloud, the list of project roles is shared globally with all projects, but each project can have - * a different set of actors associated with it (unlike groups, which have the same membership throughout all Jira - * applications). + * [Project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) are a flexible + * way to to associate users and groups with projects. In Jira Cloud, the list of project roles is shared globally + * with all projects, but each project can have a different set of actors associated with it (unlike groups, which + * have the same membership throughout all Jira applications). * * Project roles are used in [permission schemes](#api-rest-api-2-permissionscheme-get), [email notification * schemes](#api-rest-api-2-notificationscheme-get), [issue security @@ -170,7 +172,7 @@ export class ProjectRoles { * with a project role. * * Actors may be set as [default - * members](https://confluence.atlassian.com/x/3odKLg#Managingprojectroles-Specifying'defaultmembers'foraprojectrole) + * members](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/#Specifying-'default-members'-for-a-project-role) * of the project role or set at the project level: * * - Default actors: Users and groups that are assigned to the project role for all newly created projects. The default @@ -187,10 +189,10 @@ export class ProjectRoles { * * ### About project roles * - * [Project roles](https://confluence.atlassian.com/x/3odKLg) are a flexible way to to associate users and groups with - * projects. In Jira Cloud, the list of project roles is shared globally with all projects, but each project can have - * a different set of actors associated with it (unlike groups, which have the same membership throughout all Jira - * applications). + * [Project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) are a flexible + * way to to associate users and groups with projects. In Jira Cloud, the list of project roles is shared globally + * with all projects, but each project can have a different set of actors associated with it (unlike groups, which + * have the same membership throughout all Jira applications). * * Project roles are used in [permission schemes](#api-rest-api-2-permissionscheme-get), [email notification * schemes](#api-rest-api-2-notificationscheme-get), [issue security @@ -203,7 +205,7 @@ export class ProjectRoles { * with a project role. * * Actors may be set as [default - * members](https://confluence.atlassian.com/x/3odKLg#Managingprojectroles-Specifying'defaultmembers'foraprojectrole) + * members](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/#Specifying-'default-members'-for-a-project-role) * of the project role or set at the project level: * * - Default actors: Users and groups that are assigned to the project role for all newly created projects. The default @@ -262,8 +264,8 @@ export class ProjectRoles { url: '/rest/api/2/role', method: 'POST', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -340,8 +342,8 @@ export class ProjectRoles { url: `/rest/api/2/role/${parameters.id}`, method: 'POST', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -376,8 +378,8 @@ export class ProjectRoles { url: `/rest/api/2/role/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -413,7 +415,7 @@ export class ProjectRoles { url: `/rest/api/2/role/${id}`, method: 'DELETE', params: { - swap: typeof parameters !== 'string' && parameters.swap, + swap: typeof parameters !== 'string' ? parameters.swap : undefined, }, }; diff --git a/src/version2/projectVersions.ts b/src/version2/projectVersions.ts index e182c4d8d..84a97aaf5 100644 --- a/src/version2/projectVersions.ts +++ b/src/version2/projectVersions.ts @@ -45,12 +45,12 @@ export class ProjectVersions { url: `/rest/api/2/project/${projectIdOrKey}/version`, method: 'GET', params: { - startAt: typeof parameters !== 'string' && parameters.startAt, - maxResults: typeof parameters !== 'string' && parameters.maxResults, - orderBy: typeof parameters !== 'string' && parameters.orderBy, - query: typeof parameters !== 'string' && parameters.query, - status: typeof parameters !== 'string' && parameters.status, - expand: typeof parameters !== 'string' && parameters.expand, + startAt: typeof parameters !== 'string' ? parameters.startAt : undefined, + maxResults: typeof parameters !== 'string' ? parameters.maxResults : undefined, + orderBy: typeof parameters !== 'string' ? parameters.orderBy : undefined, + query: typeof parameters !== 'string' ? parameters.query : undefined, + status: typeof parameters !== 'string' ? parameters.status : undefined, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -95,7 +95,7 @@ export class ProjectVersions { url: `/rest/api/2/project/${projectIdOrKey}/versions`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -130,22 +130,24 @@ export class ProjectVersions { url: '/rest/api/2/version', method: 'POST', data: { + approvers: parameters.approvers, + archived: parameters.archived, + description: parameters.description, + driver: parameters.driver, expand: parameters.expand, - self: parameters.self, id: parameters.id, - description: parameters.description, + issuesStatusForFixVersion: parameters.issuesStatusForFixVersion, + moveUnfixedIssuesTo: parameters.moveUnfixedIssuesTo, name: parameters.name, - archived: parameters.archived, + operations: parameters.operations, + overdue: parameters.overdue, + projectId: parameters.projectId, + releaseDate: parameters.releaseDate, released: parameters.released, + self: parameters.self, startDate: parameters.startDate, - releaseDate: parameters.releaseDate, - overdue: parameters.overdue, - userStartDate: parameters.userStartDate, userReleaseDate: parameters.userReleaseDate, - projectId: parameters.projectId, - moveUnfixedIssuesTo: parameters.moveUnfixedIssuesTo, - operations: parameters.operations, - issuesStatusForFixVersion: parameters.issuesStatusForFixVersion, + userStartDate: parameters.userStartDate, }, }; @@ -183,7 +185,7 @@ export class ProjectVersions { url: `/rest/api/2/version/${id}`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -218,6 +220,8 @@ export class ProjectVersions { url: `/rest/api/2/version/${parameters.id}`, method: 'PUT', data: { + approvers: parameters.approvers, + driver: parameters.driver, expand: parameters.expand, description: parameters.description, name: parameters.name, @@ -347,6 +351,140 @@ export class ProjectVersions { return this.client.sendRequest(config, callback); } + /** + * Returns related work items for the given version id. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the version. + */ + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback: Callback, + ): Promise; + /** + * Returns related work items for the given version id. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the version. + */ + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback?: never, + ): Promise; + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/version/${parameters.id}/relatedwork`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a related work for the given version. You can only create a generic link type of related works via this + * API. relatedWorkId will be auto-generated UUID, that does not need to be provided. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback: Callback, + ): Promise; + /** + * Creates a related work for the given version. You can only create a generic link type of related works via this + * API. relatedWorkId will be auto-generated UUID, that does not need to be provided. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback?: never, + ): Promise; + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/version/${parameters.id}/relatedwork`, + method: 'POST', + data: { + category: parameters.category, + issueId: parameters.issueId, + relatedWorkId: parameters.relatedWorkId, + title: parameters.title, + url: parameters.url, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates the given related work. You can only update generic link related works via Rest APIs. Any archived version + * related works can't be edited. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback: Callback, + ): Promise; + /** + * Updates the given related work. You can only update generic link related works via Rest APIs. Any archived version + * related works can't be edited. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback?: never, + ): Promise; + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/version/${parameters.id}/relatedwork`, + method: 'PUT', + data: { + category: parameters.category, + issueId: parameters.issueId, + relatedWorkId: parameters.relatedWorkId, + title: parameters.title, + url: parameters.url, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Deletes a project version. * @@ -390,9 +528,9 @@ export class ProjectVersions { url: `/rest/api/2/version/${parameters.id}/removeAndSwap`, method: 'POST', data: { - moveFixIssuesTo: parameters.moveFixIssuesTo, - moveAffectedIssuesTo: parameters.moveAffectedIssuesTo, customFieldReplacementList: parameters.customFieldReplacementList, + moveAffectedIssuesTo: parameters.moveAffectedIssuesTo, + moveFixIssuesTo: parameters.moveFixIssuesTo, }, }; @@ -436,4 +574,38 @@ export class ProjectVersions { return this.client.sendRequest(config, callback); } + + /** + * Deletes the given related work for the given version. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async deleteRelatedWork(parameters: Parameters.DeleteRelatedWork, callback: Callback): Promise; + /** + * Deletes the given related work for the given version. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async deleteRelatedWork(parameters: Parameters.DeleteRelatedWork, callback?: never): Promise; + async deleteRelatedWork( + parameters: Parameters.DeleteRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/version/${parameters.versionId}/relatedwork/${parameters.relatedWorkId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/projects.ts b/src/version2/projects.ts index 00becfb48..27b71982d 100644 --- a/src/version2/projects.ts +++ b/src/version2/projects.ts @@ -10,11 +10,11 @@ export class Projects { /** * Creates a project based on a project type template, as shown in the following table: * - * | Project Type Key | Project Template Key | - * | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | - * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | - * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | + * | Project Type Key | Project Template Key | + * | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | + * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-blank-project-business`, `com.atlassian.servicedesk:simplified-blank-project-it`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | + * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | * * The project types are available according to the installed Jira features as follows: * @@ -37,11 +37,11 @@ export class Projects { /** * Creates a project based on a project type template, as shown in the following table: * - * | Project Type Key | Project Template Key | - * | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | - * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | - * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | + * | Project Type Key | Project Template Key | + * | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | + * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-blank-project-business`, `com.atlassian.servicedesk:simplified-blank-project-it`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | + * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | * * The project types are available according to the installed Jira features as follows: * @@ -223,8 +223,8 @@ export class Projects { url: `/rest/api/2/project/${projectIdOrKey}`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, - properties: typeof parameters !== 'string' && parameters.properties, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, + properties: typeof parameters !== 'string' ? parameters.properties : undefined, }, }; @@ -278,6 +278,7 @@ export class Projects { permissionScheme: parameters.permissionScheme, projectTemplateKey: parameters.projectTemplateKey, projectTypeKey: parameters.projectTypeKey, + releasedProjectKeys: parameters.releasedProjectKeys, url: parameters.url, }, }; @@ -315,7 +316,7 @@ export class Projects { url: `/rest/api/2/project/${projectIdOrKey}`, method: 'DELETE', params: { - enableUndo: typeof parameters !== 'string' && parameters.enableUndo, + enableUndo: typeof parameters !== 'string' ? parameters.enableUndo : undefined, }, }; @@ -556,7 +557,7 @@ export class Projects { url: `/rest/api/2/project/${projectKeyOrId}/notificationscheme`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; diff --git a/src/version2/screenTabs.ts b/src/version2/screenTabs.ts index e11f82384..8617cc52b 100644 --- a/src/version2/screenTabs.ts +++ b/src/version2/screenTabs.ts @@ -7,6 +7,43 @@ import { RequestConfig } from '../requestConfig'; export class ScreenTabs { constructor(private client: Client) {} + /** + * Returns the list of tabs for a bulk of screens. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getBulkScreenTabs( + parameters: Parameters.GetBulkScreenTabs | undefined, + callback: Callback, + ): Promise; + /** + * Returns the list of tabs for a bulk of screens. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getBulkScreenTabs(parameters?: Parameters.GetBulkScreenTabs, callback?: never): Promise; + async getBulkScreenTabs( + parameters?: Parameters.GetBulkScreenTabs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/screens/tabs', + method: 'GET', + params: { + screenId: parameters?.screenId, + tabId: parameters?.tabId, + startAt: parameters?.startAt, + maxResult: parameters?.maxResult, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns the list of tabs for a screen. * diff --git a/src/version2/serviceRegistry.ts b/src/version2/serviceRegistry.ts new file mode 100644 index 000000000..37b9f9270 --- /dev/null +++ b/src/version2/serviceRegistry.ts @@ -0,0 +1,38 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ServiceRegistry { + constructor(private client: Client) {} + + /** + * Retrieve the attributes of given service registries. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only + * Connect apps can make this request and the servicesIds belong to the tenant you are requesting + */ + async services(parameters: Parameters.Services, callback: Callback): Promise; + /** + * Retrieve the attributes of given service registries. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only + * Connect apps can make this request and the servicesIds belong to the tenant you are requesting + */ + async services(parameters: Parameters.Services, callback?: never): Promise; + async services( + parameters: Parameters.Services, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/atlassian-connect/1/service-registry', + method: 'GET', + params: { + serviceIds: parameters.serviceIds, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/status.ts b/src/version2/status.ts index 5760598e3..abeba72f2 100644 --- a/src/version2/status.ts +++ b/src/version2/status.ts @@ -155,7 +155,7 @@ export class Status { } /** - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of * statuses that match a search on name or project. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -168,7 +168,7 @@ export class Status { callback: Callback, ): Promise; /** - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of * statuses that match a search on name or project. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -193,4 +193,82 @@ export class Status { return this.client.sendRequest(config, callback); } + + /** Returns a page of issue types in a project using a given status. */ + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of issue types in a project using a given status. */ + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback?: never, + ): Promise; + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/statuses/${parameters.statusId}/project/${parameters.projectId}/issueTypeUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of projects using a given status. */ + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given status. */ + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback?: never, + ): Promise; + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/statuses/${parameters.statusId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of workflows using a given status. */ + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of workflows using a given status. */ + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback?: never, + ): Promise; + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/statuses/${parameters.statusId}/workflowUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/tasks.ts b/src/version2/tasks.ts index eed337391..4f1df0dcb 100644 --- a/src/version2/tasks.ts +++ b/src/version2/tasks.ts @@ -15,6 +15,10 @@ export class Tasks { * operation that created the task for details. Task details are not permanently retained. As of September 2019, * details are retained for 14 days although this period may change without notice. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - `read:jira-work` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** either * of: * @@ -33,6 +37,10 @@ export class Tasks { * operation that created the task for details. Task details are not permanently retained. As of September 2019, * details are retained for 14 days although this period may change without notice. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - `read:jira-work` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** either * of: * diff --git a/src/version2/teamsInPlan.ts b/src/version2/teamsInPlan.ts new file mode 100644 index 000000000..8939971c3 --- /dev/null +++ b/src/version2/teamsInPlan.ts @@ -0,0 +1,322 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class TeamsInPlan { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * plan-only and Atlassian teams in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getTeams( + parameters: Parameters.GetTeams, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * plan-only and Atlassian teams in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getTeams( + parameters: Parameters.GetTeams, + callback?: never, + ): Promise; + async getTeams( + parameters: Parameters.GetTeams, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team`, + method: 'GET', + params: { + cursor: parameters.cursor, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Adds an existing Atlassian team to a plan and configures their plannning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback: Callback): Promise; + /** + * Adds an existing Atlassian team to a plan and configures their plannning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback?: never): Promise; + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/atlassian`, + method: 'POST', + data: { + capacity: parameters.capacity, + id: parameters.id, + issueSourceId: parameters.issueSourceId, + planningStyle: parameters.planningStyle, + sprintLength: parameters.sprintLength, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns planning settings for an Atlassian team in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback: Callback, + ): Promise; + /** + * Returns planning settings for an Atlassian team in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback?: never, + ): Promise; + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following planning settings of an Atlassian team in a plan using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get Atlassian team in plan" + * endpoint to find out the order of array elements._ + */ + async updateAtlassianTeam(parameters: Parameters.UpdateAtlassianTeam, callback: Callback): Promise; + /** + * Updates any of the following planning settings of an Atlassian team in a plan using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get Atlassian team in plan" + * endpoint to find out the order of array elements._ + */ + async updateAtlassianTeam(parameters: Parameters.UpdateAtlassianTeam, callback?: never): Promise; + async updateAtlassianTeam( + parameters: Parameters.UpdateAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Removes an Atlassian team from a plan and deletes their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeAtlassianTeam(parameters: Parameters.RemoveAtlassianTeam, callback: Callback): Promise; + /** + * Removes an Atlassian team from a plan and deletes their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeAtlassianTeam(parameters: Parameters.RemoveAtlassianTeam, callback?: never): Promise; + async removeAtlassianTeam( + parameters: Parameters.RemoveAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a plan-only team and configures their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlanOnlyTeam( + parameters: Parameters.CreatePlanOnlyTeam, + callback: Callback, + ): Promise; + /** + * Creates a plan-only team and configures their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlanOnlyTeam(parameters: Parameters.CreatePlanOnlyTeam, callback?: never): Promise; + async createPlanOnlyTeam( + parameters: Parameters.CreatePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/planonly`, + method: 'POST', + data: { + capacity: parameters.capacity, + issueSourceId: parameters.issueSourceId, + memberAccountIds: parameters.memberAccountIds, + name: parameters.name, + planningStyle: parameters.planningStyle, + sprintLength: parameters.sprintLength, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns planning settings for a plan-only team. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback: Callback, + ): Promise; + /** + * Returns planning settings for a plan-only team. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback?: never, + ): Promise; + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following planning settings of a plan-only team using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * - MemberAccountIds + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan-only team" + * endpoint to find out the order of array elements._ + */ + async updatePlanOnlyTeam(parameters: Parameters.UpdatePlanOnlyTeam, callback: Callback): Promise; + /** + * Updates any of the following planning settings of a plan-only team using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * - MemberAccountIds + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan-only team" + * endpoint to find out the order of array elements._ + */ + async updatePlanOnlyTeam(parameters: Parameters.UpdatePlanOnlyTeam, callback?: never): Promise; + async updatePlanOnlyTeam( + parameters: Parameters.UpdatePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a plan-only team and their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePlanOnlyTeam(parameters: Parameters.DeletePlanOnlyTeam, callback: Callback): Promise; + /** + * Deletes a plan-only team and their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePlanOnlyTeam(parameters: Parameters.DeletePlanOnlyTeam, callback?: never): Promise; + async deletePlanOnlyTeam( + parameters: Parameters.DeletePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/uIModificationsApps.ts b/src/version2/uIModificationsApps.ts index 98b23035e..ec3dd8876 100644 --- a/src/version2/uIModificationsApps.ts +++ b/src/version2/uIModificationsApps.ts @@ -11,6 +11,9 @@ export class UIModificationsApps { * Gets UI modifications. UI modifications can only be retrieved by Forge apps. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getUiModifications( parameters: Parameters.GetUiModifications | undefined, @@ -20,6 +23,9 @@ export class UIModificationsApps { * Gets UI modifications. UI modifications can only be retrieved by Forge apps. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getUiModifications( parameters?: Parameters.GetUiModifications, @@ -45,13 +51,17 @@ export class UIModificationsApps { /** * Creates a UI modification. UI modification can only be created by Forge apps. * - * Each app can define up to 100 UI modifications. Each UI modification can define up to 1000 contexts. + * Each app can define up to 3000 UI modifications. Each UI modification can define up to 1000 contexts. The same + * context can be assigned to maximum 100 UI modifications. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the UI modification is created without contexts. * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the * UI modification is created with contexts. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async createUiModification( parameters: Parameters.CreateUiModification, @@ -60,13 +70,17 @@ export class UIModificationsApps { /** * Creates a UI modification. UI modification can only be created by Forge apps. * - * Each app can define up to 100 UI modifications. Each UI modification can define up to 1000 contexts. + * Each app can define up to 3000 UI modifications. Each UI modification can define up to 1000 contexts. The same + * context can be assigned to maximum 100 UI modifications. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the UI modification is created without contexts. * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the * UI modification is created with contexts. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async createUiModification( parameters: Parameters.CreateUiModification, @@ -93,13 +107,17 @@ export class UIModificationsApps { /** * Updates a UI modification. UI modification can only be updated by Forge apps. * - * Each UI modification can define up to 1000 contexts. + * Each UI modification can define up to 1000 contexts. The same context can be assigned to maximum 100 UI + * modifications. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the UI modification is created without contexts. * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the * UI modification is created with contexts. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateUiModification( parameters: Parameters.UpdateUiModification, @@ -108,13 +126,17 @@ export class UIModificationsApps { /** * Updates a UI modification. UI modification can only be updated by Forge apps. * - * Each UI modification can define up to 1000 contexts. + * Each UI modification can define up to 1000 contexts. The same context can be assigned to maximum 100 UI + * modifications. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the UI modification is created without contexts. * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the * UI modification is created with contexts. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateUiModification(parameters: Parameters.UpdateUiModification, callback?: never): Promise; async updateUiModification( @@ -125,10 +147,10 @@ export class UIModificationsApps { url: `/rest/api/2/uiModifications/${parameters.uiModificationId}`, method: 'PUT', data: { - name: parameters.name, - description: parameters.description, - data: parameters.data, contexts: parameters.contexts, + data: parameters.data, + description: parameters.description, + name: parameters.name, }, }; @@ -140,6 +162,9 @@ export class UIModificationsApps { * only be deleted by Forge apps. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteUiModification( parameters: Parameters.DeleteUiModification | string, @@ -150,6 +175,9 @@ export class UIModificationsApps { * only be deleted by Forge apps. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteUiModification( parameters: Parameters.DeleteUiModification | string, diff --git a/src/version2/userSearch.ts b/src/version2/userSearch.ts index 854f51763..b5c7314cb 100644 --- a/src/version2/userSearch.ts +++ b/src/version2/userSearch.ts @@ -75,9 +75,9 @@ export class UserSearch { * assigned to: * * - A new issue, by providing the `projectKeyOrId`. - * - An updated issue, by providing the `issueKey`. - * - To an issue during a transition (workflow action), by providing the `issueKey` and the transition id in - * `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in + * - An updated issue, by providing the `issueKey` or `issueId`. + * - To an issue during a transition (workflow action), by providing the `issueKey` or `issueId` and the transition id + * in `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in * the `expand` parameter of [ Get issue](#api-rest-api-2-issue-issueIdOrKey-get). * * In all these cases, you can pass an account ID to determine if a user can be assigned to an issue. The user is @@ -92,8 +92,9 @@ export class UserSearch { * the user's email address is hidden. See the [Profile visibility * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/) for more details. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * Permission to access Jira. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Assign issues_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async findAssignableUsers( parameters: Parameters.FindAssignableUsers | undefined, @@ -104,9 +105,9 @@ export class UserSearch { * assigned to: * * - A new issue, by providing the `projectKeyOrId`. - * - An updated issue, by providing the `issueKey`. - * - To an issue during a transition (workflow action), by providing the `issueKey` and the transition id in - * `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in + * - An updated issue, by providing the `issueKey` or `issueId`. + * - To an issue during a transition (workflow action), by providing the `issueKey` or `issueId` and the transition id + * in `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in * the `expand` parameter of [ Get issue](#api-rest-api-2-issue-issueIdOrKey-get). * * In all these cases, you can pass an account ID to determine if a user can be assigned to an issue. The user is @@ -121,8 +122,9 @@ export class UserSearch { * the user's email address is hidden. See the [Profile visibility * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/) for more details. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * Permission to access Jira. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Assign issues_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async findAssignableUsers( parameters?: Parameters.FindAssignableUsers, @@ -142,6 +144,7 @@ export class UserSearch { accountId: parameters?.accountId, project: parameters?.project, issueKey: parameters?.issueKey, + issueId: parameters?.issueId, startAt: parameters?.startAt, maxResults: parameters?.maxResults, actionDescriptorId: parameters?.actionDescriptorId, @@ -303,7 +306,7 @@ export class UserSearch { } /** - * Returns a list of users that match the search string and property. + * Returns a list of active users that match the search string and property. * * This operation first applies a filter to match the search string and property, and then takes the filtered users in * the range defined by `startAt` and `maxResults`, up to the thousandth user. To get all the users who match the @@ -325,7 +328,7 @@ export class UserSearch { callback: Callback, ): Promise; /** - * Returns a list of users that match the search string and property. + * Returns a list of active users that match the search string and property. * * This operation first applies a filter to match the search string and property, and then takes the filtered users in * the range defined by `startAt` and `maxResults`, up to the thousandth user. To get all the users who match the @@ -382,7 +385,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -415,7 +420,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -462,7 +469,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -495,7 +504,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -516,7 +527,7 @@ export class UserSearch { params: { query: parameters.query, startAt: parameters.startAt, - maxResults: parameters.maxResults, + maxResult: parameters.maxResult || parameters.maxResults, }, }; diff --git a/src/version2/users.ts b/src/version2/users.ts index 942b398e7..47e7f1647 100644 --- a/src/version2/users.ts +++ b/src/version2/users.ts @@ -18,7 +18,7 @@ export class Users { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUser(parameters: Parameters.GetUser | undefined, callback: Callback): Promise; + async getUser(parameters: Parameters.GetUser, callback: Callback): Promise; /** * Returns a user. * @@ -29,14 +29,14 @@ export class Users { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUser(parameters?: Parameters.GetUser, callback?: never): Promise; - async getUser(parameters?: Parameters.GetUser, callback?: Callback): Promise { + async getUser(parameters: Parameters.GetUser, callback?: never): Promise; + async getUser(parameters: Parameters.GetUser, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/2/user', method: 'GET', params: { - accountId: parameters?.accountId, - expand: parameters?.expand, + accountId: parameters.accountId, + expand: parameters.expand, }, }; @@ -234,44 +234,31 @@ export class Users { * is not passed, the calling user's default columns are set. If no column details are sent, then all default columns * are removed. * - * The parameters for this resource are expressed as HTML form data. For example, in curl: - * - * `curl -X PUT -d columns=summary -d columns=description - * https://your-domain.atlassian.net/rest/api/2/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * - Permission to access Jira, to set the calling user's columns. */ - async setUserColumns( - parameters: Parameters.SetUserColumns | undefined, - callback: Callback, - ): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns, callback: Callback): Promise; /** * Sets the default [ issue table columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If an account ID * is not passed, the calling user's default columns are set. If no column details are sent, then all default columns * are removed. * - * The parameters for this resource are expressed as HTML form data. For example, in curl: - * - * `curl -X PUT -d columns=summary -d columns=description - * https://your-domain.atlassian.net/rest/api/2/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * - Permission to access Jira, to set the calling user's columns. */ - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: never): Promise; - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: Callback): Promise { + async setUserColumns(parameters: Parameters.SetUserColumns, callback?: never): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/2/user/columns', method: 'PUT', params: { - accountId: parameters?.accountId, + accountId: parameters.accountId, }, - data: parameters?.columns, + data: parameters.columns, }; return this.client.sendRequest(config, callback); @@ -311,16 +298,20 @@ export class Users { } /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, 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). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmail( parameters: Parameters.GetUserEmail | string, callback: Callback, ): Promise; /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, 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). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmail( parameters: Parameters.GetUserEmail | string, @@ -344,16 +335,20 @@ export class Users { } /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, 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). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmailBulk( parameters: Parameters.GetUserEmailBulk | string, callback: Callback, ): Promise; /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, 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). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmailBulk( parameters: Parameters.GetUserEmailBulk | string, diff --git a/src/version2/workflowSchemes.ts b/src/version2/workflowSchemes.ts index ef9f340fe..5f337cc9b 100644 --- a/src/version2/workflowSchemes.ts +++ b/src/version2/workflowSchemes.ts @@ -92,6 +92,137 @@ export class WorkflowSchemes { return this.client.sendRequest(config, callback); } + /** + * Returns a list of workflow schemes by providing workflow scheme IDs or project IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflow schemes + * - _Administer projects_ project permissions to access project-scoped workflow schemes + */ + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback: Callback, + ): Promise; + /** + * Returns a list of workflow schemes by providing workflow scheme IDs or project IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflow schemes + * - _Administer projects_ project permissions to access project-scoped workflow schemes + */ + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback?: never, + ): Promise; + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflowscheme/read', + method: 'POST', + params: { + expand: parameters.expand, + }, + data: { + projectIds: parameters.projectIds, + workflowSchemeIds: parameters.workflowSchemeIds, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates company-managed and team-managed project workflow schemes. This API doesn't have a concept of draft, so any + * changes made to a workflow scheme are immediately available. When changing the available statuses for issue types, + * an [asynchronous task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations) + * migrates the issues as defined in the provided mappings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateSchemes(parameters: Parameters.UpdateSchemes, callback: Callback): Promise; + /** + * Updates company-managed and team-managed project workflow schemes. This API doesn't have a concept of draft, so any + * changes made to a workflow scheme are immediately available. When changing the available statuses for issue types, + * an [asynchronous task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations) + * migrates the issues as defined in the provided mappings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateSchemes(parameters: Parameters.UpdateSchemes, callback?: never): Promise; + async updateSchemes(parameters: Parameters.UpdateSchemes, callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflowscheme/update', + method: 'POST', + data: { + defaultWorkflowId: parameters.defaultWorkflowId, + description: parameters.description, + id: parameters.id, + name: parameters.name, + statusMappingsByIssueTypeOverride: parameters.statusMappingsByIssueTypeOverride, + statusMappingsByWorkflows: parameters.statusMappingsByWorkflows, + version: parameters.version, + workflowsForIssueTypes: parameters.workflowsForIssueTypes, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Gets the required status mappings for the desired changes to a workflow scheme. The results are provided per issue + * type and workflow. When updating a workflow scheme, status mappings can be provided per issue type, per workflow, + * or both. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback: Callback, + ): Promise; + /** + * Gets the required status mappings for the desired changes to a workflow scheme. The results are provided per issue + * type and workflow. When updating a workflow scheme, status mappings can be provided per issue type, per workflow, + * or both. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback?: never, + ): Promise; + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflowscheme/update/mappings', + method: 'POST', + data: { + defaultWorkflowId: parameters.defaultWorkflowId, + id: parameters.id, + workflowsForIssueTypes: parameters.workflowsForIssueTypes, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns a workflow scheme. * @@ -593,4 +724,30 @@ export class WorkflowSchemes { return this.client.sendRequest(config, callback); } + + /** Returns a page of projects using a given workflow scheme. */ + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given workflow scheme. */ + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback?: never, + ): Promise; + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/workflowscheme/${parameters.workflowSchemeId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/workflowTransitionRules.ts b/src/version2/workflowTransitionRules.ts index efda85c0b..85874662e 100644 --- a/src/version2/workflowTransitionRules.ts +++ b/src/version2/workflowTransitionRules.ts @@ -92,7 +92,7 @@ export class WorkflowTransitionRules { * * - Disable a rule. * - Add a `tag`. Use this to filter rules in the [Get workflow transition rule - * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-rest-api-3-workflow-rule-config-get). + * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-transition-rules/#api-rest-api-2-workflow-rule-config-get). * * Rules are enabled if the `disabled` parameter is not provided. * @@ -119,7 +119,7 @@ export class WorkflowTransitionRules { * * - Disable a rule. * - Add a `tag`. Use this to filter rules in the [Get workflow transition rule - * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-rest-api-3-workflow-rule-config-get). + * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-transition-rules/#api-rest-api-2-workflow-rule-config-get). * * Rules are enabled if the `disabled` parameter is not provided. * diff --git a/src/version2/workflows.ts b/src/version2/workflows.ts index 1b56d7485..20b0c9c92 100644 --- a/src/version2/workflows.ts +++ b/src/version2/workflows.ts @@ -9,7 +9,11 @@ export class Workflows { constructor(private client: Client) {} /** - * Creates a workflow. Workflow transitions are created with the default system transition rules. + * Creates a workflow. You can define transition rules using the shapes detailed in the following sections. If no + * transitional rules are specified the default system transition rules are used. Note: This only applies to + * company-managed scoped workflows. Use [bulk create + * workflows](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflows/#api-rest-api-2-workflows-create-post) + * to create both team and company-managed scoped workflows. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -19,7 +23,11 @@ export class Workflows { callback: Callback, ): Promise; /** - * Creates a workflow. Workflow transitions are created with the default system transition rules. + * Creates a workflow. You can define transition rules using the shapes detailed in the following sections. If no + * transitional rules are specified the default system transition rules are used. Note: This only applies to + * company-managed scoped workflows. Use [bulk create + * workflows](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflows/#api-rest-api-2-workflows-create-post) + * to create both team and company-managed scoped workflows. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -140,6 +148,84 @@ export class Workflows { return this.client.sendRequest(config, callback); } + /** Returns a page of issue types using a given workflow within a project. */ + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback: Callback, + ): Promise; + /** Returns a page of issue types using a given workflow within a project. */ + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback?: never, + ): Promise; + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/workflow/${parameters.workflowId}/project/${parameters.projectId}/issueTypeUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of projects using a given workflow. */ + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given workflow. */ + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback?: never, + ): Promise; + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/workflow/${parameters.workflowId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of workflow schemes using a given workflow. */ + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback: Callback, + ): Promise; + /** Returns a page of workflow schemes using a given workflow. */ + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback?: never, + ): Promise; + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/workflow/${parameters.workflowId}/workflowSchemes`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns a list of workflows and related statuses by providing workflow names, workflow IDs, or project and issue * types. @@ -173,7 +259,8 @@ export class Workflows { url: '/rest/api/2/workflows', method: 'POST', params: { - expand: parameters.expand, + useTransitionLinksFormat: parameters.useTransitionLinksFormat, + useApprovalConfiguration: parameters.useApprovalConfiguration, }, data: { projectAndIssueTypes: parameters.projectAndIssueTypes, @@ -188,7 +275,7 @@ export class Workflows { /** * Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and * issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of - * project types that the workflow is scoped to. It also includes all rules organized into their broad categories + * project types that the workflow is scoped to. It also includes all rules organised into their broad categories * (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, * Forge). * @@ -204,7 +291,7 @@ export class Workflows { /** * Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and * issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of - * project types that the workflow is scoped to. It also includes all rules organized into their broad categories + * project types that the workflow is scoped to. It also includes all rules organised into their broad categories * (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, * Forge). * @@ -242,7 +329,7 @@ export class Workflows { * - _Administer Jira_ project permission to create all, including global-scoped, workflows * - _Administer projects_ project permissions to create project-scoped workflows */ - async createWorkflows( + async createWorkflows( parameters: Parameters.CreateWorkflows, callback: Callback, ): Promise; @@ -254,11 +341,11 @@ export class Workflows { * - _Administer Jira_ project permission to create all, including global-scoped, workflows * - _Administer projects_ project permissions to create project-scoped workflows */ - async createWorkflows( + async createWorkflows( parameters: Parameters.CreateWorkflows, callback?: never, ): Promise; - async createWorkflows( + async createWorkflows( parameters: Parameters.CreateWorkflows, callback?: Callback, ): Promise { @@ -315,6 +402,57 @@ export class Workflows { return this.client.sendRequest(config, callback); } + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of global + * and project workflows. If workflow names are specified in query string, details of those workflows are returned. + * Otherwise, all workflows are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async searchWorkflows( + parameters: Parameters.SearchWorkflows | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of global + * and project workflows. If workflow names are specified in query string, details of those workflows are returned. + * Otherwise, all workflows are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async searchWorkflows( + parameters?: Parameters.SearchWorkflows, + callback?: never, + ): Promise; + async searchWorkflows( + parameters?: Parameters.SearchWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflows/search', + method: 'GET', + params: { + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + expand: parameters?.expand, + queryString: parameters?.queryString, + orderBy: parameters?.orderBy, + scope: parameters?.scope, + isActive: parameters?.isActive, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Update workflows and related statuses. * @@ -323,7 +461,7 @@ export class Workflows { * - _Administer Jira_ project permission to create all, including global-scoped, workflows * - _Administer projects_ project permissions to create project-scoped workflows */ - async updateWorkflows( + async updateWorkflows( parameters: Parameters.UpdateWorkflows, callback: Callback, ): Promise; @@ -335,11 +473,11 @@ export class Workflows { * - _Administer Jira_ project permission to create all, including global-scoped, workflows * - _Administer projects_ project permissions to create project-scoped workflows */ - async updateWorkflows( + async updateWorkflows( parameters: Parameters.UpdateWorkflows, callback?: never, ): Promise; - async updateWorkflows( + async updateWorkflows( parameters: Parameters.UpdateWorkflows, callback?: Callback, ): Promise { diff --git a/src/version3/issueNotificationSchemes.ts b/src/version3/issueNotificationSchemes.ts index b917f3ae0..4c476c3ac 100644 --- a/src/version3/issueNotificationSchemes.ts +++ b/src/version3/issueNotificationSchemes.ts @@ -215,6 +215,38 @@ export class IssueNotificationSchemes { return this.client.sendRequest(config, callback); } + /** + * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addNotifications(parameters: Parameters.AddNotifications, callback: Callback): Promise; + /** + * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addNotifications(parameters: Parameters.AddNotifications, callback?: never): Promise; + async addNotifications(parameters: Parameters.AddNotifications, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/notificationscheme/${parameters.id}/notification`, + method: 'PUT', + data: { + notificationSchemeEvents: parameters.notificationSchemeEvents, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Deletes a notification scheme. * diff --git a/src/version3/jqlFunctionsApps.ts b/src/version3/jqlFunctionsApps.ts index 190583ed5..02eeff108 100644 --- a/src/version3/jqlFunctionsApps.ts +++ b/src/version3/jqlFunctionsApps.ts @@ -63,7 +63,7 @@ export class JqlFunctionsApps { * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updatePrecomputations( - parameters: Parameters.UpdatePrecomputations | undefined, + parameters: Parameters.UpdatePrecomputations, callback: Callback, ): Promise; /** @@ -75,19 +75,19 @@ export class JqlFunctionsApps { * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we * recommend adding it to your app's scope list because we will eventually make it mandatory. */ - async updatePrecomputations(parameters?: Parameters.UpdatePrecomputations, callback?: never): Promise; + async updatePrecomputations(parameters: Parameters.UpdatePrecomputations, callback?: never): Promise; async updatePrecomputations( - parameters?: Parameters.UpdatePrecomputations, + parameters: Parameters.UpdatePrecomputations, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/jql/function/computation', method: 'POST', params: { - skipNotFoundPrecomputations: parameters?.skipNotFoundPrecomputations, + skipNotFoundPrecomputations: parameters.skipNotFoundPrecomputations, }, data: { - values: parameters?.values, + values: parameters.values, }, }; @@ -105,7 +105,7 @@ export class JqlFunctionsApps { * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getPrecomputationsByID( - parameters: Parameters.GetPrecomputationsByID | undefined, + parameters: Parameters.GetPrecomputationsByID, callback: Callback, ): Promise; /** @@ -119,21 +119,21 @@ export class JqlFunctionsApps { * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getPrecomputationsByID( - parameters?: Parameters.GetPrecomputationsByID, + parameters: Parameters.GetPrecomputationsByID, callback?: never, ): Promise; async getPrecomputationsByID( - parameters?: Parameters.GetPrecomputationsByID, + parameters: Parameters.GetPrecomputationsByID, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/jql/function/computation/search', method: 'POST', params: { - orderBy: parameters?.orderBy, + orderBy: parameters.orderBy, }, data: { - precomputationIDs: parameters?.precomputationIDs, + precomputationIDs: parameters.precomputationIDs, }, }; diff --git a/src/version3/models/index.ts b/src/version3/models/index.ts index 324e5e5c1..3cfce66b3 100644 --- a/src/version3/models/index.ts +++ b/src/version3/models/index.ts @@ -1,71 +1,3 @@ -export * from './updateDefaultProjectClassification'; -export * from './workflowUpdateRequest'; -export * from './mappingsByIssueTypeOverride'; -export * from './createCrossProjectReleaseRequest'; -export * from './validationOptionsForCreate'; -export * from './createCustomFieldRequest'; -export * from './createExclusionRulesRequest'; -export * from './createIssueSourceRequest'; -export * from './createPermissionRequest'; -export * from './createSchedulingRequest'; -export * from './priorityMapping'; -export * from './getPlanOnlyTeamResponse'; -export * from './getAtlassianTeamResponse'; -export * from './pageWithCursorGetTeamResponseForPage'; -export * from './serviceRegistry'; -export * from './updatePrioritySchemeRequest'; -export * from './updatePrioritySchemeResponse'; -export * from './suggestedMappingsRequest'; -export * from './priorityWithSequence'; -export * from './prioritySchemeWithPaginatedPrioritiesAndProjects'; -export * from './prioritySchemeId'; -export * from './plan'; -export * from './pageWithCursorGetPlanResponseForPage'; -export * from './versionRelatedWork'; -export * from './component'; -export * from './worklogsMoveRequest'; -export * from './searchAndReconcileResults'; -export * from './projectAndIssueTypePair'; -export * from './idSearchRequest'; -export * from './idSearchResults'; -export * from './jqlCountRequest'; -export * from './jqlCount'; -export * from './pageOfCreateMetaIssueTypeWithField'; -export * from './issueLimitReport'; -export * from './pageOfCreateMetaIssueTypes'; -export * from './bulkIssue'; -export * from './bulkChangelogRequest'; -export * from './bulkChangelog'; -export * from './workflowUpdateValidateRequest'; -export * from './workflowUpdate'; -export * from './workflowValidationErrorList'; -export * from './workflowCreateRequest'; -export * from './workflowCreate'; -export * from './workflowCapabilities'; -export * from './workflowRead'; -export * from './jqlFunctionPrecomputationGetByIdRequest'; -export * from './jqlFunctionPrecomputationGetByIdResponse'; -export * from './bulkOperationProgress'; -export * from './issueBulkTransitionPayload'; -export * from './bulkTransitionGetAvailableTransitions'; -export * from './issueBulkMovePayload'; -export * from './issueBulkEditPayload'; -export * from './bulkEditGetFields'; -export * from './issueBulkDeletePayload'; -export * from './submittedBulkOperation'; -export * from './dataClassificationLevels'; -export * from './workflowSchemeUpdateRequiredMappingsResponse'; -export * from './workflowSchemeReadRequest'; -export * from './mappingsByWorkflow'; -export * from './documentVersion'; -export * from './workflowSchemeAssociation'; -export * from './workflowSchemeReadResponse'; -export * from './jiraExpressionEvaluateContext'; -export * from './evaluatedJiraExpression'; -export * from './configurationsListParameters'; -export * from './pageBulkContextualConfiguration'; -export * from './workspaceDataPolicy'; -export * from './projectDataPolicies'; export * from './actorInput'; export * from './actorsMap'; export * from './addField'; @@ -96,17 +28,23 @@ export * from './avatar'; export * from './avatars'; export * from './avatarUrls'; export * from './avatarWithDetails'; +export * from './bulkChangelog'; +export * from './bulkChangelogRequest'; export * from './bulkChangeOwnerDetails'; export * from './bulkCustomFieldOptionCreateRequest'; export * from './bulkCustomFieldOptionUpdateRequest'; +export * from './bulkEditGetFields'; export * from './bulkEditShareableEntity'; +export * from './bulkIssue'; export * from './bulkIssueIsWatching'; export * from './bulkIssuePropertyUpdateRequest'; export * from './bulkOperationErrorResult'; +export * from './bulkOperationProgress'; export * from './bulkPermissionGrants'; export * from './bulkPermissionsRequest'; export * from './bulkProjectPermissionGrants'; export * from './bulkProjectPermissions'; +export * from './bulkTransitionGetAvailableTransitions'; export * from './changeDetails'; export * from './changedValue'; export * from './changedWorklog'; @@ -114,9 +52,11 @@ export * from './changedWorklogs'; export * from './changelog'; export * from './columnItem'; export * from './comment'; +export * from './component'; export * from './componentIssuesCount'; export * from './componentWithIssueCount'; export * from './configuration'; +export * from './configurationsListParameters'; export * from './connectCustomFieldValue'; export * from './connectCustomFieldValues'; export * from './connectModule'; @@ -129,14 +69,20 @@ export * from './containerOfWorkflowSchemeAssociations'; export * from './contextForProjectAndIssueType'; export * from './contextualConfiguration'; export * from './convertedJQLQueries'; +export * from './createCrossProjectReleaseRequest'; export * from './createCustomFieldContext'; +export * from './createCustomFieldRequest'; export * from './createdIssue'; export * from './createdIssues'; +export * from './createExclusionRulesRequest'; export * from './createIssueSecuritySchemeDetails'; +export * from './createIssueSourceRequest'; export * from './createNotificationSchemeDetails'; +export * from './createPermissionRequest'; export * from './createPriorityDetails'; export * from './createProjectDetails'; export * from './createResolutionDetails'; +export * from './createSchedulingRequest'; export * from './createUiModificationDetails'; export * from './createUpdateRoleRequest'; export * from './createWorkflowCondition'; @@ -171,18 +117,21 @@ export * from './dashboardGadgetResponse'; export * from './dashboardGadgetSettings'; export * from './dashboardGadgetUpdateRequest'; export * from './dashboardUser'; +export * from './dataClassificationLevels'; export * from './dateRangeFilter'; export * from './defaultLevelValue'; export * from './defaultShareScope'; export * from './defaultWorkflow'; export * from './deleteAndReplaceVersion'; export * from './document'; +export * from './documentVersion'; export * from './enhancedSearchRequest'; export * from './entityProperty'; export * from './entityPropertyDetails'; export * from './error'; export * from './errorCollection'; export * from './errors'; +export * from './evaluatedJiraExpression'; export * from './eventNotification'; export * from './exportArchivedIssuesTaskProgress'; export * from './failedWebhook'; @@ -211,6 +160,8 @@ export * from './foundGroups'; export * from './foundUsers'; export * from './foundUsersAndGroups'; export * from './functionReferenceData'; +export * from './getAtlassianTeamResponse'; +export * from './getPlanOnlyTeamResponse'; export * from './globalScope'; export * from './group'; export * from './groupDetails'; @@ -223,10 +174,16 @@ export * from './historyMetadataParticipant'; export * from './icon'; export * from './id'; export * from './idOrKey'; +export * from './idSearchRequest'; +export * from './idSearchResults'; export * from './includedFields'; export * from './issue'; export * from './issueArchivalSync'; export * from './issueArchivalSyncRequest'; +export * from './issueBulkDeletePayload'; +export * from './issueBulkEditPayload'; +export * from './issueBulkMovePayload'; +export * from './issueBulkTransitionPayload'; export * from './issueChangelogIds'; export * from './issueCommentListRequest'; export * from './issueContextVariable'; @@ -240,6 +197,7 @@ export * from './issueFieldOptionCreate'; export * from './issueFieldOptionScope'; export * from './issueFilterForBulkPropertyDelete'; export * from './issueFilterForBulkPropertySet'; +export * from './issueLimitReport'; export * from './issueLink'; export * from './issueLinkType'; export * from './issueLinkTypes'; @@ -290,13 +248,13 @@ export * from './jExpEvaluateIssuesJqlMetaData'; export * from './jExpEvaluateIssuesMeta'; export * from './jExpEvaluateJiraExpressionResult'; export * from './jExpEvaluateMetaData'; -export * from './jiraExpressionEvaluateContext'; export * from './jexpIssues'; export * from './jexpJqlIssues'; export * from './jiraExpressionAnalysis'; export * from './jiraExpressionComplexity'; export * from './jiraExpressionEvalContext'; export * from './jiraExpressionEvalRequest'; +export * from './jiraExpressionEvaluateContext'; export * from './jiraExpressionEvaluationMetaData'; export * from './jiraExpressionEvalUsingEnhancedSearchRequest'; export * from './jiraExpressionForAnalysis'; @@ -306,7 +264,11 @@ export * from './jiraExpressionsComplexity'; export * from './jiraExpressionsComplexityValue'; export * from './jiraExpressionValidationError'; export * from './jiraStatus'; +export * from './jqlCount'; +export * from './jqlCountRequest'; export * from './jqlFunctionPrecomputation'; +export * from './jqlFunctionPrecomputationGetByIdRequest'; +export * from './jqlFunctionPrecomputationGetByIdResponse'; export * from './jqlFunctionPrecomputationUpdate'; export * from './jqlFunctionPrecomputationUpdateRequest'; export * from './jQLPersonalDataMigrationRequest'; @@ -332,6 +294,8 @@ export * from './linkIssueRequestJson'; export * from './listWrapperCallbackApplicationRole'; export * from './listWrapperCallbackGroupName'; export * from './locale'; +export * from './mappingsByIssueTypeOverride'; +export * from './mappingsByWorkflow'; export * from './mark'; export * from './moveField'; export * from './multiIssueEntityProperties'; @@ -357,6 +321,7 @@ export * from './operations'; export * from './orderOfCustomFieldOptions'; export * from './orderOfIssueTypes'; export * from './pageBeanFieldConfigurationDetails'; +export * from './pageBulkContextualConfiguration'; export * from './pageChangelog'; export * from './pageComment'; export * from './pageComponentWithIssueCount'; @@ -389,6 +354,8 @@ export * from './pageJqlFunctionPrecomputation'; export * from './pageNotificationScheme'; export * from './pageOfChangelogs'; export * from './pageOfComments'; +export * from './pageOfCreateMetaIssueTypes'; +export * from './pageOfCreateMetaIssueTypeWithField'; export * from './pageOfDashboards'; export * from './pageOfStatuses'; export * from './pageOfWorklogs'; @@ -409,6 +376,8 @@ export * from './pageUserDetails'; export * from './pageUserKey'; export * from './pageVersion'; export * from './pageWebhook'; +export * from './pageWithCursorGetPlanResponseForPage'; +export * from './pageWithCursorGetTeamResponseForPage'; export * from './pageWorkflow'; export * from './pageWorkflowScheme'; export * from './pageWorkflowTransitionRules'; @@ -423,12 +392,19 @@ export * from './permissionScheme'; export * from './permissionSchemes'; export * from './permissionsKeys'; export * from './permittedProjects'; +export * from './plan'; export * from './priority'; export * from './priorityId'; +export * from './priorityMapping'; +export * from './prioritySchemeId'; +export * from './prioritySchemeWithPaginatedPrioritiesAndProjects'; +export * from './priorityWithSequence'; export * from './project'; +export * from './projectAndIssueTypePair'; export * from './projectAvatars'; export * from './projectCategory'; export * from './projectComponent'; +export * from './projectDataPolicies'; export * from './projectDetails'; export * from './projectEmailAddress'; export * from './projectFeature'; @@ -485,6 +461,7 @@ export * from './screenSchemeId'; export * from './screenTypes'; export * from './screenWithTab'; export * from './searchAndReconcileResults'; +export * from './searchAndReconcileResults'; export * from './searchAutoCompleteFilter'; export * from './searchRequest'; export * from './searchResults'; @@ -498,6 +475,7 @@ export * from './securitySchemeMembersRequest'; export * from './securitySchemes'; export * from './securitySchemeWithProjects'; export * from './serverInformation'; +export * from './serviceRegistry'; export * from './setDefaultLevelsRequest'; export * from './setDefaultPriorityRequest'; export * from './setDefaultResolutionRequest'; @@ -514,10 +492,15 @@ export * from './statusCreate'; export * from './statusCreateRequest'; export * from './statusDetails'; export * from './statusMapping'; +export * from './statusProjectIssueTypeUsage'; +export * from './statusProjectUsage'; export * from './statusScope'; export * from './statusUpdate'; export * from './statusUpdateRequest'; +export * from './statusWorkflowUsage'; +export * from './submittedBulkOperation'; export * from './suggestedIssue'; +export * from './suggestedMappingsRequest'; export * from './systemAvatars'; export * from './taskProgressObject'; export * from './taskProgressRemoveOptionFromIssuesResult'; @@ -531,12 +514,15 @@ export * from './uiModificationDetails'; export * from './uiModificationIdentifiers'; export * from './unrestrictedUserEmail'; export * from './updateCustomFieldDetails'; +export * from './updateDefaultProjectClassification'; export * from './updatedProjectCategory'; export * from './updateFieldConfigurationSchemeDetails'; export * from './updateIssueSecurityLevelDetails'; export * from './updateIssueSecuritySchemeRequest'; export * from './updateNotificationSchemeDetails'; export * from './updatePriorityDetails'; +export * from './updatePrioritySchemeRequest'; +export * from './updatePrioritySchemeResponse'; export * from './updateProjectDetails'; export * from './updateResolutionDetails'; export * from './updateScreenDetails'; @@ -552,10 +538,12 @@ export * from './userKey'; export * from './userList'; export * from './userMigration'; export * from './userPickerUser'; +export * from './validationOptionsForCreate'; export * from './version'; export * from './versionIssueCounts'; export * from './versionIssuesStatus'; export * from './versionMove'; +export * from './versionRelatedWork'; export * from './versionUnresolvedIssuesCount'; export * from './versionUsageInCustomField'; export * from './visibility'; @@ -566,16 +554,29 @@ export * from './webhookDetails'; export * from './webhookRegistrationDetails'; export * from './webhooksExpirationDate'; export * from './workflow'; +export * from './workflowCapabilities'; export * from './workflowCondition'; +export * from './workflowCreate'; +export * from './workflowCreateRequest'; export * from './workflowId'; export * from './workflowOperations'; +export * from './workflowProjectIssueTypeUsage'; +export * from './workflowProjectUsage'; +export * from './workflowRead'; export * from './workflowRules'; export * from './workflowRulesSearch'; export * from './workflowRulesSearchDetails'; export * from './workflowScheme'; +export * from './workflowSchemeAssociation'; export * from './workflowSchemeAssociations'; export * from './workflowSchemeIdName'; export * from './workflowSchemeProjectAssociation'; +export * from './workflowSchemeProjectUsage'; +export * from './workflowSchemeReadRequest'; +export * from './workflowSchemeReadResponse'; +export * from './workflowSchemeUpdateRequiredMappingsResponse'; +export * from './workflowSchemeUsage'; +export * from './workflowSearchResponse'; export * from './workflowStatus'; export * from './workflowStatusProperties'; export * from './workflowsWithTransitionRulesDetails'; @@ -587,5 +588,11 @@ export * from './workflowTransitionRulesDetails'; export * from './workflowTransitionRulesUpdate'; export * from './workflowTransitionRulesUpdateErrorDetails'; export * from './workflowTransitionRulesUpdateErrors'; +export * from './workflowUpdate'; +export * from './workflowUpdateRequest'; +export * from './workflowUpdateValidateRequest'; +export * from './workflowValidationErrorList'; export * from './worklog'; export * from './worklogIdsRequest'; +export * from './worklogsMoveRequest'; +export * from './workspaceDataPolicy'; diff --git a/src/version3/models/projectUsage.ts b/src/version3/models/projectUsage.ts new file mode 100644 index 000000000..2cc468d44 --- /dev/null +++ b/src/version3/models/projectUsage.ts @@ -0,0 +1,5 @@ +/** The project. */ +export interface ProjectUsage { + /** The project ID. */ + id?: string; +} diff --git a/src/version3/models/projectUsagePage.ts b/src/version3/models/projectUsagePage.ts new file mode 100644 index 000000000..f018c8e7b --- /dev/null +++ b/src/version3/models/projectUsagePage.ts @@ -0,0 +1,9 @@ +import { ProjectUsage } from './projectUsage'; + +/** A page of projects. */ +export interface ProjectUsagePage { + /** Page token for the next page of project usages. */ + nextPageToken?: string; + /** The list of projects. */ + values?: ProjectUsage[]; +} diff --git a/src/version3/models/statusProjectIssueTypeUsage.ts b/src/version3/models/statusProjectIssueTypeUsage.ts new file mode 100644 index 000000000..a6e133af1 --- /dev/null +++ b/src/version3/models/statusProjectIssueTypeUsage.ts @@ -0,0 +1,10 @@ +import { StatusProjectIssueTypeUsagePage } from './statusProjectIssueTypeUsagePage'; + +/** The issue types using this status in a project. */ +export interface StatusProjectIssueTypeUsage { + issueTypes?: StatusProjectIssueTypeUsagePage; + /** The project ID. */ + projectId?: string; + /** The status ID. */ + statusId?: string; +} diff --git a/src/version3/models/statusProjectIssueTypeUsagePage.ts b/src/version3/models/statusProjectIssueTypeUsagePage.ts new file mode 100644 index 000000000..b273c4e6c --- /dev/null +++ b/src/version3/models/statusProjectIssueTypeUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusProjectIssueTypeUsage } from './statusProjectIssueTypeUsage'; + +/** A page of issue types. */ +export interface StatusProjectIssueTypeUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of issue types. */ + values?: StatusProjectIssueTypeUsage[]; +} diff --git a/src/version3/models/statusProjectUsage.ts b/src/version3/models/statusProjectUsage.ts new file mode 100644 index 000000000..c1390878c --- /dev/null +++ b/src/version3/models/statusProjectUsage.ts @@ -0,0 +1,8 @@ +import { StatusProjectUsagePage } from './statusProjectUsagePage'; + +/** The projects using this status. */ +export interface StatusProjectUsage { + projects?: StatusProjectUsagePage; + /** The status ID. */ + statusId?: string; +} diff --git a/src/version3/models/statusProjectUsagePage.ts b/src/version3/models/statusProjectUsagePage.ts new file mode 100644 index 000000000..5a9583f81 --- /dev/null +++ b/src/version3/models/statusProjectUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusProjectUsage } from './statusProjectUsage'; + +/** A page of projects. */ +export interface StatusProjectUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of projects. */ + values?: StatusProjectUsage[]; +} diff --git a/src/version3/models/statusWorkflowUsage.ts b/src/version3/models/statusWorkflowUsage.ts new file mode 100644 index 000000000..53780c802 --- /dev/null +++ b/src/version3/models/statusWorkflowUsage.ts @@ -0,0 +1,8 @@ +import { StatusWorkflowUsagePage } from './statusWorkflowUsagePage'; + +/** Workflows using the status. */ +export interface StatusWorkflowUsage { + /** The status ID. */ + statusId?: string; + workflows?: StatusWorkflowUsagePage; +} diff --git a/src/version3/models/statusWorkflowUsagePage.ts b/src/version3/models/statusWorkflowUsagePage.ts new file mode 100644 index 000000000..6d358d851 --- /dev/null +++ b/src/version3/models/statusWorkflowUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusWorkflowUsageWorkflow } from './statusWorkflowUsageWorkflow'; + +/** A page of workflows. */ +export interface StatusWorkflowUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of statuses. */ + values?: StatusWorkflowUsageWorkflow[]; +} diff --git a/src/version3/models/statusWorkflowUsageWorkflow.ts b/src/version3/models/statusWorkflowUsageWorkflow.ts new file mode 100644 index 000000000..3e860725b --- /dev/null +++ b/src/version3/models/statusWorkflowUsageWorkflow.ts @@ -0,0 +1,5 @@ +/** The worflow. */ +export interface StatusWorkflowUsageWorkflow { + /** The workflow ID. */ + id?: string; +} diff --git a/src/version3/models/workflowProjectIssueTypeUsage.ts b/src/version3/models/workflowProjectIssueTypeUsage.ts new file mode 100644 index 000000000..9545964f0 --- /dev/null +++ b/src/version3/models/workflowProjectIssueTypeUsage.ts @@ -0,0 +1,10 @@ +import { WorkflowProjectIssueTypeUsagePage } from './workflowProjectIssueTypeUsagePage'; + +/** Issue types associated with the workflow for a project. */ +export interface WorkflowProjectIssueTypeUsage { + issueTypes?: WorkflowProjectIssueTypeUsagePage; + /** The ID of the project. */ + projectId?: string; + /** The ID of the workflow. */ + workflowId?: string; +} diff --git a/src/version3/models/workflowProjectIssueTypeUsagePage.ts b/src/version3/models/workflowProjectIssueTypeUsagePage.ts new file mode 100644 index 000000000..33efc451d --- /dev/null +++ b/src/version3/models/workflowProjectIssueTypeUsagePage.ts @@ -0,0 +1,9 @@ +import { WorkflowProjectIssueTypeUsage } from './workflowProjectIssueTypeUsage'; + +/** A page of issue types. */ +export interface WorkflowProjectIssueTypeUsagePage { + /** Token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of issue types. */ + values?: WorkflowProjectIssueTypeUsage[]; +} diff --git a/src/version3/models/workflowProjectUsage.ts b/src/version3/models/workflowProjectUsage.ts new file mode 100644 index 000000000..6276eb98c --- /dev/null +++ b/src/version3/models/workflowProjectUsage.ts @@ -0,0 +1,8 @@ +import { ProjectUsagePage } from './projectUsagePage'; + +/** Projects using the workflow. */ +export interface WorkflowProjectUsage { + projects?: ProjectUsagePage; + /** The workflow ID. */ + workflowId?: string; +} diff --git a/src/version3/models/workflowSchemeProjectUsage.ts b/src/version3/models/workflowSchemeProjectUsage.ts new file mode 100644 index 000000000..525818ea3 --- /dev/null +++ b/src/version3/models/workflowSchemeProjectUsage.ts @@ -0,0 +1,8 @@ +import { ProjectUsagePage } from './projectUsagePage'; + +/** Projects using the workflow scheme. */ +export interface WorkflowSchemeProjectUsage { + projects?: ProjectUsagePage; + /** The workflow scheme ID. */ + workflowSchemeId?: string; +} diff --git a/src/version3/models/workflowSchemeUsage.ts b/src/version3/models/workflowSchemeUsage.ts new file mode 100644 index 000000000..0c2852209 --- /dev/null +++ b/src/version3/models/workflowSchemeUsage.ts @@ -0,0 +1,8 @@ +import { WorkflowSchemeUsagePage } from './workflowSchemeUsagePage'; + +/** Workflow schemes using the workflow. */ +export interface WorkflowSchemeUsage { + /** The workflow ID. */ + workflowId?: string; + workflowSchemes?: WorkflowSchemeUsagePage; +} diff --git a/src/version3/models/workflowSchemeUsagePage.ts b/src/version3/models/workflowSchemeUsagePage.ts new file mode 100644 index 000000000..5b883978f --- /dev/null +++ b/src/version3/models/workflowSchemeUsagePage.ts @@ -0,0 +1,9 @@ +import { WorkflowSchemeUsage } from './workflowSchemeUsage'; + +/** A page of workflow schemes. */ +export interface WorkflowSchemeUsagePage { + /** Token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of workflow schemes. */ + values?: WorkflowSchemeUsage[]; +} diff --git a/src/version3/models/workflowSearchResponse.ts b/src/version3/models/workflowSearchResponse.ts new file mode 100644 index 000000000..966016a32 --- /dev/null +++ b/src/version3/models/workflowSearchResponse.ts @@ -0,0 +1,22 @@ +import { JiraWorkflowStatus } from './jiraWorkflowStatus'; +import { JiraWorkflow } from './jiraWorkflow'; + +/** Page of items, including workflows and related statuses. */ +export interface WorkflowSearchResponse { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** List of statuses. */ + statuses?: JiraWorkflowStatus[]; + /** The number of items returned. */ + total?: number; + /** List of workflows. */ + values?: JiraWorkflow[]; +} diff --git a/src/version3/parameters/addNotifications.ts b/src/version3/parameters/addNotifications.ts new file mode 100644 index 000000000..180d1ed1d --- /dev/null +++ b/src/version3/parameters/addNotifications.ts @@ -0,0 +1,8 @@ +import { NotificationSchemeEventDetails } from '../models'; + +export interface AddNotifications { + /** The ID of the notification scheme. */ + id: string; + /** The list of notifications which should be added to the notification scheme. */ + notificationSchemeEvents: NotificationSchemeEventDetails[]; +} diff --git a/src/version3/parameters/getAvailablePrioritiesByPriorityScheme.ts b/src/version3/parameters/getAvailablePrioritiesByPriorityScheme.ts index e576614d0..da7ba318f 100644 --- a/src/version3/parameters/getAvailablePrioritiesByPriorityScheme.ts +++ b/src/version3/parameters/getAvailablePrioritiesByPriorityScheme.ts @@ -1,8 +1,8 @@ export interface GetAvailablePrioritiesByPriorityScheme { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The string to query priorities on by name. */ query?: string; /** The priority scheme ID. */ diff --git a/src/version3/parameters/getNotificationSchemeToProjectMappings.ts b/src/version3/parameters/getNotificationSchemeToProjectMappings.ts index 34cfec0e7..bfb504e6e 100644 --- a/src/version3/parameters/getNotificationSchemeToProjectMappings.ts +++ b/src/version3/parameters/getNotificationSchemeToProjectMappings.ts @@ -1,8 +1,8 @@ export interface GetNotificationSchemeToProjectMappings { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of notifications scheme IDs to be filtered out */ notificationSchemeId?: string[]; /** The list of project IDs to be filtered out */ diff --git a/src/version3/parameters/getPrioritiesByPriorityScheme.ts b/src/version3/parameters/getPrioritiesByPriorityScheme.ts index 76d7512d9..6cd7fceda 100644 --- a/src/version3/parameters/getPrioritiesByPriorityScheme.ts +++ b/src/version3/parameters/getPrioritiesByPriorityScheme.ts @@ -1,8 +1,8 @@ export interface GetPrioritiesByPriorityScheme { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The priority scheme ID. */ schemeId: string; } diff --git a/src/version3/parameters/getPrioritySchemes.ts b/src/version3/parameters/getPrioritySchemes.ts index 0ce9f0840..bb8715103 100644 --- a/src/version3/parameters/getPrioritySchemes.ts +++ b/src/version3/parameters/getPrioritySchemes.ts @@ -1,8 +1,8 @@ export interface GetPrioritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * A set of priority IDs to filter by. To include multiple IDs, provide an ampersand-separated list. For example, * `priorityId=10000&priorityId=10001`. diff --git a/src/version3/parameters/getProjectIssueTypeUsagesForStatus.ts b/src/version3/parameters/getProjectIssueTypeUsagesForStatus.ts new file mode 100644 index 000000000..80deab4e9 --- /dev/null +++ b/src/version3/parameters/getProjectIssueTypeUsagesForStatus.ts @@ -0,0 +1,10 @@ +export interface GetProjectIssueTypeUsagesForStatus { + /** The statusId to fetch issue type usages for */ + statusId: string; + /** The projectId to fetch issue type usages for */ + projectId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getProjectUsagesForStatus.ts b/src/version3/parameters/getProjectUsagesForStatus.ts new file mode 100644 index 000000000..0e8913c90 --- /dev/null +++ b/src/version3/parameters/getProjectUsagesForStatus.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForStatus { + /** The statusId to fetch project usages for */ + statusId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getProjectUsagesForWorkflow.ts b/src/version3/parameters/getProjectUsagesForWorkflow.ts new file mode 100644 index 000000000..e70544f1f --- /dev/null +++ b/src/version3/parameters/getProjectUsagesForWorkflow.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForWorkflow { + /** The workflow ID */ + workflowId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getProjectUsagesForWorkflowScheme.ts b/src/version3/parameters/getProjectUsagesForWorkflowScheme.ts new file mode 100644 index 000000000..026695960 --- /dev/null +++ b/src/version3/parameters/getProjectUsagesForWorkflowScheme.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForWorkflowScheme { + /** The workflow scheme ID */ + workflowSchemeId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getProjectsByPriorityScheme.ts b/src/version3/parameters/getProjectsByPriorityScheme.ts index 6bbbf10e4..607505f6d 100644 --- a/src/version3/parameters/getProjectsByPriorityScheme.ts +++ b/src/version3/parameters/getProjectsByPriorityScheme.ts @@ -1,8 +1,8 @@ export interface GetProjectsByPriorityScheme { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The project IDs to filter by. For example, `projectId=10000&projectId=10001`. */ projectId?: number[]; /** The priority scheme ID. */ diff --git a/src/version3/parameters/getSecurityLevelMembers.ts b/src/version3/parameters/getSecurityLevelMembers.ts index ca3cfe5b2..d1ed167d6 100644 --- a/src/version3/parameters/getSecurityLevelMembers.ts +++ b/src/version3/parameters/getSecurityLevelMembers.ts @@ -1,8 +1,8 @@ export interface GetSecurityLevelMembers { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security level member IDs. To include multiple issue security level members separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version3/parameters/getSecurityLevels.ts b/src/version3/parameters/getSecurityLevels.ts index 05024f88e..4c49f9375 100644 --- a/src/version3/parameters/getSecurityLevels.ts +++ b/src/version3/parameters/getSecurityLevels.ts @@ -1,8 +1,8 @@ export interface GetSecurityLevels { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security scheme level IDs. To include multiple issue security levels, separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version3/parameters/getUser.ts b/src/version3/parameters/getUser.ts index 6d17d114e..935f89a6d 100644 --- a/src/version3/parameters/getUser.ts +++ b/src/version3/parameters/getUser.ts @@ -5,15 +5,15 @@ export interface GetUser { */ accountId?: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide) + * for details. */ username?: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide) + * for details. */ key?: string; /** diff --git a/src/version3/parameters/getWorkflowProjectIssueTypeUsages.ts b/src/version3/parameters/getWorkflowProjectIssueTypeUsages.ts new file mode 100644 index 000000000..42ce81e47 --- /dev/null +++ b/src/version3/parameters/getWorkflowProjectIssueTypeUsages.ts @@ -0,0 +1,10 @@ +export interface GetWorkflowProjectIssueTypeUsages { + /** The workflow ID */ + workflowId: string; + /** The project ID */ + projectId: number; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getWorkflowSchemeUsagesForWorkflow.ts b/src/version3/parameters/getWorkflowSchemeUsagesForWorkflow.ts new file mode 100644 index 000000000..dae488d33 --- /dev/null +++ b/src/version3/parameters/getWorkflowSchemeUsagesForWorkflow.ts @@ -0,0 +1,8 @@ +export interface GetWorkflowSchemeUsagesForWorkflow { + /** The workflow ID */ + workflowId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getWorkflowUsagesForStatus.ts b/src/version3/parameters/getWorkflowUsagesForStatus.ts new file mode 100644 index 000000000..cdfb21d97 --- /dev/null +++ b/src/version3/parameters/getWorkflowUsagesForStatus.ts @@ -0,0 +1,8 @@ +export interface GetWorkflowUsagesForStatus { + /** The statusId to fetch workflow usages for */ + statusId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/index.ts b/src/version3/parameters/index.ts index 88cff2064..b38a6c6c2 100644 --- a/src/version3/parameters/index.ts +++ b/src/version3/parameters/index.ts @@ -1,72 +1,6 @@ -export * from './deletePlanOnlyTeam'; -export * from './updatePlanOnlyTeam'; -export * from './getPlanOnlyTeam'; -export * from './createPlanOnlyTeam'; -export * from './removeAtlassianTeam'; -export * from './updateAtlassianTeam'; -export * from './getAtlassianTeam'; -export * from './addAtlassianTeam'; -export * from './getTeams'; -export * from './services'; -export * from './removeDefaultProjectClassification'; -export * from './updateDefaultProjectClassification'; -export * from './getDefaultProjectClassification'; -export * from './getProjectsByPriorityScheme'; -export * from './getPrioritiesByPriorityScheme'; -export * from './deletePriorityScheme'; -export * from './updatePriorityScheme'; -export * from './getAvailablePrioritiesByPriorityScheme'; -export * from './suggestedPrioritiesForMappings'; -export * from './createPriorityScheme'; -export * from './getPrioritySchemes'; -export * from './trashPlan'; -export * from './duplicatePlan'; -export * from './archivePlan'; -export * from './updatePlan'; -export * from './getPlan'; -export * from './createPlan'; -export * from './getPlans'; -export * from './deleteRelatedWork'; -export * from './updateRelatedWork'; -export * from './createRelatedWork'; -export * from './getRelatedWork'; -export * from './findComponentsForProjects'; -export * from './bulkMoveWorklogs'; -export * from './bulkDeleteWorklogs'; -export * from './searchAndReconsileIssuesUsingJqlPost'; -export * from './searchForIssuesIds'; -export * from './countIssues'; -export * from './getCreateIssueMetaIssueTypeId'; -export * from './getIssueLimitReport'; -export * from './getCreateIssueMetaIssueTypes'; -export * from './bulkFetchIssues'; -export * from './getBulkChangelogs'; -export * from './validateUpdateWorkflows'; -export * from './updateWorkflows'; -export * from './validateCreateWorkflows'; -export * from './createWorkflows'; -export * from './workflowCapabilities'; -export * from './readWorkflows'; -export * from './getPrecomputationsByID'; -export * from './getBulkOperationProgress'; -export * from './submitBulkTransition'; -export * from './getAvailableTransitions'; -export * from './submitBulkMove'; -export * from './submitBulkEdit'; -export * from './getBulkEditableFields'; -export * from './submitBulkDelete'; -export * from './getAllUserDataClassificationLevels'; -export * from './getResolution'; -export * from './deletePriority'; -export * from './getBulkScreenTabs'; -export * from './getNotificationSchemeForProject'; -export * from './updateWorkflowSchemeMappings'; -export * from './updateSchemes'; -export * from './readWorkflowSchemes'; -export * from './replaceCustomFieldOption'; -export * from './getCustomFieldsConfigurations'; -export * from './getPolicies'; +export * from './addNotifications'; export * from './addActorUsers'; +export * from './addAtlassianTeam'; export * from './addAttachment'; export * from './addComment'; export * from './addFieldToDefaultScreen'; @@ -87,6 +21,7 @@ export * from './analyseExpression'; export * from './appendMappingsForIssueTypeScreenScheme'; export * from './archiveIssues'; export * from './archiveIssuesAsync'; +export * from './archivePlan'; export * from './archiveProject'; export * from './assignFieldConfigurationSchemeToProject'; export * from './assignIssue'; @@ -97,16 +32,20 @@ export * from './assignProjectsToCustomFieldContext'; export * from './assignSchemeToProject'; export * from './associateSchemesToProjects'; export * from './bulkDeleteIssueProperty'; +export * from './bulkDeleteWorklogs'; export * from './bulkEditDashboards'; +export * from './bulkFetchIssues'; export * from './bulkGetGroups'; export * from './bulkGetUsers'; export * from './bulkGetUsersMigration'; +export * from './bulkMoveWorklogs'; export * from './bulkSetIssuePropertiesByIssue'; export * from './bulkSetIssueProperty'; export * from './bulkSetIssuesProperties'; export * from './cancelTask'; export * from './changeFilterOwner'; export * from './copyDashboard'; +export * from './countIssues'; export * from './createComponent'; export * from './createCustomField'; export * from './createCustomFieldContext'; @@ -129,11 +68,15 @@ export * from './createNotificationScheme'; export * from './createOrUpdateRemoteIssueLink'; export * from './createPermissionGrant'; export * from './createPermissionScheme'; +export * from './createPlan'; +export * from './createPlanOnlyTeam'; export * from './createPriority'; +export * from './createPriorityScheme'; export * from './createProject'; export * from './createProjectAvatar'; export * from './createProjectCategory'; export * from './createProjectRole'; +export * from './createRelatedWork'; export * from './createResolution'; export * from './createScreen'; export * from './createScreenScheme'; @@ -142,6 +85,7 @@ export * from './createUiModification'; export * from './createUser'; export * from './createVersion'; export * from './createWorkflow'; +export * from './createWorkflows'; export * from './createWorkflowScheme'; export * from './createWorkflowSchemeDraftFromParent'; export * from './createWorkflowTransitionProperty'; @@ -178,12 +122,16 @@ export * from './deleteIssueTypeScreenScheme'; export * from './deleteNotificationScheme'; export * from './deletePermissionScheme'; export * from './deletePermissionSchemeEntity'; +export * from './deletePlanOnlyTeam'; +export * from './deletePriority'; +export * from './deletePriorityScheme'; export * from './deleteProject'; export * from './deleteProjectAsynchronously'; export * from './deleteProjectAvatar'; export * from './deleteProjectProperty'; export * from './deleteProjectRole'; export * from './deleteProjectRoleActorsFromRole'; +export * from './deleteRelatedWork'; export * from './deleteRemoteIssueLinkByGlobalId'; export * from './deleteRemoteIssueLinkById'; export * from './deleteResolution'; @@ -206,6 +154,7 @@ export * from './deleteWorkflowTransitionRuleConfigurations'; export * from './deleteWorklog'; export * from './deleteWorklogProperty'; export * from './doTransition'; +export * from './duplicatePlan'; export * from './editIssue'; export * from './evaluateJiraExpression'; export * from './evaluateJiraExpressionUsingEnhancedSearch'; @@ -214,6 +163,7 @@ export * from './expandAttachmentForMachines'; export * from './exportArchivedIssues'; export * from './findAssignableUsers'; export * from './findBulkAssignableUsers'; +export * from './findComponentsForProjects'; export * from './findGroups'; export * from './findUserKeysByQuery'; export * from './findUsers'; @@ -239,6 +189,7 @@ export * from './getAllScreenTabFields'; export * from './getAllScreenTabs'; export * from './getAllStatuses'; export * from './getAllSystemAvatars'; +export * from './getAllUserDataClassificationLevels'; export * from './getAllUsers'; export * from './getAllUsersDefault'; export * from './getAllWorkflowSchemes'; @@ -246,17 +197,24 @@ export * from './getAlternativeIssueTypes'; export * from './getApplicationProperty'; export * from './getApplicationRole'; export * from './getAssignedPermissionScheme'; +export * from './getAtlassianTeam'; export * from './getAttachment'; export * from './getAttachmentContent'; export * from './getAttachmentThumbnail'; export * from './getAuditRecords'; export * from './getAutoCompletePost'; +export * from './getAvailablePrioritiesByPriorityScheme'; export * from './getAvailableScreenFields'; +export * from './getAvailableTransitions'; export * from './getAvatarImageByID'; export * from './getAvatarImageByOwner'; export * from './getAvatarImageByType'; export * from './getAvatars'; +export * from './getBulkChangelogs'; +export * from './getBulkEditableFields'; +export * from './getBulkOperationProgress'; export * from './getBulkPermissions'; +export * from './getBulkScreenTabs'; export * from './getChangeLogs'; export * from './getChangeLogsByIds'; export * from './getColumns'; @@ -269,14 +227,18 @@ export * from './getComponent'; export * from './getComponentRelatedIssues'; export * from './getContextsForField'; export * from './getCreateIssueMeta'; +export * from './getCreateIssueMetaIssueTypeId'; +export * from './getCreateIssueMetaIssueTypes'; export * from './getCurrentUser'; export * from './getCustomFieldConfiguration'; export * from './getCustomFieldContextsForProjectsAndIssueTypes'; export * from './getCustomFieldOption'; +export * from './getCustomFieldsConfigurations'; export * from './getDashboard'; export * from './getDashboardItemProperty'; export * from './getDashboardItemPropertyKeys'; export * from './getDashboardsPaginated'; +export * from './getDefaultProjectClassification'; export * from './getDefaultValues'; export * from './getDefaultWorkflow'; export * from './getDraftDefaultWorkflow'; @@ -298,6 +260,7 @@ export * from './getIdsOfWorklogsDeletedSince'; export * from './getIdsOfWorklogsModifiedSince'; export * from './getIssue'; export * from './getIssueFieldOption'; +export * from './getIssueLimitReport'; export * from './getIssueLink'; export * from './getIssueLinkType'; export * from './getIssuePickerResource'; @@ -322,6 +285,7 @@ export * from './getIsWatchingIssueBulk'; export * from './getMyFilters'; export * from './getMyPermissions'; export * from './getNotificationScheme'; +export * from './getNotificationSchemeForProject'; export * from './getNotificationSchemes'; export * from './getNotificationSchemeToProjectMappings'; export * from './getOptionsForContext'; @@ -329,9 +293,16 @@ export * from './getPermissionScheme'; export * from './getPermissionSchemeGrant'; export * from './getPermissionSchemeGrants'; export * from './getPermittedProjects'; +export * from './getPlan'; +export * from './getPlanOnlyTeam'; +export * from './getPlans'; +export * from './getPolicies'; export * from './getPrecomputations'; +export * from './getPrecomputationsByID'; export * from './getPreference'; +export * from './getPrioritiesByPriorityScheme'; export * from './getPriority'; +export * from './getPrioritySchemes'; export * from './getProject'; export * from './getProjectCategoryById'; export * from './getProjectComponents'; @@ -339,6 +310,7 @@ export * from './getProjectComponentsPaginated'; export * from './getProjectContextMapping'; export * from './getProjectEmail'; export * from './getProjectIssueSecurityScheme'; +export * from './getProjectIssueTypeUsagesForStatus'; export * from './getProjectProperty'; export * from './getProjectPropertyKeys'; export * from './getProjectRole'; @@ -346,13 +318,19 @@ export * from './getProjectRoleActorsForRole'; export * from './getProjectRoleById'; export * from './getProjectRoleDetails'; export * from './getProjectRoles'; +export * from './getProjectsByPriorityScheme'; export * from './getProjectsForIssueTypeScreenScheme'; export * from './getProjectTypeByKey'; +export * from './getProjectUsagesForStatus'; +export * from './getProjectUsagesForWorkflow'; +export * from './getProjectUsagesForWorkflowScheme'; export * from './getProjectVersions'; export * from './getProjectVersionsPaginated'; export * from './getRecent'; +export * from './getRelatedWork'; export * from './getRemoteIssueLinkById'; export * from './getRemoteIssueLinks'; +export * from './getResolution'; export * from './getScreens'; export * from './getScreenSchemes'; export * from './getScreensForField'; @@ -366,6 +344,7 @@ export * from './getStatus'; export * from './getStatusCategory'; export * from './getStatusesById'; export * from './getTask'; +export * from './getTeams'; export * from './getTransitions'; export * from './getTrashedFieldsPaginated'; export * from './getUiModifications'; @@ -385,14 +364,17 @@ export * from './getVersionUnresolvedIssues'; export * from './getVisibleIssueFieldOptions'; export * from './getVotes'; export * from './getWorkflow'; +export * from './getWorkflowProjectIssueTypeUsages'; export * from './getWorkflowScheme'; export * from './getWorkflowSchemeDraft'; export * from './getWorkflowSchemeDraftIssueType'; export * from './getWorkflowSchemeIssueType'; export * from './getWorkflowSchemeProjectAssociations'; +export * from './getWorkflowSchemeUsagesForWorkflow'; export * from './getWorkflowsPaginated'; export * from './getWorkflowTransitionProperties'; export * from './getWorkflowTransitionRuleConfigurations'; +export * from './getWorkflowUsagesForStatus'; export * from './getWorklog'; export * from './getWorklogProperty'; export * from './getWorklogPropertyKeys'; @@ -412,11 +394,15 @@ export * from './partialUpdateProjectRole'; export * from './publishDraftWorkflowScheme'; export * from './putAddonProperty'; export * from './putAppProperty'; +export * from './readWorkflows'; +export * from './readWorkflowSchemes'; export * from './refreshWebhooks'; export * from './registerDynamicWebhooks'; export * from './registerModules'; +export * from './removeAtlassianTeam'; export * from './removeAttachment'; export * from './removeCustomFieldContextFromProjects'; +export * from './removeDefaultProjectClassification'; export * from './removeGadget'; export * from './removeGroup'; export * from './removeIssueTypeFromIssueTypeScheme'; @@ -437,6 +423,7 @@ export * from './removeWatcher'; export * from './renameScreenTab'; export * from './reorderCustomFieldOptions'; export * from './reorderIssueTypesInIssueTypeScheme'; +export * from './replaceCustomFieldOption'; export * from './replaceIssueFieldOption'; export * from './resetColumns'; export * from './resetUserColumns'; @@ -444,16 +431,20 @@ export * from './restore'; export * from './restoreCustomField'; export * from './sanitiseJqlQueries'; export * from './search'; +export * from './searchAndReconsileIssuesUsingJqlPost'; +export * from './searchForIssuesIds'; export * from './searchForIssuesUsingJql'; export * from './searchForIssuesUsingJqlEnhancedSearch'; -export * from './searchForIssuesUsingJqlPost'; export * from './searchForIssuesUsingJqlEnhancedSearchPost'; +export * from './searchForIssuesUsingJqlPost'; export * from './searchPriorities'; export * from './searchProjects'; export * from './searchProjectsUsingSecuritySchemes'; export * from './searchResolutions'; export * from './searchSecuritySchemes'; +export * from './searchWorkflows'; export * from './selectTimeTrackingImplementation'; +export * from './services'; export * from './setActors'; export * from './setApplicationProperty'; export * from './setBanner'; @@ -478,9 +469,16 @@ export * from './setWorkflowSchemeDraftIssueType'; export * from './setWorkflowSchemeIssueType'; export * from './setWorklogProperty'; export * from './storeAvatar'; +export * from './submitBulkDelete'; +export * from './submitBulkEdit'; +export * from './submitBulkMove'; +export * from './submitBulkTransition'; +export * from './suggestedPrioritiesForMappings'; export * from './toggleFeatureForProject'; export * from './trashCustomField'; +export * from './trashPlan'; export * from './unarchiveIssues'; +export * from './updateAtlassianTeam'; export * from './updateComment'; export * from './updateComponent'; export * from './updateCustomField'; @@ -489,6 +487,7 @@ export * from './updateCustomFieldContext'; export * from './updateCustomFieldOption'; export * from './updateCustomFieldValue'; export * from './updateDashboard'; +export * from './updateDefaultProjectClassification'; export * from './updateDefaultScreenScheme'; export * from './updateDefaultWorkflow'; export * from './updateDraftDefaultWorkflow'; @@ -509,14 +508,19 @@ export * from './updateIssueTypeScreenScheme'; export * from './updateMultipleCustomFieldValues'; export * from './updateNotificationScheme'; export * from './updatePermissionScheme'; +export * from './updatePlan'; +export * from './updatePlanOnlyTeam'; export * from './updatePrecomputations'; export * from './updatePriority'; +export * from './updatePriorityScheme'; export * from './updateProject'; export * from './updateProjectAvatar'; export * from './updateProjectCategory'; export * from './updateProjectEmail'; +export * from './updateRelatedWork'; export * from './updateRemoteIssueLink'; export * from './updateResolution'; +export * from './updateSchemes'; export * from './updateScreen'; export * from './updateScreenScheme'; export * from './updateSecurityLevel'; @@ -524,10 +528,15 @@ export * from './updateStatuses'; export * from './updateUiModification'; export * from './updateVersion'; export * from './updateWorkflowMapping'; +export * from './updateWorkflows'; export * from './updateWorkflowScheme'; export * from './updateWorkflowSchemeDraft'; +export * from './updateWorkflowSchemeMappings'; export * from './updateWorkflowTransitionProperty'; export * from './updateWorkflowTransitionRuleConfigurations'; export * from './updateWorklog'; +export * from './validateCreateWorkflows'; export * from './validateProjectKey'; +export * from './validateUpdateWorkflows'; +export * from './workflowCapabilities'; export * from './workflowRuleSearch'; diff --git a/src/version3/parameters/removeUser.ts b/src/version3/parameters/removeUser.ts index 9a94e575a..0cb0db148 100644 --- a/src/version3/parameters/removeUser.ts +++ b/src/version3/parameters/removeUser.ts @@ -5,15 +5,15 @@ export interface RemoveUser { */ accountId: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ username?: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ key?: string; } diff --git a/src/version3/parameters/resetUserColumns.ts b/src/version3/parameters/resetUserColumns.ts index db5e05007..55e573ad2 100644 --- a/src/version3/parameters/resetUserColumns.ts +++ b/src/version3/parameters/resetUserColumns.ts @@ -5,9 +5,9 @@ export interface ResetUserColumns { */ accountId?: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ username?: string; } diff --git a/src/version3/parameters/searchPriorities.ts b/src/version3/parameters/searchPriorities.ts index 64c81ab36..7ad7be970 100644 --- a/src/version3/parameters/searchPriorities.ts +++ b/src/version3/parameters/searchPriorities.ts @@ -1,8 +1,8 @@ export interface SearchPriorities { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=2&id=3`. */ id?: string[]; /** diff --git a/src/version3/parameters/searchProjectsUsingSecuritySchemes.ts b/src/version3/parameters/searchProjectsUsingSecuritySchemes.ts index 6e2ee0702..ba08b5778 100644 --- a/src/version3/parameters/searchProjectsUsingSecuritySchemes.ts +++ b/src/version3/parameters/searchProjectsUsingSecuritySchemes.ts @@ -1,8 +1,8 @@ export interface SearchProjectsUsingSecuritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of security scheme IDs to be filtered out. */ issueSecuritySchemeId?: string[]; /** The list of project IDs to be filtered out. */ diff --git a/src/version3/parameters/searchSecuritySchemes.ts b/src/version3/parameters/searchSecuritySchemes.ts index eb6b6edc6..df7dae957 100644 --- a/src/version3/parameters/searchSecuritySchemes.ts +++ b/src/version3/parameters/searchSecuritySchemes.ts @@ -1,8 +1,8 @@ export interface SearchSecuritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security scheme IDs. To include multiple issue security scheme IDs, separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version3/parameters/searchWorkflows.ts b/src/version3/parameters/searchWorkflows.ts new file mode 100644 index 000000000..c58c10c39 --- /dev/null +++ b/src/version3/parameters/searchWorkflows.ts @@ -0,0 +1,37 @@ +export interface SearchWorkflows { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * - `values.transitions` Returns the transitions that each workflow is associated with. + */ + expand?: 'values.transitions' | string; + /** String used to perform a case-insensitive partial match with workflow name. */ + queryString?: string; + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * + * - `name` Sorts by workflow name. + * - `created` Sorts by create time. + * - `updated` Sorts by update time. + */ + orderBy?: + | 'name' + | 'created' + | 'updated' + | '+name' + | '+created' + | '+updated' + | '-name' + | '-created' + | '-updated' + | string; + /** The scope of the workflow. Global for company-managed projects and Project for team-managed projects. */ + scope?: string; + /** Filters active and inactive workflows. */ + isActive?: boolean; +} diff --git a/src/version3/status.ts b/src/version3/status.ts index 5a5e0ec72..6cf82f415 100644 --- a/src/version3/status.ts +++ b/src/version3/status.ts @@ -6,7 +6,6 @@ import { RequestConfig } from '../requestConfig'; export class Status { constructor(private client: Client) {} - /** * Returns a list of the statuses specified by one or more status IDs. * @@ -16,7 +15,7 @@ export class Status { * - _Administer Jira_ [project permission.](https://confluence.atlassian.com/x/yodKLg) */ async getStatusesById( - parameters: Parameters.GetStatusesById | string, + parameters: Parameters.GetStatusesById, callback: Callback, ): Promise; /** @@ -27,28 +26,22 @@ export class Status { * - _Administer projects_ [project permission.](https://confluence.atlassian.com/x/yodKLg) * - _Administer Jira_ [project permission.](https://confluence.atlassian.com/x/yodKLg) */ + async getStatusesById(parameters: Parameters.GetStatusesById, callback?: never): Promise; async getStatusesById( - parameters: Parameters.GetStatusesById | string, - callback?: never, - ): Promise; - async getStatusesById( - parameters: Parameters.GetStatusesById | string, + parameters: Parameters.GetStatusesById, callback?: Callback, ): Promise { - const id = typeof parameters === 'string' ? parameters : parameters.id; - const config: RequestConfig = { url: '/rest/api/3/statuses', method: 'GET', params: { - id, - expand: typeof parameters !== 'string' && parameters.expand, + expand: parameters.expand, + id: parameters.id, }, }; return this.client.sendRequest(config, callback); } - /** * Creates statuses for a global or project scope. * @@ -58,7 +51,7 @@ export class Status { * - _Administer Jira_ [project permission.](https://confluence.atlassian.com/x/yodKLg) */ async createStatuses( - parameters: Parameters.CreateStatuses, + parameters: Parameters.CreateStatuses | undefined, callback: Callback, ): Promise; /** @@ -69,23 +62,22 @@ export class Status { * - _Administer projects_ [project permission.](https://confluence.atlassian.com/x/yodKLg) * - _Administer Jira_ [project permission.](https://confluence.atlassian.com/x/yodKLg) */ - async createStatuses(parameters: Parameters.CreateStatuses, callback?: never): Promise; + async createStatuses(parameters?: Parameters.CreateStatuses, callback?: never): Promise; async createStatuses( - parameters: Parameters.CreateStatuses, + parameters?: Parameters.CreateStatuses, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/statuses', method: 'POST', data: { - scope: parameters.scope, - statuses: parameters.statuses, + scope: parameters?.scope, + statuses: parameters?.statuses, }, }; return this.client.sendRequest(config, callback); } - /** * Updates statuses by ID. * @@ -94,7 +86,10 @@ export class Status { * - _Administer projects_ [project permission.](https://confluence.atlassian.com/x/yodKLg) * - _Administer Jira_ [project permission.](https://confluence.atlassian.com/x/yodKLg) */ - async updateStatuses(parameters: Parameters.UpdateStatuses, callback: Callback): Promise; + async updateStatuses( + parameters: Parameters.UpdateStatuses | undefined, + callback: Callback, + ): Promise; /** * Updates statuses by ID. * @@ -103,19 +98,18 @@ export class Status { * - _Administer projects_ [project permission.](https://confluence.atlassian.com/x/yodKLg) * - _Administer Jira_ [project permission.](https://confluence.atlassian.com/x/yodKLg) */ - async updateStatuses(parameters: Parameters.UpdateStatuses, callback?: never): Promise; - async updateStatuses(parameters: Parameters.UpdateStatuses, callback?: Callback): Promise { + async updateStatuses(parameters?: Parameters.UpdateStatuses, callback?: never): Promise; + async updateStatuses(parameters?: Parameters.UpdateStatuses, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/3/statuses', method: 'PUT', data: { - statuses: parameters.statuses, + statuses: parameters?.statuses, }, }; return this.client.sendRequest(config, callback); } - /** * Deletes statuses by ID. * @@ -124,10 +118,7 @@ export class Status { * - _Administer projects_ [project permission.](https://confluence.atlassian.com/x/yodKLg) * - _Administer Jira_ [project permission.](https://confluence.atlassian.com/x/yodKLg) */ - async deleteStatusesById( - parameters: Parameters.DeleteStatusesById | string, - callback: Callback, - ): Promise; + async deleteStatusesById(parameters: Parameters.DeleteStatusesById, callback: Callback): Promise; /** * Deletes statuses by ID. * @@ -136,24 +127,21 @@ export class Status { * - _Administer projects_ [project permission.](https://confluence.atlassian.com/x/yodKLg) * - _Administer Jira_ [project permission.](https://confluence.atlassian.com/x/yodKLg) */ - async deleteStatusesById(parameters: Parameters.DeleteStatusesById | string, callback?: never): Promise; + async deleteStatusesById(parameters: Parameters.DeleteStatusesById, callback?: never): Promise; async deleteStatusesById( - parameters: Parameters.DeleteStatusesById | string, + parameters: Parameters.DeleteStatusesById, callback?: Callback, ): Promise { - const id = typeof parameters === 'string' ? parameters : parameters.id; - const config: RequestConfig = { url: '/rest/api/3/statuses', method: 'DELETE', params: { - id, + id: parameters.id, }, }; return this.client.sendRequest(config, callback); } - /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of * statuses that match a search on name or project. @@ -191,6 +179,83 @@ export class Status { }, }; + return this.client.sendRequest(config, callback); + } + /** Returns a page of issue types in a project using a given status. */ + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of issue types in a project using a given status. */ + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback?: never, + ): Promise; + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/statuses/${parameters.statusId}/project/${parameters.projectId}/issueTypeUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of projects using a given status. */ + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given status. */ + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback?: never, + ): Promise; + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/statuses/${parameters.statusId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of workflows using a given status. */ + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of workflows using a given status. */ + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback?: never, + ): Promise; + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/statuses/${parameters.statusId}/workflowUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + return this.client.sendRequest(config, callback); } } diff --git a/src/version3/users.ts b/src/version3/users.ts index 1e4d017f2..523c21c3f 100644 --- a/src/version3/users.ts +++ b/src/version3/users.ts @@ -18,7 +18,7 @@ export class Users { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUser(parameters: Parameters.GetUser | undefined, callback: Callback): Promise; + async getUser(parameters: Parameters.GetUser, callback: Callback): Promise; /** * Returns a user. * @@ -29,16 +29,16 @@ export class Users { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUser(parameters?: Parameters.GetUser, callback?: never): Promise; - async getUser(parameters?: Parameters.GetUser, callback?: Callback): Promise { + async getUser(parameters: Parameters.GetUser, callback?: never): Promise; + async getUser(parameters: Parameters.GetUser, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/3/user', method: 'GET', params: { - accountId: parameters?.accountId, - username: parameters?.username, - key: parameters?.key, - expand: parameters?.expand, + accountId: parameters.accountId, + username: parameters.username, + key: parameters.key, + expand: parameters.expand, }, }; @@ -234,44 +234,31 @@ export class Users { * is not passed, the calling user's default columns are set. If no column details are sent, then all default columns * are removed. * - * The parameters for this resource are expressed as HTML form data. For example, in curl: - * - * `curl -X PUT -d columns=summary -d columns=description - * https://your-domain.atlassian.net/rest/api/3/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * - Permission to access Jira, to set the calling user's columns. */ - async setUserColumns( - parameters: Parameters.SetUserColumns | undefined, - callback: Callback, - ): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns, callback: Callback): Promise; /** * Sets the default [ issue table columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If an account ID * is not passed, the calling user's default columns are set. If no column details are sent, then all default columns * are removed. * - * The parameters for this resource are expressed as HTML form data. For example, in curl: - * - * `curl -X PUT -d columns=summary -d columns=description - * https://your-domain.atlassian.net/rest/api/3/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * - Permission to access Jira, to set the calling user's columns. */ - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: never): Promise; - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: Callback): Promise { + async setUserColumns(parameters: Parameters.SetUserColumns, callback?: never): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/3/user/columns', method: 'PUT', params: { - accountId: parameters?.accountId, + accountId: parameters.accountId, }, - data: parameters?.columns, + data: parameters.columns, }; return this.client.sendRequest(config, callback); diff --git a/src/version3/workflowSchemes.ts b/src/version3/workflowSchemes.ts index 4cd18fb25..4811b7ed0 100644 --- a/src/version3/workflowSchemes.ts +++ b/src/version3/workflowSchemes.ts @@ -101,7 +101,7 @@ export class WorkflowSchemes { * - _Administer projects_ project permissions to access project-scoped workflow schemes */ async readWorkflowSchemes( - parameters: Parameters.ReadWorkflowSchemes | undefined, + parameters: Parameters.ReadWorkflowSchemes, callback: Callback, ): Promise; /** @@ -113,19 +113,19 @@ export class WorkflowSchemes { * - _Administer projects_ project permissions to access project-scoped workflow schemes */ async readWorkflowSchemes( - parameters?: Parameters.ReadWorkflowSchemes, + parameters: Parameters.ReadWorkflowSchemes, callback?: never, ): Promise; async readWorkflowSchemes( - parameters?: Parameters.ReadWorkflowSchemes, + parameters: Parameters.ReadWorkflowSchemes, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/workflowscheme/read', method: 'POST', data: { - projectIds: parameters?.projectIds, - workflowSchemeIds: parameters?.workflowSchemeIds, + projectIds: parameters.projectIds, + workflowSchemeIds: parameters.workflowSchemeIds, }, }; @@ -721,4 +721,30 @@ export class WorkflowSchemes { return this.client.sendRequest(config, callback); } + + /** Returns a page of projects using a given workflow scheme. */ + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given workflow scheme. */ + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback?: never, + ): Promise; + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/workflowscheme/${parameters.workflowSchemeId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version3/workflows.ts b/src/version3/workflows.ts index ce30980b5..eaccfee54 100644 --- a/src/version3/workflows.ts +++ b/src/version3/workflows.ts @@ -144,6 +144,84 @@ export class Workflows { return this.client.sendRequest(config, callback); } + /** Returns a page of issue types using a given workflow within a project. */ + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback: Callback, + ): Promise; + /** Returns a page of issue types using a given workflow within a project. */ + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback?: never, + ): Promise; + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/workflow/${parameters.workflowId}/project/${parameters.projectId}/issueTypeUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of projects using a given workflow. */ + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given workflow. */ + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback?: never, + ): Promise; + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/workflow/${parameters.workflowId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of workflow schemes using a given workflow. */ + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback: Callback, + ): Promise; + /** Returns a page of workflow schemes using a given workflow. */ + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback?: never, + ): Promise; + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/workflow/${parameters.workflowId}/workflowSchemes`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns a list of workflows and related statuses by providing workflow names, workflow IDs, or project and issue * types. @@ -320,6 +398,57 @@ export class Workflows { return this.client.sendRequest(config, callback); } + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of global + * and project workflows. If workflow names are specified in query string, details of those workflows are returned. + * Otherwise, all workflows are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async searchWorkflows( + parameters: Parameters.SearchWorkflows | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of global + * and project workflows. If workflow names are specified in query string, details of those workflows are returned. + * Otherwise, all workflows are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async searchWorkflows( + parameters?: Parameters.SearchWorkflows, + callback?: never, + ): Promise; + async searchWorkflows( + parameters?: Parameters.SearchWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflows/search', + method: 'GET', + params: { + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + expand: parameters?.expand, + queryString: parameters?.queryString, + orderBy: parameters?.orderBy, + scope: parameters?.scope, + isActive: parameters?.isActive, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Update workflows and related statuses. * diff --git a/tests/unit/version2/issueSearch.test.ts b/tests/unit/version2/issueSearch.test.ts index 840cadbfb..7ff24a817 100644 --- a/tests/unit/version2/issueSearch.test.ts +++ b/tests/unit/version2/issueSearch.test.ts @@ -12,7 +12,9 @@ test('searchForIssuesUsingJql should calls without parameters', ({ expect }) => const client = new Version2Client(config); const sendRequestStub = sinon.stub(client, 'sendRequest'); - client.issueSearch.searchForIssuesUsingJql(); + client.issueSearch.searchForIssuesUsingJql({ + jql: '', + }); expect(sendRequestStub.calledOnce).toBeTruthy(); }); @@ -33,6 +35,7 @@ test('searchForIssuesUsingJql should accept follow parameters', ({ expect }) => expect(callArgument.params).toStrictEqual({ expand: undefined, + failFast: undefined, fields: ['key', 'summary'], fieldsByKeys: undefined, jql: 'id IN (TICKET_ID) ORDER BY key ASC', @@ -72,7 +75,7 @@ test('searchForIssuesUsingJqlEnhancedSearch should calls without parameters', ({ const client = new Version2Client(config); const sendRequestStub = sinon.stub(client, 'sendRequest'); - client.issueSearch.searchForIssuesUsingJqlEnhancedSearch(); + client.issueSearch.searchForIssuesUsingJqlEnhancedSearch({}); expect(sendRequestStub.calledOnce).toBeTruthy(); }); diff --git a/tests/unit/version2/jiraExpressions.test.ts b/tests/unit/version2/jiraExpressions.test.ts index a4e0f3ae5..94a374c2a 100644 --- a/tests/unit/version2/jiraExpressions.test.ts +++ b/tests/unit/version2/jiraExpressions.test.ts @@ -12,7 +12,9 @@ test('evaluateJiraExpressionUsingEnhancedSearch should calls without parameters' const client = new Version2Client(config); const sendRequestStub = sinon.stub(client, 'sendRequest'); - client.jiraExpressions.evaluateJiraExpressionUsingEnhancedSearch(); + client.jiraExpressions.evaluateJiraExpressionUsingEnhancedSearch({ + expression: '', + }); expect(sendRequestStub.calledOnce).toBeTruthy(); }); diff --git a/tests/unit/version2/projectVersions.test.ts b/tests/unit/version2/projectVersions.test.ts index b60f9201e..1d3caf552 100644 --- a/tests/unit/version2/projectVersions.test.ts +++ b/tests/unit/version2/projectVersions.test.ts @@ -73,8 +73,10 @@ test('createVersion should accept follow parameters', ({ expect }) => { const callArgument = sendRequestStub.getCall(0).args[0]; expect(callArgument.data).toStrictEqual({ + approvers: undefined, archived: undefined, description: undefined, + driver: undefined, expand: undefined, id: undefined, issuesStatusForFixVersion: undefined, diff --git a/tests/unit/version3/issueSearch.test.ts b/tests/unit/version3/issueSearch.test.ts index 78d40e979..28b582c3e 100644 --- a/tests/unit/version3/issueSearch.test.ts +++ b/tests/unit/version3/issueSearch.test.ts @@ -35,8 +35,8 @@ test('searchForIssuesUsingJql should accept follow parameters', ({ expect }) => expect(callArgument.params).toStrictEqual({ expand: undefined, - fields: ['key', 'summary'], failFast: undefined, + fields: ['key', 'summary'], fieldsByKeys: undefined, jql: 'id IN (TICKET_ID) ORDER BY key ASC', maxResults: 10,